Skip to content

[CodeGen][ARM64EC] Use MCSymbolRefExpr::VK_None for function aliases. #92100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ void AArch64AsmPrinter::emitFunctionEntryLabel() {
auto emitFunctionAlias = [&](MCSymbol *Src, MCSymbol *Dst) {
OutStreamer->emitSymbolAttribute(Src, MCSA_WeakAntiDep);
OutStreamer->emitAssignment(
Src, MCSymbolRefExpr::create(Dst, MCSymbolRefExpr::VK_WEAKREF,
Src, MCSymbolRefExpr::create(Dst, MCSymbolRefExpr::VK_None,
MMI->getContext()));
};

Expand Down
6 changes: 3 additions & 3 deletions llvm/test/CodeGen/AArch64/arm64ec-symbols.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ define void @caller() nounwind {
}

; CHECK: .weak_anti_dep caller
; CHECK-NEXT: .set caller, "#caller"@WEAKREF
; CHECK-NEXT: .set caller, "#caller"{{$}}

; CHECK: .weak_anti_dep func
; CHECK-NEXT: .set func, "#func"@WEAKREF
; CHECK-NEXT: .set func, "#func"{{$}}
; CHECK-NEXT: .weak_anti_dep "#func"
; CHECK-NEXT: .set "#func", "#func$exit_thunk"@WEAKREF
; CHECK-NEXT: .set "#func", "#func$exit_thunk"{{$}}

; SYM: [ 8](sec 4)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x00000000 #caller
; SYM: [21](sec 7)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x00000000 #func$exit_thunk
Expand Down
Loading