Skip to content

Commit ed5ee2f

Browse files
committed
[win][aarch64] Enable the llvm/test/CodeGen/WinEH tests for AArch64
1 parent b12fcff commit ed5ee2f

File tree

7 files changed

+58
-48
lines changed

7 files changed

+58
-48
lines changed

llvm/test/CodeGen/WinEH/lit.local.cfg

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
# FIXME: For now, override suffixes to exclude any .s tests, because some of the
2-
# buildbots have a stray misched-copy.s output file lying around that causes
3-
# failures. See misched-copy.s where we try and clean up that file.
4-
#
5-
# It should be possible to remove this override once all the bots have cycled
6-
# cleanly.
7-
config.suffixes = [".ll", ".test", ".txt"]
8-
9-
# FIXME: Add Windows on ARM support to these tests.
10-
if not "X86" in config.root.targets:
1+
if not (
2+
("X86" in config.root.targets)
3+
| ("AArch64" in config.root.targets)
4+
):
115
config.unsupported = True

llvm/test/CodeGen/WinEH/wineh-cloning.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
; RUN: opt -mtriple=x86_64-pc-windows-msvc -S -win-eh-prepare < %s | FileCheck %s
22
; RUN: opt -mtriple=x86_64-pc-windows-msvc -S -passes=win-eh-prepare < %s | FileCheck %s
3+
; RUN: opt -mtriple=aarch64-pc-windows-msvc -S -win-eh-prepare < %s | FileCheck %s
4+
; RUN: opt -mtriple=aarch64-pc-windows-msvc -S -passes=win-eh-prepare < %s | FileCheck %s
35

46
declare i32 @__CxxFrameHandler3(...)
57
declare i32 @__C_specific_handler(...)

llvm/test/CodeGen/WinEH/wineh-demotion.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
; RUN: opt -mtriple=x86_64-pc-windows-msvc -S -win-eh-prepare < %s | FileCheck %s
22
; RUN: opt -mtriple=x86_64-pc-windows-msvc -S -passes=win-eh-prepare < %s | FileCheck %s
3+
; RUN: opt -mtriple=aarch64-pc-windows-msvc -S -win-eh-prepare < %s | FileCheck %s
4+
; RUN: opt -mtriple=aarch64-pc-windows-msvc -S -passes=win-eh-prepare < %s | FileCheck %s
35

46
declare i32 @__CxxFrameHandler3(...)
57

llvm/test/CodeGen/WinEH/wineh-empty-seh-scope.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
; RUN: llc -mtriple=x86_64-pc-windows-msvc19.41.34120 < %s | FileCheck %s
2+
; RUN: llc -mtriple=x86_64-pc-windows-msvc < %s | FileCheck %s --check-prefixes=CHECK,X64
3+
; RUN: llc -mtriple=aarch64-pc-windows-msvc < %s | FileCheck %s --check-prefixes=CHECK,AARCH64
34

45
define void @foo() personality ptr @__CxxFrameHandler3 {
56
; CHECK-LABEL: foo:
6-
; CHECK: # %bb.0:
7-
; CHECK-NEXT: nop # avoids zero-length function
7+
; CHECK: %bb.0:
8+
; X64-NEXT: nop # avoids zero-length function
9+
; AARCH64: brk #0x1
810
call void @llvm.seh.scope.begin()
911
unreachable
1012
}

llvm/test/CodeGen/WinEH/wineh-nested-unwind.ll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
; RUN: llc < %s | FileCheck %s
2-
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
3-
target triple = "x86_64-pc-windows-msvc18.0.0"
1+
; RUN: llc -mtriple=x86_64-pc-windows-msvc < %s | FileCheck %s
2+
; RUN: llc -mtriple=aarch64-pc-windows-msvc < %s | FileCheck %s
43

54
; Function Attrs: uwtable
65
define void @f() #0 personality ptr @__CxxFrameHandler3 {

llvm/test/CodeGen/WinEH/wineh-no-demotion.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
; RUN: opt -mtriple=x86_64-pc-windows-msvc -S -win-eh-prepare -disable-demotion -disable-cleanups < %s | FileCheck %s
22
; RUN: opt -mtriple=x86_64-pc-windows-msvc -S -passes=win-eh-prepare -disable-demotion -disable-cleanups < %s | FileCheck %s
3+
; RUN: opt -mtriple=aarch64-pc-windows-msvc -S -win-eh-prepare -disable-demotion -disable-cleanups < %s | FileCheck %s
4+
; RUN: opt -mtriple=aarch64-pc-windows-msvc -S -passes=win-eh-prepare -disable-demotion -disable-cleanups < %s | FileCheck %s
35

46
declare i32 @__CxxFrameHandler3(...)
57

llvm/test/CodeGen/WinEH/wineh-noret-cleanup.ll

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
; RUN: sed -e s/.Cxx:// %s | llc -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefix=CXX
2-
; RUN: sed -e s/.Seh:// %s | llc -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefix=SEH
1+
; RUN: sed -e s/.Cxx:// %s | llc -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefixes=CXX,X64CXX
2+
; RUN: sed -e s/.Seh:// %s | llc -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefixes=SEH
3+
; RUN: sed -e s/.Cxx:// %s | llc -mtriple=aarch64-pc-windows-msvc | FileCheck %s --check-prefix=CXX
4+
; RUN: sed -e s/.Seh:// %s | llc -mtriple=aarch64-pc-windows-msvc | FileCheck %s --check-prefix=SEH
35

46
declare i32 @__CxxFrameHandler3(...)
57
declare i32 @__C_specific_handler(...)
@@ -44,37 +46,44 @@ catch.body.2:
4446

