Index: lib/Target/AMDGPU/SIInstructions.td =================================================================== --- lib/Target/AMDGPU/SIInstructions.td +++ lib/Target/AMDGPU/SIInstructions.td @@ -2085,9 +2085,15 @@ (constant_load (SMRDSgpr i64:$sbase, i32:$offset)), (vt (Instr_SGPR $sbase, $offset)) >; + + def : Pat < + (constant_load (SMRDSImm32 i64:$sbase, i32:$offset)), + (vt (Instr_IMM_ci $sbase, $offset)) + > { + let Predicates = [isCI]; + } } -defm : SMRD_Pattern ; defm : SMRD_Pattern ; defm : SMRD_Pattern ; defm : SMRD_Pattern ;