[PATCH] D135078: [AArch64][GlobalISel] Fold away lowered vector sign-extend of vector compares

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 14:30:32 PDT 2022


arsenm added a comment.

In D135078#3831867 <https://reviews.llvm.org/D135078#3831867>, @arsenm wrote:

> In D135078#3830895 <https://reviews.llvm.org/D135078#3830895>, @aemerson wrote:
>
>> In D135078#3830892 <https://reviews.llvm.org/D135078#3830892>, @arsenm wrote:
>>
>>> This should have been caught and combined into g_sext_inreg, which should have folded out based on computeNumSignBits
>>
>> The only place we have an opportunity to catch the extend before it gets legalized into shifts is in the artifact combiner, and this is just a code quality optimization so it shouldn't go there.
>
> The shifts themselves combine into g_sext_inreg

Plus there's nothing AArch64 specific about this. You're not getting the sext_inreg with the base set of combines because the aarch64 rule is to always lower sext_inreg


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135078



More information about the llvm-commits mailing list