File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ bool X86WinEHUnwindV2::runOnMachineFunction(MachineFunction &MF) {
190
190
State = FunctionState::FinishedEpilog;
191
191
break ;
192
192
193
+ case X86::LEA64r:
193
194
case X86::MOV64rr:
194
195
case X86::ADD64ri32:
195
196
if (State == FunctionState::InEpilog) {
@@ -210,7 +211,8 @@ bool X86WinEHUnwindV2::runOnMachineFunction(MachineFunction &MF) {
210
211
HasStackDealloc = true ;
211
212
} else if (State == FunctionState::FinishedEpilog)
212
213
return rejectCurrentFunctionInternalError (
213
- MF, Mode, " Unexpected mov or add instruction after the epilog" );
214
+ MF, Mode,
215
+ " Unexpected lea, mov or add instruction after the epilog" );
214
216
break ;
215
217
216
218
case X86::POP64r:
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ body: |
106
106
# RUN: -x86-wineh-unwindv2-force-mode=1 | FileCheck %s \
107
107
# RUN: --check-prefix=BESTEFFORT
108
108
# DEALLOC-AFTER-EPILOG: LLVM ERROR: Windows x64 Unwind v2 is required, but LLVM has generated incompatible code in function 'dealloc_after_epilog':
109
- # DEALLOC-AFTER-EPILOG-SAME: Unexpected mov or add instruction after the epilog
109
+ # DEALLOC-AFTER-EPILOG-SAME: Unexpected lea, mov or add instruction after the epilog
110
110
111
111
--- |
112
112
define dso_local void @dealloc_after_epilog() local_unnamed_addr {
Original file line number Diff line number Diff line change @@ -152,6 +152,25 @@ entry:
152
152
; CHECK-NEXT: retq
153
153
; CHECK-NEXT: .seh_endproc
154
154
155
+ define dso_local void @large_aligned_alloc () align 16 {
156
+ %1 = alloca [128 x i8 ], align 64
157
+ ret void
158
+ }
159
+ ; CHECK-LABEL: large_aligned_alloc:
160
+ ; CHECK: .seh_unwindversion 2
161
+ ; CHECK: .seh_pushreg %rbp
162
+ ; CHECK: .seh_stackalloc 176
163
+ ; CHECK: .seh_setframe %rbp, 128
164
+ ; CHECK: .seh_endprologue
165
+ ; CHECK-NOT: .seh_endproc
166
+ ; CHECK: .seh_startepilogue
167
+ ; CHECK-NEXT: leaq 48(%rbp), %rsp
168
+ ; CHECK-NEXT: .seh_unwindv2start
169
+ ; CHECK-NEXT: popq %rbp
170
+ ; CHECK-NEXT: .seh_endepilogue
171
+ ; CHECK-NEXT: retq
172
+ ; CHECK-NEXT: .seh_endproc
173
+
155
174
declare void @a () local_unnamed_addr
156
175
declare i32 @b () local_unnamed_addr
157
176
declare i32 @c (i32 ) local_unnamed_addr
You can’t perform that action at this time.
0 commit comments