blob: 1330663e45289aa62d7e387910f4d302fe01653e [file] [log] [blame]
Rafael Espindola833850b2012-07-24 20:00:35 +00001// RUN: %clang_cc1 -triple i386-unknown-unknown -mregparm 4 %s -emit-llvm -o - | FileCheck %s
Daniel Dunbar17d3fea2011-02-09 17:54:19 +00002
3void f1(int a, int b, int c, int d,
4 int e, int f, int g, int h);
5
Eli Friedmana49218e2011-04-09 08:18:08 +00006void f2(int a, int b) __attribute((regparm(0)));
7
Daniel Dunbar17d3fea2011-02-09 17:54:19 +00008void f0() {
9// CHECK: call void @f1(i32 inreg 1, i32 inreg 2, i32 inreg 3, i32 inreg 4,
10// CHECK: i32 5, i32 6, i32 7, i32 8)
11 f1(1, 2, 3, 4, 5, 6, 7, 8);
Eli Friedmana49218e2011-04-09 08:18:08 +000012// CHECK: call void @f2(i32 1, i32 2)
13 f2(1, 2);
Daniel Dunbar17d3fea2011-02-09 17:54:19 +000014}
15
16// CHECK: declare void @f1(i32 inreg, i32 inreg, i32 inreg, i32 inreg,
17// CHECK: i32, i32, i32, i32)
Eli Friedmana49218e2011-04-09 08:18:08 +000018// CHECK: declare void @f2(i32, i32)
Daniel Dunbar17d3fea2011-02-09 17:54:19 +000019