[PATCH] D119696: [AMDGPU] Improve v_cmpx usage on GFX10.3.
Thomas Symalla via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 06:52:01 PDT 2022
tsymalla added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp:333-335
+ MachineBasicBlock::reverse_iterator A = MBB.rend();
+
+ for (++A; A != Stop; ++A) {
----------------
sebastian-ne wrote:
> tsymalla wrote:
> > sebastian-ne wrote:
> > > I think a reverse iterator iterates from MBB.rbegin() to MBB.rend() (I’m always confused by this, but it’s used in SIOptimizeExecMaskingPreRA.cpp:412 in this way).
> > Good catch. rbegin() == end(), while rend() == begin().
> I think the first ++A is wrong, rbegin() should already be a valid iterator?
I assume this is not exactly wrong, as we don't care about defines at the end of the basic block in this case, but it shouldn't matter either.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119696/new/
https://reviews.llvm.org/D119696
More information about the llvm-commits
mailing list