[LLVMdev] register allocation problems in trunk with IMPLICIT_DEF

Jonas Paulsson jonas.paulsson at ericsson.com
Wed May 9 06:27:51 PDT 2012


Hi,

Recently code using IMPLICIT_DEF and INSERT_SUBREG started to break:

            %vreg9<def> = IMPLICIT_DEF
            %vreg10<def> = INSERT_SUBREG %vreg9<kill>, %vreg1<kill>, hi
            %vreg12<def> = sub %vreg10<kill>, %vreg11<kill>
=>
            %vreg10<def> = IMPLICIT_DEF
            %vreg10:hi<def> = COPY %vreg1<kill>
            %vreg12<def> = sub %vreg10<kill>, %vreg11<kill>
=>
            %vreg10:hi<def,read-undef> = COPY %vreg1<kill>, %vreg10<imp-def>
            %vreg12<def> = sub %vreg10<kill>, %vreg11<kill>
=>
            %vreg10:hi<def,read-undef> = COPY %a1_h<kill>
            %vreg12<def> = sub %vreg10<kill>, %vreg11<kill>
=>
            %a2_h<def> = COPY %a1_h<kill>
            %a2<def> = sub %a2<kill>, %a3<kill>

*** Bad machine code: Using an undefined physical register ***
- function:    array
- basic block:  0x43ac7d0 (BB#0)
- instruction: %a2<def> = sub %a2<kill>, %a3<kill
- operand 1:   %a2<kill>

This all worked well before. Is there a change somewhere in the framework that will make the code on top wrong?

Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120509/109a2952/attachment.html>


More information about the llvm-dev mailing list