[PATCH] D123569: [AMDGPU] Try to avoid inserting duplicate s_inst_prefetch
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 12 02:42:55 PDT 2022
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12300
+ auto PreTerm = Pre->getFirstTerminator();
+ if (PreTerm != Pre->begin() &&
+ std::prev(PreTerm)->getOpcode() != AMDGPU::S_INST_PREFETCH)
----------------
Surely the condition should be `PreTerm == Pre->begin() || ...`?
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12306
+ auto ExitHead = Exit->getFirstNonDebugInstr();
+ if (ExitHead != Exit->end() &&
+ ExitHead->getOpcode() != AMDGPU::S_INST_PREFETCH)
----------------
Likewise.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123569/new/
https://reviews.llvm.org/D123569
More information about the llvm-commits
mailing list