1 ; RUN: llc < %s | FileCheck %s 2 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" 5 6 define void @test() #0 { 7 entry: 8 ; CHECK: test: 9 10 ; CHECK: call #f_i16 11 ; CHECK: mov.w r15, &g_i16 12 %0 = call i16 @f_i16() 13 store volatile i16 %0, i16* @g_i16 14 15 ; CHECK: call #f_i32 16 ; CHECK: mov.w r15, &g_i32+2 17 ; CHECK: mov.w r14, &g_i32 18 %1 = call i32 @f_i32() 19 store volatile i32 %1, i32* @g_i32 20 21 ; CHECK: call #f_i64 22 ; CHECK: mov.w r15, &g_i64+6 23 ; CHECK: mov.w r14, &g_i64+4 24 ; CHECK: mov.w r13, &g_i64+2 25 ; CHECK: mov.w r12, &g_i64 26 %2 = call i64 @f_i64() 27 store volatile i64 %2, i64* @g_i64 28 29 ret void 30 } 31 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 35 36 define i16 @f_i16() #0 { 37 ; CHECK: f_i16: 38 ; CHECK: mov.w #1, r15 39 ; CHECK: ret 40 ret i16 1 41 } 42 43 define i32 @f_i32() #0 { 44 ; CHECK: f_i32: 45 ; CHECK: mov.w #772, r14 46 ; CHECK: mov.w #258, r15 47 ; CHECK: ret 48 ret i32 16909060 49 } 50 51 define i64 @f_i64() #0 { 52 ; CHECK: f_i64: 53 ; CHECK: mov.w #1800, r12 54 ; CHECK: mov.w #1286, r13 55 ; CHECK: mov.w #772, r14 56 ; CHECK: mov.w #258, r15 57 ; CHECK: ret 58 ret i64 72623859790382856 59 } 60 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" } 62