[llvm] [AMDGPU] Add s_delay_alu in relocated PC-relative symbol sequence (PR #71061)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 06:48:31 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));
----------------
jayfoad wrote:
Open question: should the existing command line flag `-amdgpu-enable-delay-alu=0` disable this? Or should that flag only disable running the `AMDGPUInsertDelayAlu` pass?
https://github.com/llvm/llvm-project/pull/71061
More information about the llvm-commits
mailing list