[llvm] 97c0232 - [InstSimplify] add test for fdiv signbit; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 21 06:08:42 PDT 2020


Author: Sanjay Patel
Date: 2020-06-21T09:07:59-04:00
New Revision: 97c0232621a474b91d39a5882c5875be32f21640

URL: https://github.com/llvm/llvm-project/commit/97c0232621a474b91d39a5882c5875be32f21640
DIFF: https://github.com/llvm/llvm-project/commit/97c0232621a474b91d39a5882c5875be32f21640.diff

LOG: [InstSimplify] add test for fdiv signbit; NFC

Added: 
    

Modified: 
    llvm/test/Transforms/InstSimplify/floating-point-compare.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstSimplify/floating-point-compare.ll b/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
index c44ce6988b41..e5d5ffa0ff2a 100644
--- a/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
+++ b/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
@@ -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


        


More information about the llvm-commits mailing list