From: Adam Nemet Date: Wed, 8 Oct 2014 23:25:23 +0000 (+0000) Subject: [AVX512] Peel off an asm-only class from AVX512_masking_common. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6feb834941171af1abc7d427aa48cb589e97ae7b;p=oota-llvm.git [AVX512] Peel off an asm-only class from AVX512_masking_common. No functional change. This enables the generation of masking instructions that don't provide a ISel pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219358 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrAVX512.td b/lib/Target/X86/X86InstrAVX512.td index 40292f5dac1..c7126296c30 100644 --- a/lib/Target/X86/X86InstrAVX512.td +++ b/lib/Target/X86/X86InstrAVX512.td @@ -115,14 +115,18 @@ def avx512vl_i32_info : AVX512VLVectorVTInfo; - -// Common base class of AVX512_masking and AVX512_masking_3src. -multiclass AVX512_masking_common O, Format F, X86VectorVTInfo _, +// This multiclass generates the masking variants from the non-masking +// variant. It only provides the assembly pieces for the masking variants. +// It assumes custom ISel patterns for masking which can be provided as +// template arguments. +multiclass AVX512_masking_custom O, Format F, dag Outs, dag Ins, dag MaskingIns, dag ZeroMaskingIns, string OpcodeStr, string AttSrcAsm, string IntelSrcAsm, - dag RHS, dag MaskingRHS, + list Pattern, + list MaskingPattern, + list ZeroMaskingPattern, string MaskingConstraint = "", InstrItinClass itin = NoItinerary, bit IsCommutable = 0> { @@ -130,14 +134,14 @@ multiclass AVX512_masking_common O, Format F, X86VectorVTInfo _, def NAME: AVX512; + Pattern, itin>; // Prefer over VMOV*rrk Pat<> let AddedComplexity = 20 in def NAME#k: AVX512, + MaskingPattern, itin>, EVEX_K { // In case of the 3src subclass this is overridden with a let. string Constraints = MaskingConstraint; @@ -146,14 +150,32 @@ multiclass AVX512_masking_common O, Format F, X86VectorVTInfo _, def NAME#kz: AVX512, EVEX_KZ; } + +// Common base class of AVX512_masking and AVX512_masking_3src. +multiclass AVX512_masking_common O, Format F, X86VectorVTInfo _, + dag Outs, + dag Ins, dag MaskingIns, dag ZeroMaskingIns, + string OpcodeStr, + string AttSrcAsm, string IntelSrcAsm, + dag RHS, dag MaskingRHS, + string MaskingConstraint = "", + InstrItinClass itin = NoItinerary, + bit IsCommutable = 0> : + AVX512_masking_custom; + // This multiclass generates the unconditional/non-masking, the masking and // the zero-masking variant of the instruction. In the masking case, the // perserved vector elements come from a new dummy input operand tied to $dst.