Merging r261039:
[oota-llvm.git] / test / CodeGen / X86 / vec_partial.ll
1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
2
3 ; PR11580
4 define <3 x float> @addf3(<3 x float> %x) {
5 ; CHECK-LABEL: addf3
6 ; CHECK:       # BB#0:
7 ; CHECK-NEXT:  addps .LCPI0_0(%rip), %xmm0
8 ; CHECK-NEXT:  retq
9 entry:
10   %add = fadd <3 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
11   ret <3 x float> %add
12 }
13
14 ; PR11580
15 define <4 x float> @cvtf3_f4(<3 x float> %x) {
16 ; CHECK-LABEL: cvtf3_f4
17 ; CHECK:       # BB#0:
18 ; CHECK-NEXT:  retq
19 entry:
20   %extractVec = shufflevector <3 x float> %x, <3 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
21   ret <4 x float> %extractVec
22 }
23
24 ; PR11580
25 define <3 x float> @cvtf4_f3(<4 x float> %x) {
26 ; CHECK-LABEL: cvtf4_f3
27 ; CHECK:       # BB#0:
28 ; CHECK-NEXT:  retq
29 entry:
30   %extractVec = shufflevector <4 x float> %x, <4 x float> undef, <3 x i32> <i32 0, i32 1, i32 2>
31   ret <3 x float> %extractVec
32 }