summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopVectorize/minmax_reduction.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-05-22 15:50:46 +0000
committerSanjay Patel <spatel@rotateright.com>2019-05-22 15:50:46 +0000
commit5a4f7cf2ff3fc15d82ca062ee64dd8bd01a68883 (patch)
tree6fb5af1a3e04d75d44d0a65c713d4042cf37a445 /llvm/test/Transforms/LoopVectorize/minmax_reduction.ll
parent63305c8fbba7b3b852f43fb2e05b9752097f13ba (diff)
downloadbcm5719-llvm-5a4f7cf2ff3fc15d82ca062ee64dd8bd01a68883.tar.gz
bcm5719-llvm-5a4f7cf2ff3fc15d82ca062ee64dd8bd01a68883.zip
[IR] allow fast-math-flags on select of FP values
This is a minimal start to correcting a problem most directly discussed in PR38086: https://bugs.llvm.org/show_bug.cgi?id=38086 We have been hacking around a limitation for FP select patterns by using the fast-math-flags on the condition of the select rather than the select itself. This patch just allows FMF to appear with the 'select' opcode. No changes are needed to "FPMathOperator" because it already includes select-of-FP because that definition is based on the (return) value type. Once we have this ability, we can start correcting and adding IR transforms to use the FMF on a 'select' instruction. The instcombine and vectorizer test diffs only show that the IRBuilder change is behaving as expected by applying an FMF guard value to 'select'. For reference: rL241901 - allowed FMF with fcmp rL255555 - allowed FMF with FP calls Differential Revision: https://reviews.llvm.org/D61917 llvm-svn: 361401
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize/minmax_reduction.ll')
-rw-r--r--llvm/test/Transforms/LoopVectorize/minmax_reduction.ll34
1 files changed, 17 insertions, 17 deletions
diff --git a/llvm/test/Transforms/LoopVectorize/minmax_reduction.ll b/llvm/test/Transforms/LoopVectorize/minmax_reduction.ll
index 188700d66d8..fc2f8dcec2f 100644
--- a/llvm/test/Transforms/LoopVectorize/minmax_reduction.ll
+++ b/llvm/test/Transforms/LoopVectorize/minmax_reduction.ll
@@ -416,7 +416,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast ogt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @max_red_float(float %max) #0 {
entry:
@@ -442,7 +442,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast ogt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @max_red_float_ge(float %max) #0 {
entry:
@@ -468,7 +468,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast ogt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @inverted_max_red_float(float %max) #0 {
entry:
@@ -494,7 +494,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast ogt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @inverted_max_red_float_le(float %max) #0 {
entry:
@@ -520,7 +520,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast ogt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @unordered_max_red_float(float %max) #0 {
entry:
@@ -546,7 +546,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast ogt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @unordered_max_red_float_ge(float %max) #0 {
entry:
@@ -572,7 +572,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast ogt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @inverted_unordered_max_red_float(float %max) #0 {
entry:
@@ -598,7 +598,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast ogt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @inverted_unordered_max_red_float_le(float %max) #0 {
entry:
@@ -627,7 +627,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @min_red_float(float %min) #0 {
entry:
@@ -653,7 +653,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @min_red_float_le(float %min) #0 {
entry:
@@ -679,7 +679,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @inverted_min_red_float(float %min) #0 {
entry:
@@ -705,7 +705,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @inverted_min_red_float_ge(float %min) #0 {
entry:
@@ -731,7 +731,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @unordered_min_red_float(float %min) #0 {
entry:
@@ -757,7 +757,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @unordered_min_red_float_le(float %min) #0 {
entry:
@@ -783,7 +783,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @inverted_unordered_min_red_float(float %min) #0 {
entry:
@@ -809,7 +809,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x float>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define float @inverted_unordered_min_red_float_ge(float %min) #0 {
entry:
@@ -836,7 +836,7 @@ for.end:
; CHECK: select <2 x i1>
; CHECK: middle.block
; CHECK: fcmp fast olt <2 x double>
-; CHECK: select <2 x i1>
+; CHECK: select fast <2 x i1>
define double @min_red_double(double %min) #0 {
entry:
OpenPOWER on IntegriCloud