[llvm] [X86] Fold VPMOV*2M + masked VMOV* into VBLENDV* (PR #204723)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 26 07:15:32 PDT 2026


================
@@ -4,15 +4,50 @@
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl,+fast-variable-crosslane-shuffle,+fast-variable-perlane-shuffle -O2 | FileCheck %s --check-prefixes=AVX512NOTDQ,AVX512NOTDQ-FAST
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl,+fast-variable-perlane-shuffle -O2 | FileCheck %s --check-prefixes=AVX512NOTDQ,AVX512NOTDQ-FAST-PERLANE
 
+define void @select_v16i8_signbits(<16 x i8> %maskvec,<16 x i8> %a1,<16 x i8> %a2,ptr %a3) {
+; AVX512-LABEL: select_v16i8_signbits:
+; AVX512:       # %bb.0:
+; AVX512-NEXT:    vpblendvb %xmm0, %xmm2, %xmm1, %xmm2
----------------
RKSimon wrote:

is this the right way around? should it be:
```
vpblendvb %xmm0, %xmm1, %xmm2, %xmm2
```

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


More information about the llvm-commits mailing list