[LLVMdev] Hit a snag while attempting to write a backend - any advice?

Lee Hammerton savoury.snax at googlemail.com
Wed Mar 20 22:28:01 PDT 2013


On Mon, Mar 18, 2013 at 6:34 PM, Lee Hammerton
<savoury.snax at googlemail.com>wrote:

> Hi,
>
>  I've been experimenting with writing a backend for LLVM (3.2) (having
> already written a frontend http://savourysnax.github.com/EDL), everything
> was going reasonably ok ( calls/returns, epilogue, prologue, etc are all
> working), up until I tried to place support for conditional  branches.
>
> Given this simple program :
>
> int test(int c,int d)
> {
>         if (c)
>         {
>                 return d;
>         }
>         else
>         {
>                 return c;
>         }
> }
>
> with optimisations disabled (opts enabled it generates a select and this
> works fine) - I get the error  at the bottom of the post.
>
>
>
>
I've attached the .ll file and output from runnnig llc -debug in the hopes
that someone can see the problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130321/92380e3b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: err
Type: application/octet-stream
Size: 47972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130321/92380e3b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 08-simple.c.ll
Type: application/octet-stream
Size: 882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130321/92380e3b/attachment-0001.obj>


More information about the llvm-dev mailing list