diff options
author | Jay Foad <jay.foad@amd.com> | 2023-04-18 14:12:14 +0100 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2023-04-18 14:14:07 +0100 |
commit | c30c5f0122243326f89c0f0e9e78118ff34ca9ed (patch) | |
tree | f6e0d3dcf36c671025dee10b60f934e4ea18fc72 /llvm/lib/CodeGen/StackMaps.cpp | |
parent | 54963cad87cf9028cb7b367e9c8cf977708314de (diff) | |
download | llvm-c30c5f0122243326f89c0f0e9e78118ff34ca9ed.zip llvm-c30c5f0122243326f89c0f0e9e78118ff34ca9ed.tar.gz llvm-c30c5f0122243326f89c0f0e9e78118ff34ca9ed.tar.bz2 |
[MC] Simplify uses of subregs/superregs. NFC.
Diffstat (limited to 'llvm/lib/CodeGen/StackMaps.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackMaps.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/StackMaps.cpp b/llvm/lib/CodeGen/StackMaps.cpp index 79b2d42..1058f3b 100644 --- a/llvm/lib/CodeGen/StackMaps.cpp +++ b/llvm/lib/CodeGen/StackMaps.cpp @@ -193,11 +193,11 @@ unsigned StackMaps::getNextMetaArgIdx(const MachineInstr *MI, unsigned CurIdx) { /// Go up the super-register chain until we hit a valid dwarf register number. static unsigned getDwarfRegNum(unsigned Reg, const TargetRegisterInfo *TRI) { - int RegNum = TRI->getDwarfRegNum(Reg, false); - for (MCPhysReg SR : TRI->superregs(Reg)) { + int RegNum; + for (MCPhysReg SR : TRI->superregs_inclusive(Reg)) { + RegNum = TRI->getDwarfRegNum(SR, false); if (RegNum >= 0) break; - RegNum = TRI->getDwarfRegNum(SR, false); } assert(RegNum >= 0 && "Invalid Dwarf register number."); |