Skip to content
Unverified Commit c98bf1e4 authored by Sergei Barannikov's avatar Sergei Barannikov Committed by GitHub
Browse files

[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.
parent 7cfe32d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment