The sub-register logic is correct for an entirely undef register, but needlessly complicated. We can do a single undef pseudo instead.
Note that the undef being adjusted in the test is the pass thru, which doesn't actually require the non-overlap constraint. However, the sub-register logic doesn't include the special case for passthru operands that the implicit_def logic does. However, the logic in implicit_def logic also looks suspect, so this isn't as simple as just copying it across. We really should merge the two code paths, and I'm looking into that.
Is this the correct base line? The if (false looks suspicious