[llvm-dev] PHI inst has two exact the same operands?

Xiaochu Liu via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 30 20:36:33 PDT 2016


I guess my tool does not support this type of CFG at this point. Thanks Daniel.

On Wed, Mar 30, 2016 at 8:32 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> yes, this is valid assuming bb9 dominates bb10.
> Not sure what you mean by "support this", unless your tool doesn't handle
> certain types of CFG's
>
>
> On Wed, Mar 30, 2016 at 8:12 PM, Xiaochu Liu via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>>
>> Dear there,
>>
>> Is the following phi instruction valid?
>>
>> %j_8 = phi i32 [ %j_100, %"<bb 13>" ], [ %j_9133, %"<bb 10>" ], [
>> %j_9133, %"<bb 9>" ]
>>
>> Variable %j_9133 is in bb 9.
>>
>> And also this one:
>>
>> %D.1898_8.i = phi i32 [ %D.1898_27.i, %"<bb 18>.i" ], [ -1, %"<bb 23>" ],
>> [ %D.1776_193, %"<bb 4>], [ %D.1776_193, %"<bb 4>], [ %l_5.lcssa.i,
>> %"<bb 17>.i" ]
>>
>> It has two identical operands.
>> Are they valid llvm instructions? I am hacking a infrastructure which
>> generates these IR. I was wondering if I should make my tool support
>> this or somehow manage to resolve this situation.
>>
>> Thanks,
>> Xiaochu
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>


More information about the llvm-dev mailing list