Skip to content

Commit f8cbacb

Browse files
committed
add share TOC base
1 parent 4aaf43b commit f8cbacb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5265,6 +5265,11 @@ bool PPCTargetLowering::IsEligibleForTailCallOptimization_AIX(
52655265
if (CalleeCC == CallingConv::Fast && TailCallOpt)
52665266
return true;
52675267

5268+
// Check if we share the TOC base.
5269+
if (!Subtarget.isUsingPCRelativeCalls() &&
5270+
!callsShareTOCBase(CallerFunc, CalleeGV, getTargetMachine()))
5271+
return false;
5272+
52685273
if (DisableSCO)
52695274
return false;
52705275

0 commit comments

Comments
 (0)