summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-05-27 16:40:27 +0000
committerTim Northover <tnorthover@apple.com>2016-05-27 16:40:27 +0000
commit10a1e8b1fe574c6012018bb91a0572a65e8f6779 (patch)
tree8278efaf3d2c9514276c50d08c32bf572523d86e /llvm/lib/Transforms
parent11c849c10b5924033af9ab3dd4126ea812cf0794 (diff)
downloadbcm5719-llvm-10a1e8b1fe574c6012018bb91a0572a65e8f6779.tar.gz
bcm5719-llvm-10a1e8b1fe574c6012018bb91a0572a65e8f6779.zip
Vectorizer: track non-fast FP instructions through phis when finding reductions.
When we traced through a phi node looking for floating-point reductions, we forgot whether we'd ever seen an instruction without fast-math flags (that would block vectorization). This propagates it through to the end. llvm-svn: 271015
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index f2f9bae0c8a..e77ab2aad62 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -430,7 +430,7 @@ RecurrenceDescriptor::isRecurrenceInstr(Instruction *I, RecurrenceKind Kind,
default:
return InstDesc(false, I);
case Instruction::PHI:
- return InstDesc(I, Prev.getMinMaxKind());
+ return InstDesc(I, Prev.getMinMaxKind(), Prev.getUnsafeAlgebraInst());
case Instruction::Sub:
case Instruction::Add:
return InstDesc(Kind == RK_IntegerAdd, I);
OpenPOWER on IntegriCloud