Rafael Espindola | 833850b | 2012-07-24 20:00:35 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple i386-unknown-unknown -mregparm 4 %s -emit-llvm -o - | FileCheck %s |
Daniel Dunbar | 17d3fea | 2011-02-09 17:54:19 +0000 | [diff] [blame] | 2 | |
| 3 | void f1(int a, int b, int c, int d, |
| 4 | int e, int f, int g, int h); |
| 5 | |
Eli Friedman | a49218e | 2011-04-09 08:18:08 +0000 | [diff] [blame] | 6 | void f2(int a, int b) __attribute((regparm(0))); |
| 7 | |
Daniel Dunbar | 17d3fea | 2011-02-09 17:54:19 +0000 | [diff] [blame] | 8 | void 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 Friedman | a49218e | 2011-04-09 08:18:08 +0000 | [diff] [blame] | 12 | // CHECK: call void @f2(i32 1, i32 2) |
| 13 | f2(1, 2); |
Daniel Dunbar | 17d3fea | 2011-02-09 17:54:19 +0000 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | // CHECK: declare void @f1(i32 inreg, i32 inreg, i32 inreg, i32 inreg, |
| 17 | // CHECK: i32, i32, i32, i32) |
Eli Friedman | a49218e | 2011-04-09 08:18:08 +0000 | [diff] [blame] | 18 | // CHECK: declare void @f2(i32, i32) |
Daniel Dunbar | 17d3fea | 2011-02-09 17:54:19 +0000 | [diff] [blame] | 19 | |