1; RUN: llc -march=hexagon < %s | FileCheck %s
2
3; Test that global constant GEPs are calculated correctly
4;
5target triple = "hexagon-unknown--elf"
6
7%s.0 = type { i32, i64, [100 x i8] }
8
9@g0 = common global %s.0 zeroinitializer, align 8
10@g1 = global i8* getelementptr inbounds (%s.0, %s.0* @g0, i32 0, i32 2, i32 10), align 4
11; CHECK-LABEL: g1:
12; CHECK: .word g0+26
13
14@g2 = common global [100 x i8] zeroinitializer, align 8
15@g3 = global i8* getelementptr inbounds ([100 x i8], [100 x i8]* @g2, i32 0, i32 10), align 4
16; CHECK-LABEL: g3:
17; CHECK: .word g2+10
18