[PATCH] D133967: [IRBuilder] Use PoisonValue in CreateMasked*

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 02:19:48 PDT 2022


nlopes accepted this revision.
nlopes added a comment.
This revision is now accepted and ready to land.

In D133967#3798994 <https://reviews.llvm.org/D133967#3798994>, @simoll wrote:

> In D133967#3797505 <https://reviews.llvm.org/D133967#3797505>, @nlopes wrote:
>
>> I reviewed all users:
>>
>> - SLP Vectorizer: the mask is all ones, so passthru is irrelevant
>> - Loop vectorizer: masked out lanes aren't used. In fact, masked loads are already using poison for passthru.
>> - X86 expand intrinsic: uses custom zero passthru.
>> - Codegen expand vp load/gather: there's an issue here as langref says passthru is undef.
>>
>> So, vector folks, is it ok to change `@llvm.vp.load`/gather's passthru to poison instead of undef?
>
> Yes and we should do this for all VP intrinsics. This also means we need to change the wording in the `Semantics` sections, eg https://llvm.org/docs/LangRef.html#id894 .

Thanks for the review, Simon!
I've implemented the change to LangRef here: https://github.com/llvm/llvm-project/commit/32b1b06b7081bd722750c6f3d528336f3f7ed34b

This patch can now proceed. Thank you!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133967/new/

https://reviews.llvm.org/D133967



More information about the llvm-commits mailing list