diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp --- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp @@ -3901,7 +3901,7 @@ true); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedLoad(Node, 2, 1, AArch64::LD2H_IMM, AArch64::LD2H, true); return; @@ -3922,7 +3922,7 @@ true); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedLoad(Node, 3, 1, AArch64::LD3H_IMM, AArch64::LD3H, true); return; @@ -3943,7 +3943,7 @@ true); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedLoad(Node, 4, 1, AArch64::LD4H_IMM, AArch64::LD4H, true); return; @@ -4267,7 +4267,7 @@ SelectPredicatedStore(Node, 2, 0, AArch64::ST2B, AArch64::ST2B_IMM); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedStore(Node, 2, 1, AArch64::ST2H, AArch64::ST2H_IMM); return; } else if (VT == MVT::nxv4i32 || VT == MVT::nxv4f32) { @@ -4284,7 +4284,7 @@ SelectPredicatedStore(Node, 3, 0, AArch64::ST3B, AArch64::ST3B_IMM); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedStore(Node, 3, 1, AArch64::ST3H, AArch64::ST3H_IMM); return; } else if (VT == MVT::nxv4i32 || VT == MVT::nxv4f32) { @@ -4301,7 +4301,7 @@ SelectPredicatedStore(Node, 4, 0, AArch64::ST4B, AArch64::ST4B_IMM); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedStore(Node, 4, 1, AArch64::ST4H, AArch64::ST4H_IMM); return; } else if (VT == MVT::nxv4i32 || VT == MVT::nxv4f32) { @@ -4911,7 +4911,7 @@ SelectPredicatedLoad(Node, 2, 0, AArch64::LD2B_IMM, AArch64::LD2B); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedLoad(Node, 2, 1, AArch64::LD2H_IMM, AArch64::LD2H); return; } else if (VT == MVT::nxv4i32 || VT == MVT::nxv4f32) { @@ -4928,7 +4928,7 @@ SelectPredicatedLoad(Node, 3, 0, AArch64::LD3B_IMM, AArch64::LD3B); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedLoad(Node, 3, 1, AArch64::LD3H_IMM, AArch64::LD3H); return; } else if (VT == MVT::nxv4i32 || VT == MVT::nxv4f32) { @@ -4945,7 +4945,7 @@ SelectPredicatedLoad(Node, 4, 0, AArch64::LD4B_IMM, AArch64::LD4B); return; } else if (VT == MVT::nxv8i16 || VT == MVT::nxv8f16 || - (VT == MVT::nxv8bf16 && Subtarget->hasBF16())) { + VT == MVT::nxv8bf16) { SelectPredicatedLoad(Node, 4, 1, AArch64::LD4H_IMM, AArch64::LD4H); return; } else if (VT == MVT::nxv4i32 || VT == MVT::nxv4f32) { diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -4611,10 +4611,6 @@ EVT MemVT = MGT->getMemoryVT(); SDValue InputVT = DAG.getValueType(MemVT); - if (VT.getVectorElementType() == MVT::bf16 && - !static_cast(DAG.getSubtarget()).hasBF16()) - return SDValue(); - if (IsFixedLength) { assert(Subtarget->useSVEForFixedLengthVectors() && "Cannot lower when not using SVE for fixed vectors"); @@ -4716,10 +4712,6 @@ EVT MemVT = MSC->getMemoryVT(); SDValue InputVT = DAG.getValueType(MemVT); - if (VT.getVectorElementType() == MVT::bf16 && - !static_cast(DAG.getSubtarget()).hasBF16()) - return SDValue(); - if (IsFixedLength) { assert(Subtarget->useSVEForFixedLengthVectors() && "Cannot lower when not using SVE for fixed vectors"); @@ -15797,10 +15789,6 @@ EVT VT = N->getValueType(0); EVT PtrTy = N->getOperand(3).getValueType(); - if (VT == MVT::nxv8bf16 && - !static_cast(DAG.getSubtarget()).hasBF16()) - return SDValue(); - EVT LoadVT = VT; if (VT.isFloatingPoint()) LoadVT = VT.changeTypeToInteger(); @@ -15828,9 +15816,6 @@ "Unsupported opcode."); SDLoc DL(N); EVT VT = N->getValueType(0); - if (VT == MVT::nxv8bf16 && - !static_cast(DAG.getSubtarget()).hasBF16()) - return SDValue(); EVT LoadVT = VT; if (VT.isFloatingPoint()) @@ -15853,10 +15838,6 @@ EVT HwSrcVt = getSVEContainerType(DataVT); SDValue InputVT = DAG.getValueType(DataVT); - if (DataVT == MVT::nxv8bf16 && - !static_cast(DAG.getSubtarget()).hasBF16()) - return SDValue(); - if (DataVT.isFloatingPoint()) InputVT = DAG.getValueType(HwSrcVt); @@ -15883,10 +15864,6 @@ EVT DataVT = Data.getValueType(); EVT PtrTy = N->getOperand(4).getValueType(); - if (DataVT == MVT::nxv8bf16 && - !static_cast(DAG.getSubtarget()).hasBF16()) - return SDValue(); - if (DataVT.isFloatingPoint()) Data = DAG.getNode(ISD::BITCAST, DL, DataVT.changeTypeToInteger(), Data);