[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
Mon Oct 16 22:25:40 PDT 2017


I managed to find one amongst the rules currently imported for X86. Added in r315972

> On 16 Oct 2017, at 13:47, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Fri, Oct 13, 2017 at 6:51 PM Daniel Sanders via llvm-commits <llvm-commits at lists.llvm.org <mailto: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 <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 <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 <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <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/94f66b6b/attachment.html>


More information about the llvm-commits mailing list