[llvm] [X86][BF16] Add subvec_zero_lowering patterns (PR #76507)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 28 06:52:57 PST 2023


================
@@ -3743,7 +3743,7 @@ static SDValue getZeroVector(MVT VT, const X86Subtarget &Subtarget,
   SDValue Vec;
   if (!Subtarget.hasSSE2() && VT.is128BitVector()) {
     Vec = DAG.getConstantFP(+0.0, dl, MVT::v4f32);
-  } else if (VT.isFloatingPoint()) {
+  } else if (VT.isFloatingPoint() && VT.getVectorElementType() != MVT::bf16) {
----------------
RKSimon wrote:

Why is this necessary? Are we missing bf16 handling somewhere?

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


More information about the llvm-commits mailing list