[PATCH] D135844: [AArch64][2/4]Regard (shl val, N) as a potential bit-field-positioning op regardless of the number of uses.
Mingming Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 11:09:13 PDT 2022
mingmingl planned changes to this revision.
mingmingl added a comment.
In D135844#3857874 <https://reviews.llvm.org/D135844#3857874>, @dmgreen wrote:
> Do you have a better test? One that doesn't get so heavily optimized by opt.
Good question. When constructing test case, turns out changing `shl (val, N)` to `UBFIZ` could be counter-productive (regardless of number of uses), since `shl (val, N)` itself might be folded into aarch64 operand2.
Take `@test_nouseful_bits` as an example, `bfxil w9, w0, #0, #8` is not better than `orr w9, w0, w8, #8` (with `w8 = and w0, 0xff`) (higher throughput, shorter latency).
Together with the other motivating test case (https://godbolt.org/z/h96b1sGco for D135102 <https://reviews.llvm.org/D135102>) , planning to make changes when `orr` with a left shift is better than `bfi`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135844/new/
https://reviews.llvm.org/D135844
More information about the llvm-commits
mailing list