Skip to content

Commit 64482d5

Browse files
authored
[AMDGPU] Fix passing CodeGen/AMDGPU/frem.ll on gfx1150. (#67425)
We would currently crash on it trying to use t16 instructions instead of fake16 ones.
1 parent 97f9f1a commit 64482d5

File tree

2 files changed

+582
-5
lines changed

2 files changed

+582
-5
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5038,11 +5038,11 @@ unsigned SIInstrInfo::getVALUOp(const MachineInstr &MI) const {
50385038
case AMDGPU::S_MIN_F32: return AMDGPU::V_MIN_F32_e64;
50395039
case AMDGPU::S_MAX_F32: return AMDGPU::V_MAX_F32_e64;
50405040
case AMDGPU::S_MUL_F32: return AMDGPU::V_MUL_F32_e64;
5041-
case AMDGPU::S_ADD_F16: return AMDGPU::V_ADD_F16_t16_e64;
5042-
case AMDGPU::S_SUB_F16: return AMDGPU::V_SUB_F16_t16_e64;
5043-
case AMDGPU::S_MIN_F16: return AMDGPU::V_MIN_F16_t16_e64;
5044-
case AMDGPU::S_MAX_F16: return AMDGPU::V_MAX_F16_t16_e64;
5045-
case AMDGPU::S_MUL_F16: return AMDGPU::V_MUL_F16_t16_e64;
5041+
case AMDGPU::S_ADD_F16: return AMDGPU::V_ADD_F16_fake16_e64;
5042+
case AMDGPU::S_SUB_F16: return AMDGPU::V_SUB_F16_fake16_e64;
5043+
case AMDGPU::S_MIN_F16: return AMDGPU::V_MIN_F16_fake16_e64;
5044+
case AMDGPU::S_MAX_F16: return AMDGPU::V_MAX_F16_fake16_e64;
5045+
case AMDGPU::S_MUL_F16: return AMDGPU::V_MUL_F16_fake16_e64;
50465046
case AMDGPU::S_CVT_PK_RTZ_F16_F32: return AMDGPU::V_CVT_PKRTZ_F16_F32_e64;
50475047
case AMDGPU::S_FMAC_F32: return AMDGPU::V_FMAC_F32_e64;
50485048
case AMDGPU::S_FMAC_F16: return AMDGPU::V_FMAC_F16_t16_e64;

0 commit comments

Comments
 (0)