[PATCH] D150107: [X86] Remove patterns for shift/rotate with immediate 1 and update side effect

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 17:24:32 PDT 2023


craig.topper added a comment.

In D150107#4326423 <https://reviews.llvm.org/D150107#4326423>, @skan wrote:

> In D150107#4326328 <https://reviews.llvm.org/D150107#4326328>, @RKSimon wrote:
>
>> What is the motivation here?
>
> It's first suggested by craig in D150068 <https://reviews.llvm.org/D150068>. I think there are at least three pros
>
> 1. This can reduce the patterns during ISEL, as a result, reducing the bytes in X86GenDAGISel.inc
> 2. The patterns for shift/rotate with immediate 1 look quite similar to shift/rotate with immediate 8. So this can be seen as eliminating "duplicate" code.
> 3. Delay the optimization from imm8 to imm1, so that the previous optimization passes do not need to handle the version of imm1

Yeah I thought since the code had been moved to a function it was easy to share it and get an isel table reduction.

Looks like it improved fast isel code and made X86DomainReassignment work for shifts by 1. But regressed global isel, though I guess no one should care.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150107



More information about the llvm-commits mailing list