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