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
This commit is contained in:
Benjamin Kramer 2013-09-28 21:27:49 +00:00
parent 2f101e83b2
commit fc2599f186

View File

@ -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
}