[llvm] [X86][AVX] Prefer per-element vector shifts for known splats #39424 (PR #87913)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 21 02:01:52 PDT 2024


SahilPatidar wrote:

@RKSimon, I used your test example with this `-mattr=+avx2,+tuning-fast-per-element-vector-shift` and then got this:
```
; AVX2-FAST-LABEL: f:
; AVX2-FAST:       # %bb.0:
; AVX2-FAST-NEXT:    vmovd %edi, %xmm1
; AVX2-FAST-NEXT:    vpbroadcastd %xmm1, %ymm1
; AVX2-FAST-NEXT:    vpsrlvd %ymm1, %ymm0, %ymm0
; AVX2-FAST-NEXT:    retq
;
```
Doesn't `vpbroadcastd` seem to be using `%edi` directly?


https://github.com/llvm/llvm-project/pull/87913


More information about the llvm-commits mailing list