[PATCH] D92405: [VirtRegRewriter] Insert missing killed flags when tracking subregister liveness
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 17 01:32:04 PST 2020
lkail added inline comments.
================
Comment at: llvm/lib/CodeGen/LiveIntervals.cpp:794-795
+ if (MO.getSubReg() == 0)
+ if (const TargetRegisterClass *TRC = MRI->getRegClassOrNull(Reg))
+ UseMask = TRC->getLaneMask();
if ((UseMask & ~DefinedLanesMask).any())
----------------
arsenm wrote:
> getRegClass should be sufficient. There can't be a vreg without a class at this point
I think it can be simplified as
```
unsigned SubReg = MO.getSubReg();
LaneBitmask UseMask = SubReg ? TRI->getSubRegIndexLaneMask(SubReg)
: MRI->getMaxLaneMaskForVReg(Reg);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92405/new/
https://reviews.llvm.org/D92405
More information about the llvm-commits
mailing list