Skip to content

Commit 1fce874

Browse files
authored
[AMDGPU] Use unsigned overflow for S_UADDO_PSEUDO/S_USUBO_PSEUDO (#160142)
Use correct unsigned overflow instructions for S_UADDO_PSEUDO/S_USUBO_PSEUDO. Note that this issue was hidden because instruction selection never selected S_UADDO_PSEUDO/S_USUBO_PSEUDO which will be addressed in #159814. Signed-off-by: John Lu <[email protected]>
1 parent a25eda2 commit 1fce874

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5953,8 +5953,8 @@ SITargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
59535953
MachineOperand &Src1 = MI.getOperand(3);
59545954

59555955
unsigned Opc = (MI.getOpcode() == AMDGPU::S_UADDO_PSEUDO)
5956-
? AMDGPU::S_ADD_I32
5957-
: AMDGPU::S_SUB_I32;
5956+
? AMDGPU::S_ADD_U32
5957+
: AMDGPU::S_SUB_U32;
59585958
// clang-format off
59595959
BuildMI(*BB, MI, DL, TII->get(Opc), Dest0.getReg())
59605960
.add(Src0)

0 commit comments

Comments
 (0)