Skip to content

Commit c0cc335

Browse files
author
Aman Sharma
committed
[AMDGPU] Set hasSideEffects=0 for SALU psuedos
1 parent 44923d8 commit c0cc335

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

llvm/lib/Target/AMDGPU/SIInstructions.td

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,19 +340,27 @@ def S_SUB_U64_PSEUDO : SPseudoInstSI <
340340

341341
def S_ADD_CO_PSEUDO : SPseudoInstSI <
342342
(outs SReg_32:$sdst, SSrc_i1:$scc_out), (ins SSrc_b32:$src0, SSrc_b32:$src1, SSrc_i1:$scc_in)
343-
>;
343+
>{
344+
let hasSideEffects = 0;
345+
}
344346

345347
def S_SUB_CO_PSEUDO : SPseudoInstSI <
346348
(outs SReg_32:$sdst, SSrc_i1:$scc_out), (ins SSrc_b32:$src0, SSrc_b32:$src1, SSrc_i1:$scc_in)
347-
>;
349+
>{
350+
let hasSideEffects = 0;
351+
}
348352

349353
def S_UADDO_PSEUDO : SPseudoInstSI <
350354
(outs SReg_32:$sdst, SSrc_i1:$scc_out), (ins SSrc_b32:$src0, SSrc_b32:$src1)
351-
>;
355+
>{
356+
let hasSideEffects = 0;
357+
}
352358

353359
def S_USUBO_PSEUDO : SPseudoInstSI <
354360
(outs SReg_32:$sdst, SSrc_i1:$scc_out), (ins SSrc_b32:$src0, SSrc_b32:$src1)
355-
>;
361+
>{
362+
let hasSideEffects = 0;
363+
}
356364

357365
let OtherPredicates = [HasShaderCyclesHiLoRegisters] in
358366
def GET_SHADERCYCLESHILO : SPseudoInstSI<

llvm/lib/Target/AMDGPU/SOPInstructions.td

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,12 +665,16 @@ let SubtargetPredicate = isGFX12Plus in {
665665
// The higher 32-bits of the inputs contain the sign extension bits.
666666
def S_MUL_I64_I32_PSEUDO : SPseudoInstSI <
667667
(outs SReg_64:$sdst), (ins SSrc_b64:$src0, SSrc_b64:$src1)
668-
>;
668+
>{
669+
let hasSideEffects = 0;
670+
}
669671

670672
// The higher 32-bits of the inputs are zero.
671673
def S_MUL_U64_U32_PSEUDO : SPseudoInstSI <
672674
(outs SReg_64:$sdst), (ins SSrc_b64:$src0, SSrc_b64:$src1)
673-
>;
675+
>{
676+
let hasSideEffects = 0;
677+
}
674678

675679
} // End SubtargetPredicate = isGFX12Plus
676680

0 commit comments

Comments
 (0)