2009-09-11 18:36:27 +00:00
|
|
|
; RUN: llc < %s -march=cellspu | FileCheck %s
|
2008-11-21 02:56:16 +00:00
|
|
|
|
|
|
|
; ModuleID = 'loads.bc'
|
|
|
|
target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
|
|
|
|
target triple = "spu"
|
|
|
|
|
|
|
|
define <4 x float> @load_v4f32_1(<4 x float>* %a) nounwind readonly {
|
|
|
|
entry:
|
|
|
|
%tmp1 = load <4 x float>* %a
|
|
|
|
ret <4 x float> %tmp1
|
2009-08-24 23:57:35 +00:00
|
|
|
; CHECK: lqd $3, 0($3)
|
2008-11-21 02:56:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @load_v4f32_2(<4 x float>* %a) nounwind readonly {
|
|
|
|
entry:
|
2009-08-24 23:57:35 +00:00
|
|
|
%arrayidx = getelementptr <4 x float>* %a, i32 1
|
|
|
|
%tmp1 = load <4 x float>* %arrayidx
|
2008-11-21 02:56:16 +00:00
|
|
|
ret <4 x float> %tmp1
|
2009-08-24 23:57:35 +00:00
|
|
|
; CHECK: lqd $3, 16($3)
|
2008-11-21 02:56:16 +00:00
|
|
|
}
|
2010-06-01 13:34:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
declare <4 x i32>* @getv4f32ptr()
|
|
|
|
define <4 x i32> @func() {
|
2010-06-21 15:08:16 +00:00
|
|
|
;CHECK: brasl
|
|
|
|
; we need to have some instruction to move the result to safety.
|
|
|
|
; which instruction (lr, stqd...) depends on the regalloc
|
|
|
|
;CHECK: {{.*}}
|
|
|
|
;CHECK: brasl
|
|
|
|
%rv1 = call <4 x i32>* @getv4f32ptr()
|
|
|
|
%rv2 = call <4 x i32>* @getv4f32ptr()
|
|
|
|
%rv3 = load <4 x i32>* %rv1
|
|
|
|
ret <4 x i32> %rv3
|
2010-06-01 13:34:47 +00:00
|
|
|
}
|
|
|
|
|
2010-06-09 08:29:41 +00:00
|
|
|
define <4 x float> @load_undef(){
|
2010-06-26 20:05:06 +00:00
|
|
|
; CHECK: lqd $3, 0($3)
|
2010-06-09 08:29:41 +00:00
|
|
|
%val = load <4 x float>* undef
|
|
|
|
ret <4 x float> %val
|
|
|
|
}
|