diff options
Diffstat (limited to 'test/CodeGen/CellSPU/v2i32.ll')
-rw-r--r-- | test/CodeGen/CellSPU/v2i32.ll | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/test/CodeGen/CellSPU/v2i32.ll b/test/CodeGen/CellSPU/v2i32.ll index dd51be5..71d4aba 100644 --- a/test/CodeGen/CellSPU/v2i32.ll +++ b/test/CodeGen/CellSPU/v2i32.ll @@ -37,9 +37,8 @@ define %vec @test_mul(%vec %param) } define <2 x i32> @test_splat(i32 %param ) { -;TODO insertelement transforms to a PREFSLOT2VEC, that trasforms to the -; somewhat redundant: -;CHECK-NOT or $3, $3, $3 +;see svn log for why this is here... +;CHECK-NOT: or $3, $3, $3 ;CHECK: lqa ;CHECK: shufb %sv = insertelement <1 x i32> undef, i32 %param, i32 0 @@ -62,3 +61,17 @@ define void @test_store( %vec %val, %vec* %ptr) store %vec %val, %vec* %ptr ret void } + +;Alignment of <2 x i32> is not *directly* defined in the ABI +;It probably is safe to interpret it as an array, thus having 8 byte +;alignment (according to ABI). This tests that the size of +;[2 x <2 x i32>] is 16 bytes, i.e. there is no padding between the +;two arrays +define <2 x i32>* @test_alignment( [2 x <2 x i32>]* %ptr) +{ +; CHECK-NOT: ai $3, $3, 16 +; CHECK: ai $3, $3, 8 +; CHECK: bi $lr + %rv = getelementptr [2 x <2 x i32>]* %ptr, i32 0, i32 1 + ret <2 x i32>* %rv +} |