[llvm] [PowerPC] Remove carry register (PR #142420)
Lei Huang via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 1 07:37:44 PDT 2025
lei137 wrote:
> @lei137 without my patch:
>
> ```
> $ llvm-tblgen -gen-register-info -register-info-debug -I include -I lib/Target/PowerPC/ -o /dev/null lib/Target/PowerPC/PPC.td 2>&1 | sed -En '/Register (CARRY|XER):/,/^Register/p'
> Register CARRY:
> CostPerUse: 0
> CoveredBySubregs: 0
> HasDisjunctSubRegs: 0
> RegUnit 1
> RegUnit 2
> Register CTR:
> Register XER:
> CostPerUse: 0
> CoveredBySubregs: 0
> HasDisjunctSubRegs: 0
> RegUnit 2
> RegUnit 11
> Register ZERO:
> ```
>
> I.e. CARRY has regunits 1 and 2, XER has regunits 2 and 11, as if they partially overlap.
I am not familiar with the register allocation, so does this mean having this CARRY alias will cause the compiler to generate 1 more regunit then needed? What kind of side effects does that cause?
https://github.com/llvm/llvm-project/pull/142420
More information about the llvm-commits
mailing list