[llvm] [AMDGPU] Reject i64 amdgcn.ubfe/sbfe with a diagnostic (PR #217461)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 03:19:45 PDT 2026
================
@@ -8066,48 +8066,17 @@ static SDValue lowerBFEIntrinsic(SDValue Op, SelectionDAG &DAG, bool Signed) {
SDValue Offset = Op.getOperand(2);
SDValue Width = Op.getOperand(3);
- if (VT == MVT::i32)
- return DAG.getNode(Signed ? AMDGPUISD::BFE_I32 : AMDGPUISD::BFE_U32, DL, VT,
- Src, Offset, Width);
-
- assert(!VT.isVector() && "Vector handling of BFE not implemented");
-
- auto *CWidth = dyn_cast<ConstantSDNode>(Width);
- if (CWidth && CWidth->getZExtValue() == 0)
- return DAG.getConstant(0, DL, VT);
+ if (VT != MVT::i32) {
+ DAG.getContext()->diagnose(DiagnosticInfoUnsupported(
+ DAG.getMachineFunction().getFunction(),
+ Twine("llvm.amdgcn.") + (Signed ? "sbfe" : "ubfe") +
----------------
arsenm wrote:
Intrinsic::getBaseName(ID)?
https://github.com/llvm/llvm-project/pull/217461
More information about the llvm-commits
mailing list