Skip to content

Commit 7e8eaa5

Browse files
committed
[win][arm64ec] More fixes for building and testing Arm64EC Windows
1 parent efbbc0b commit 7e8eaa5

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

llvm/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ test/tools/split-file/basic.test text eol=lf
3232
test/tools/split-file/Inputs/basic-*.txt eol=lf
3333
test/tools/split-file/basic.crlf.test text eol=crlf
3434
test/tools/split-file/Inputs/basic-*.crlf eol=crlf
35+
test/tools/llvm-objcopy/MachO/Inputs/macho_sections.s text eol=lf

llvm/lib/IR/Mangler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ void llvm::emitLinkerFlagsForUsedCOFF(raw_ostream &OS, const GlobalValue *GV,
292292
}
293293

294294
std::optional<std::string> llvm::getArm64ECMangledFunctionName(StringRef Name) {
295+
if (Name.empty())
296+
reportFatalUsageError("ARM64EC does not support empty function names");
297+
295298
if (Name[0] != '?') {
296299
// For non-C++ symbols, prefix the name with "#" unless it's already
297300
// mangled.

llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -727,9 +727,6 @@ AArch64Arm64ECCallLowering::buildPatchableThunk(GlobalAlias *UnmangledAlias,
727727

728728
// Lower an indirect call with inline code.
729729
void AArch64Arm64ECCallLowering::lowerCall(CallBase *CB) {
730-
assert(CB->getModule()->getTargetTriple().isOSWindows() &&
731-
"Only applicable for Windows targets");
732-
733730
IRBuilder<> B(CB);
734731
Value *CalledOperand = CB->getCalledOperand();
735732

@@ -872,7 +869,7 @@ bool AArch64Arm64ECCallLowering::runOnModule(Module &Mod) {
872869
if (!F.isDeclaration() && (!F.hasLocalLinkage() || F.hasAddressTaken()) &&
873870
F.getCallingConv() != CallingConv::ARM64EC_Thunk_Native &&
874871
F.getCallingConv() != CallingConv::ARM64EC_Thunk_X64) {
875-
if (!F.hasComdat())
872+
if (!F.hasComdat() && !F.isDeclarationForLinker())
876873
F.setComdat(Mod.getOrInsertComdat(F.getName()));
877874
ThunkMapping.push_back(
878875
{&F, buildEntryThunk(&F), Arm64ECThunkType::Entry});

llvm/test/CodeGen/Generic/allow-check.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
; XFAIL: target=nvptx{{.*}}
77
; XFAIL: target=sparc{{.*}}
88
; XFAIL: target=hexagon-{{.*}}
9+
; XFAIL: target=arm64ec-{{.*}}
910

1011
; RUN: llc < %s -O3 -global-isel=0 -fast-isel=0
1112
; RUN: llc < %s -O3 -global-isel=1 -fast-isel=0

llvm/test/CodeGen/Generic/vector-constantexpr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: llc < %s
22

3-
define void @""(ptr %inregs, ptr %outregs) {
3+
define void @test(ptr %inregs, ptr %outregs) {
44
%a_addr.i = alloca <4 x float> ; <ptr> [#uses=1]
55
store <4 x float> < float undef, float undef, float undef, float undef >, ptr %a_addr.i
66
ret void

0 commit comments

Comments
 (0)