Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=i686-windows | FileCheck %s -check-prefix=CHECK -check-prefix=NORMAL
      2 ; RUN: llc < %s -mtriple=i686-windows -mattr=call-reg-indirect | FileCheck %s -check-prefix=CHECK -check-prefix=SLM
      3 
      4 declare void @foo(i32 %r)
      5 
      6 define void @test(i32 %a, i32 %b) optsize nounwind {
      7 ; CHECK-LABEL: test:
      8 ; CHECK: movl [[EAX:%e..]], (%esp)
      9 ; CHECK-NEXT: pushl [[EAX]]
     10 ; CHECK-NEXT: calll
     11 ; CHECK-NEXT: addl $4, %esp
     12 ; CHECK: nop
     13 ; NORMAL: pushl (%esp)
     14 ; SLM: movl (%esp), [[RELOAD:%e..]]
     15 ; SLM-NEXT: pushl [[RELOAD]]
     16 ; CHECK: calll
     17 ; CHECK-NEXT: addl $8, %esp
     18   %c = add i32 %a, %b
     19   call void @foo(i32 %c)
     20   call void asm sideeffect "nop", "~{ax},~{bx},~{cx},~{dx},~{bp},~{si},~{di}"()
     21   call void @foo(i32 %c)
     22   ret void
     23 }
     24 
     25 define void @test_min(i32 %a, i32 %b) minsize nounwind {
     26 ; CHECK-LABEL: test_min:
     27 ; CHECK: movl [[EAX:%e..]], (%esp)
     28 ; CHECK-NEXT: pushl [[EAX]]
     29 ; CHECK-NEXT: calll
     30 ; CHECK-NEXT: popl
     31 ; CHECK: nop
     32 ; CHECK: pushl (%esp)
     33 ; CHECK: calll
     34 ; CHECK-NEXT: popl
     35   %c = add i32 %a, %b
     36   call void @foo(i32 %c)
     37   call void asm sideeffect "nop", "~{ax},~{bx},~{cx},~{dx},~{bp},~{si},~{di}"()
     38   call void @foo(i32 %c)
     39   ret void
     40 }
     41