I have a question regarding StrongPHIElimination.
With (weak) PHIElimination, register classes seems to take care of themselves, but with the Strong version, I get illegal virtual register for instruction.
In this testcase, I define the PHI operands into a bigger (super) RC, than what the using MI can handle. Weak PHI elim handled this by copying the PHI
operands into the right RC. The Strong version omitted this, and thus produced illegal code. The PHI def-operand has the right (sub) RC at entrance of PHIElim.
%vreg3 = PHI %vreg1, %vreg2
Mul %vreg3, …
This type of code will let the mul instruction use a virtreg with the SuperRC, with the StrongPHIElimination.
I wonder what are the purposes of the weak respective strong phi-eliminations? Do you think I might end up with fewer COPY’s in the end if I manually inserted
the needed COPY’s to the narrow RC’s in preRA and then run the StrongPHIElimination?