LiveInterval error with 2 dead defs


I’m hitting a machine verifier error in a trivial testcase which I don’t understand. There are 2 dead defs of the same register:

Hi Matt,

The expectation is that each LiveInterval should only have values that are connected somehow, otherwise these should be split into different liveinterval.
I don’t think anything bad would happen when this assumption is broken (hence why it looks fine in your example), but it certainly puts needless constraints on the live-ranges.

I’m guessing Jakob added that check to make sure the splitting mechanism would create one live-range per connected component.

If you’re hitting that problem that means you miss somewhere a call to ConnectedVNInfoEqClasses::Distribute.


The associated patch caused a compilation problems on Hexagon:

The splitting of a live interval should not be done automatically upon creation. Calling LIS->getInterval(Reg) should not go around changing the code behind the scenes.

There is already a function “splitSeparateComponents” that does that. It should be added where it’s missing.

The patch is using splitSeparateComponents. Where else would it go? The problem is with the initial live interval creation.


I have an alternative at