It seems that there can be other cases with this that also can lead to wrong code (discovered with csmith). This time it involved not the kill flag but the undef flag. Use the intersection of the flags from both MachineOperand:s instead of the RegState from just one of them.
10 KiB
10 KiB