[Sparc] Replace CMP instructions with InstAlias (NFCI) (#66859)
According to the manual `cmp` is a synthetic instruction that maps to `subcc` with %g0 output operand. Make it so. The change required some changes to instruction selection process. The reason is that the old CMP did not have an output operand, while setcc does have one. We want that operand to be %g0. The easiest way to achieve this seems to be to mark SUBCC with hasPostISelHook and replace the output operand with %g0 in the corresponding TargetLowering method.
Loading
Please sign in to comment