1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 16:33:37 +01:00
llvm-mirror/test/Transforms/InstCombine/2007-09-05-EqualGEP.ll
Nick Lewycky 2f66503c0a When the two operands of an icmp are equal, there are five possible predicates
that would make the icmp true. Fixes PR1637.

llvm-svn: 41740
2007-09-06 01:10:22 +00:00

11 lines
252 B
LLVM

; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i1 true}
; PR1637
define i1 @f(i8* %arr) {
%X = getelementptr i8* %arr, i32 1
%Y = getelementptr i8* %arr, i32 1
%test = icmp uge i8* %X, %Y
ret i1 %test
}