f3f10f2b4f24620fe78a94132a1a6c40c484ee54
[oota-llvm.git] / test / CodeGen / Hexagon / absimm.ll
1 ; RUN: llc -march=hexagon < %s | FileCheck %s
2 ; Check that we generate absolute addressing mode instructions
3 ; with immediate value.
4 ; XFAIL: *
5
6 define i32 @f1(i32 %i) nounwind {
7 ; CHECK: memw(##786432){{ *}}={{ *}}r{{[0-9]+}}
8 entry:
9   store volatile i32 %i, i32* inttoptr (i32 786432 to i32*), align 262144
10   ret i32 %i
11 }
12
13 define i32* @f2(i32* nocapture %i) nounwind {
14 entry:
15 ; CHECK: r{{[0-9]+}}{{ *}}={{ *}}memw(##786432)
16   %0 = load volatile i32, i32* inttoptr (i32 786432 to i32*), align 262144
17   %1 = inttoptr i32 %0 to i32*
18   ret i32* %1
19   }