[PATCH] D69653: [GlobalISel] Match table opt: fix a bug in matching num of operands
Roman Tereshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 23:52:57 PDT 2019
rtereshin marked an inline comment as done.
rtereshin added inline comments.
================
Comment at: llvm/utils/TableGen/GlobalISelEmitter.cpp:2276
if (Stash.back().get() == &OpcMatcher) {
- if (NumOperandsCheck && OpcMatcher.getNumOperands() < getNumOperands())
+ if (NumOperandsCheck && OpcMatcher.isVariadicNumOperands())
Stash.emplace_back(
----------------
qcolombet wrote:
> Stupid question: what complains if an instruction does not have the `isVariadic` attribute, but we write patterns with different number of operands?
> (Just wondering if we need an assert that !isVariadic => getNumOperands() == OpcMatcher.getNumOperands()).
> Stupid question: what complains if an instruction does not have the isVariadic attribute, but we write patterns with different number of operands?
This does: https://github.com/llvm/llvm-project/blob/master/llvm/utils/TableGen/CodeGenDAGPatterns.cpp#L2414-L2420
> (Just wondering if we need an assert that !isVariadic => getNumOperands() == OpcMatcher.getNumOperands()).
Considered the same, decided redundant.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69653/new/
https://reviews.llvm.org/D69653
More information about the llvm-commits
mailing list