Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep
[oota-llvm.git] / test / CodeGen / X86 / fastcc-byval.ll
1 ; RUN: llc < %s -tailcallopt=false | FileCheck %s
2 ; CHECK: movl 8(%esp), %eax 
3 ; CHECK: movl 8(%esp), %eax 
4
5 ; PR3122
6 ; rdar://6400815
7
8 ; byval requires a copy, even with fastcc.
9
10 target 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"
11 target triple = "i386-apple-darwin9.5"
12         %struct.MVT = type { i32 }
13
14 define fastcc i32 @bar() nounwind {
15         %V = alloca %struct.MVT
16         %a = getelementptr %struct.MVT* %V, i32 0, i32 0
17         store i32 1, i32* %a
18         call fastcc void @foo(%struct.MVT* byval %V) nounwind
19         %t = load i32* %a
20         ret i32 %t
21 }
22
23 declare fastcc void @foo(%struct.MVT* byval)