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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 13:47:38 PDT 2017


On Fri, Oct 13, 2017 at 6:51 PM Daniel Sanders via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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.
>

Worth adding a test where that's not the case?


>
>
> 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;
>        }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171016/90004e0f/attachment.html>


More information about the llvm-commits mailing list