From 1c4109b4c236de94e38c45189baf383e66de5b81 Mon Sep 17 00:00:00 2001 From: Sean Fertile Date: Fri, 9 Dec 2016 17:21:42 +0000 Subject: [PPC] Add intrinsics for vector extract word and vector insert word. Revision: https://reviews.llvm.org/D26547 llvm-svn: 289227 --- llvm/lib/Target/PowerPC/PPCInstrVSX.td | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/PowerPC/PPCInstrVSX.td b/llvm/lib/Target/PowerPC/PPCInstrVSX.td index e5d375a2450..dcb49b0b024 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrVSX.td +++ b/llvm/lib/Target/PowerPC/PPCInstrVSX.td @@ -2262,6 +2262,14 @@ let AddedComplexity = 400, Predicates = [HasP9Vector] in { [(set v4i32: $XT, (int_ppc_vsx_xvxsigsp v4f32:$XB))]>; + let AddedComplexity = 400, Predicates = [HasP9Vector] in { + // Extra patterns expanding to vector Extract Word/Insert Word + def : Pat<(v4i32 (int_ppc_vsx_xxinsertw v4i32:$A, v2i64:$B, imm:$IMM)), + (v4i32 (XXINSERTW $A, $B, imm:$IMM))>; + def : Pat<(v2i64 (int_ppc_vsx_xxextractuw v2i64:$A, imm:$IMM)), + (v2i64 (COPY_TO_REGCLASS (XXEXTRACTUW $A, imm:$IMM), VSRC))>; + } // AddedComplexity = 400, HasP9Vector + //===--------------------------------------------------------------------===// // Test Data Class SP/DP/QP @@ -2632,6 +2640,7 @@ let AddedComplexity = 400, Predicates = [HasP9Vector] in { (STXSIHXv (VSLDOI $S, $S, 10), xoaddr:$dst)>; } // IsLittleEndian, HasP9Vector + // Vector sign extensions def : Pat<(f64 (PPCVexts f64:$A, 1)), (f64 (COPY_TO_REGCLASS (VEXTSB2Ds $A), VSFRC))>; -- cgit v1.2.3