1 ; RUN: llc -march=hexagon -O3 -hexagon-small-data-threshold=0 < %s | FileCheck %s
2 ; Check that absolute loads are generated for 64-bit
4 target triple = "hexagon-unknown--elf"
6 @g0 = external global i8, align 8
7 @g1 = external global i16, align 8
8 @g2 = external global i32, align 8
9 @g3 = external global i64, align 8
12 ; CHECK: = memd(##441656)
15 %v0 = load volatile i64, i64* inttoptr (i32 441656 to i64*)
20 ; CHECK: = memw(##441656)
23 %v0 = load volatile i32, i32* inttoptr (i32 441656 to i32*)
24 %v1 = sext i32 %v0 to i64
29 ; CHECK: = memw(##441656)
32 %v0 = load volatile i32, i32* inttoptr (i32 441656 to i32*)
33 %v1 = zext i32 %v0 to i64
38 ; CHECK: = memh(##441656)
41 %v0 = load volatile i16, i16* inttoptr (i32 441656 to i16*)
42 %v1 = sext i16 %v0 to i64
47 ; CHECK: = memuh(##441656)
50 %v0 = load volatile i16, i16* inttoptr (i32 441656 to i16*)
51 %v1 = zext i16 %v0 to i64
56 ; CHECK: = memb(##441656)
59 %v0 = load volatile i8, i8* inttoptr (i32 441656 to i8*)
60 %v1 = sext i8 %v0 to i64
65 ; CHECK: = memub(##441656)
68 %v0 = load volatile i8, i8* inttoptr (i32 441656 to i8*)
69 %v1 = zext i8 %v0 to i64
77 %v0 = load volatile i64, i64* @g3
85 %v0 = load volatile i32, i32* @g2
86 %v1 = sext i32 %v0 to i64
94 %v0 = load volatile i32, i32* @g2
95 %v1 = zext i32 %v0 to i64
100 ; CHECK: = memh(##g1)
101 define i64 @f10() #0 {
103 %v0 = load volatile i16, i16* @g1
104 %v1 = sext i16 %v0 to i64
109 ; CHECK: = memuh(##g1)
110 define i64 @f11() #0 {
112 %v0 = load volatile i16, i16* @g1
113 %v1 = zext i16 %v0 to i64
118 ; CHECK: = memb(##g0)
119 define i64 @f12() #0 {
121 %v0 = load volatile i8, i8* @g0
122 %v1 = sext i8 %v0 to i64
127 ; CHECK: = memub(##g0)
128 define i64 @f13() #0 {
130 %v0 = load volatile i8, i8* @g0
131 %v1 = zext i8 %v0 to i64
135 attributes #0 = { nounwind }