Xiaochu Liu via llvm-dev
2016-Mar-31 03:12 UTC
[llvm-dev] PHI inst has two exact the same operands?
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
Daniel Berlin via llvm-dev
2016-Mar-31 03:32 UTC
[llvm-dev] PHI inst has two exact the same operands?
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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160330/7b7521cc/attachment.html>
Xiaochu Liu via llvm-dev
2016-Mar-31 03:36 UTC
[llvm-dev] PHI inst has two exact the same operands?
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 > >