Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / clang / test / CodeGen / PowerPC / toc-data-structs-arrays.cpp
blob2d988fcbc0f86150a5812426600087e9eabedb22
1 // RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -mtocdata=a4,a5,a8,a9,b,c,d,e,v -emit-llvm -o - 2>&1 \
2 // RUN: | FileCheck %s -check-prefixes=CHECK32 --match-full-lines
3 // RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -mtocdata -emit-llvm -o - 2>&1 \
4 // RUN: | FileCheck %s -check-prefixes=CHECK32 --match-full-lines
6 // RUN: %clang_cc1 %s -triple powerpc64-ibm-aix-xcoff -mtocdata=a4,a5,a8,a9,b,c,d,e,v -emit-llvm -o - 2>&1 \
7 // RUN: | FileCheck %s -check-prefixes=CHECK64 --match-full-lines
8 // RUN: %clang_cc1 %s -triple powerpc64-ibm-aix-xcoff -mtocdata -emit-llvm -o - 2>&1 \
9 // RUN: | FileCheck %s -check-prefixes=CHECK64 --match-full-lines
11 struct size4_struct {
12 int x;
15 struct size5_struct {
16 int x;
17 char c;
20 struct size8_struct {
21 int x;
22 short y;
23 short z;
26 struct size9_struct {
27 int x;
28 short y;
29 short z;
30 char c;
33 struct size4_struct a4;
34 struct size5_struct a5;
35 struct size8_struct a8;
36 struct size9_struct a9;
38 short b[2];
39 short c[3];
40 short d[4];
41 short e[5];
43 int func_a() {
44 return a4.x+a5.x+a8.x+a9.x+b[0]+c[0]+d[0]+e[0];
47 // CHECK32: @a4 = global %struct.size4_struct zeroinitializer, align 4 #0
48 // CHECK32: @a5 = global %struct.size5_struct zeroinitializer, align 4
49 // CHECK32: @a8 = global %struct.size8_struct zeroinitializer, align 4
50 // CHECK32: @a9 = global %struct.size9_struct zeroinitializer, align 4
51 // CHECK32: @b = global [2 x i16] zeroinitializer, align 2 #0
52 // CHECK32: @c = global [3 x i16] zeroinitializer, align 2
53 // CHECK32: @d = global [4 x i16] zeroinitializer, align 2
54 // CHECK32: @e = global [5 x i16] zeroinitializer, align 2
55 // CHECK32: attributes #0 = { "toc-data" }
57 // CHECK64: @a4 = global %struct.size4_struct zeroinitializer, align 4 #0
58 // CHECK64: @a5 = global %struct.size5_struct zeroinitializer, align 4 #0
59 // CHECK64: @a8 = global %struct.size8_struct zeroinitializer, align 4 #0
60 // CHECK64: @a9 = global %struct.size9_struct zeroinitializer, align 4
61 // CHECK64: @b = global [2 x i16] zeroinitializer, align 2 #0
62 // CHECK64: @c = global [3 x i16] zeroinitializer, align 2 #0
63 // CHECK64: @d = global [4 x i16] zeroinitializer, align 2 #0
64 // CHECK64: @e = global [5 x i16] zeroinitializer, align 2
65 // CHECK64: attributes #0 = { "toc-data" }