X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FX86%2Fphys-reg-local-regalloc.ll;h=a0adba0f83382c510719117fe083dbc750438309;hb=3d89ab8299eeecacf3c51b135190ce91057263cc;hp=e5e2d4bb230d5a03068bf1219d1f87fdbde70429;hpb=fc49bd244741fd7923768509759fbfb7198edbec;p=oota-llvm.git diff --git a/test/CodeGen/X86/phys-reg-local-regalloc.ll b/test/CodeGen/X86/phys-reg-local-regalloc.ll index e5e2d4bb230..a0adba0f833 100644 --- a/test/CodeGen/X86/phys-reg-local-regalloc.ll +++ b/test/CodeGen/X86/phys-reg-local-regalloc.ll @@ -1,4 +1,7 @@ -; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 -regalloc=local | FileCheck %s +; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 -mcpu=generic -regalloc=fast -optimize-regalloc=0 | FileCheck %s +; RUN: llc -O0 < %s -march=x86 -mtriple=i386-apple-darwin9 -mcpu=generic -regalloc=fast | FileCheck %s +; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 -mcpu=atom -regalloc=fast -optimize-regalloc=0 | FileCheck -check-prefix=ATOM %s +; CHECKed instructions should be the same with or without -O0 except on Intel Atom due to instruction scheduling. @.str = private constant [12 x i8] c"x + y = %i\0A\00", align 1 ; <[12 x i8]*> [#uses=1] @@ -13,6 +16,19 @@ entry: ; CHECK: movl %ebx, 40(%esp) ; CHECK-NOT: movl ; CHECK: addl %ebx, %eax + +; On Intel Atom the scheduler moves a movl instruction +; used for the printf call to follow movl 24(%esp), %eax +; ATOM: movl 24(%esp), %eax +; ATOM: movl +; ATOM: movl %eax, 36(%esp) +; ATOM-NOT: movl +; ATOM: movl 28(%esp), %ebx +; ATOM-NOT: movl +; ATOM: movl %ebx, 40(%esp) +; ATOM-NOT: movl +; ATOM: addl %ebx, %eax + %retval = alloca i32 ; [#uses=2] %"%ebx" = alloca i32 ; [#uses=1] %"%eax" = alloca i32 ; [#uses=2] @@ -34,15 +50,15 @@ entry: store i32 %asmtmp2, i32* %"%eax" %3 = call i32 asm "", "={ax}"() nounwind ; [#uses=1] call void asm sideeffect alignstack "movl $0, $1", "{eax},*m,~{dirflag},~{fpsr},~{flags},~{memory}"(i32 %3, i32* %result) nounwind - %4 = load i32* %result, align 4 ; [#uses=1] - %5 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @.str, i32 0, i32 0), i32 %4) nounwind ; [#uses=0] + %4 = load i32, i32* %result, align 4 ; [#uses=1] + %5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i32 %4) nounwind ; [#uses=0] store i32 0, i32* %0, align 4 - %6 = load i32* %0, align 4 ; [#uses=1] + %6 = load i32, i32* %0, align 4 ; [#uses=1] store i32 %6, i32* %retval, align 4 br label %return return: ; preds = %entry - %retval3 = load i32* %retval ; [#uses=1] + %retval3 = load i32, i32* %retval ; [#uses=1] ret i32 %retval3 }