[llvm-branch-commits] [llvm] [DAG] Explicitly truncate splat operand in get_active_lane_mask expansion (PR #230056)

Simon Pilgrim via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 9 03:51:00 PDT 2026


================
@@ -0,0 +1,288 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc < %s -mtriple=x86_64-- -mcpu=x86-64    | FileCheck %s --check-prefixes=SSE2
+; RUN: llc < %s -mtriple=x86_64-- -mcpu=x86-64-v2 | FileCheck %s --check-prefixes=SSE42
+; RUN: llc < %s -mtriple=x86_64-- -mcpu=x86-64-v3 | FileCheck %s --check-prefixes=AVX2
+; TODO: Fix crash on AVX512
+
+define <16 x i1> @v16i1(<16 x i1> %m) {
----------------
RKSimon wrote:

`<X x i1>` types aren't great to pass as args/return types as no x86 target (not even avx512) handles them as such.

You might need to either convert them to a cmp+select test pattern, or at least add test coverage for those situations as an alternative.
e.g.
```ll
define <16 x i8> @v16i1_as_v16i8(<16 x i8> %a0, <16 x i8> %a1) {
  %m = icmp sgt <16 x i8> %a0, %a1
  %x = call <16 x i1> @llvm.mask.beforefirst(<16 x i1> %m)
  %r = select <16 x i1> %x, <16 x i8> %a0, <16 x i8> %a1
  ret <16 x i8> %r
}
```


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


More information about the llvm-branch-commits mailing list