8179953: [ppc] TLABWasteIncrement not loaded correctly

Also fix TestOptionWithRanges to show the bug.

Reviewed-by: dholmes, shade
diff --git a/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp b/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp
index 798ec3b..6886548 100644
--- a/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp
+++ b/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp
@@ -3720,7 +3720,7 @@
       __ bge(CCR0, Lslow_case);
 
       // Increment waste limit to prevent getting stuck on this slow path.
-      __ addi(RtlabWasteLimitValue, RtlabWasteLimitValue, (int)ThreadLocalAllocBuffer::refill_waste_limit_increment());
+      __ add_const_optimized(RtlabWasteLimitValue, RtlabWasteLimitValue, ThreadLocalAllocBuffer::refill_waste_limit_increment());
       __ std(RtlabWasteLimitValue, in_bytes(JavaThread::tlab_refill_waste_limit_offset()), R16_thread);
     }
     // else: No allocation in the shared eden. // fallthru: __ b(Lslow_case);
diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java
index b10ac75..20d8f7a 100644
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java
@@ -383,7 +383,11 @@
             runJava.add(VMType);
         }
 
-        if (GCType != null) {
+        if (GCType != null &&
+            !(prepend.contains("-XX:+UseConcMarkSweepGC") ||
+              prepend.contains("-XX:+UseSerialGC") ||
+              prepend.contains("-XX:+UseParallelGC") ||
+              prepend.contains("-XX:+UseG1GC"))) {
             runJava.add(GCType);
         }
 
diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
index 3c69456..f406a85 100644
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
@@ -242,6 +242,9 @@
                 option.addPrepend("-XX:SharedArchiveFile=TestOptionsWithRanges.jsa");
                 option.addPrepend("-Xshare:dump");
                 break;
+            case "TLABWasteIncrement":
+                option.addPrepend("-XX:+UseParallelGC");
+                break;
             default:
                 /* Do nothing */
                 break;