[InstSimplify] add test for fdiv signbit; NFC

This commit is contained in:
Sanjay Patel 2020-06-21 08:18:24 -04:00
parent cddc9993ea
commit 97c0232621
1 changed files with 11 additions and 0 deletions

View File

@ -203,6 +203,17 @@ define i1 @orderedLessZeroTree(float,float,float,float) {
ret i1 %uge
}
define i1 @orderedLessZero_fdiv(float %x) {
; CHECK-LABEL: @orderedLessZero_fdiv(
; CHECK-NEXT: [[D:%.*]] = fdiv float [[X:%.*]], [[X]]
; CHECK-NEXT: [[UGE:%.*]] = fcmp uge float [[D]], 0.000000e+00
; CHECK-NEXT: ret i1 [[UGE]]
;
%d = fdiv float %x, %x
%uge = fcmp uge float %d, 0.0
ret i1 %uge
}
define i1 @orderedLessZeroExpExt(float) {
; CHECK-LABEL: @orderedLessZeroExpExt(
; CHECK-NEXT: ret i1 true