[LLVMdev] PHIs with Same Basic Block Listed Twice

John Criswell criswell at cs.uiuc.edu
Tue Mar 17 11:37:47 PDT 2009


Dear All,

I have, in an LLVM bitcode program, the following phi node:

%iftmp.225.0 = phi i8* [ getelementptr ([10 x i8]* @.str12597431, i32 0,
i32 0), %bb114 ], [ getelementptr ([10 x i8]* @.str1258, i32 0, i32 0),
%bb111 ], [ getelementptr ([10 x i8]* @.str1258, i32 0, i32 0), %bb111 ]

This phi instruction has two arguments for the same incoming basic
block.  The only reason why it passes verification right now is because
the same constant expression is used for the same basic block.

Does anyone know what might be causing this phi to have the same
incoming block listed multiple times?  Should LLVM consider such a phi
valid?

-- John T.




More information about the llvm-dev mailing list