From: Adam Nemet Date: Wed, 15 Oct 2014 23:42:09 +0000 (+0000) Subject: [AVX512] Two new attributes in X86VectorVTInfo for subvector insert X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=ccebe7258eacc9d9d9eb94118a898613110683de [AVX512] Two new attributes in X86VectorVTInfo for subvector insert The new attributes are NumElts and the CD8TupleForm. This prepares the code to enable x8 and x2 inserts. NFC, no change in X86.td.expanded except for the new attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219871 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrAVX512.td b/lib/Target/X86/X86InstrAVX512.td index 1d69d1dbf7d..788fcab773e 100644 --- a/lib/Target/X86/X86InstrAVX512.td +++ b/lib/Target/X86/X86InstrAVX512.td @@ -2,9 +2,10 @@ // EltVT). These are things like the register class for the writemask, etc. // The idea is to pass one of these as the template argument rather than the // individual arguments. -class X86VectorVTInfo { RegisterClass RC = rc; + int NumElts = numelts; // Corresponding mask register class. RegisterClass KRC = !cast("VK" # NumElts); @@ -73,6 +74,11 @@ class X86VectorVTInfo("CD8VT" # NumElts), ?); + SubRegIndex SubRegIdx = !if (!eq (Size, 128), sub_xmm, !if (!eq (Size, 256), sub_ymm, ?)); @@ -349,7 +355,8 @@ multiclass vinsert_for_size, EVEX_4V, EVEX_V512, EVEX_CD8; + []>, + EVEX_4V, EVEX_V512, EVEX_CD8; } // Codegen pattern with the alternative types, e.g. v2i64 -> v8i64 for diff --git a/lib/Target/X86/X86InstrFormats.td b/lib/Target/X86/X86InstrFormats.td index 66865219dbf..cbd135aa007 100644 --- a/lib/Target/X86/X86InstrFormats.td +++ b/lib/Target/X86/X86InstrFormats.td @@ -101,6 +101,7 @@ def CD8VF : CD8VForm<0>; // v := VL def CD8VH : CD8VForm<1>; // v := VL/2 def CD8VQ : CD8VForm<2>; // v := VL/4 def CD8VO : CD8VForm<3>; // v := VL/8 +// The tuple (subvector) forms. def CD8VT1 : CD8VForm<4>; // v := 1 def CD8VT2 : CD8VForm<5>; // v := 2 def CD8VT4 : CD8VForm<6>; // v := 4