[PATCH] D123569: [AMDGPU] Try to avoid inserting duplicate s_inst_prefetch
Carl Ritson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 12 03:35:13 PDT 2022
critson marked 2 inline comments as done.
critson 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)
----------------
foad wrote:
> Surely the condition should be `PreTerm == Pre->begin() || ...`?
A fair point, I had not consider we still want to insert when this is the beginning of the block.
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