1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -O0 -no-integrated-as -verify-machineinstrs | FileCheck %s
3; PR7509
4target triple = "i386-apple-darwin10"
5%asmtype = type { i32, i8*, i32, i32 }
6
7; Arguments 1 and 4 must be the same. No other output arguments may be
8; allocated %eax.
9
10define i32 @func(i8* %s) nounwind ssp {
11; CHECK-LABEL: func:
12; CHECK:       ## %bb.0: ## %entry
13; CHECK-NEXT:    pushl %esi
14; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %ecx
15; CHECK-NEXT:    ## InlineAsm Start
16; CHECK-NEXT:    arg0 %eax
17; CHECK-NEXT:    arg1 %ecx
18; CHECK-NEXT:    arg2 %edx
19; CHECK-NEXT:    arg3 %esi
20; CHECK-NEXT:    arg4 %ecx
21; CHECK-NEXT:    ## InlineAsm End
22; CHECK-NEXT:    popl %esi
23; CHECK-NEXT:    retl
24entry:
25  %0 = tail call %asmtype asm "arg0 $0\0A\09arg1 $1\0A\09arg2 $2\0A\09arg3 $3\0A\09arg4 $4", "={ax},=r,=r,=r,1,~{dirflag},~{fpsr},~{flags}"(i8* %s) nounwind, !srcloc !0 ; <%0> [#uses=1]
26  %asmresult = extractvalue %asmtype %0, 0              ; <i64> [#uses=1]
27  ret i32 %asmresult
28}
29
30!0 = !{i32 108}
31