[llvm] [RISCV][GISel][WIP] Support s64 G_PHI on RV32 when D extension is enabled. (PR #119026)
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 13:00:28 PST 2024
qcolombet wrote:
> Unfortunately, this hurts the codegen of i64 phis because we now end up emitting them as an s64 G_PHI surrounded by G_MERGE/G_UNMERGE. Since are no instructions to move between 2 GPRs and an FPR, we have to go through a stack temporary.
Just to make sure I understand this.
These are two separate problems:
1. Merge/unmerge for i64 values
2. Moving 2 gprs in an FPR
If they are not, the thing that trips me is why do we use FPR for i64?
While writing this, I think I understand: that's because only FPR can hold the i64 value after legalization and you're stuck with it.
Is that the problem?
That's actually what RegBankSelect is for. At this point you're supposed to propagate the GPR requirements and break down the G_PHI into smaller G_PHI to keep the whole chain on GPRs.
I believe this type of use cases are supported, but I may be misremembering.
https://github.com/llvm/llvm-project/pull/119026
More information about the llvm-commits
mailing list