xref: /llvm-project/llvm/test/CodeGen/Hexagon/common-global-addr.ll (revision 2208c97c1bec2512d4e47b6223db6d95a7037956)
1; RUN: llc -mtriple=hexagon -hexagon-small-data-threshold=0 -disable-hexagon-amodeopt -hexagon-cext-threshold=1 < %s | FileCheck %s
2; Check commoning of global addresses.
3
4@g0 = external global i32
5
6; Function Attrs: nounwind
7define zeroext i32 @f0() #0 {
8b0:
9; CHECK: ##g0
10; CHECK-NOT: ##g0
11  %v0 = load i32, ptr @g0, align 1
12  %v1 = mul nsw i32 100, %v0
13  store i32 %v1, ptr @g0, align 1
14  ret i32 %v1
15}
16
17attributes #0 = { nounwind }
18