4547
; CXX-LABEL: test:
4648
; CXX-LABEL: $ip2state$test:
47-
; CXX-NEXT: .long .Lfunc_begin0@IMGREL
48-
; CXX-NEXT: .long -1
49-
; CXX-NEXT: .long .Ltmp0@IMGREL+1
50-
; CXX-NEXT: .long 1
51-
; CXX-NEXT: .long .Ltmp1@IMGREL+1
52-
; CXX-NEXT: .long -1
53-
; CXX-NEXT: .long "?catch$3@?0?test@4HA"@IMGREL
54-
; CXX-NEXT: .long 2
55-
; CXX-NEXT: .long .Ltmp2@IMGREL+1
56-
; CXX-NEXT: .long 3
57-
; CXX-NEXT: .long .Ltmp3@IMGREL+1
58-
; CXX-NEXT: .long 2
59-
; CXX-NEXT: .long "?catch$5@?0?test@4HA"@IMGREL
60-
; CXX-NEXT: .long 4
49+
; CXX-NEXT: .[[ENTRY:long|word]] .Lfunc_begin0@IMGREL
50+
; CXX-NEXT: .[[ENTRY]] -1
51+
; CXX-NEXT: .[[ENTRY]] .Ltmp0@IMGREL
52+
; X64CXX-SAME: +1
53+
; CXX-NEXT: .[[ENTRY]] 1
54+
; CXX-NEXT: .[[ENTRY]] .Ltmp1@IMGREL
55+
; X64CXX-SAME: +1
56+
; CXX-NEXT: .[[ENTRY]] -1
57+
; CXX-NEXT: .[[ENTRY]] "?catch$3@?0?test@4HA"@IMGREL
58+
; CXX-NEXT: .[[ENTRY]] 2
59+
; CXX-NEXT: .[[ENTRY]] .Ltmp2@IMGREL
60+
; X64CXX-SAME: +1
61+
; CXX-NEXT: .[[ENTRY]] 3
62+
; CXX-NEXT: .[[ENTRY]] .Ltmp3@IMGREL
63+
; X64CXX-SAME: +1
64+
; CXX-NEXT: .[[ENTRY]] 2
65+
; CXX-NEXT: .[[ENTRY]] "?catch$5@?0?test@4HA"@IMGREL
66+
; CXX-NEXT: .[[ENTRY]] 4
6167

6268
; SEH-LABEL: test:
69+
; SEH: .LBB0_[[CATCH2:[0-9]+]]: {{.*}} %catch.body.2
70+
; SEH: .LBB0_[[CATCH:[0-9]+]]: {{.*}} %catch.body
6371
; SEH-LABEL: .Llsda_begin0:
64-
; SEH-NEXT: .long .Ltmp0@IMGREL
65-
; SEH-NEXT: .long .Ltmp1@IMGREL+1
66-
; SEH-NEXT: .long dummy_filter@IMGREL
67-
; SEH-NEXT: .long .LBB0_3@IMGREL
68-
; SEH-NEXT: .long .Ltmp0@IMGREL
69-
; SEH-NEXT: .long .Ltmp1@IMGREL+1
70-
; SEH-NEXT: .long dummy_filter@IMGREL
71-
; SEH-NEXT: .long .LBB0_5@IMGREL
72-
; SEH-NEXT: .long .Ltmp2@IMGREL
73-
; SEH-NEXT: .long .Ltmp3@IMGREL+1
74-
; SEH-NEXT: .long "?dtor$2@?0?test@4HA"@IMGREL
75-
; SEH-NEXT: .long 0
76-
; SEH-NEXT: .long .Ltmp2@IMGREL
77-
; SEH-NEXT: .long .Ltmp3@IMGREL+1
78-
; SEH-NEXT: .long dummy_filter@IMGREL
79-
; SEH-NEXT: .long .LBB0_5@IMGREL
72+
; SEH-NEXT: .[[ENTRY:long|word]] .Ltmp0@IMGREL
73+
; SEH-NEXT: .[[ENTRY]] .Ltmp1@IMGREL+1
74+
; SEH-NEXT: .[[ENTRY]] dummy_filter@IMGREL
75+
; SEH-NEXT: .[[ENTRY]] .LBB0_[[CATCH]]@IMGREL
76+
; SEH-NEXT: .[[ENTRY]] .Ltmp0@IMGREL
77+
; SEH-NEXT: .[[ENTRY]] .Ltmp1@IMGREL+1
78+
; SEH-NEXT: .[[ENTRY]] dummy_filter@IMGREL
79+
; SEH-NEXT: .[[ENTRY]] .LBB0_[[CATCH2]]@IMGREL
80+
; SEH-NEXT: .[[ENTRY]] .Ltmp2@IMGREL
81+
; SEH-NEXT: .[[ENTRY]] .Ltmp3@IMGREL+1
82+
; SEH-NEXT: .[[ENTRY]] "?dtor$[[DTOR:[0-9]+]]@?0?test@4HA"@IMGREL
83+
; SEH-NEXT: .[[ENTRY]] 0
84+
; SEH-NEXT: .[[ENTRY]] .Ltmp2@IMGREL
85+
; SEH-NEXT: .[[ENTRY]] .Ltmp3@IMGREL+1
86+
; SEH-NEXT: .[[ENTRY]] dummy_filter@IMGREL
87+
; SEH-NEXT: .[[ENTRY]] .LBB0_[[CATCH2]]@IMGREL
8088
; SEH-NEXT: .Llsda_end0:
89+
; SEH: "?dtor$[[DTOR]]@?0?test@4HA"

0 commit comments

Comments
 (0)