forked from OSchip/llvm-project
[NewGVN][NFC] add poison tests
This commit is contained in:
parent
5a2020d069
commit
42a761e57c
|
@ -41,3 +41,29 @@ define i8 @simplify_add_poison(i8 %x) {
|
|||
%r = add i8 poison, %x
|
||||
ret i8 %r
|
||||
}
|
||||
|
||||
define i8 @simplify_xor_poison(i8 %x) {
|
||||
; CHECK-LABEL: @simplify_xor_poison(
|
||||
; CHECK-NEXT: [[R:%.*]] = xor i8 poison, [[X:%.*]]
|
||||
; CHECK-NEXT: ret i8 [[R]]
|
||||
;
|
||||
%r = xor i8 poison, %x
|
||||
ret i8 %r
|
||||
}
|
||||
|
||||
define i8 @simplify_sdiv_poison(i8 %x) {
|
||||
; CHECK-LABEL: @simplify_sdiv_poison(
|
||||
; CHECK-NEXT: ret i8 poison
|
||||
;
|
||||
%r = sdiv i8 poison, %x
|
||||
ret i8 %r
|
||||
}
|
||||
|
||||
define i8 @simplify_urem_poison(i8 %x) {
|
||||
; CHECK-LABEL: @simplify_urem_poison(
|
||||
; CHECK-NEXT: [[R:%.*]] = urem i8 [[X:%.*]], poison
|
||||
; CHECK-NEXT: ret i8 [[R]]
|
||||
;
|
||||
%r = urem i8 %x, poison
|
||||
ret i8 %r
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue