]> granicus.if.org Git - llvm/commitdiff
[globalisel][tablegen] Fix an unused variable warning caused by a typo (corrected...
authorDaniel Sanders <daniel_l_sanders@apple.com>
Sat, 14 Oct 2017 01:51:46 +0000 (01:51 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Sat, 14 Oct 2017 01:51:46 +0000 (01:51 +0000)
The tests were passing by luck since the instruction ID and operand index happened to be the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315788 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h

index d2da152cf393c96a26c46c7491027d37bc7cdea0..f1bc848409631cc338e7c67964be97bb00866c92 100644 (file)
@@ -345,7 +345,7 @@ bool InstructionSelector::executeMatchTable(
       assert(State.MIs[InsnID] != nullptr && "Used insn before defined");
       assert(State.MIs[OtherInsnID] != nullptr && "Used insn before defined");
       if (!State.MIs[InsnID]->getOperand(OpIdx).isIdenticalTo(
-              State.MIs[OtherInsnID]->getOperand(OtherInsnID))) {
+              State.MIs[OtherInsnID]->getOperand(OtherOpIdx))) {
         if (handleReject() == RejectAndGiveUp)
           return false;
       }