[all-commits] [llvm/llvm-project] c98bf1: [Sparc] Replace CMP instructions with InstAlias (N...
Sergei Barannikov via All-commits
all-commits at lists.llvm.org
Sun Oct 8 23:40:58 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c98bf1e45e22e2a7d107b187f5d3e7abf5e81375
https://github.com/llvm/llvm-project/commit/c98bf1e45e22e2a7d107b187f5d3e7abf5e81375
Author: Sergei Barannikov <barannikov88 at gmail.com>
Date: 2023-10-09 (Mon, 09 Oct 2023)
Changed paths:
M llvm/lib/Target/Sparc/SparcISelLowering.cpp
M llvm/lib/Target/Sparc/SparcISelLowering.h
M llvm/lib/Target/Sparc/SparcInstr64Bit.td
M llvm/lib/Target/Sparc/SparcInstrAliases.td
M llvm/lib/Target/Sparc/SparcInstrInfo.td
Log Message:
-----------
[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.
More information about the All-commits
mailing list