brintos

brintos / llvm-project-archived public Read only

0
0
Text · 912 B · 6db2d26 Raw
31 lines · plain
1; RUN: llc -mtriple=bpfel -mcpu=v4 < %s | FileCheck %s2 3; Generated from the following C code:4;5;   #define __as __attribute__((address_space(272)))6;   __as const char a[2] = {1,2};7;   __as char b[2] = {3,4};8;   __as char c[2];9;10; Using the following command:11;12;   clang --target=bpf -O2 -S -emit-llvm -o t.ll t.c13 14 15@a = dso_local local_unnamed_addr addrspace(272) constant [2 x i8] [i8 1, i8 2], align 116@b = dso_local local_unnamed_addr addrspace(272) global [2 x i8] [i8 3, i8 4], align 117@c = dso_local local_unnamed_addr addrspace(272) global [2 x i8] zeroinitializer, align 118 19; Verify that a,b,c reside in the same section20 21; CHECK:     .section .addr_space.272,"aw",@progbits22; CHECK-NOT: .section23; CHECK:     .globl  a24; CHECK:     .ascii  "\001\002"25; CHECK-NOT: .section26; CHECK:     .globl  b27; CHECK:     .ascii  "\003\004"28; CHECK-NOT: .section29; CHECK:     .globl  c30; CHECK:     .zero   231