mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[InstCombine][test] add tests for icmp simplify miscompile (PR50944); NFC
This commit is contained in:
parent
c26c170592
commit
01dbad81cc
@ -3930,3 +3930,23 @@ bb:
|
||||
%i3 = icmp eq i32 %i, %i2
|
||||
ret i1 %i3
|
||||
}
|
||||
|
||||
; PR50944
|
||||
|
||||
define i1 @thread_cmp_over_select_with_poison_trueval(i1 %b) {
|
||||
; CHECK-LABEL: @thread_cmp_over_select_with_poison_trueval(
|
||||
; CHECK-NEXT: ret i1 poison
|
||||
;
|
||||
%s = select i1 %b, i32 poison, i32 0
|
||||
%tobool = icmp ne i32 %s, 0
|
||||
ret i1 %tobool
|
||||
}
|
||||
|
||||
define i1 @thread_cmp_over_select_with_poison_falseval(i1 %b) {
|
||||
; CHECK-LABEL: @thread_cmp_over_select_with_poison_falseval(
|
||||
; CHECK-NEXT: ret i1 poison
|
||||
;
|
||||
%s = select i1 %b, i32 1, i32 poison
|
||||
%tobool = icmp ne i32 %s, 0
|
||||
ret i1 %tobool
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user