[llvm-dev] Instruction does not dominate all uses!

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 9 21:14:42 PDT 2017


On 9 June 2017 at 21:00, Dipanjan Das via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Instruction does not dominate all uses!
>   %var = alloca [3 x i32], align 4
>   %0 = bitcast [3 x i32]* %var to i8*

It looks like your IRBuilder may be inserting the instruction in the
wrong place. I'd use the debugger to call Module::dump after that
fault to see where the bitcast really lives. If it's before the alloca
(or even not guaranteed to be afterwards) then that's your problem.

Tim.


More information about the llvm-dev mailing list