[llvm] [RISCV][GISel] Use CCValAssign::getCustomReg for converting f16/f32<->GPR. (PR #105700)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 11:48:04 PDT 2024


topperc wrote:

> > Unfortunately, IRTranslator for bitcast still generates copies between register classes of different sizes. Because of this we can't handle i16<->f16 bitcasts without crashing. Not sure if I should teach RISCVInstrInfo::copyPhysReg to allow copies between FPR16 and GPR or if I should convert the copies to instructions in GISel.
> 
> What kind of code is required to emit such a copy? I'd assume that could be directly handled in copyPhysReg.

It's just one instruction. I've just never found much evidence that other targets have mismatched copy sizes in copyPhysReg.


https://github.com/llvm/llvm-project/pull/105700


More information about the llvm-commits mailing list