<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 9 June 2017 at 21:14, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 9 June 2017 at 21:00, Dipanjan Das via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
> Instruction does not dominate all uses!<br>
>   %var = alloca [3 x i32], align 4<br>
>   %0 = bitcast [3 x i32]* %var to i8*<br>
<br>
It looks like your IRBuilder may be inserting the instruction in the<br>
wrong place.</blockquote><div><br></div><div>Indeed. Thank you so much. I was scratching my head all day today. I wish I'd have mailed in the morning, could have saved my day.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'd use the debugger to call Module::dump after that<br>
fault to see where the bitcast really lives. If it's before the alloca<br>
(or even not guaranteed to be afterwards) then that's your problem.<br></blockquote><div><br></div><div>Out of curiosity, do my mean to fire up gdb? Can it call Module:dump() after a breakpoint is hit?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span><div><div dir="ltr"><p>Thanks & Regards,</p>
<div>Dipanjan</div></div></div></span></div></div>
</div></div>