]> granicus.if.org Git - llvm/commit
Recommit r355224 "[TableGen][SelectionDAG][X86] Add specific isel matchers for immAll...
authorCraig Topper <craig.topper@intel.com>
Sun, 10 Mar 2019 05:21:52 +0000 (05:21 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 10 Mar 2019 05:21:52 +0000 (05:21 +0000)
commit7f415404f7388e1eb2f01a23c7c3f4258dc74498
tree5c0e1379f72126deb8f24e23413a5b6f56509618
parent4daee4c2afed10b62063b8b5551798a0452b4aaf
Recommit r355224 "[TableGen][SelectionDAG][X86] Add specific isel matchers for immAllZerosV/immAllOnesV. Remove bitcasts from X86 patterns that are no longer necessary."

Includes a fix to emit a CheckOpcode for build_vector when immAllZerosV/immAllOnesV is used as a pattern root. This means it can't be used to look through bitcasts when used as a root, but that's probably ok. This extra CheckOpcode will ensure that the first match in the isel table will be a SwitchOpcode which is needed by the caching optimization in the ISel Matcher.

Original commit message:

Previously we had build_vector PatFrags that called ISD::isBuildVectorAllZeros/Ones. Internally the ISD::isBuildVectorAllZeros/Ones look through bitcasts, but we aren't able to take advantage of that in isel. Instead of we have to canonicalize the types of the all zeros/ones build_vectors and insert bitcasts. Then we have to pattern match those exact bitcasts.

By emitting specific matchers for these 2 nodes, we can make isel look through any bitcasts without needing to explicitly match them. We should also be able to remove the canonicalization to vXi32 from lowering, but I've left that for a follow up.

This removes something like 40,000 bytes from the X86 isel table.

Differential Revision: https://reviews.llvm.org/D58595

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355784 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/CodeGen/SelectionDAGISel.h
include/llvm/Target/TargetSelectionDAG.td
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Target/SystemZ/SystemZOperators.td
lib/Target/X86/X86InstrAVX512.td
lib/Target/X86/X86InstrSSE.td
lib/Target/X86/X86InstrVecCompiler.td
utils/TableGen/CodeGenDAGPatterns.cpp
utils/TableGen/DAGISelMatcher.cpp
utils/TableGen/DAGISelMatcher.h
utils/TableGen/DAGISelMatcherEmitter.cpp
utils/TableGen/DAGISelMatcherGen.cpp