[PATCH] D69653: [GlobalISel] Match table opt: fix a bug in matching num of operands
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 13:54:51 PDT 2019
qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.
For the test case, couldn't you add a `isVariadic` instruction with different patterns in one of the TableGen test?
Otherwise LGTM.
================
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(
----------------
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()).
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