For the loop that used MCRegAliasIterator this should be NFC.
For the loop that previously used MCSubRegIterator we should
now detect more cases where the register is actually live out that
we previously missed.
Differential D52410
Use TRI->regsOverlap() in MachineBasicBlock::computeRegisterLiveness uabelho on Sep 24 2018, 5:17 AM. Authored by
Details For the loop that used MCRegAliasIterator this should be NFC. For the loop that previously used MCSubRegIterator we should
Diff Detail Event TimelineComment Actions I would like to create a testcase exposing that we actually fix a bug when we use regsOverlap() instead of MCSubRegIterator, but then I think I need help. In https://reviews.llvm.org/D51348 Matt suggested it can be triggered in an "AMDGPU testcase where VCC_LO or VCC_HI is defined and VCC is the live out". def VCC : RegisterWithSubRegs<"vcc", [VCC_LO, VCC_HI]>, DwarfRegAlias<VCC_LO> { Since both VCC_LO and VCC_HI are sub registers of VCC I think the old MCSubRegIterator code works? What we would need would be some register VCC_X that is made up of both VCC_LO or VCC_HI _and_ some other part so it overlaps/aliases VCC, but it's not Comment Actions An instruction just needs to def one or the other and the live out would be vcc, since it needs to visit the super register Comment Actions Hm, you think any of the cases in test/CodeGen/AMDGPU/fold-immediate-operand-shrink.mir could be copied and modifed Comment Actions code change LGTM. Comment Actions It doesn't actually work. The query is on the passed register, which is always the super register so this doesn't apply |