1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_sp 2; RUN: llc < %s -tailcallopt=false | FileCheck %s 3 4; PR3122 5; rdar://6400815 6 7; byval requires a copy, even with fastcc. 8 9target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" 10target triple = "i386-apple-darwin9.5" 11 12%struct.MVT = type { i32 } 13 14define fastcc i32 @bar() nounwind { 15; CHECK-LABEL: bar: 16; CHECK: ## %bb.0: 17; CHECK-NEXT: subl $12, %esp 18; CHECK-NEXT: movl $1, 8(%esp) 19; CHECK-NEXT: movl $1, (%esp) 20; CHECK-NEXT: calll _foo 21; CHECK-NEXT: movl 8(%esp), %eax 22; CHECK-NEXT: addl $12, %esp 23; CHECK-NEXT: retl 24 %V = alloca %struct.MVT 25 store i32 1, ptr %V 26 call fastcc void @foo(ptr byval(%struct.MVT) %V) nounwind 27 %t = load i32, ptr %V 28 ret i32 %t 29} 30 31declare fastcc void @foo(ptr byval(%struct.MVT)) 32