Skip to content

Commit 0fa515f

Browse files
authored
[win] Merge the x64 and AArch64 wineh-reuse-catch-alloca.ll tests (#149178)
Cleans up debt from #147849 and #147860 I had originally duplicated this test since the WinEH directory wasn't enabled for AArch64, but now that we can run AArch64 tests in that directory, I've unified the tests.
1 parent 6932080 commit 0fa515f

File tree

2 files changed

+22
-112
lines changed

2 files changed

+22
-112
lines changed

llvm/test/CodeGen/AArch64/wineh-reuse-catch-alloca.ll

Lines changed: 0 additions & 100 deletions
This file was deleted.

llvm/test/CodeGen/WinEH/wineh-reuse-catch-alloca.ll

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
; RUN: llc %s --mtriple=x86_64-pc-windows-msvc -o - | FileCheck %s
1+
; RUN: llc %s --mtriple=x86_64-pc-windows-msvc -o - | FileCheck %s --check-prefixes=CHECK,X64
2+
; RUN: %if aarch64-registered-target %{ llc %s --mtriple=aarch64-pc-windows-msvc -o - | FileCheck %s --check-prefixes=CHECK,ARM64 %}
23

34
; Tests the fixed object layouts when two catchpads re-use the same stack
45
; allocation for this catch objects.
@@ -18,27 +19,36 @@
1819
; }
1920
; ```
2021

21-
; Minimum stack alloc is 64 bytes, so no change there.
2222
; CHECK-LABEL: calls_boom:
23-
; CHECK: subq $64, %rsp
24-
; CHECK: .seh_stackalloc 64
23+
; Minimum stack alloc is 64 bytes, so no change there.
24+
; X64: subq $64, %rsp
25+
; X64: .seh_stackalloc 64
26+
; Only need 48 bytes on the stack, not 64.
27+
; ARM64: sub sp, sp, #48
28+
; ARM64: .seh_stackalloc 48
2529

2630
; Both the catch blocks load from the same address.
2731
; CHECK-LABEL: "?catch$3@?0?calls_boom@4HA":
28-
; CHECK: movq -8(%rbp), %rax
32+
; X64: movq -8(%rbp), %rax
33+
; ARM64: ldr x8, [x29, #24]
2934
; CHECK-LABEL: "?catch$4@?0?calls_boom@4HA":
30-
; CHECK: movq -8(%rbp), %rax
35+
; X64: movq -8(%rbp), %rax
36+
; ARM64: ldr x8, [x29, #24]
3137

32-
; There's enough space for the UnwindHelp to be at 48 instead of 40
3338
; CHECK-LABEL: $cppxdata$calls_boom:
34-
; CHECK: .long 48 # UnwindHelp
39+
; There's enough space for the UnwindHelp to be at 48 instead of 40
40+
; X64: .long 48 # UnwindHelp
41+
; There's enough space for the UnwindHelp to be at -16 instead of -32
42+
; ARM64: .word -16 // UnwindHelp
3543

3644
; Both catches have the same object offset.
3745
; CHECK-LABEL: $handlerMap$0$calls_boom:
38-
; CHECK: .long 56 # CatchObjOffset
39-
; CHECK-NEXT: .long "?catch$3@?0?calls_boom@4HA"@IMGREL # Handler
40-
; CHECK: .long 56 # CatchObjOffset
41-
; CHECK-NEXT: .long "?catch$4@?0?calls_boom@4HA"@IMGREL # Handler
46+
; X64: .long 56 # CatchObjOffset
47+
; ARM64: .word -8 // CatchObjOffset
48+
; CHECK-NEXT: "?catch$3@?0?calls_boom@4HA"@IMGREL
49+
; X64: .long 56 # CatchObjOffset
50+
; ARM64: .word -8 // CatchObjOffset
51+
; CHECK-NEXT: "?catch$4@?0?calls_boom@4HA"@IMGREL
4252

4353
%rtti.TypeDescriptor2 = type { ptr, ptr, [3 x i8] }
4454

0 commit comments

Comments
 (0)