1; RUN: llc < %s -mcpu=atom -mtriple=i686-linux -no-x86-call-frame-opt | FileCheck -check-prefix=ATOM %s 2; RUN: llc < %s -mcpu=core2 -mtriple=i686-linux -no-x86-call-frame-opt | FileCheck %s 3 4declare void @use_arr(i8*) 5declare void @many_params(i32, i32, i32, i32, i32, i32) 6 7define void @test1() nounwind { 8; ATOM-LABEL: test1: 9; ATOM: leal -1052(%esp), %esp 10; ATOM-NOT: sub 11; ATOM: call 12; ATOM: leal 1052(%esp), %esp 13 14; CHECK-LABEL: test1: 15; CHECK: subl 16; CHECK: call 17; CHECK-NOT: lea 18 %arr = alloca [1024 x i8], align 16 19 %arr_ptr = getelementptr inbounds [1024 x i8], [1024 x i8]* %arr, i8 0, i8 0 20 call void @use_arr(i8* %arr_ptr) 21 ret void 22} 23 24define void @test2() nounwind { 25; ATOM-LABEL: test2: 26; ATOM: leal -28(%esp), %esp 27; ATOM: call 28; ATOM: leal 28(%esp), %esp 29 30; CHECK-LABEL: test2: 31; CHECK-NOT: lea 32 call void @many_params(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6) 33 ret void 34} 35 36define void @test3() nounwind { 37; ATOM-LABEL: test3: 38; ATOM: leal -8(%esp), %esp 39; ATOM: leal 8(%esp), %esp 40 41; CHECK-LABEL: test3: 42; CHECK-NOT: lea 43 %x = alloca i32, align 4 44 %y = alloca i32, align 4 45 store i32 0, i32* %x, align 4 46 ret void 47} 48 49