brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 535bf8f Raw
55 lines · c
1// RUN: %clang_cc1 -triple avr -target-cpu atmega328 -emit-llvm %s -o - \2// RUN:     | FileCheck %s --check-prefix=AVR3// RUN: %clang_cc1 -triple avr -target-cpu attiny40 -emit-llvm %s -o - \4// RUN:     | FileCheck %s --check-prefix=TINY5 6// Structure that is more than 8 bytes.7struct s10 {8  int a, b, c, d, e;9};10 11// Structure that is less than 8 bytes but more than 4 bytes.12struct s06 {13  int a, b, c;14};15 16// Structure that is less than 4 bytes.17struct s04 {18  int a, b;19};20 21struct s10 foo10(int a, int b, int c) {22  struct s10 a0;23  return a0;24}25 26struct s06 foo06(int a, int b, int c) {27  struct s06 a0;28  return a0;29}30 31struct s04 foo04(int a, int b) {32  struct s04 a0;33  return a0;34}35 36long long fooi64(void) {37  return 0xaa5533;38}39 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()47 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 {{.*}})55