Add a few patterns to match allzeros without having to use the fp unit.
[oota-llvm.git] / test / CodeGen / X86 / vec_shuffle-38.ll
1 ; RUN: llc < %s -march=x86-64 | FileCheck %s
2
3 define <2 x double> @ld(<2 x double> %p) nounwind optsize ssp {
4 ; CHECK: unpcklpd
5   %shuffle = shufflevector <2 x double> %p, <2 x double> undef, <2 x i32> zeroinitializer
6   ret <2 x double> %shuffle
7 }
8
9 define <2 x double> @hd(<2 x double> %p) nounwind optsize ssp {
10 ; CHECK: unpckhpd
11   %shuffle = shufflevector <2 x double> %p, <2 x double> undef, <2 x i32> <i32 1, i32 1>
12   ret <2 x double> %shuffle
13 }
14
15 define <2 x i64> @ldi(<2 x i64> %p) nounwind optsize ssp {
16 ; CHECK: punpcklqdq
17   %shuffle = shufflevector <2 x i64> %p, <2 x i64> undef, <2 x i32> zeroinitializer
18   ret <2 x i64> %shuffle
19 }
20
21 define <2 x i64> @hdi(<2 x i64> %p) nounwind optsize ssp {
22 ; CHECK: punpckhqdq
23   %shuffle = shufflevector <2 x i64> %p, <2 x i64> undef, <2 x i32> <i32 1, i32 1>
24   ret <2 x i64> %shuffle
25 }
26