diff options
author | Adam Nemet <anemet@apple.com> | 2014-08-07 17:53:55 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2014-08-07 17:53:55 +0000 |
commit | 2e2537f665babd875af22548b77604553a4c8541 (patch) | |
tree | dc779eab7d4c94a718e66ce3b61661ba28325faa /llvm/utils/FileCheck/FileCheck.cpp | |
parent | 3f55974024d9178825e73bdd0e97f19fba67a2b7 (diff) | |
download | llvm-2e2537f665babd875af22548b77604553a4c8541.zip llvm-2e2537f665babd875af22548b77604553a4c8541.tar.gz llvm-2e2537f665babd875af22548b77604553a4c8541.tar.bz2 |
[AVX512] Generate masking instruction variants with tablegen
After adding the masking variants to several instructions, I have decided to
experiment with generating these from the non-masking/unconditional
variant. This will hopefully reduce the amount repetition that we currently
have in order to define an instruction with all its variants (for a reg/mem
instruction this would be 6 instruction defs and 2 Pat<> for the intrinsic).
The patch is the first cut that is currently only applied to valignd/q to make
the patch small.
A few notes on the approach:
* In order to stitch together the dag for both the conditional and the
unconditional patterns I pass the RHS of the set rather than the full
pattern (set dest, RHS).
* Rather than subclassing each instruction base class (e.g. AVX512AIi8),
with a masking variant which wouldn't scale, I derived the masking
instructions from a new base class AVX512 (this is just I<> with
Requires<HasAVX512>). The instructions derive from this now, plus a new set
of classes that add the format bits and everything else that instruction
base class provided (i.e. AVX512AIi8 vs. AVX512AIi8Base).
I hope we can go incrementally from here. I expect that:
* We will need different variants of the masking class. One example is
instructions requiring three vector sources. In this case we tie one of the
source operands to dest rather than a new implicit source operand ($src0)
* Add the zero-masking variant
* Add more AVX512*Base classes as new uses are added
I've looked at X86.td.expanded before and after to make sure that nothing got
lost for valignd/q.
llvm-svn: 215125
Diffstat (limited to 'llvm/utils/FileCheck/FileCheck.cpp')
0 files changed, 0 insertions, 0 deletions