[llvm] [IR][NFC] Introduce Constant::containsMatchingVectorElement and corresponding matcher (PR #200502)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 09:36:41 PDT 2026
================
@@ -398,7 +398,11 @@ Instruction *InstCombinerImpl::simplifyMaskedScatter(IntrinsicInst &II) {
if (auto *SplatPtr = getSplatValue(II.getArgOperand(1))) {
// scatter(splat(value), splat(ptr), non-zero-mask) -> store value, ptr
if (auto *SplatValue = getSplatValue(II.getArgOperand(0))) {
- if (maskContainsAllOneOrUndef(ConstMask)) {
+ // non-zero-mask if at least one lane of the mask can be assumed active
----------------
artagnon wrote:
Excellent, thanks!
https://github.com/llvm/llvm-project/pull/200502
More information about the llvm-commits
mailing list