1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

[InstCombine] add test for wrong icmp constant (PR27792)

The code fix for this was checked in at r269797.

llvm-svn: 269803
This commit is contained in:
Sanjay Patel 2016-05-17 19:25:55 +00:00
parent 51308d7c2b
commit 332b22fe5c

View File

@ -2097,3 +2097,15 @@ if.then3: ; preds = %if.end
return: ; preds = %if.end, %entry, %if.then3
ret void
}
; When canonicalizing to 'sgt', make sure the constant is correct.
define i1 @PR27792(i128 %a) {
; CHECK-LABEL: @PR27792(
; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i128 %a, -1
; CHECK-NEXT: ret i1 [[CMP]]
;
%cmp = icmp sge i128 %a, 0
ret i1 %cmp
}