summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-05-07 22:58:31 +0000
committerSanjay Patel <spatel@rotateright.com>2019-05-07 22:58:31 +0000
commite088d03b9c8b25589bbf35545399ae28a34df182 (patch)
treeee6008603c4b897a1b38cd1d5990b3cf413f32b9 /llvm/test
parent0d8ae1e3435accab5130d71dfc872507043ca4f1 (diff)
downloadbcm5719-llvm-e088d03b9c8b25589bbf35545399ae28a34df182.tar.gz
bcm5719-llvm-e088d03b9c8b25589bbf35545399ae28a34df182.zip
[ValueTracking] add logic for known-never-nan with minnum/maxnum
From the LangRef: "Returns NaN only if both operands are NaN." llvm-svn: 360206
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstSimplify/floating-point-compare.ll8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstSimplify/floating-point-compare.ll b/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
index a2785fab84d..1a1afbe9133 100644
--- a/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
+++ b/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
@@ -487,9 +487,7 @@ define i1 @orderedLessZeroMaximum(float, float) {
define i1 @minnum_non_nan(float %x) {
; CHECK-LABEL: @minnum_non_nan(
-; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.minnum.f32(float 5.000000e-01, float [[X:%.*]])
-; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[MIN]], 1.000000e+00
-; CHECK-NEXT: ret i1 [[CMP]]
+; CHECK-NEXT: ret i1 true
;
%min = call float @llvm.minnum.f32(float 0.5, float %x)
%cmp = fcmp ord float %min, 1.0
@@ -498,9 +496,7 @@ define i1 @minnum_non_nan(float %x) {
define i1 @maxnum_non_nan(float %x) {
; CHECK-LABEL: @maxnum_non_nan(
-; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.maxnum.f32(float [[X:%.*]], float 4.200000e+01)
-; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[MIN]], 1.200000e+01
-; CHECK-NEXT: ret i1 [[CMP]]
+; CHECK-NEXT: ret i1 false
;
%min = call float @llvm.maxnum.f32(float %x, float 42.0)
%cmp = fcmp uno float %min, 12.0
OpenPOWER on IntegriCloud