diff options
author | Fraser Cormack <fraser@codeplay.com> | 2021-01-06 08:07:41 +0000 |
---|---|---|
committer | Fraser Cormack <fraser@codeplay.com> | 2021-01-09 17:05:31 +0000 |
commit | de373ef779880e923636d90cdb277e4db84c7479 (patch) | |
tree | 65ec6fcdacb4bb08048ab232763608ebd63ac7eb /llvm/lib/CodeGen/MachineOutliner.cpp | |
parent | 676c7cb0c0d4b66affde3ff7fc566c7a5aaa7246 (diff) | |
download | llvm-de373ef779880e923636d90cdb277e4db84c7479.zip llvm-de373ef779880e923636d90cdb277e4db84c7479.tar.gz llvm-de373ef779880e923636d90cdb277e4db84c7479.tar.bz2 |
[SelectionDAG] Extend immAll(Ones|Zeros)V to handle ISD::SPLAT_VECTOR
The TableGen immAllOnesV and immAllZerosV helpers implicitly wrapped the
ISD::isBuildVectorAll(Ones|Zeros) helper functions. This was inhibiting
their use for targets such as RISC-V which use ISD::SPLAT_VECTOR. In
particular, RISC-V had to define its own 'vnot' fragment.
In order to extend the scope of these nodes to include support for
ISD::SPLAT_VECTOR, two new ISD predicate functions have been introduced:
ISD::isConstantSplatVectorAll(Ones|Zeros). These effectively supersede
the older "isBuildVector" predicates, which are now simple wrappers for
the new functions. They pass a defaulted boolean toggle which preserves
the old behaviour. It is hoped that in time all call-sites can be ported
to the "isConstantSplatVector" functions.
While the use of ISD::isBuildVectorAll(Ones|Zeros) has not changed, the
behaviour of the TableGen immAll(Ones|Zeros)V **has**. To test the new
functionality, the custom RISC-V TableGen fragment has been removed and
replaced with the built-in 'vnot'. To test their use as pattern-roots, two
splat patterns have been updated accordingly.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D94223
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
0 files changed, 0 insertions, 0 deletions