[PATCH] [GC] improve testing around gc.relocate and catch a bug

Ramkumar Ramachandra artagnon at gmail.com
Fri Jan 2 12:02:10 PST 2015


================
Comment at: lib/IR/Verifier.cpp:2734
@@ -2728,2 +2733,3 @@
     Assert1(0 <= BaseIndex &&
             BaseIndex < (int)StatepointCS.arg_size(),
+            "gc.relocate: statepoint base index out of bounds", &CI);
----------------
reames wrote:
> sanjoy wrote:
> > Might be cleaner to store the result of `getZExtValue()` in an `unsigned` instead.
> While Sanjoy's right, you'd don't need to fix my pre-existing style problems in your change.  :)
Actually, I copied that out from the gc_statepoint case code: would you like me to change the instances on lines 2624 and 2650 too, for consistency?

================
Comment at: test/CodeGen/X86/statepoint-stackmap-format.ll:30
@@ -30,2 +29,3 @@
+  %b = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32 %safepoint_token, i32 7, i32 7)
 ; 
   ret i1 %call1
----------------
sanjoy wrote:
> You had to make these changes because the original indices are out of range, right?
Technically, the original indices didn't fall within the 'gc parameters' section of the arguments: argument #3 reads `i32 2`, which means that '4' and '5' refer to the two following deopt parameters.

http://reviews.llvm.org/D6824

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list