[llvm] [LLVM][ConstProp] Enable intrinsic simplifications for vector ConstantInt based operands. (PR #159358)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 06:36:44 PDT 2025
================
@@ -2165,7 +2165,7 @@ Constant *constantFoldVectorReduce(Intrinsic::ID IID, Constant *Op) {
return PoisonValue::get(VT->getElementType());
// TODO: Handle undef.
- if (!isa<ConstantVector>(Op) && !isa<ConstantDataVector>(Op))
+ if (!isa<ConstantVector, ConstantDataVector, ConstantInt>(Op))
----------------
nikic wrote:
Can we skip these checks entirely?
https://github.com/llvm/llvm-project/pull/159358
More information about the llvm-commits
mailing list