@@ -1119,16 +1119,20 @@ multiclass MIMG_Atomic <mimgopc op, string asm, bit isCmpSwap = 0, bit isFP = 0,
11191119 // _V* variants have different dst size, but the size is encoded implicitly,
11201120 // using dmask and tfe. Only 32-bit variant is registered with disassembler.
11211121 // Other variants are reconstructed by disassembler using dmask and tfe.
1122- let VDataDwords = !if(isCmpSwap, 2, 1) in
1123- defm _V1 : MIMG_Atomic_Addr_Helper_m <op, asm, !if(isCmpSwap, VReg_64, VGPR_32), 1, isFP, renamed>;
1124- let VDataDwords = !if(isCmpSwap, 4, 2) in
1125- defm _V2 : MIMG_Atomic_Addr_Helper_m <op, asm, !if(isCmpSwap, VReg_128, VReg_64), 0, isFP, renamed>;
1122+ if !not(isCmpSwap) then
1123+ let VDataDwords = 1 in
1124+ defm _V1 : MIMG_Atomic_Addr_Helper_m <op, asm, VGPR_32, 1, isFP, renamed>;
1125+
1126+ let VDataDwords = 2 in
1127+ defm _V2 : MIMG_Atomic_Addr_Helper_m <op, asm, VReg_64, !if(isCmpSwap, 1, 0), isFP, renamed>;
11261128 let VDataDwords = 3 in
11271129 defm _V3 : MIMG_Atomic_Addr_Helper_m <op, asm, VReg_96, 0, isFP, renamed>;
11281130
11291131 if isCmpSwap then {
1132+ let VDataDwords = 4 in
1133+ defm _V4 : MIMG_Atomic_Addr_Helper_m <op, asm, VReg_128, 0, isFP, renamed>;
11301134 let VDataDwords = 5 in
1131- defm _V4 : MIMG_Atomic_Addr_Helper_m <op, asm, VReg_160, 0, isFP, renamed>;
1135+ defm _V5 : MIMG_Atomic_Addr_Helper_m <op, asm, VReg_160, 0, isFP, renamed>;
11321136 }
11331137 }
11341138 } // End IsAtomicRet = 1
0 commit comments