ret <2 x i64> %ret
}
+; Test v4f32 splat of the first element.
+define <4 x float> @f12(float %scalar) {
+; CHECK-LABEL: f12:
+; CHECK: vrepf %v24, %v0, 0
+; CHECK: br %r14
+ %val = insertelement <4 x float> undef, float %scalar, i32 0
+ %ret = shufflevector <4 x float> %val, <4 x float> undef,
+ <4 x i32> zeroinitializer
+ ret <4 x float> %ret
+}
+
+; Test v4f32 splat of the last element.
+define <4 x float> @f13(float %scalar) {
+; CHECK-LABEL: f13:
+; CHECK: vrepf %v24, %v0, 0
+; CHECK: br %r14
+ %val = insertelement <4 x float> undef, float %scalar, i32 3
+ %ret = shufflevector <4 x float> %val, <4 x float> undef,
+ <4 x i32> <i32 3, i32 3, i32 3, i32 3>
+ ret <4 x float> %ret
+}
+
+; Test v4f32 splat of an arbitrary element, using the second operand of
+; the shufflevector.
+define <4 x float> @f14(float %scalar) {
+; CHECK-LABEL: f14:
+; CHECK: vrepf %v24, %v0, 0
+; CHECK: br %r14
+ %val = insertelement <4 x float> undef, float %scalar, i32 1
+ %ret = shufflevector <4 x float> undef, <4 x float> %val,
+ <4 x i32> <i32 5, i32 5, i32 5, i32 5>
+ ret <4 x float> %ret
+}
+
; Test v2f64 splat of the first element.
define <2 x double> @f15(double %scalar) {
; CHECK-LABEL: f15: