[llvm] [RISCV] Remove RISCVCCAssignFn and Simplify (PR #191071)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 09:15:38 PDT 2026
================
@@ -173,39 +145,6 @@ struct RISCVOutgoingValueHandler : public CallLowering::OutgoingValueHandler {
const RISCVSubtarget &Subtarget;
};
-struct RISCVIncomingValueAssigner : public CallLowering::IncomingValueAssigner {
-private:
- // The function used internally to assign args - we ignore the AssignFn stored
- // by IncomingValueAssigner since RISC-V implements its CC using a custom
- // function with a different signature.
- RISCVCCAssignFn *RISCVAssignFn;
-
- // Whether this is assigning args from a return.
- bool IsRet;
-
-public:
- RISCVIncomingValueAssigner(RISCVCCAssignFn *RISCVAssignFn_, bool IsRet)
- : CallLowering::IncomingValueAssigner(nullptr),
- RISCVAssignFn(RISCVAssignFn_), IsRet(IsRet) {}
-
- bool assignArg(unsigned ValNo, EVT OrigVT, MVT ValVT, MVT LocVT,
- CCValAssign::LocInfo LocInfo,
- const CallLowering::ArgInfo &Info, ISD::ArgFlagsTy Flags,
- CCState &State) override {
- MachineFunction &MF = State.getMachineFunction();
-
- if (LocVT.isScalableVector())
----------------
lenary wrote:
I'm pretty sure this was happening in the wrong place anyway.
In SDag, this was called when lowering arguments (incoming values), and return values (outgoing values). It was not used when lowering calls (neither for outgoing values nor incoming values).
In this GISel code, this is only used on incoming values (arguments in the callee, return values in the caller), not on outgoing values, so it misses a function that returns a scalable vector, and it marks a function that has a scalable vector returned to it from a caller.
I'll make sure this is fixed, but I'm not sure it shows up in tests because we filter out directives. I don't know if we can ensure important directives are not filtered by update_llc_test_checks.py
https://github.com/llvm/llvm-project/pull/191071
More information about the llvm-commits
mailing list