[llvm] [X86] Use valign instead of vperm for float domain shuffles (PR #201624)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 10:48:36 PDT 2026


================
@@ -12673,18 +12673,30 @@ static SDValue lowerShuffleAsVALIGN(const SDLoc &DL, MVT VT, SDValue V1,
                                     const APInt &Zeroable,
                                     const X86Subtarget &Subtarget,
                                     SelectionDAG &DAG) {
-  assert((VT.getScalarType() == MVT::i32 || VT.getScalarType() == MVT::i64) &&
-         "Only 32-bit and 64-bit elements are supported!");
+  unsigned EltBits = VT.getScalarSizeInBits();
+  if (EltBits != 32 && EltBits != 64)
+    return SDValue();
+
+  MVT AlignVT =
----------------
RKSimon wrote:

```suggestion
  MVT AlignVT = VT.changeVectorElementTypeToInteger();
```

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


More information about the llvm-commits mailing list