blob: 8ecf53950805347a3e07b219eda0ae6c5cf7d693 [file] [log] [blame]
Daniel Dunbar17d3fea2011-02-09 17:54:19 +00001// RUN: %clang_cc1 -triple i386-unknown-unknown -mregparm 4 %s -emit-llvm -o %t
2// RUN: FileCheck < %t %s
3
4void f1(int a, int b, int c, int d,
5 int e, int f, int g, int h);
6
Eli Friedmana49218e2011-04-09 08:18:08 +00007void f2(int a, int b) __attribute((regparm(0)));
8
Daniel Dunbar17d3fea2011-02-09 17:54:19 +00009void f0() {
10// CHECK: call void @f1(i32 inreg 1, i32 inreg 2, i32 inreg 3, i32 inreg 4,
11// CHECK: i32 5, i32 6, i32 7, i32 8)
12 f1(1, 2, 3, 4, 5, 6, 7, 8);
Eli Friedmana49218e2011-04-09 08:18:08 +000013// CHECK: call void @f2(i32 1, i32 2)
14 f2(1, 2);
Daniel Dunbar17d3fea2011-02-09 17:54:19 +000015}
16
17// CHECK: declare void @f1(i32 inreg, i32 inreg, i32 inreg, i32 inreg,
18// CHECK: i32, i32, i32, i32)
Eli Friedmana49218e2011-04-09 08:18:08 +000019// CHECK: declare void @f2(i32, i32)
Daniel Dunbar17d3fea2011-02-09 17:54:19 +000020