[llvm] r191628 - Add a test that large offsets on GEPs on 32 bits targets are handled correctly.

Benjamin Kramer benny.kra at googlemail.com
Sat Sep 28 14:27:50 PDT 2013


Author: d0k
Date: Sat Sep 28 16:27:49 2013
New Revision: 191628

URL: http://llvm.org/viewvc/llvm-project?rev=191628&view=rev
Log:
Add a test that large offsets on GEPs on 32 bits targets are handled correctly.

Modified:
    llvm/trunk/test/Transforms/InstSimplify/compare.ll

Modified: llvm/trunk/test/Transforms/InstSimplify/compare.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/compare.ll?rev=191628&r1=191627&r2=191628&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstSimplify/compare.ll (original)
+++ llvm/trunk/test/Transforms/InstSimplify/compare.ll Sat Sep 28 16:27:49 2013
@@ -729,3 +729,13 @@ define i1 @non_inbounds_gep_compare(i64*
   ret i1 %cmp
 ; CHECK-NEXT: ret i1 true
 }
+
+define i1 @non_inbounds_gep_compare2(i64* %a) {
+; CHECK-LABEL: @non_inbounds_gep_compare2(
+; Equality compares with non-inbounds GEPs can be folded.
+  %x = getelementptr i64* %a, i64 4294967297
+  %y = getelementptr i64* %a, i64 1
+  %cmp = icmp eq i64* %y, %y
+  ret i1 %cmp
+; CHECK-NEXT: ret i1 true
+}





More information about the llvm-commits mailing list