brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 2d988fc Raw
66 lines · cpp
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-lines3// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -mtocdata -emit-llvm -o - 2>&1 \4// RUN:          | FileCheck %s -check-prefixes=CHECK32 --match-full-lines5 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-lines8// RUN: %clang_cc1 %s -triple powerpc64-ibm-aix-xcoff -mtocdata -emit-llvm -o - 2>&1 \9// RUN:          | FileCheck %s -check-prefixes=CHECK64 --match-full-lines10 11struct size4_struct {12  int x;13};14 15struct size5_struct {16  int x;17  char c;18};19 20struct size8_struct {21  int x;22  short y;23  short z;24};25 26struct size9_struct {27  int x;28  short y;29  short z;30  char c;31};32 33struct size4_struct a4;34struct size5_struct a5;35struct size8_struct a8;36struct size9_struct a9;37 38short b[2];39short c[3];40short d[4];41short e[5];42 43int func_a() {44  return a4.x+a5.x+a8.x+a9.x+b[0]+c[0]+d[0]+e[0];45}46 47// CHECK32: @a4 = global %struct.size4_struct zeroinitializer, align 4 #048// CHECK32: @a5 = global %struct.size5_struct zeroinitializer, align 449// CHECK32: @a8 = global %struct.size8_struct zeroinitializer, align 450// CHECK32: @a9 = global %struct.size9_struct zeroinitializer, align 451// CHECK32: @b = global [2 x i16] zeroinitializer, align 2 #052// CHECK32: @c = global [3 x i16] zeroinitializer, align 253// CHECK32: @d = global [4 x i16] zeroinitializer, align 254// CHECK32: @e = global [5 x i16] zeroinitializer, align 255// CHECK32: attributes #0 = { "toc-data" }56 57// CHECK64: @a4 = global %struct.size4_struct zeroinitializer, align 4 #058// CHECK64: @a5 = global %struct.size5_struct zeroinitializer, align 4 #059// CHECK64: @a8 = global %struct.size8_struct zeroinitializer, align 4 #060// CHECK64: @a9 = global %struct.size9_struct zeroinitializer, align 461// CHECK64: @b = global [2 x i16] zeroinitializer, align 2 #062// CHECK64: @c = global [3 x i16] zeroinitializer, align 2 #063// CHECK64: @d = global [4 x i16] zeroinitializer, align 2 #064// CHECK64: @e = global [5 x i16] zeroinitializer, align 265// CHECK64: attributes #0 = { "toc-data" }66