From 10a1e8b1fe574c6012018bb91a0572a65e8f6779 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Fri, 27 May 2016 16:40:27 +0000 Subject: 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 --- llvm/lib/Transforms/Utils/LoopUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp') 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); -- cgit v1.2.3