blob: 1e7a418d1d67fb5e58b042d022612fc9d06d685a [file] [log] [blame]
Evan Cheng578f3232009-12-01 22:25:00 +00001; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
2; pr5391
3
4define void @t() nounwind ssp {
5entry:
6; CHECK: t:
7; CHECK: movl %ecx, %eax
8; CHECK: %eax = foo (%eax, %ecx)
9 %b = alloca i32 ; <i32*> [#uses=2]
10 %a = alloca i32 ; <i32*> [#uses=1]
11 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
12 %0 = load i32* %b, align 4 ; <i32> [#uses=1]
13 %1 = load i32* %b, align 4 ; <i32> [#uses=1]
14 %asmtmp = call i32 asm "$0 = foo ($1, $2)", "=&{ax},%0,r,~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1) nounwind ; <i32> [#uses=1]
15 store i32 %asmtmp, i32* %a
16 br label %return
17
18return: ; preds = %entry
19 ret void
20}
21
22define void @t2() nounwind ssp {
23entry:
24; CHECK: t2:
25; CHECK: movl %eax, %ecx
26; CHECK: %ecx = foo (%ecx, %eax)
27 %b = alloca i32 ; <i32*> [#uses=2]
28 %a = alloca i32 ; <i32*> [#uses=1]
29 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
30 %0 = load i32* %b, align 4 ; <i32> [#uses=1]
31 %1 = load i32* %b, align 4 ; <i32> [#uses=1]
32 %asmtmp = call i32 asm "$0 = foo ($1, $2)", "=&r,%0,r,~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1) nounwind ; <i32> [#uses=1]
33 store i32 %asmtmp, i32* %a
34 br label %return
35
36return: ; preds = %entry
37 ret void
38}