brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · d9c6ad3 Raw
26 lines · plain
1// Check that -local-alloc-tbaa-threshold option limits2// the attachment of TBAA tags to accesses of locally allocated entities.3// RUN: fir-opt --fir-add-alias-tags -local-alloc-tbaa-threshold=2 %s | FileCheck %s --check-prefixes=ALL,COUNT24// RUN: fir-opt --fir-add-alias-tags -local-alloc-tbaa-threshold=1 %s | FileCheck %s --check-prefixes=ALL,COUNT15// RUN: fir-opt --fir-add-alias-tags -local-alloc-tbaa-threshold=0 %s | FileCheck %s --check-prefixes=ALL,COUNT06 7// ALL-LABEL:   func.func @_QPtest() {8// COUNT2: fir.load{{.*}}{tbaa =9// COUNT2: fir.store{{.*}}{tbaa =10// COUNT1: fir.load{{.*}}{tbaa =11// COUNT1-NOT: fir.store{{.*}}{tbaa =12// COUNT0-NOT: fir.load{{.*}}{tbaa =13// COUNT0-NOT: fir.store{{.*}}{tbaa =14module attributes {dlti.dl_spec = #dlti.dl_spec<!llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, i64 = dense<[32, 64]> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little">, llvm.data_layout = ""} {15func.func @_QPtest() {16  %0 = fir.dummy_scope : !fir.dscope17  %1 = fir.alloca f32 {bindc_name = "x", uniq_name = "_QFtestEx"}18  %2 = fir.declare %1 {uniq_name = "_QFtestEx"} : (!fir.ref<f32>) -> !fir.ref<f32>19  %3 = fir.alloca f32 {bindc_name = "y", uniq_name = "_QFtestEy"}20  %4 = fir.declare %3 {uniq_name = "_QFtestEy"} : (!fir.ref<f32>) -> !fir.ref<f32>21  %5 = fir.load %4 : !fir.ref<f32>22  fir.store %5 to %2 : !fir.ref<f32>23  return24}25}26