Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / bpf-preserve-access-index-2.c
blob5039a52135acbee93b67a547f74897bd9cd49ce4
1 // RUN: %clang %s -target bpfeb -x c -emit-llvm -S -g -O2 -o - | FileCheck %s
2 // RUN: %clang %s -target bpfel -x c -emit-llvm -S -g -O2 -o - | FileCheck %s
4 struct t {
5 int i:1;
6 int j:2;
7 union {
8 int a;
9 int b;
10 } c[4];
13 #define _(x) (x)
15 const void *test(struct t *arg) {
16 return _(&arg->c[3].b);
19 // CHECK-NOT: llvm.preserve.struct.access.index
20 // CHECK-NOT: llvm.preserve.array.access.index
21 // CHECK-NOT: llvm.preserve.union.access.index
22 // CHECK-NOT: __builtin_preserve_access_index