[PATCH] D99531: [x86] enhance matching of pmaddwd

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 29 13:40:14 PDT 2021


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

In D99531#2656843 <https://reviews.llvm.org/D99531#2656843>, @spatel wrote:

> In D99531#2656756 <https://reviews.llvm.org/D99531#2656756>, @craig.topper wrote:
>
>> This seems reasonable. Is it possible we also need to handle the case where all the extract indices from a different subvector of the input? It's hard to say from the test case that we started from since it appears to have a logic mistake that exposed the bug in the first place. It used "sizeof sizeof(__r) in its loop control which caused the loop bounds to be 4. Seems like it should have been sizeof(__r)/sizeof(int16_t).
>
> Right - that source looks unintended.
> We could go further in matching, but it gets harder to keep track of the indices and then calculate the offsets, and it doesn't seem as likely to come up in practice. This case seemed plausible from valid source even (!), so that's why I figured we should try to get it.

I'm inclined to agree. So this patch LGTM.


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

https://reviews.llvm.org/D99531



More information about the llvm-commits mailing list