1 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-p:16:16:16-i8:8:8-i16:16:16-i32:16:32-n8:16-a0:16:16"
4 target triple = "msp430---elf"
6 define void @test() #0 {
11 ; CHECK: mov r12, &g_i16
12 %0 = call i16 @f_i16()
13 store volatile i16 %0, i16* @g_i16
16 ; CHECK: mov r13, &g_i32+2
17 ; CHECK: mov r12, &g_i32
18 %1 = call i32 @f_i32()
19 store volatile i32 %1, i32* @g_i32
22 ; CHECK: mov r15, &g_i64+6
23 ; CHECK: mov r14, &g_i64+4
24 ; CHECK: mov r13, &g_i64+2
25 ; CHECK: mov r12, &g_i64
26 %2 = call i64 @f_i64()
27 store volatile i64 %2, i64* @g_i64
32 @g_i16 = common global i16 0, align 2
33 @g_i32 = common global i32 0, align 2
34 @g_i64 = common global i64 0, align 2
36 define i16 @f_i16() #0 {
43 define i32 @f_i32() #0 {
45 ; CHECK: mov #772, r12
46 ; CHECK: mov #258, r13
51 define i64 @f_i64() #0 {
53 ; CHECK: mov #1800, r12
54 ; CHECK: mov #1286, r13
55 ; CHECK: mov #772, r14
56 ; CHECK: mov #258, r15
58 ret i64 72623859790382856
61 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }