// REQUIRES: hexagon-registered-target
// RUN: %clang_cc1 -emit-llvm -O2 -o - -triple hexagon-unknown-elf -target-cpu hexagonv60 %s | FileCheck %s
// This unit test validates that the store to "dst" variable needs to be eliminated.
// CHECK: @brev_store_elimination_test1
// CHECK: llvm.hexagon.L2.loadri.pbr
// CHECK-NOT: store
int *
// CHECK: @brev_store_elimination_test2
// CHECK: llvm.hexagon.L2.loadri.pbr
// CHECK-NOT: store
extern int ;
int
// CHECK: @brev_store_elimination_test3
// CHECK: llvm.hexagon.L2.loadri.pbr
// CHECK-NOT: store
int
// brev_store_elimination_test4 validates the fact that we are not deleting the
// stores if the value is passed by reference later.
// CHECK: @brev_store_elimination_test4
// CHECK: llvm.hexagon.L2.loadri.pbr
// CHECK: store
extern int ;
int