unison-code / unison

Unison's source code
http://unison-code.github.io/
Other
104 stars 17 forks source link

llc doesn't identify machine instruction LW_fi #59

Closed romits800 closed 3 years ago

romits800 commented 3 years ago

I am compiling a small function (reduced from from the original c code) as follows:

$ uni import --target=Mips g72x.tandem_adjust_ulaw.mir -o g72x.tandem_adjust_ulaw.uni --function=tandem_adjust_ulaw --goal=speed --maxblocksize=25
$ uni linearize --target=Mips g72x.tandem_adjust_ulaw.uni -o g72x.tandem_adjust_ulaw.lssa.uni
$ uni extend --target=Mips g72x.tandem_adjust_ulaw.lssa.uni -o g72x.tandem_adjust_ulaw.ext.uni
$ uni augment --target=Mips g72x.tandem_adjust_ulaw.ext.uni -o g72x.tandem_adjust_ulaw.alt.uni
$ uni model --target=Mips g72x.tandem_adjust_ulaw.alt.uni -o g72x.tandem_adjust_ulaw.json
$ gecode-presolver -o g72x.tandem_adjust_ulaw.ext.json  --verbose g72x.tandem_adjust_ulaw.json 
$ gecode-solver -o g72x.tandem_adjust_ulaw.out.json  --verbose g72x.tandem_adjust_ulaw.ext.json 
$ uni export --keepnops --target=Mips g72x.tandem_adjust_ulaw.alt.uni -o g72x.tandem_adjust_ulaw.unison.mir --solfile=g72x.tandem_adjust_ulaw.out.json;

When trying to compile and generate binary using llc, I get:

$ llc_flags="-disable-post-ra -disable-tail-duplicate -disable-branch-fold -disable-block-placement -start-after livedebugvars"
$ llc g72x.tandem_adjust_ulaw.unison.mir -filetype=obj -march=mipsel -mcpu=mips32 ${llc_flags} -o g72x.tandem_adjust_ulaw.o
error: g72x.tandem_adjust_ulaw.unison.mir:83:11: unknown machine instruction name 'LW_fi'
    %at = LW_fi -20, 0

I attach the .mir file and a script run.sh that runs the commands described above: LW_fi_bug.tar.gz