41 lines · plain
1; RUN: llc < %s -mtriple=i686-windows | FileCheck %s -check-prefix=CHECK -check-prefix=NORMAL2; RUN: llc < %s -mtriple=i686-windows -mattr=slow-two-mem-ops | FileCheck %s -check-prefix=CHECK -check-prefix=SLM3 4declare void @foo(i32 %r)5 6define 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: calll11; CHECK-NEXT: addl $4, %esp12; CHECK: nop13; NORMAL: pushl (%esp)14; SLM: movl (%esp), [[RELOAD:%e..]]15; SLM-NEXT: pushl [[RELOAD]]16; CHECK: calll17; CHECK-NEXT: addl $8, %esp18 %c = add i32 %a, %b19 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 void23}24 25define 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: calll30; CHECK-NEXT: popl31; CHECK: nop32; CHECK: pushl (%esp)33; CHECK: calll34; CHECK-NEXT: popl35 %c = add i32 %a, %b36 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 void40}41