1 ; RUN: llc < %s -O0 -fast-isel-abort=1 -march=x86 | FileCheck %s 2 3 %struct.s = type {i32, i32, i32} 4 5 define i32 @test1() nounwind { 6 tak: 7 %tmp = call i1 @foo() 8 br i1 %tmp, label %BB1, label %BB2 9 BB1: 10 ret i32 1 11 BB2: 12 ret i32 0 13 ; CHECK-LABEL: test1: 14 ; CHECK: calll 15 ; CHECK-NEXT: testb $1 16 } 17 declare zeroext i1 @foo() nounwind 18 19 declare void @foo2(%struct.s* byval) 20 21 define void @test2(%struct.s* %d) nounwind { 22 call void @foo2(%struct.s* byval %d ) 23 ret void 24 ; CHECK-LABEL: 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 } 32 33 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind 34 35 define void @test3(i8* %a) { 36 call void @llvm.memset.p0i8.i32(i8* %a, i8 0, i32 100, i32 1, i1 false) 37 ret void 38 ; CHECK-LABEL: test3: 39 ; CHECK: movl {{.*}}, (%esp) 40 ; CHECK: movl $0, 4(%esp) 41 ; CHECK: movl $100, 8(%esp) 42 ; CHECK: calll {{.*}}memset 43 } 44 45 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind 46 47 define void @test4(i8* %a, i8* %b) { 48 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a, i8* %b, i32 100, i32 1, i1 false) 49 ret void 50 ; CHECK-LABEL: test4: 51 ; CHECK: movl {{.*}}, (%esp) 52 ; CHECK: movl {{.*}}, 4(%esp) 53 ; CHECK: movl $100, 8(%esp) 54 ; CHECK: calll {{.*}}memcpy 55 } 56