<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">re-sending, since this email account wasn’t subscribed to the list, and the list rejected it.<div><div><br><blockquote type="cite"><div>On Dec 4, 2023, at 10:50 AM, Jon Roelofs <jonathan_roelofs@apple.com> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">The tool is [1]. Thread about it here: [2].<div><br></div><div>These aren’t actually commits on the `main` branch. Rather, the infrastructure code has a bug [3] that causes email to be sent to the list when commits are added to personal branches in the users/<username> branch namespace. I have a patch up to fix that, but it needs review [4] and deployment.</div><div><br></div><div>When this stacked set of PRs eventually lands on `main`, the `[spr]`-titled commits and the branch they’re on will go away.<div><div><div><br></div><div><br></div><div>1: <a href="https://github.com/getcord/spr">https://github.com/getcord/spr</a></div><div>2: <a href="https://discourse.llvm.org/t/update-on-github-pull-requests/71540/146?u=jroelofs">https://discourse.llvm.org/t/update-on-github-pull-requests/71540/146?u=jroelofs</a></div><div>3: <a href="https://github.com/llvm/llvm-project/issues/71185">https://github.com/llvm/llvm-project/issues/71185</a></div><div><div>4: <a href="https://github.com/llvm/llvm-admin/pull/7">https://github.com/llvm/llvm-admin/pull/7</a></div><div><br></div><div><br></div><div>Cheers,</div><div><br></div><div>Jon</div><div><br><blockquote type="cite"><div>On Dec 4, 2023, at 10:38 AM, David Blaikie <dblaikie@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr">There's a lot of these "[𝘀𝗽𝗿] changes introduced through rebase" patches you've committed, presumably through some tooling - what are they? I assume they're some accident of tooling, and probably aren't intentional, or otherwise shouldn't be made/maybe are meant to be squashed into the actual commits you're trying to make?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 28, 2023 at 2:25 PM Jon Roelofs via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Jon Roelofs<br>
Date: 2023-11-28T14:25:01-08:00<br>
New Revision: a34d63cab61b3d7bd327b6a90ee4b9e3ed568e85<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/a34d63cab61b3d7bd327b6a90ee4b9e3ed568e85" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/a34d63cab61b3d7bd327b6a90ee4b9e3ed568e85</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/a34d63cab61b3d7bd327b6a90ee4b9e3ed568e85.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/a34d63cab61b3d7bd327b6a90ee4b9e3ed568e85.diff</a><br>
<br>
LOG: [𝘀𝗽𝗿] changes introduced through rebase<br>
<br>
Created using spr 1.3.4<br>
<br>
[skip ci]<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br>
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp<br>
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp<br>
llvm/test/CodeGen/AArch64/addrsig-macho.ll<br>
llvm/test/CodeGen/AArch64/ifunc-asm.ll<br>
<br>
Removed: <br>
llvm/test/Verifier/ifunc-macho.ll<br>
<br>
<br>
################################################################################<br>
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br>
index 15ff39883680369..b4ac0a70e7fde9c 100644<br>
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br>
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br>
@@ -2300,6 +2300,32 @@ bool AsmPrinter::doFinalization(Module &M) {<br>
// through user plugins.<br>
emitStackMaps();<br>
<br>
+ // Print aliases in topological order, that is, for each alias a = b,<br>
+ // b must be printed before a.<br>
+ // This is because on some targets (e.g. PowerPC) linker expects aliases in<br>
+ // such an order to generate correct TOC information.<br>
+ SmallVector<const GlobalAlias *, 16> AliasStack;<br>
+ SmallPtrSet<const GlobalAlias *, 16> AliasVisited;<br>
+ for (const auto &Alias : M.aliases()) {<br>
+ if (Alias.hasAvailableExternallyLinkage())<br>
+ continue;<br>
+ for (const GlobalAlias *Cur = &Alias; Cur;<br>
+ Cur = dyn_cast<GlobalAlias>(Cur->getAliasee())) {<br>
+ if (!AliasVisited.insert(Cur).second)<br>
+ break;<br>
+ AliasStack.push_back(Cur);<br>
+ }<br>
+ for (const GlobalAlias *AncestorAlias : llvm::reverse(AliasStack))<br>
+ emitGlobalAlias(M, *AncestorAlias);<br>
+ AliasStack.clear();<br>
+ }<br>
+<br>
+ // IFuncs must come before deubginfo in case the backend decides to emit them<br>
+ // as actual functions, since on MachO targets, we cannot create regular<br>
+ // sections after DWARF.<br>
+ for (const auto &IFunc : M.ifuncs())<br>
+ emitGlobalIFunc(M, IFunc);<br>
+<br>
// Finalize debug and EH information.<br>
for (const HandlerInfo &HI : Handlers) {<br>
NamedRegionTimer T(HI.TimerName, HI.TimerDescription, HI.TimerGroupName,<br>
@@ -2339,28 +2365,6 @@ bool AsmPrinter::doFinalization(Module &M) {<br>
}<br>
}<br>
<br>
- // Print aliases in topological order, that is, for each alias a = b,<br>
- // b must be printed before a.<br>
- // This is because on some targets (e.g. PowerPC) linker expects aliases in<br>
- // such an order to generate correct TOC information.<br>
- SmallVector<const GlobalAlias *, 16> AliasStack;<br>
- SmallPtrSet<const GlobalAlias *, 16> AliasVisited;<br>
- for (const auto &Alias : M.aliases()) {<br>
- if (Alias.hasAvailableExternallyLinkage())<br>
- continue;<br>
- for (const GlobalAlias *Cur = &Alias; Cur;<br>
- Cur = dyn_cast<GlobalAlias>(Cur->getAliasee())) {<br>
- if (!AliasVisited.insert(Cur).second)<br>
- break;<br>
- AliasStack.push_back(Cur);<br>
- }<br>
- for (const GlobalAlias *AncestorAlias : llvm::reverse(AliasStack))<br>
- emitGlobalAlias(M, *AncestorAlias);<br>
- AliasStack.clear();<br>
- }<br>
- for (const auto &IFunc : M.ifuncs())<br>
- emitGlobalIFunc(M, IFunc);<br>
-<br>
GCModuleInfo *MI = getAnalysisIfAvailable<GCModuleInfo>();<br>
assert(MI && "AsmPrinter didn't require GCModuleInfo?");<br>
for (GCModuleInfo::iterator I = MI->end(), E = MI->begin(); I != E; )<br>
<br>
diff --git a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp<br>
index e0080b145d4f995..ce736178afc8b5a 100644<br>
--- a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp<br>
+++ b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp<br>
@@ -147,7 +147,7 @@ bool CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, const CallBase &CB,<br>
if (const GlobalIFunc *IF = dyn_cast<GlobalIFunc>(CalleeV);<br>
IF && MF.getTarget().getTargetTriple().isOSBinFormatMachO()) {<br>
// ld64 requires that .symbol_resolvers to be called via a stub, so these<br>
- // must always be a diret call.<br>
+ // must always be a direct call.<br>
Info.Callee = MachineOperand::CreateGA(IF, 0);<br>
} else if (const Function *F = dyn_cast<Function>(CalleeV))<br>
Info.Callee = MachineOperand::CreateGA(F, 0);<br>
<br>
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp<br>
index f4128332008fb83..26b3a14e22b2ad9 100644<br>
--- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp<br>
+++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp<br>
@@ -1965,65 +1965,71 @@ void AArch64AsmPrinter::emitManualSymbolResolver(Module &M,<br>
OutStreamer->emitLabel(StubHelper);<br>
emitVisibility(StubHelper, GI.getVisibility());<br>
<br>
- // stp fp, lr, [sp, #-16]!<br>
- // mov fp, sp<br>
- // stp x1, x0, [sp, #-16]!<br>
- // stp x3, x2, [sp, #-16]!<br>
- // stp x5, x4, [sp, #-16]!<br>
- // stp x7, x6, [sp, #-16]!<br>
- // stp d1, d0, [sp, #-16]!<br>
- // stp d3, d2, [sp, #-16]!<br>
- // stp d5, d4, [sp, #-16]!<br>
- // stp d7, d6, [sp, #-16]!<br>
+ // stp fp, lr, [sp, #-16]<br>
+ // sub fp, sp, 16<br>
+ // stp x1, x0, [sp, #-32]<br>
+ // stp x3, x2, [sp, #-48]<br>
+ // stp x5, x4, [sp, #-64]<br>
+ // stp x7, x6, [sp, #-80]<br>
+ // stp d1, d0, [sp, #-96]<br>
+ // stp d3, d2, [sp, #-112]<br>
+ // stp d5, d4, [sp, #-128]<br>
+ // stp d7, d6, [sp, #-144]<br>
+ // sub sp, sp, 144<br>
// bl _resolver<br>
// adrp x16, lazy_pointer@GOTPAGE<br>
// ldr x16, [x16, lazy_pointer@GOTPAGEOFF]<br>
// str x0, [x16]<br>
// mov x16, x0<br>
- // ldp d7, d6, [sp], #16<br>
- // ldp d5, d4, [sp], #16<br>
- // ldp d3, d2, [sp], #16<br>
- // ldp d1, d0, [sp], #16<br>
- // ldp x7, x6, [sp], #16<br>
- // ldp x5, x4, [sp], #16<br>
- // ldp x3, x2, [sp], #16<br>
- // ldp x1, x0, [sp], #16<br>
- // ldp fp, lr, [sp], #16<br>
+ // add sp, sp, 144<br>
+ // ldp d7, d6, [sp, #-144]<br>
+ // ldp d5, d4, [sp, #-128]<br>
+ // ldp d3, d2, [sp, #-112]<br>
+ // ldp d1, d0, [sp, #-96]<br>
+ // ldp x7, x6, [sp, #-80]<br>
+ // ldp x5, x4, [sp, #-64]<br>
+ // ldp x3, x2, [sp, #-48]<br>
+ // ldp x1, x0, [sp, #-32]<br>
+ // ldp fp, lr, [sp, #-16]<br>
// br x16<br>
<br>
- OutStreamer->emitInstruction(MCInstBuilder(AArch64::STPXpre)<br>
- .addReg(AArch64::SP)<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::STPXi)<br>
.addReg(AArch64::FP)<br>
.addReg(AArch64::LR)<br>
.addReg(AArch64::SP)<br>
.addImm(-2),<br>
*STI);<br>
<br>
- OutStreamer->emitInstruction(MCInstBuilder(AArch64::ADDXri)<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::SUBXri)<br>
.addReg(AArch64::FP)<br>
.addReg(AArch64::SP)<br>
- .addImm(0)<br>
+ .addImm(16)<br>
.addImm(0),<br>
*STI);<br>
<br>
- for (int I = 0; I != 4; ++I)<br>
- OutStreamer->emitInstruction(MCInstBuilder(AArch64::STPXpre)<br>
- .addReg(AArch64::SP)<br>
- .addReg(AArch64::X1 + 2 * I)<br>
- .addReg(AArch64::X0 + 2 * I)<br>
+ for (int I = 0; I != 8; I += 2)<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::STPXi)<br>
+ .addReg(AArch64::X1 + I)<br>
+ .addReg(AArch64::X0 + I)<br>
.addReg(AArch64::SP)<br>
- .addImm(-2),<br>
+ .addImm(-4 - I),<br>
*STI);<br>
<br>
- for (int I = 0; I != 4; ++I)<br>
- OutStreamer->emitInstruction(MCInstBuilder(AArch64::STPDpre)<br>
+ for (int I = 0; I != 8; I += 2)<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::STPDi)<br>
+ .addReg(AArch64::D1 + I)<br>
+ .addReg(AArch64::D0 + I)<br>
.addReg(AArch64::SP)<br>
- .addReg(AArch64::D1 + 2 * I)<br>
- .addReg(AArch64::D0 + 2 * I)<br>
- .addReg(AArch64::SP)<br>
- .addImm(-2),<br>
+ .addImm(-12 - I),<br>
*STI);<br>
<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::SUBXri)<br>
+ .addReg(AArch64::SP)<br>
+ .addReg(AArch64::SP)<br>
+ .addImm(144)<br>
+ .addImm(0),<br>
+ *STI);<br>
+<br>
OutStreamer->emitInstruction(<br>
MCInstBuilder(AArch64::BL)<br>
.addOperand(MCOperand::createExpr(lowerConstant(GI.getResolver()))),<br>
@@ -2070,30 +2076,34 @@ void AArch64AsmPrinter::emitManualSymbolResolver(Module &M,<br>
.addImm(0),<br>
*STI);<br>
<br>
- for (int I = 3; I != -1; --I)<br>
- OutStreamer->emitInstruction(MCInstBuilder(AArch64::LDPDpost)<br>
- .addReg(AArch64::SP)<br>
- .addReg(AArch64::D1 + 2 * I)<br>
- .addReg(AArch64::D0 + 2 * I)<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::ADDXri)<br>
+ .addReg(AArch64::SP)<br>
+ .addReg(AArch64::SP)<br>
+ .addImm(144)<br>
+ .addImm(0),<br>
+ *STI);<br>
+<br>
+ for (int I = 6; I != -2; I -= 2)<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::LDPDi)<br>
+ .addReg(AArch64::D1 + I)<br>
+ .addReg(AArch64::D0 + I)<br>
.addReg(AArch64::SP)<br>
- .addImm(2),<br>
+ .addImm(-12 - I),<br>
*STI);<br>
<br>
- for (int I = 3; I != -1; --I)<br>
- OutStreamer->emitInstruction(MCInstBuilder(AArch64::LDPXpost)<br>
- .addReg(AArch64::SP)<br>
- .addReg(AArch64::X1 + 2 * I)<br>
- .addReg(AArch64::X0 + 2 * I)<br>
+ for (int I = 6; I != -2; I -= 2)<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::LDPXi)<br>
+ .addReg(AArch64::X1 + I)<br>
+ .addReg(AArch64::X0 + I)<br>
.addReg(AArch64::SP)<br>
- .addImm(2),<br>
+ .addImm(-4 - I),<br>
*STI);<br>
<br>
- OutStreamer->emitInstruction(MCInstBuilder(AArch64::LDPXpost)<br>
- .addReg(AArch64::SP)<br>
+ OutStreamer->emitInstruction(MCInstBuilder(AArch64::LDPXi)<br>
.addReg(AArch64::FP)<br>
.addReg(AArch64::LR)<br>
.addReg(AArch64::SP)<br>
- .addImm(2),<br>
+ .addImm(-2),<br>
*STI);<br>
<br>
OutStreamer->emitInstruction(MCInstBuilder(TM.getTargetTriple().isArm64e()<br>
<br>
diff --git a/llvm/test/CodeGen/AArch64/addrsig-macho.ll b/llvm/test/CodeGen/AArch64/addrsig-macho.ll<br>
index 980b0e7bc446695..62bc764e0251b33 100644<br>
--- a/llvm/test/CodeGen/AArch64/addrsig-macho.ll<br>
+++ b/llvm/test/CodeGen/AArch64/addrsig-macho.ll<br>
@@ -3,6 +3,19 @@<br>
; RUN: llvm-objdump --macho --section-headers %t | FileCheck %s --check-prefix=SECTIONS<br>
; RUN: llvm-objdump --macho --reloc %t | FileCheck %s --check-prefix=RELOCS<br>
<br>
+; CHECK: .section __DATA,__data<br>
+; CHECK: _i1.lazy_pointer:<br>
+; CHECK: .section __TEXT,__text,regular,pure_instructions<br>
+; CHECK: _i1:<br>
+; CHECK: _i1.stub_helper:<br>
+; CHECK: .section __DATA,__data<br>
+; CHECK: _i2.lazy_pointer:<br>
+; CHECK: .section __TEXT,__text,regular,pure_instructions<br>
+; CHECK: _i2:<br>
+; CHECK: _i2.stub_helper:<br>
+<br>
+; CHECK: .section __DWARF<br>
+<br>
; CHECK: .addrsig{{$}}<br>
; CHECK-NEXT: .addrsig_sym _func03_takeaddr<br>
; CHECK-NEXT: .addrsig_sym _f1<br>
@@ -118,8 +131,8 @@ declare void @f3() unnamed_addr<br>
@a1 = alias i32, i32* @g1<br>
@a2 = internal local_unnamed_addr alias i32, i32* @g2<br>
<br>
-@i1 = external ifunc void(), void()* ()* @f1<br>
-@i2 = external local_unnamed_addr ifunc void(), void()* ()* @f2<br>
+@i1 = ifunc void(), void()* ()* @f1<br>
+@i2 = internal local_unnamed_addr ifunc void(), void()* ()* @f2<br>
<br>
declare void @llvm.dbg.value(metadata, metadata, metadata)<br>
<br>
<br>
diff --git a/llvm/test/CodeGen/AArch64/ifunc-asm.ll b/llvm/test/CodeGen/AArch64/ifunc-asm.ll<br>
index fbc0f74cee46baa..ede669aa52703f7 100644<br>
--- a/llvm/test/CodeGen/AArch64/ifunc-asm.ll<br>
+++ b/llvm/test/CodeGen/AArch64/ifunc-asm.ll<br>
@@ -3,79 +3,82 @@<br>
; RUN: llc -mtriple=arm64-apple-darwin %s -filetype=asm -o - -arm64-darwin-ifunc-symbol_resolver=if_supported | FileCheck %s --check-prefixes=MACHO,MACHO-DEFAULT<br>
; RUN: llc -mtriple=arm64-apple-darwin %s -filetype=asm -o - -arm64-darwin-ifunc-symbol_resolver=never | FileCheck %s --check-prefixes=MACHO,MACHO-MANUAL<br>
; RUN: llc -mtriple=arm64-apple-darwin %s -filetype=asm -o - | FileCheck %s --check-prefixes=MACHO,MACHO-MANUAL<br>
+; RUN: llc -mtriple=arm64-apple-darwin %s -filetype=asm -o - -global-isel | FileCheck %s --check-prefixes=MACHO,MACHO-MANUAL<br>
<br>
-define internal ptr @foo_resolver() {<br>
+define internal ptr @the_resolver() {<br>
entry:<br>
ret ptr null<br>
}<br>
-; ELF: .type foo_resolver,@function<br>
-; ELF-NEXT: foo_resolver:<br>
+; ELF: .type the_resolver,@function<br>
+; ELF-NEXT: the_resolver:<br>
<br>
; MACHO: .p2align 2<br>
-; MACHO-NEXT: _foo_resolver<br>
+; MACHO-NEXT: _the_resolver<br>
<br>
<br>
-@foo_ifunc = ifunc i32 (i32), ptr @foo_resolver<br>
-; ELF: .globl foo_ifunc<br>
-; ELF-NEXT: .type foo_ifunc,@gnu_indirect_function<br>
-; ELF-NEXT: .set foo_ifunc, foo_resolver<br>
+@global_ifunc = ifunc i32 (i32), ptr @the_resolver<br>
+; ELF: .globl global_ifunc<br>
+; ELF-NEXT: .type global_ifunc,@gnu_indirect_function<br>
+; ELF-NEXT: .set global_ifunc, the_resolver<br>
<br>
-; MACHO-LINKER: .globl _foo_ifunc<br>
+; MACHO-LINKER: .globl _global_ifunc<br>
; MACHO-LINKER-NEXT: .p2align 2<br>
-; MACHO-LINKER-NEXT: _foo_ifunc:<br>
-; MACHO-LINKER-NEXT: .symbol_resolver _foo_ifunc<br>
-; MACHO-LINKER-NEXT: b _foo_resolver<br>
+; MACHO-LINKER-NEXT: _global_ifunc:<br>
+; MACHO-LINKER-NEXT: .symbol_resolver _global_ifunc<br>
+; MACHO-LINKER-NEXT: b _the_resolver<br>
<br>
-; MACHO-DEFAULT: .globl _foo_ifunc<br>
+; MACHO-DEFAULT: .globl _global_ifunc<br>
; MACHO-DEFAULT-NEXT: .p2align 2<br>
-; MACHO-DEFAULT-NEXT: _foo_ifunc:<br>
-; MACHO-DEFAULT-NEXT: .symbol_resolver _foo_ifunc<br>
-; MACHO-DEFAULT-NEXT: b _foo_resolver<br>
+; MACHO-DEFAULT-NEXT: _global_ifunc:<br>
+; MACHO-DEFAULT-NEXT: .symbol_resolver _global_ifunc<br>
+; MACHO-DEFAULT-NEXT: b _the_resolver<br>
<br>
; MACHO-MANUAL: .section __DATA,__data<br>
-; MACHO-MANUAL-NEXT: .globl _foo_ifunc.lazy_pointer<br>
-; MACHO-MANUAL-NEXT: _foo_ifunc.lazy_pointer:<br>
-; MACHO-MANUAL-NEXT: .quad _foo_ifunc.stub_helper<br>
+; MACHO-MANUAL-NEXT: .globl _global_ifunc.lazy_pointer<br>
+; MACHO-MANUAL-NEXT: _global_ifunc.lazy_pointer:<br>
+; MACHO-MANUAL-NEXT: .quad _global_ifunc.stub_helper<br>
<br>
; MACHO-MANUAL: .section __TEXT,__text,regular,pure_instructions<br>
-; MACHO-MANUAL-NEXT: .globl _foo_ifunc<br>
+; MACHO-MANUAL-NEXT: .globl _global_ifunc<br>
; MACHO-MANUAL-NEXT: .p2align 2<br>
-; MACHO-MANUAL-NEXT: _foo_ifunc:<br>
-; MACHO-MANUAL-NEXT: adrp x16, _foo_ifunc.lazy_pointer@GOTPAGE<br>
-; MACHO-MANUAL-NEXT: ldr x16, [x16, _foo_ifunc.lazy_pointer@GOTPAGEOFF]<br>
+; MACHO-MANUAL-NEXT: _global_ifunc:<br>
+; MACHO-MANUAL-NEXT: adrp x16, _global_ifunc.lazy_pointer@GOTPAGE<br>
+; MACHO-MANUAL-NEXT: ldr x16, [x16, _global_ifunc.lazy_pointer@GOTPAGEOFF]<br>
; MACHO-MANUAL-NEXT: ldr x16, [x16]<br>
; MACHO-MANUAL-NEXT: br x16<br>
-; MACHO-MANUAL-NEXT: .globl _foo_ifunc.stub_helper<br>
+; MACHO-MANUAL-NEXT: .globl _global_ifunc.stub_helper<br>
; MACHO-MANUAL-NEXT: .p2align 2<br>
-; MACHO-MANUAL-NEXT: _foo_ifunc.stub_helper:<br>
-; MACHO-MANUAL-NEXT: stp x29, x30, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: mov x29, sp<br>
-; MACHO-MANUAL-NEXT: stp x1, x0, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: stp x3, x2, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: stp x5, x4, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: stp x7, x6, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: stp d1, d0, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: stp d3, d2, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: stp d5, d4, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: stp d7, d6, [sp, #-16]!<br>
-; MACHO-MANUAL-NEXT: bl _foo_resolver<br>
-; MACHO-MANUAL-NEXT: adrp x16, _foo_ifunc.lazy_pointer@GOTPAGE<br>
-; MACHO-MANUAL-NEXT: ldr x16, [x16, _foo_ifunc.lazy_pointer@GOTPAGEOFF]<br>
+; MACHO-MANUAL-NEXT: _global_ifunc.stub_helper:<br>
+; MACHO-MANUAL-NEXT: stp x29, x30, [sp, #-16]<br>
+; MACHO-MANUAL-NEXT: sub x29, sp, #16<br>
+; MACHO-MANUAL-NEXT: stp x1, x0, [sp, #-32]<br>
+; MACHO-MANUAL-NEXT: stp x3, x2, [sp, #-48]<br>
+; MACHO-MANUAL-NEXT: stp x5, x4, [sp, #-64]<br>
+; MACHO-MANUAL-NEXT: stp x7, x6, [sp, #-80]<br>
+; MACHO-MANUAL-NEXT: stp d1, d0, [sp, #-96]<br>
+; MACHO-MANUAL-NEXT: stp d3, d2, [sp, #-112]<br>
+; MACHO-MANUAL-NEXT: stp d5, d4, [sp, #-128]<br>
+; MACHO-MANUAL-NEXT: stp d7, d6, [sp, #-144]<br>
+; MACHO-MANUAL-NEXT: sub sp, sp, #144<br>
+; MACHO-MANUAL-NEXT: bl _the_resolver<br>
+; MACHO-MANUAL-NEXT: adrp x16, _global_ifunc.lazy_pointer@GOTPAGE<br>
+; MACHO-MANUAL-NEXT: ldr x16, [x16, _global_ifunc.lazy_pointer@GOTPAGEOFF]<br>
; MACHO-MANUAL-NEXT: str x0, [x16]<br>
; MACHO-MANUAL-NEXT: add x16, x0, #0<br>
-; MACHO-MANUAL-NEXT: ldp d7, d6, [sp], #16<br>
-; MACHO-MANUAL-NEXT: ldp d5, d4, [sp], #16<br>
-; MACHO-MANUAL-NEXT: ldp d3, d2, [sp], #16<br>
-; MACHO-MANUAL-NEXT: ldp d1, d0, [sp], #16<br>
-; MACHO-MANUAL-NEXT: ldp x7, x6, [sp], #16<br>
-; MACHO-MANUAL-NEXT: ldp x5, x4, [sp], #16<br>
-; MACHO-MANUAL-NEXT: ldp x3, x2, [sp], #16<br>
-; MACHO-MANUAL-NEXT: ldp x1, x0, [sp], #16<br>
-; MACHO-MANUAL-NEXT: ldp x29, x30, [sp], #16<br>
+; MACHO-MANUAL-NEXT: add sp, sp, #144<br>
+; MACHO-MANUAL-NEXT: ldp d7, d6, [sp, #-144]<br>
+; MACHO-MANUAL-NEXT: ldp d5, d4, [sp, #-128]<br>
+; MACHO-MANUAL-NEXT: ldp d3, d2, [sp, #-112]<br>
+; MACHO-MANUAL-NEXT: ldp d1, d0, [sp, #-96]<br>
+; MACHO-MANUAL-NEXT: ldp x7, x6, [sp, #-80]<br>
+; MACHO-MANUAL-NEXT: ldp x5, x4, [sp, #-64]<br>
+; MACHO-MANUAL-NEXT: ldp x3, x2, [sp, #-48]<br>
+; MACHO-MANUAL-NEXT: ldp x1, x0, [sp, #-32]<br>
+; MACHO-MANUAL-NEXT: ldp x29, x30, [sp, #-16]<br>
; MACHO-MANUAL-NEXT: br x16<br>
<br>
<br>
-@weak_ifunc = weak ifunc i32 (i32), ptr @foo_resolver<br>
+@weak_ifunc = weak ifunc i32 (i32), ptr @the_resolver<br>
; ELF: .type weak_ifunc,@gnu_indirect_function<br>
; MACHO-LINKER: .symbol_resolver _weak_ifunc<br>
; MACHO-MANUAL: _weak_ifunc.stub_helper:<br>
<br>
diff --git a/llvm/test/Verifier/ifunc-macho.ll b/llvm/test/Verifier/ifunc-macho.ll<br>
deleted file mode 100644<br>
index 2e2166645983ac3..000000000000000<br>
--- a/llvm/test/Verifier/ifunc-macho.ll<br>
+++ /dev/null<br>
@@ -1,42 +0,0 @@<br>
-; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s<br>
-<br>
-target triple = "arm64-apple-ios"<br>
-<br>
-define ptr @resolver() {<br>
- ret ptr null<br>
-}<br>
-<br>
-@g = external global i32<br>
-@inval_objtype = ifunc void (), ptr @g<br>
-; CHECK: IFunc must have a Function resolver<br>
-<br>
-declare ptr @resolver_decl()<br>
-@inval_resolver_decl = ifunc void (), ptr @resolver_decl<br>
-; CHECK: IFunc resolver must be a definition<br>
-; CHECK-NEXT: @inval_resolver_decl<br>
-<br>
-define available_externally ptr @resolver_linker_decl() {<br>
- ret ptr null<br>
-}<br>
-@inval_resolver_decl2 = ifunc void (), ptr @resolver_linker_decl<br>
-; CHECK: IFunc resolver must be a definition<br>
-; CHECK-NEXT: @inval_resolver_decl2<br>
-<br>
-@ifunc_nonpointer_return_type = ifunc i32 (), ptr @resolver_returns_nonpointer<br>
-; CHECK: IFunc resolver must return a pointer<br>
-; CHECK-NEXT: ptr @ifunc_nonpointer_return_type<br>
-<br>
-define i32 @resolver_returns_nonpointer() {<br>
- ret i32 0<br>
-}<br>
-<br>
-@valid_external = ifunc void (), ptr @resolver<br>
-; CHECK-NOT: valid_external<br>
-<br>
-@inval_linkonce = linkonce ifunc void (), ptr @resolver<br>
-<br>
-@inval_weak = weak ifunc void (), ptr @resolver<br>
-<br>
-@inval_weak_extern = extern_weak ifunc void (), ptr @resolver<br>
-<br>
-@inval_private = private ifunc void (), ptr @resolver<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</div></blockquote></div><br></div></div></div></div></div></div></blockquote></div><br></div></body></html>