summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-08-02 14:33:40 +0000
committerSanjay Patel <spatel@rotateright.com>2018-08-02 14:33:40 +0000
commit3f6e9a71f7dee5e44b5d6dae16d7a31163f9d7c1 (patch)
tree2b3c0f363b6851247a66fa8aac249831eaf60b7b /llvm/test
parenta7dbe571e686f3a8f0d97715a82a6dc648a8d3db (diff)
downloadbcm5719-llvm-3f6e9a71f7dee5e44b5d6dae16d7a31163f9d7c1.tar.gz
bcm5719-llvm-3f6e9a71f7dee5e44b5d6dae16d7a31163f9d7c1.zip
[InstSimplify] move minnum/maxnum with undef fold from instcombine
llvm-svn: 338719
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/maxnum.ll16
-rw-r--r--llvm/test/Transforms/InstCombine/minnum.ll16
-rw-r--r--llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll32
3 files changed, 32 insertions, 32 deletions
diff --git a/llvm/test/Transforms/InstCombine/maxnum.ll b/llvm/test/Transforms/InstCombine/maxnum.ll
index ff415aa86f6..c929c782542 100644
--- a/llvm/test/Transforms/InstCombine/maxnum.ll
+++ b/llvm/test/Transforms/InstCombine/maxnum.ll
@@ -153,22 +153,6 @@ define float @fold_maxnum_f32_undef_undef(float %x) {
ret float %val
}
-define float @fold_maxnum_f32_val_undef(float %x) {
-; CHECK-LABEL: @fold_maxnum_f32_val_undef(
-; CHECK-NEXT: ret float [[X:%.*]]
-;
- %val = call float @llvm.maxnum.f32(float %x, float undef)
- ret float %val
-}
-
-define float @fold_maxnum_f32_undef_val(float %x) {
-; CHECK-LABEL: @fold_maxnum_f32_undef_val(
-; CHECK-NEXT: ret float [[X:%.*]]
-;
- %val = call float @llvm.maxnum.f32(float undef, float %x)
- ret float %val
-}
-
define float @maxnum_x_maxnum_x_y(float %x, float %y) {
; CHECK-LABEL: @maxnum_x_maxnum_x_y(
; CHECK-NEXT: [[A:%.*]] = call float @llvm.maxnum.f32(float [[X:%.*]], float [[Y:%.*]])
diff --git a/llvm/test/Transforms/InstCombine/minnum.ll b/llvm/test/Transforms/InstCombine/minnum.ll
index 7cf9d1bc758..7e98eba26c4 100644
--- a/llvm/test/Transforms/InstCombine/minnum.ll
+++ b/llvm/test/Transforms/InstCombine/minnum.ll
@@ -155,22 +155,6 @@ define float @fold_minnum_f32_undef_undef(float %x) {
ret float %val
}
-define float @fold_minnum_f32_val_undef(float %x) {
-; CHECK-LABEL: @fold_minnum_f32_val_undef(
-; CHECK-NEXT: ret float [[X:%.*]]
-;
- %val = call float @llvm.minnum.f32(float %x, float undef)
- ret float %val
-}
-
-define float @fold_minnum_f32_undef_val(float %x) {
-; CHECK-LABEL: @fold_minnum_f32_undef_val(
-; CHECK-NEXT: ret float [[X:%.*]]
-;
- %val = call float @llvm.minnum.f32(float undef, float %x)
- ret float %val
-}
-
define float @minnum_x_minnum_x_y(float %x, float %y) {
; CHECK-LABEL: @minnum_x_minnum_x_y(
; CHECK-NEXT: [[A:%.*]] = call float @llvm.minnum.f32(float [[X:%.*]], float [[Y:%.*]])
diff --git a/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll b/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
index ca9226dd076..1acff6f5f98 100644
--- a/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
+++ b/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
@@ -537,6 +537,38 @@ define <2 x double> @minnum_nan_op1_vec(<2 x double> %x) {
ret <2 x double> %r
}
+define float @maxnum_undef_op1(float %x) {
+; CHECK-LABEL: @maxnum_undef_op1(
+; CHECK-NEXT: ret float [[X:%.*]]
+;
+ %val = call float @llvm.maxnum.f32(float %x, float undef)
+ ret float %val
+}
+
+define float @maxnum_undef_op0(float %x) {
+; CHECK-LABEL: @maxnum_undef_op0(
+; CHECK-NEXT: ret float [[X:%.*]]
+;
+ %val = call float @llvm.maxnum.f32(float undef, float %x)
+ ret float %val
+}
+
+define float @minnum_undef_op1(float %x) {
+; CHECK-LABEL: @minnum_undef_op1(
+; CHECK-NEXT: ret float [[X:%.*]]
+;
+ %val = call float @llvm.minnum.f32(float %x, float undef)
+ ret float %val
+}
+
+define float @minnum_undef_op0(float %x) {
+; CHECK-LABEL: @minnum_undef_op0(
+; CHECK-NEXT: ret float [[X:%.*]]
+;
+ %val = call float @llvm.minnum.f32(float undef, float %x)
+ ret float %val
+}
+
define float @minnum_same_args(float %x) {
; CHECK-LABEL: @minnum_same_args(
; CHECK-NEXT: ret float [[X:%.*]]
OpenPOWER on IntegriCloud