1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s 2 ; pr5391 3 4 define void @t() nounwind ssp { 5 entry: 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 18 return: ; preds = %entry 19 ret void 20 } 21 22 define void @t2() nounwind ssp { 23 entry: 24 ; CHECK: t2: 25 ; CHECK: movl 26 ; CHECK: [[D2:%e.x]] = foo 27 ; CHECK: ([[D2]], 28 ; CHECK-NOT: [[D2]] 29 ; CHECK: ) 30 %b = alloca i32 ; <i32*> [#uses=2] 31 %a = alloca i32 ; <i32*> [#uses=1] 32 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 33 %0 = load i32* %b, align 4 ; <i32> [#uses=1] 34 %1 = load i32* %b, align 4 ; <i32> [#uses=1] 35 %asmtmp = call i32 asm "$0 = foo ($1, $2)", "=&r,%0,r,~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1) nounwind ; <i32> [#uses=1] 36 store i32 %asmtmp, i32* %a 37 br label %return 38 39 return: ; preds = %entry 40 ret void 41 } 42