1 ; Check that eh_return & unwind_init were properly lowered
2 ; RUN: llc -mcpu=corei7 < %s -verify-machineinstrs | FileCheck %s
4 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
5 target triple = "i386-pc-linux"
9 define ptr @test1(i32 %a, ptr %b) {
11 call void @llvm.eh.unwind.init()
13 call void @llvm.eh.return.i32(i32 %a, ptr %b)
14 ; CHECK: movl 12(%ebp), %[[ECX:e..]]
15 ; CHECK: movl 8(%ebp), %[[EAX:e..]]
16 ; CHECK: movl %[[ECX]], 4(%ebp,%[[EAX]])
17 ; CHECK: leal 4(%ebp,%[[EAX]]), %[[ECX2:e..]]
18 ; CHECK: movl %[[ECX2]], %esp
25 define ptr @test2(i32 %a, ptr %b) {
27 call void @llvm.eh.return.i32(i32 %a, ptr %b)
28 ; CHECK: movl 12(%ebp), %[[ECX:e..]]
29 ; CHECK: movl 8(%ebp), %[[EAX:e..]]
30 ; CHECK: movl %[[ECX]], 4(%ebp,%[[EAX]])
31 ; CHECK: leal 4(%ebp,%[[EAX]]), %[[ECX2:e..]]
32 ; CHECK: movl %[[ECX2]], %esp
37 declare void @llvm.eh.return.i32(i32, ptr)
38 declare void @llvm.eh.unwind.init()