[llvm] [LV][EVL] Reimplement method for extracting new mask. nfc (PR #156827)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 9 00:57:28 PDT 2025


Mel-Chen wrote:

> Oh, and then let simplifyRecipes remove the all ones mask from the logical and? That seems like a good idea to avoid creating new masks

Yes.
> 
> Why do we need to do it after all EVL recipes are converted though. Can we do it as we're converting?

I’m not sure whether there could be cases where the same mask is shared. If so, we might need to generate a new mask for each user. But in any case, I think simply replacing the header mask with an all-true mask at the end would be better and simpler — we wouldn’t even need GetNewMask. This approach is currently blocked by https://github.com/llvm/llvm-project/pull/154072
, but once that patch lands, we should be able to directly replace the header mask with an all-true mask.

> Btw, is this PR NFC? I think this is good to have but it looks to be more powerful than the existing logic. Does it remove any more header masks in llvm-test-suite/SPEC?

Unfortunately, I haven’t found any cases, which suggests that in practice we might not encounter such a complex situation.


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


More information about the llvm-commits mailing list