<br><br><div class="gmail_quote">On Mon, Mar 18, 2013 at 6:34 PM, Lee Hammerton <span dir="ltr"><<a href="mailto:savoury.snax@googlemail.com" target="_blank">savoury.snax@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div><br></div><div> I've been experimenting with writing a backend for LLVM (3.2) (having already written a frontend <a href="http://savourysnax.github.com/EDL" target="_blank">http://savourysnax.github.com/EDL</a>), everything was going reasonably ok ( calls/returns, epilogue, prologue, etc are all working), up until I tried to place support for conditional branches.</div>
<div><br></div><div>Given this simple program :<br><br><div>int test(int c,int d)</div><div>{</div><div> if (c)</div><div> {</div><div> return d;</div><div> }</div><div> else</div>
<div> {</div><div> return c;</div><div> }</div><div>}<br><br>with optimisations disabled (opts enabled it generates a select and this works fine) - I get the error at the bottom of the post.</div>
</div><div><br></div><div><br></div><div><br></div></blockquote><div><br></div><div>I've attached the .ll file and output from runnnig llc -debug in the hopes that someone can see the problem.</div><div><br></div></div>
<br>