brintos

brintos / llvm-project-archived public Read only

0
0
Text · 961 B · 8ee49be Raw
21 lines · c
1// RUN: %clang     --target=aarch64 -march=armv8+memtag -fsanitize=memtag-stack -mllvm -stack-safety-print=1 %s -S -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SAFETY2// RUN: %clang -O1 --target=aarch64 -march=armv8+memtag -fsanitize=memtag-stack -mllvm -stack-safety-print=1 %s -S -o - 2>&1 | FileCheck %s --check-prefix=CHECK-SAFETY3// RUN: %clang -O2 --target=aarch64 -march=armv8+memtag -fsanitize=memtag-stack -mllvm -stack-safety-print=1 %s -S -o - 2>&1 | FileCheck %s --check-prefix=CHECK-SAFETY4// RUN: %clang -O3 --target=aarch64 -march=armv8+memtag -fsanitize=memtag-stack -mllvm -stack-safety-print=1 %s -S -o - 2>&1 | FileCheck %s --check-prefix=CHECK-SAFETY5 6// REQUIRES: aarch64-registered-target7 8int z;9__attribute__((noinline)) void use(int *p) { *p = z; }10int foo() {11  int x;12  use(&x);13  return x;14}15 16// CHECK-NO-SAFETY-NOT: allocas uses17 18// CHECK-SAFETY-LABEL: @foo19// CHECK-SAFETY-LABEL: allocas uses:20// CHECK-SAFETY-NEXT: [4]: [0,4)21