Instruction does not dominate all uses

Hi all,

I'm getting a weird error if I run llc on the attached module.
Did I do something wrong (llc says the module is broken, also
attached) or is this a bug?

Cheers,
Gary

test.bc (2.01 KB)

llc.out (2.3 KB)

The module appears to be malformed. Essentially, what the error
message means is that there is some path through the function that
reaches a use of a variable without passing through the definition,
which is illegal in SSA form.

http://llvm.org/docs/tutorial/LangImpl7.html might be useful for
understanding SSA form, and how to generate it easily.

-Eli

Gary Benson wrote:

Hi all,

I'm getting a weird error if I run llc on the attached module.
Did I do something wrong (llc says the module is broken, also
attached) or is this a bug?
  

Are you running your own optimization passes, or just the standard LLVM passes?

If it's your own optimization pass, there might be a bug. Otherwise, you might be running into a bug that I found last week in the standard LLVM optimization passes. That bug has since been fixed (http://llvm.org/bugs/show_bug.cgi?id=2434); if you update your LLVM tree from SVN mainline and rebuild, it should fix the problem.

-- John T.