53 lines · plain
1; RUN: llc < %s -stack-symbol-ordering=0 -mtriple=i386-apple-darwin9 -mcpu=generic -regalloc=fast -optimize-regalloc=0 -no-x86-call-frame-opt | FileCheck %s2; RUN: llc -O0 < %s -stack-symbol-ordering=0 -mtriple=i386-apple-darwin9 -mcpu=generic -regalloc=fast -no-x86-call-frame-opt | FileCheck %s3; RUN: llc < %s -stack-symbol-ordering=0 -mtriple=i386-apple-darwin9 -mcpu=atom -regalloc=fast -optimize-regalloc=0 -no-x86-call-frame-opt | FileCheck %s4 5@.str = private constant [12 x i8] c"x + y = %i\0A\00", align 1 ; <ptr> [#uses=1]6 7define i32 @main() nounwind {8entry:9; CHECK: movl 24(%esp), %eax10; CHECK-NOT: movl11; CHECK: movl %eax, 36(%esp)12; CHECK-NOT: movl13; CHECK: movl 28(%esp), %ebx14; CHECK-NOT: movl15; CHECK: movl %ebx, 40(%esp)16; CHECK-NOT: movl17; CHECK: addl %ebx, %eax18 19 %retval = alloca i32 ; <ptr> [#uses=2]20 %"%ebx" = alloca i32 ; <ptr> [#uses=1]21 %"%eax" = alloca i32 ; <ptr> [#uses=2]22 %result = alloca i32 ; <ptr> [#uses=2]23 %y = alloca i32 ; <ptr> [#uses=2]24 %x = alloca i32 ; <ptr> [#uses=2]25 %0 = alloca i32 ; <ptr> [#uses=2]26 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]27 store i32 1, ptr %x, align 428 store i32 2, ptr %y, align 429 call void asm sideeffect alignstack "# top of block", "~{dirflag},~{fpsr},~{flags},~{edi},~{esi},~{edx},~{ecx},~{eax}"() nounwind30 %asmtmp = call i32 asm sideeffect alignstack "movl $1, $0", "=={eax},*m,~{dirflag},~{fpsr},~{flags},~{memory}"(ptr elementtype(i32) %x) nounwind ; <i32> [#uses=1]31 store i32 %asmtmp, ptr %"%eax"32 %asmtmp1 = call i32 asm sideeffect alignstack "movl $1, $0", "=={ebx},*m,~{dirflag},~{fpsr},~{flags},~{memory}"(ptr elementtype(i32) %y) nounwind ; <i32> [#uses=1]33 store i32 %asmtmp1, ptr %"%ebx"34 %1 = call i32 asm "", "={bx}"() nounwind ; <i32> [#uses=1]35 %2 = call i32 asm "", "={ax}"() nounwind ; <i32> [#uses=1]36 %asmtmp2 = call i32 asm sideeffect alignstack "addl $1, $0", "=={eax},{ebx},{eax},~{dirflag},~{fpsr},~{flags},~{memory}"(i32 %1, i32 %2) nounwind ; <i32> [#uses=1]37 store i32 %asmtmp2, ptr %"%eax"38 %3 = call i32 asm "", "={ax}"() nounwind ; <i32> [#uses=1]39 call void asm sideeffect alignstack "movl $0, $1", "{eax},*m,~{dirflag},~{fpsr},~{flags},~{memory}"(i32 %3, ptr elementtype(i32) %result) nounwind40 %4 = load i32, ptr %result, align 4 ; <i32> [#uses=1]41 %5 = call i32 (ptr, ...) @printf(ptr @.str, i32 %4) nounwind ; <i32> [#uses=0]42 store i32 0, ptr %0, align 443 %6 = load i32, ptr %0, align 4 ; <i32> [#uses=1]44 store i32 %6, ptr %retval, align 445 br label %return46 47return: ; preds = %entry48 %retval3 = load i32, ptr %retval ; <i32> [#uses=1]49 ret i32 %retval350}51 52declare i32 @printf(ptr, ...) nounwind53