blob: 04accb9c56b8dda47f3011b2d5134b810d9034aa [file] [log] [blame]
Kalle Raiskila47948072010-06-21 10:17:36 +00001; RUN: llc --march=cellspu < %s | FileCheck %s
2
3define <4 x float> @shuffle(<4 x float> %param1, <4 x float> %param2) {
4 ; CHECK: cwd {{\$.}}, 0($sp)
5 ; CHECK: shufb {{\$., \$4, \$3, \$.}}
6 %val= shufflevector <4 x float> %param1, <4 x float> %param2, <4 x i32> <i32 4,i32 1,i32 2,i32 3>
7 ret <4 x float> %val
Kalle Raiskila47948072010-06-21 10:17:36 +00008}
9
Kalle Raiskila91fdee12010-06-21 14:42:19 +000010define <4 x float> @splat(float %param1) {
Kalle Raiskila2e394982010-06-21 15:11:51 +000011 ; CHECK: lqa
12 ; CHECK: shufb $3
13 ; CHECK: bi
Kalle Raiskila91fdee12010-06-21 14:42:19 +000014 %vec = insertelement <1 x float> undef, float %param1, i32 0
15 %val= shufflevector <1 x float> %vec, <1 x float> undef, <4 x i32> <i32 0,i32 0,i32 0,i32 0>
16 ret <4 x float> %val
17}
18