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

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 03:28:45 PDT 2024


RKSimon wrote:

So you now need to add test coverage, I'd recommend adding this to the `vector-shift-*-128.ll` and `vector-shift-*-256.ll` files:

They should all have the following RUN line:
```
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2
```
this needs to be replaced with:
```
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-SLOW
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2,+tuning-fast-per-element-vector-shift | FileCheck %s --check-prefixes=AVX,AVX2,AVX2-FAST
```

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


More information about the llvm-commits mailing list