Skip to content

Commit ecba68c

Browse files
committed
uncomment CopyOnce return
1 parent 114e136 commit ecba68c

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

llvm/lib/Target/X86/X86ISelLoweringCall.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,15 +2047,12 @@ X86TargetLowering::ByValCopyKind X86TargetLowering::ByValNeedsCopyForTailCall(
20472047
int64_t SrcOffset = MFI.getObjectOffset(SrcFI);
20482048
int64_t DstOffset = MFI.getObjectOffset(DstFI);
20492049

2050-
// FIXME:
2051-
2052-
// // If the source is in the local frame, then the copy to the argument
2053-
// memory
2054-
// // is always valid.
2055-
// bool FixedSrc = MFI.isFixedObjectIndex(SrcFI);
2056-
// if (!FixedSrc ||
2057-
// (FixedSrc && SrcOffset < -(int64_t)AFI->getArgRegsSaveSize()))
2058-
// return CopyOnce;
2050+
2051+
// If the source is in the local frame, then the copy to the argument
2052+
// memory is always valid.
2053+
bool FixedSrc = MFI.isFixedObjectIndex(SrcFI);
2054+
if (!FixedSrc || (FixedSrc && SrcOffset < 0))
2055+
return CopyOnce;
20592056

20602057
// In the case of byval arguments split between registers and the stack,
20612058
// computeAddrForCallArg returns a FrameIndex which corresponds only to the

0 commit comments

Comments
 (0)