Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / regparm.c
blob099bea06a927a2e64373b38d64cb6bb92adad864
1 // RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
3 #define FASTCALL __attribute__((regparm(2)))
5 typedef struct {
6 int aaa;
7 double bbbb;
8 int ccc[200];
9 } foo;
11 typedef void (*FType)(int, int) __attribute ((regparm (3), stdcall));
12 FType bar;
14 extern void FASTCALL reduced(char b, double c, foo* d, double e, int f);
16 // PR7025
17 void FASTCALL f1(int i, int j, int k);
18 // CHECK-LABEL: define{{.*}} void @f1(i32 inreg noundef %i, i32 inreg noundef %j, i32 noundef %k)
19 void f1(int i, int j, int k) { }
21 int
22 main(void) {
23 // CHECK: call void @reduced(i8 inreg noundef signext 0, {{.*}} ptr inreg noundef null
24 reduced(0, 0.0, 0, 0.0, 0);
25 // CHECK: call x86_stdcallcc void {{.*}}(i32 inreg noundef 1, i32 inreg noundef 2)
26 bar(1,2);