[llvm] r315788 - [globalisel][tablegen] Fix an unused variable warning caused by a typo (corrected OtherInsnID->OtherOpIdx).

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 18:51:47 PDT 2017


Author: dsanders
Date: Fri Oct 13 18:51:46 2017
New Revision: 315788

URL: http://llvm.org/viewvc/llvm-project?rev=315788&view=rev
Log:
[globalisel][tablegen] Fix an unused variable warning caused by a typo (corrected OtherInsnID->OtherOpIdx).

The tests were passing by luck since the instruction ID and operand index happened to be the same.


Modified:
    llvm/trunk/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h

Modified: llvm/trunk/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h?rev=315788&r1=315787&r2=315788&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h Fri Oct 13 18:51:46 2017
@@ -345,7 +345,7 @@ bool InstructionSelector::executeMatchTa
       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;
       }




More information about the llvm-commits mailing list