Skip to content

Commit edcbae0

Browse files
committed
Fail with cannot select in case rsrc is neither v8i32 nor v4i32
1 parent 222c0a1 commit edcbae0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8209,6 +8209,10 @@ SDValue SITargetLowering::lowerImage(SDValue Op,
82098209
append_range(Ops, VAddrs);
82108210
else
82118211
Ops.push_back(VAddr);
8212+
SDValue Rsrc = Op.getOperand(ArgOffset + Intr->RsrcIndex);
8213+
EVT VT = Rsrc.getValueType();
8214+
if (VT != MVT::v4i32 && VT != MVT::v8i32)
8215+
return Op;
82128216
Ops.push_back(Op.getOperand(ArgOffset + Intr->RsrcIndex));
82138217
if (BaseOpcode->Sampler)
82148218
Ops.push_back(Op.getOperand(ArgOffset + Intr->SampIndex));

0 commit comments

Comments
 (0)