且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

LLVM“指令并不主导所有使用". -插入新指令

更新时间:2021-09-13 05:47:29

我还没有遇到这样的问题,但是我认为您的问题是if语句. %add属于if.then BasicBlock,不能从if.end块访问.这就是为什么phi指令选择" %add%sub可用的值的原因.因此,您必须将IcmpInst的%a.0用作参数,而不是%add.

I have not encountered such a problem jet but I think your problem is the if statement. %add belonges to the if.then BasicBlock and it is not accessable from the if.end block. This is why the phi instruction "chooses" which value is available %add or %sub. So you have to take %a.0 for your IcmpInst as argument not %add.