[llvm] [X86][BF16] Add subvec_zero_lowering patterns (PR #76507)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 30 07:41:29 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:
Could we test for isTypeLegal(VT.getVectorElementType()) instead?
https://github.com/llvm/llvm-project/pull/76507
More information about the llvm-commits
mailing list