[PATCH] [SeparateConstOffsetFromGEP] make two tests more strict

Mark Heffernan meheff at google.com
Sun Jun 8 10:00:18 PDT 2014


================
Comment at: test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll:76
@@ -75,2 +75,3 @@
   %4 = sext i32 %3 to i48
   %5 = zext i48 %4 to i64    ; zext(sext(a +nsw 2)) != zext(sext(a)) + 2
+  %p1 = getelementptr [32 x [32 x float]]* @float_2d_array, i64 0, i64 %2, i64 %5
----------------
nit: in the comment the variable is a, in the code it is b.

================
Comment at: test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll:81
@@ -80,3 +80,3 @@
   %7 = zext i32 %6 to i48
   %8 = sext i48 %7 to i64 ; sext(zext(b +nuw 3)) = zext(b +nuw 3) = zext(b) + 3
   %9 = add nsw i32 %b, 4
----------------
same here: a/b mismatch.

http://reviews.llvm.org/D4051






More information about the llvm-commits mailing list