[llvm] X86: add some missing lowerings for shuffles on `bf16` element type. (PR #76076)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 17:35:38 PST 2024


================
@@ -12353,7 +12353,8 @@ static SDValue lowerShuffleAsBroadcast(const SDLoc &DL, MVT VT, SDValue V1,
   MVT EltVT = VT.getVectorElementType();
   if (!((Subtarget.hasSSE3() && VT == MVT::v2f64) ||
         (Subtarget.hasAVX() && (EltVT == MVT::f64 || EltVT == MVT::f32)) ||
-        (Subtarget.hasAVX2() && (VT.isInteger() || EltVT == MVT::f16))))
+        (Subtarget.hasAVX2() && (VT.isInteger() || EltVT == MVT::f16)) ||
+        (Subtarget.hasBF16() && EltVT == MVT::bf16)))
----------------
phoebewang wrote:

I'm not sure of the change here. Maybe leave it unchanged if it doesn't affect the test?

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


More information about the llvm-commits mailing list