Skip to content

Commit 50f4168

Browse files
committed
[GlobalISel] Fix implementation of CheckNumOperandsLE/GE
The condition was backwards - it was rejecting when the condition was met. Fixes #102719
1 parent 875b652 commit 50f4168

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ bool GIMatchTableExecutor::executeMatchTable(
320320
<< "], Expected=" << Expected << ")\n");
321321
assert(State.MIs[InsnID] != nullptr && "Used insn before defined");
322322
const unsigned NumOps = State.MIs[InsnID]->getNumOperands();
323-
if (IsLE ? (NumOps <= Expected) : (NumOps >= Expected)) {
323+
if (IsLE ? (NumOps > Expected) : (NumOps < Expected)) {
324324
if (handleReject() == RejectAndGiveUp)
325325
return false;
326326
}

0 commit comments

Comments
 (0)