Skip to content

Commit 7529fe2

Browse files
authored
[AMDGPU] Only set Info.memVT when not later overridden (#92670)
For the amdgcn_*_buffer_load_lds intrinsics this field is later overriden, so avoid pointlessly calling MVT::getVT in that case. Importantly, this is also the only case I can find in tree where a PointerType is passed to MVT::getVT, so this will allow us to forbid doing so in future, keeping MVT::iPTR as originating solely from TableGen as was claimed next to its definition in MachineValueType.h (but lost in the autogeneration conversion).
1 parent 32ae9a2 commit 7529fe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,13 +1233,13 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
12331233
// Atomic
12341234
Info.opc = CI.getType()->isVoidTy() ? ISD::INTRINSIC_VOID :
12351235
ISD::INTRINSIC_W_CHAIN;
1236-
Info.memVT = MVT::getVT(CI.getArgOperand(0)->getType());
12371236
Info.flags |= MachineMemOperand::MOLoad |
12381237
MachineMemOperand::MOStore |
12391238
MachineMemOperand::MODereferenceable;
12401239

12411240
switch (IntrID) {
12421241
default:
1242+
Info.memVT = MVT::getVT(CI.getArgOperand(0)->getType());
12431243
// XXX - Should this be volatile without known ordering?
12441244
Info.flags |= MachineMemOperand::MOVolatile;
12451245
break;

0 commit comments

Comments
 (0)