Skip to content

Commit

Permalink
[AMDGPU] Set Size to 4 for V_MOV_B64_PSEUDO and S_MOV_B64_IMM_PSEUDO (#…
Browse files Browse the repository at this point in the history
…70376)

These are not fixed size instructions, so immediate size shall be added
separately. A minimal opcode size 4 since the inception of the V_MOV_B64
instruction. A real instruction can be as small as 4 bytes in case of
inline immediate. Otherwise it is NFCI.
  • Loading branch information
rampitec committed Oct 27, 2023
1 parent 4b58112 commit 3e6d6f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/AMDGPU/SIInstructions.td
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def V_MOV_B64_PSEUDO : VPseudoInstSI <(outs VReg_64:$vdst),
let isAsCheapAsAMove = 1;
let isMoveImm = 1;
let SchedRW = [Write64Bit];
let Size = 16; // Needs maximum 2 v_mov_b32 instructions 8 byte long each.
let Size = 4;
let UseNamedOperandTable = 1;
}

Expand All @@ -149,7 +149,7 @@ def S_MOV_B64_IMM_PSEUDO : SPseudoInstSI <(outs SReg_64:$sdst),
let isAsCheapAsAMove = 1;
let isMoveImm = 1;
let SchedRW = [WriteSALU, Write64Bit];
let Size = 16; // Needs maximum 2 s_mov_b32 instructions 8 byte long each.
let Size = 4;
let Uses = [];
let UseNamedOperandTable = 1;
}
Expand Down

0 comments on commit 3e6d6f2

Please sign in to comment.