[PATCH] D91358: [ARM][RegAlloc] Add t2LoopEndDec
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 7 12:24:43 PST 2020
bjope added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:1553
+ // Checl that unspillable terminators define a reg and have a single use.
+ if (TII->isUnspillableTerminator(MI)) {
----------------
typ: /Checl/Check/
================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:1559
+ if (Def.isVirtual() &&
+ std::distance(MRI->use_instr_begin(Def), MRI->use_instr_end()) > 1)
+ report("Unspillable Terminator expected to have a single user!", MI);
----------------
Use lists in MRI also contain dbg-uses. So I think we want to use use_instr_nodbg here to only count non-dbg-uses.
Also a bit unclear if zero uses should be valid or not (code is currently checking "at most one user", but code comments and the report says "should have a single user"). There is a hasOneDBGUser helper in MRI that could be used if there has to be one user.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91358/new/
https://reviews.llvm.org/D91358
More information about the llvm-commits
mailing list