Skip to content

Commit 49ce884

Browse files
committed
[AMDGPU] Update for comments.
1 parent 876b9ab commit 49ce884

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

llvm/lib/Target/AMDGPU/MIMGInstructions.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ class MIMG_Atomic_gfx10<mimgopc op, string opcode,
921921
bit noRtn = 0, bit enableDisasm = 0>
922922
: MIMG_gfx10<op.GFX10M, !if(noRtn, (outs), (outs DataRC:$vdst)),
923923
!if(enableDisasm, "GFX10", "")> {
924-
let Constraints = !if(noRtn, "","$vdst = $vdata");
924+
let Constraints = !if(noRtn, "", "$vdst = $vdata");
925925
let isCodeGenOnly = noRtn;
926926
let InOperandList = (ins DataRC:$vdata, AddrRC:$vaddr0, SReg_256_XNULL:$srsrc,
927927
DMask:$dmask, Dim:$dim, UNorm:$unorm, CPol:$cpol,
@@ -976,7 +976,7 @@ class VIMAGE_Atomic_gfx12<mimgopc op, string opcode, RegisterOperand DataRC,
976976
int num_addrs, string renamed, bit noRtn = 0, bit enableDisasm = 0>
977977
: VIMAGE_gfx12<op.GFX12, !if(noRtn, (outs), (outs DataRC:$vdst)), num_addrs,
978978
!if(enableDisasm, "GFX12", "")> {
979-
let Constraints = !if(noRtn,"", "$vdst = $vdata");
979+
let Constraints = !if(noRtn, "", "$vdst = $vdata");
980980
let isCodeGenOnly = noRtn;
981981
let InOperandList = !con((ins DataRC:$vdata),
982982
AddrIns,
@@ -1092,7 +1092,7 @@ multiclass MIMG_Atomic_Addr_Helper_m <mimgopc op, string asm,
10921092
}
10931093
}
10941094

1095-
multiclass MIMG_Atomic_Impl <mimgopc op, string asm, bit isCmpSwap = 0, bit isFP = 0,
1095+
multiclass MIMG_Atomic_Base <mimgopc op, string asm, bit isCmpSwap = 0, bit isFP = 0,
10961096
bit noRtn = 0, string renamed = ""> { // 64-bit atomics
10971097
let IsAtomicRet = !not(noRtn) in {
10981098
def "" : MIMGBaseOpcode {
@@ -1127,8 +1127,8 @@ multiclass MIMG_Atomic_Impl <mimgopc op, string asm, bit isCmpSwap = 0, bit isFP
11271127

11281128
multiclass MIMG_Atomic <mimgopc op, string asm, bit isCmpSwap = 0, bit isFP = 0,
11291129
string renamed = ""> {
1130-
defm "" : MIMG_Atomic_Impl <op, asm, isCmpSwap, isFP, 0, renamed>;
1131-
defm "_NORTN" : MIMG_Atomic_Impl <op, asm, isCmpSwap, isFP, 1, renamed>;
1130+
defm "" : MIMG_Atomic_Base <op, asm, isCmpSwap, isFP, 0, renamed>;
1131+
defm "_NORTN" : MIMG_Atomic_Base <op, asm, isCmpSwap, isFP, 1, renamed>;
11321132
}
11331133

11341134
multiclass MIMG_Atomic_Renamed <mimgopc op, string asm, string renamed,

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9145,10 +9145,9 @@ SDValue SITargetLowering::lowerImage(SDValue Op,
91459145

91469146
SmallVector<EVT, 3> OrigResultTypes(Op->values());
91479147
SmallVector<EVT, 3> ResultTypes;
9148-
if (BaseOpcode->NoReturn && BaseOpcode->Atomic)
9149-
ResultTypes.push_back(MVT::Other);
9150-
else
9151-
ResultTypes = OrigResultTypes;
9148+
ResultTypes = (BaseOpcode->NoReturn && BaseOpcode->Atomic)
9149+
? SmallVector<EVT, 1>{MVT::Other}
9150+
: OrigResultTypes;
91529151

91539152
bool IsD16 = false;
91549153
bool IsG16 = false;

0 commit comments

Comments
 (0)