[PATCH] [SeparateConstOffsetFromGEP] make two tests more strict
Jingyue Wu
jingyue at google.com
Fri Jun 6 16:10:32 PDT 2014
Hi eliben, meheff,
inbounds are not necessary in these two tests. zext(a +nuw b) = zext(a) +
zext(b) should hold with or without inbounds.
http://reviews.llvm.org/D4051
Files:
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll
Index: test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll
===================================================================
--- test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll
+++ test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll
@@ -74,15 +74,15 @@
%3 = add nsw i32 %b, 2
%4 = sext i32 %3 to i48
%5 = zext i48 %4 to i64 ; zext(sext(a +nsw 2)) != zext(sext(a)) + 2
- %p1 = getelementptr inbounds [32 x [32 x float]]* @float_2d_array, i64 0, i64 %2, i64 %5
+ %p1 = getelementptr [32 x [32 x float]]* @float_2d_array, i64 0, i64 %2, i64 %5
store float* %p1, float** %out1
%6 = add nuw i32 %a, 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
%10 = zext i32 %9 to i48
%11 = sext i48 %10 to i64 ; sext(zext(b +nsw 4)) != zext(b) + 4
- %p2 = getelementptr inbounds [32 x [32 x float]]* @float_2d_array, i64 0, i64 %8, i64 %11
+ %p2 = getelementptr [32 x [32 x float]]* @float_2d_array, i64 0, i64 %8, i64 %11
store float* %p2, float** %out2
ret void
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4051.10197.patch
Type: text/x-patch
Size: 1109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140606/62581cf8/attachment.bin>
More information about the llvm-commits
mailing list