[PATCH] D109726: [X86] Improve `matchBinaryShuffle()`'s `BLEND` lowering with per-element all-zero/all-ones knowledge

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 14:28:53 PDT 2021


lebedev.ri added a comment.

In D109726#3004107 <https://reviews.llvm.org/D109726#3004107>, @RKSimon wrote:

> In D109726#2999993 <https://reviews.llvm.org/D109726#2999993>, @lebedev.ri wrote:
>
>> In D109726#2999987 <https://reviews.llvm.org/D109726#2999987>, @RKSimon wrote:
>>
>>> Why couldn't this be put in more generic ISD::OR combines somewhere? Possibly TargetLowering::SimplifyDemandedVectorElts?
>>
>> What do you mean by 'it'? `blend`->`or` lowering?
>
> The insert tests look like we're just failing to recognize that we're OR'ing all-ones elements, which should allow the SimplifyDemanded call to realise that we're going to completely overwrite those elements, so we don't need to mask them. Its most of the logic you've written but it feels like it should be somewhere more generic than inside x86 shuffle combining.

https://reviews.llvm.org/D109927 - doesn't seem to work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109726



More information about the llvm-commits mailing list