diff options
author | Craig Topper <craig.topper@sifive.com> | 2021-02-08 09:48:25 -0800 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2021-02-08 09:48:27 -0800 |
commit | cc2c45dc54b324727a00be7218f387fcb53dd6c7 (patch) | |
tree | dfd8b2e5e5d42b992a48bac246f4b263c2329f8b /llvm/utils/TableGen/CodeGenDAGPatterns.cpp | |
parent | a4b1df8af37236935427342f0d82f83b178f0842 (diff) | |
download | llvm-cc2c45dc54b324727a00be7218f387fcb53dd6c7.zip llvm-cc2c45dc54b324727a00be7218f387fcb53dd6c7.tar.gz llvm-cc2c45dc54b324727a00be7218f387fcb53dd6c7.tar.bz2 |
[RISCV] Use SplatPat/SplatPat_simm5 to handle PseudoVMV_V_X_/PseudoVMV_V_I_ selection as well.
This ensures that we'll match immediates consistently regardless
of whether we match them as a standalone splat or as part of
another operation.
While I was there I added complexities to the simm5/uimm5 patterns so
we didn't have to assume that the 1 on the non-immediate was lower
than what tablegen inferred.
I had to make a minor tweak to tablegen to fix one place that
didn't expect to see a ComplexPattern that wasn't a "leaf".
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D96199
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index 394a0e1..0bfb695 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -3472,6 +3472,9 @@ private: if (N->getNumChildren() != 1 || !N->getChild(0)->isLeaf()) return false; + if (N->getOperator()->isSubClassOf("ComplexPattern")) + return false; + const SDNodeInfo &OpInfo = CDP.getSDNodeInfo(N->getOperator()); if (OpInfo.getNumResults() != 1 || OpInfo.getNumOperands() != 1) return false; |