[llvm] [VectorUtils] Replace maskIsAll{Zero,One}OrUndef with PatternMatch (PR #200040)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 12:58:53 PDT 2026


================
@@ -7266,8 +7266,9 @@ static Value *simplifyIntrinsic(CallBase *Call, Value *Callee,
   case Intrinsic::masked_gather: {
     Value *MaskArg = Args[1];
     Value *PassthruArg = Args[2];
-    // If the mask is all zeros or undef, the "passthru" argument is the result.
-    if (maskIsAllZeroOrUndef(MaskArg))
+    // If the mask is all zeros or poisons, the "passthru" argument is the
----------------
nikic wrote:

```suggestion
    // If the mask is all zeros or poison, the "passthru" argument is the
```
Here and elsewhere. We don't really use "poisons" in the plural in LLVM.

https://github.com/llvm/llvm-project/pull/200040


More information about the llvm-commits mailing list