blob: 7e57965bb5b30182a43a8ca07c0f105b474f5263 [file] [log] [blame]
Eli Friedmanc0883452011-05-20 22:21:04 +00001; RUN: llc < %s -O0 -fast-isel-abort -march=x86 | FileCheck %s
Evan Chengdebdea02008-09-08 17:15:42 +00002
Eli Friedmanc0883452011-05-20 22:21:04 +00003%struct.s = type {i32, i32, i32}
4
5define i32 @test1() nounwind {
Evan Chengdebdea02008-09-08 17:15:42 +00006tak:
7 %tmp = call i1 @foo()
8 br i1 %tmp, label %BB1, label %BB2
9BB1:
10 ret i32 1
11BB2:
12 ret i32 0
Eli Friedmanc0883452011-05-20 22:21:04 +000013; CHECK: test1:
Eli Friedman19515b42011-05-17 18:29:03 +000014; CHECK: calll
15; CHECK-NEXT: testb $1
Evan Chengdebdea02008-09-08 17:15:42 +000016}
Evan Chengdebdea02008-09-08 17:15:42 +000017declare i1 @foo() zeroext nounwind
Eli Friedmanc0883452011-05-20 22:21:04 +000018
19declare void @foo2(%struct.s* byval)
20
21define void @test2(%struct.s* %d) nounwind {
22 call void @foo2(%struct.s* %d byval)
23 ret void
24; CHECK: test2:
25; CHECK: movl (%eax)
26; CHECK: movl {{.*}}, (%esp)
27; CHECK: movl 4(%eax)
28; CHECK: movl {{.*}}, 4(%esp)
29; CHECK: movl 8(%eax)
30; CHECK: movl {{.*}}, 8(%esp)
31}