[llvm-dev] phi node as an operand

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 15 07:00:25 PST 2016


On 15 January 2016 at 06:44, Mohammad Norouzi via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Is it possible to have phi nodes as an operand to an instruction?

You mean you don't want to name the value "%input" but inline it into
another instruction? That's not possible. Only the operations listed
under "constant expressions" in the IR reference[1] can be fused like
that. The concept roughly corresponds to things you'd expect to be
able to write into an object file as a relocation.

Cheers.

Tim.

[1] http://llvm.org/docs/LangRef.html#constant-expressions


More information about the llvm-dev mailing list