[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
Tue Oct 17 13:33:02 PDT 2017


Nice!

On Mon, Oct 16, 2017 at 10:25 PM Daniel Sanders <daniel_l_sanders at apple.com>
wrote:

> 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> 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/20171017/9d06deea/attachment.html>


More information about the llvm-commits mailing list