[llvm] [AMDGPU] Add s_delay_alu in relocated PC-relative symbol sequence (PR #71061)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 02:25:37 PDT 2023
================
@@ -2405,13 +2405,22 @@ bool SIInstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
// the encoding of $symbol starts 12 bytes after the start of the s_add_u32
// instruction.
+ int64_t Adjust = 0;
+ if (ST.hasDelayAlu()) {
+ // Manually add the 1 cycle delay before using RegLo. AMDGPUInsertDelayAlu
+ // will not add this automatically inside a bundle:
+ // s_delay_alu instid0(SALU_CYCLE_1)
+ Bundler.append(BuildMI(MF, DL, get(AMDGPU::S_DELAY_ALU)).addImm(9));
----------------
arsenm wrote:
The main use seems to be to minimize the diff from gfx10, so probably
https://github.com/llvm/llvm-project/pull/71061
More information about the llvm-commits
mailing list