From a3b1e47840a68d650bbef66a3ec7a9413174f967 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Wed, 15 Oct 2014 23:42:09 +0000 Subject: [PATCH] [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. llvm-svn: 219871 --- lib/Target/X86/X86InstrAVX512.td | 17 +++++++++++++---- lib/Target/X86/X86InstrFormats.td | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) 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