From: Bruno Cardoso Lopes Date: Fri, 29 Jul 2011 01:31:07 +0000 (+0000) Subject: Add v8i32 and v4i64 vpermil patterns X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e89c7d4ce3636b52ab528bcb1c8a1c4b6dc649c7;p=oota-llvm.git Add v8i32 and v4i64 vpermil patterns git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136451 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index 441c14639e0..066f7c01a53 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -5581,6 +5581,10 @@ def : Pat<(v8f32 (X86VPermilpsy VR256:$src1, (i8 imm:$imm))), (VPERMILPSYri VR256:$src1, imm:$imm)>; def : Pat<(v4f64 (X86VPermilpdy VR256:$src1, (i8 imm:$imm))), (VPERMILPDYri VR256:$src1, imm:$imm)>; +def : Pat<(v8i32 (X86VPermilpsy VR256:$src1, (i8 imm:$imm))), + (VPERMILPSYri VR256:$src1, imm:$imm)>; +def : Pat<(v4i64 (X86VPermilpdy VR256:$src1, (i8 imm:$imm))), + (VPERMILPDYri VR256:$src1, imm:$imm)>; //===----------------------------------------------------------------------===// // VZERO - Zero YMM registers diff --git a/test/CodeGen/X86/avx-vpermil.ll b/test/CodeGen/X86/avx-vpermil.ll index d57c1737c46..f059948a799 100644 --- a/test/CodeGen/X86/avx-vpermil.ll +++ b/test/CodeGen/X86/avx-vpermil.ll @@ -14,3 +14,16 @@ entry: ret <4 x double> %shuffle } +; CHECK: vpermilps +define <8 x i32> @funcC(<8 x i32> %a) nounwind uwtable readnone ssp { +entry: + %shuffle = shufflevector <8 x i32> %a, <8 x i32> undef, <8 x i32> + ret <8 x i32> %shuffle +} + +; CHECK: vpermilpd +define <4 x i64> @funcD(<4 x i64> %a) nounwind uwtable readnone ssp { +entry: + %shuffle = shufflevector <4 x i64> %a, <4 x i64> undef, <4 x i32> + ret <4 x i64> %shuffle +}