brintos

brintos / llvm-project-archived public Read only

0
0
Text · 624 B · 60082e6 Raw
23 lines · c
1// RUN: %clang %s -target bpfeb -x c -emit-llvm -S -g -O2 -Xclang -disable-llvm-passes -o - | FileCheck --check-prefix=CHECK %s2// RUN: %clang %s -target bpfel -x c -emit-llvm -S -g -O2 -Xclang -disable-llvm-passes -o - | FileCheck --check-prefix=CHECK %s3 4struct t {5  int i:1;6  int j:2;7  union {8   int a;9   int b;10  } c[4];11};12 13#define _(x) (__builtin_preserve_access_index(x))14 15const void *test(struct t *arg) {16  return _(&arg->c[3].b);17}18 19// CHECK: llvm.preserve.struct.access.index20// CHECK: llvm.preserve.array.access.index21// CHECK: llvm.preserve.union.access.index22// CHECK-NOT: __builtin_preserve_access_index23