Skip to content

[AMDGPU] Move S_ADD_U64_PSEUDO handling into getVALUOp. NFC. #142934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5528,6 +5528,10 @@ unsigned SIInstrInfo::getVALUOp(const MachineInstr &MI) const {
return AMDGPU::V_ADD_CO_U32_e32;
case AMDGPU::S_SUB_U32:
return AMDGPU::V_SUB_CO_U32_e32;
case AMDGPU::S_ADD_U64_PSEUDO:
return AMDGPU::V_ADD_U64_PSEUDO;
case AMDGPU::S_SUB_U64_PSEUDO:
return AMDGPU::V_SUB_U64_PSEUDO;
case AMDGPU::S_SUBB_U32: return AMDGPU::V_SUBB_U32_e32;
case AMDGPU::S_MUL_I32: return AMDGPU::V_MUL_LO_U32_e64;
case AMDGPU::S_MUL_HI_U32: return AMDGPU::V_MUL_HI_U32_e64;
Expand Down Expand Up @@ -7310,12 +7314,6 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
switch (Opcode) {
default:
break;
case AMDGPU::S_ADD_U64_PSEUDO:
NewOpcode = AMDGPU::V_ADD_U64_PSEUDO;
break;
case AMDGPU::S_SUB_U64_PSEUDO:
NewOpcode = AMDGPU::V_SUB_U64_PSEUDO;
break;
case AMDGPU::S_ADD_I32:
case AMDGPU::S_SUB_I32: {
// FIXME: The u32 versions currently selected use the carry.
Expand Down
Loading