[llvm] [X86][GlobalISel] Added support for FNEG (PR #167919)
Evgenii Kudriashov via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 22 08:43:30 PST 2025
================
@@ -109,6 +109,9 @@ struct X86OutgoingValueHandler : public CallLowering::OutgoingValueHandler {
const CCValAssign &VA) override {
MIB.addUse(PhysReg, RegState::Implicit);
Register ExtReg = extendRegister(ValVReg, VA);
+ if ((VA.getLocReg() == X86::FP0 || VA.getLocReg() == X86::FP1) &&
+ STI.getTargetLowering()->isScalarFPTypeInSSEReg(VA.getValVT()))
+ ExtReg = MIRBuilder.buildFPExt(LLT::scalar(80), ExtReg).getReg(0);
----------------
e-kud wrote:
I haven't checked but I suspect that `G_FPEXT` support for fp80 type is required. Would you kindly review this PR https://github.com/llvm/llvm-project/pull/141611? It has stalled for 6 months. I'm not sure that we need to introduce extra opcodes to illustrate FPEXT_LOAD or FPTRUNC_LOAD as there is only one way of conversion between floats and it will be clear once float LLTs are merged and enabled in X86 backend.
https://github.com/llvm/llvm-project/pull/167919
More information about the llvm-commits
mailing list