[llvm] [RISCV][GISel][WIP] Support s64 G_PHI on RV32 when D extension is enabled. (PR #119026)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 13:39:50 PST 2024
arsenm wrote:
> > Make s64 unconditionally legal and split and remap the phi in regbankselect
>
> Is there prior art for that?
AMDGPU has to split most 64-bit operations this way since VALU ops usually only support 32-bit operations, but SALU often supports 64-bits.
> Would I create G_UNMERGEs to split the s64 PHI inputs or do I need to peek through the existing G_MERGEs to find their inputs?
You should create new G_UNMERGEs in applyMappingImpl. The API for this really is a mess though. What the generic code tries to do for you is counter-productive. It attempts to (sometimes) create new virtual registers for you, and sometimes doesn't. When it does create the registers for you, there's no sensible way to do anything with them, like create the new instructions with appropriate type you need. We should rip all of that out at some point
https://github.com/llvm/llvm-project/pull/119026
More information about the llvm-commits
mailing list