[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / avr / return-value.c
blob535bf8f3a4e9eac7addd932498cf4033b8ebc49e
1 // RUN: %clang_cc1 -triple avr -target-cpu atmega328 -emit-llvm %s -o - \
2 // RUN: | FileCheck %s --check-prefix=AVR
3 // RUN: %clang_cc1 -triple avr -target-cpu attiny40 -emit-llvm %s -o - \
4 // RUN: | FileCheck %s --check-prefix=TINY
6 // Structure that is more than 8 bytes.
7 struct s10 {
8 int a, b, c, d, e;
9 };
11 // Structure that is less than 8 bytes but more than 4 bytes.
12 struct s06 {
13 int a, b, c;
16 // Structure that is less than 4 bytes.
17 struct s04 {
18 int a, b;
21 struct s10 foo10(int a, int b, int c) {
22 struct s10 a0;
23 return a0;
26 struct s06 foo06(int a, int b, int c) {
27 struct s06 a0;
28 return a0;
31 struct s04 foo04(int a, int b) {
32 struct s04 a0;
33 return a0;
36 long long fooi64(void) {
37 return 0xaa5533;
40 // AVR: %struct.s10 = type { i16, i16, i16, i16, i16 }
41 // AVR: %struct.s06 = type { i16, i16, i16 }
42 // AVR: %struct.s04 = type { i16, i16 }
43 // AVR: define{{.*}} void @foo10(ptr {{.*}}, i16 noundef %a, i16 noundef %b, i16 noundef %c)
44 // AVR: define{{.*}} %struct.s06 @foo06(i16 noundef %a, i16 noundef %b, i16 noundef %c)
45 // AVR: define{{.*}} %struct.s04 @foo04(i16 noundef %a, i16 noundef %b)
46 // AVR: define{{.*}} i64 @fooi64()
48 // TINY: %struct.s10 = type { i16, i16, i16, i16, i16 }
49 // TINY: %struct.s06 = type { i16, i16, i16 }
50 // TINY: %struct.s04 = type { i16, i16 }
51 // TINY: define{{.*}} void @foo10(ptr {{.*}}, i16 noundef %a, i16 noundef %b, i16 noundef %c)
52 // TINY: define{{.*}} void @foo06(ptr {{.*}}, i16 noundef %a, i16 noundef %b, i16 noundef %c)
53 // TINY: define{{.*}} %struct.s04 @foo04(i16 noundef %a, i16 noundef %b)
54 // TINY: define{{.*}} void @fooi64(ptr {{.*}})