Fix lowering of INSERT_VECTOR_ELT in SPU.

The IDX was treated as byte index, not element index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112422 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kalle Raiskila
2010-08-29 12:41:50 +00:00
parent 10ce7f3116
commit bd887df8b9
2 changed files with 12 additions and 3 deletions

View File

@@ -31,3 +31,11 @@ define void @test_insert( <2 x float>* %ptr, float %val1, float %val2 ) {
ret void
}
define <4 x float> @test_insert_1(<4 x float> %vparam, float %eltparam) {
;CHECK: cwd $5, 4($sp)
;CHECK: shufb $3, $4, $3, $5
;CHECK: bi $lr
%rv = insertelement <4 x float> %vparam, float %eltparam, i32 1
ret <4 x float> %rv
}