diff options
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 948c884..7d4fcdc 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -1715,7 +1715,7 @@ Constant *constantFoldVectorReduce(Intrinsic::ID IID, Constant *Op) { return ConstantInt::get(VT->getElementType(), 0); // This is the same as the underlying binops - poison propagates. - if (isa<PoisonValue>(Op)) + if (isa<PoisonValue>(Op) || Op->containsPoisonElement()) return PoisonValue::get(VT->getElementType()); // TODO: Handle undef. |