[llvm] [RISCV][GISEL] Use MO_PLT when Callee is a Global or Symbol (PR #71982)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 13:26:32 PST 2023


================
@@ -463,8 +463,23 @@ bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
   // TODO: Support tail calls.
   Info.IsTailCall = false;
 
-  if (!Info.Callee.isReg())
-    Info.Callee.setTargetFlags(RISCVII::MO_CALL);
+  // If the callee is a GlobalAddress or ExternalSymbol, then use MO_PLT.
----------------
topperc wrote:

This description is missing the DSOLocal checkl

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


More information about the llvm-commits mailing list