diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 8a8d8af..61f7b23 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -1213,7 +1213,8 @@ Value *llvm::createSimpleTargetReduction(IRBuilderBase &Builder, Value *Src, auto getIdentity = [&]() { Intrinsic::ID ID = getReductionIntrinsicID(RdxKind); unsigned Opc = getArithmeticReductionInstruction(ID); - return ConstantExpr::getBinOpIdentity(Opc, SrcVecEltTy); + bool NSZ = Builder.getFastMathFlags().noSignedZeros(); + return ConstantExpr::getBinOpIdentity(Opc, SrcVecEltTy, false, NSZ); }; switch (RdxKind) { case RecurKind::Add: |