diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-28 21:27:49 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-28 21:27:49 +0000 |
commit | fc2599f186c1f409a21b5970af4b4dd4d1735c6c (patch) | |
tree | b9927640475c7de298c1b09be05b65350f811452 /test/Transforms | |
parent | 2f101e83b29700b89f1ba3863288de1db0840c90 (diff) | |
download | external_llvm-fc2599f186c1f409a21b5970af4b4dd4d1735c6c.zip external_llvm-fc2599f186c1f409a21b5970af4b4dd4d1735c6c.tar.gz external_llvm-fc2599f186c1f409a21b5970af4b4dd4d1735c6c.tar.bz2 |
Add a test that large offsets on GEPs on 32 bits targets are handled correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstSimplify/compare.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/compare.ll b/test/Transforms/InstSimplify/compare.ll index 83705aa..abb3869 100644 --- a/test/Transforms/InstSimplify/compare.ll +++ b/test/Transforms/InstSimplify/compare.ll @@ -729,3 +729,13 @@ define i1 @non_inbounds_gep_compare(i64* %a) { 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 +} |