[LLVMbugs] [Bug 8822] New: DBG_VALUE using a killed register

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Dec 19 15:36:49 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=8822

           Summary: DBG_VALUE using a killed register
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: zwarich at apple.com
                CC: llvmbugs at cs.uiuc.edu


If I run the verifier on CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll I
get the following output:

# Machine code for function x0:
Constant Pool:
  cp#0: length, align=4
Function Live Ins: %R0 in reg%16389, %R1 in reg%16390

0L    BB#0: derived from LLVM BB %entry
        Live Ins: %R0 %R1
        DBG_VALUE %R0, 0, !"buf"; dbg:t.c:4:24
        DBG_VALUE %R1, 0, !"nbytes"; dbg:t.c:4:43
4L        %reg16390<def> = COPY %R1<kill>; rGPR:%reg16390
        DBG_VALUE %reg16390, 0, !"nbytes"; rGPR:%reg16390 dbg:t.c:4:43
12L        %reg16389<def> = COPY %R0<kill>; GPR:%reg16389
        DBG_VALUE %reg16389, 0, !"buf"; GPR:%reg16389 dbg:t.c:4:24
20L        %reg16392<def> = t2LDRpci <cp#0>; mem:LD4[ConstantPool]
GPR:%reg16392 dbg:t.c:9:2
28L        %reg16393<def> = t2LDRi12 %reg16392<kill>, 0, pred:14, pred:%reg0;
mem:LD4[GOT] GPR:%reg16393,16392 dbg:t.c:9:2
36L        %reg16394<def> = t2LDRi12 %reg16393<kill>, 0, pred:14, pred:%reg0;
mem:LD4[@length] rGPR:%reg16394 GPR:%reg16393 dbg:t.c:9:2
44L        %reg16395<def> = t2MOVi 0, pred:14, pred:%reg0, opt:%reg0;
rGPR:%reg16395
52L        t2CMPrr %reg16394, %reg16390, pred:14, pred:%reg0, %CPSR<imp-def>;
rGPR:%reg16394,16390 dbg:t.c:9:2
60L        %reg16397<def> = COPY %reg16395; rGPR:%reg16397,16395 dbg:t.c:9:2
68L        %reg16397<def> = t2MOVCCi %reg16397, 1, pred:3, pred:%CPSR<kill>;
rGPR:%reg16397 dbg:t.c:9:2
76L        t2CMPri %reg16394, -1, pred:14, pred:%reg0, %CPSR<imp-def>;
rGPR:%reg16394
84L        %reg16398<def> = COPY %reg16395; rGPR:%reg16398,16395
92L        %reg16398<def> = t2MOVCCi %reg16398, 1, pred:1, pred:%CPSR<kill>;
rGPR:%reg16398
100L        t2TSTrr %reg16398<kill>, %reg16397<kill>, pred:14, pred:%reg0,
%CPSR<imp-def>; rGPR:%reg16398,16397
108L        %reg16399<def> = COPY %reg16390<kill>; rGPR:%reg16399,16390
116L        %reg16399<def> = t2MOVCCr %reg16399, %reg16394<kill>, pred:1,
pred:%CPSR<kill>; rGPR:%reg16399,16394
124L        %reg16391<def> = COPY %reg16395<kill>; GPR:%reg16391 rGPR:%reg16395
132L        %reg16384<def> = COPY %reg16389<kill>; GPR:%reg16384,16389
        DBG_VALUE %reg16384, 0, !"buf"; GPR:%reg16384
140L        %reg16385<def> = COPY %reg16399<kill>; rGPR:%reg16385,16399
        DBG_VALUE %reg16394, 0, !"nbytes"; rGPR:%reg16394 dbg:t.c:9:2
        DBG_VALUE 0, 0, !"nread"; dbg:t.c:10:2
148L        %reg16406<def> = COPY %reg16391<kill>; GPR:%reg16406,16391
        Successors according to CFG: BB#1

160L    BB#1: derived from LLVM BB %while.cond
        Predecessors according to CFG: BB#0 BB#3
164L        %reg16386<def> = COPY %reg16406<kill>; GPR:%reg16386,16406
172L        t2CMPrr %reg16386, %reg16385, pred:14, pred:%reg0, %CPSR<imp-def>;
GPR:%reg16386 rGPR:%reg16385 dbg:t.c:11:2
180L        t2Bcc <BB#4>, pred:2, pred:%CPSR<kill>; dbg:t.c:11:2
188L        t2B <BB#2>; dbg:t.c:11:2
        Successors according to CFG: BB#2 BB#4

200L    BB#2: derived from LLVM BB %land.rhs
        Predecessors according to CFG: BB#1
204L        ADJCALLSTACKDOWN 0, pred:14, pred:%reg0, %SP<imp-def>, %SP<imp-use>
212L        tBLXi_r9 pred:14, pred:%reg0, <ga:@x1>, %R0<imp-def>,
%R1<imp-def,dead>, %CPSR<imp-def,dead>, %R7<imp-use>, %SP<imp-use>, ...;
dbg:t.c:11:2
220L        ADJCALLSTACKUP 0, 0, pred:14, pred:%reg0, %SP<imp-def>,
%SP<imp-use>
228L        %reg16403<def> = COPY %R0<kill>; GPR:%reg16403 dbg:t.c:11:2
236L        t2CMPri %reg16403, -1, pred:14, pred:%reg0, %CPSR<imp-def>;
GPR:%reg16403 dbg:t.c:11:2
244L        t2Bcc <BB#4>, pred:0, pred:%CPSR<kill>; dbg:t.c:11:2
252L        t2B <BB#3>; dbg:t.c:11:2
        Successors according to CFG: BB#4 BB#3

264L    BB#3: derived from LLVM BB %while.body
        Predecessors according to CFG: BB#2
268L        %reg16387<def> = COPY %reg16403<kill>; GPR:%reg16387,16403
dbg:t.c:11:2
276L        %reg16404<def> = COPY %reg16386; rGPR:%reg16404 GPR:%reg16386
284L        t2STRBs %reg16387<kill>, %reg16384, %reg16404<kill>, 0, pred:14,
pred:%reg0; mem:ST1[%sunkaddr2] GPR:%reg16387,16384 rGPR:%reg16404 dbg:t.c:12:3
292L        %reg16405<def> = t2ADDri %reg16386<kill>, 1, pred:14, pred:%reg0,
opt:%reg0; rGPR:%reg16405 GPR:%reg16386 dbg:t.c:13:3
300L        %reg16388<def> = COPY %reg16405<kill>; GPR:%reg16388 rGPR:%reg16405
dbg:t.c:13:3
308L        %reg16406<def> = COPY %reg16388<kill>; GPR:%reg16406,16388
316L        t2B <BB#1>; dbg:t.c:14:2
        Successors according to CFG: BB#1

328L    BB#4: derived from LLVM BB %while.end
        Predecessors according to CFG: BB#1 BB#2
332L        tBX_RET; dbg:t.c:15:1

# End machine code for function x0.

*** Bad machine code: Using a killed virtual register ***
- function:    x0
- basic block: entry 0x102849198 (BB#0) [0L;160L)
- instruction: DBG_VALUE %reg16394, 0, !"nbytes"; rGPR:%reg16394 dbg:t.c:9:2
- operand 0:   %reg16394
LLVM ERROR: Found 1 machine code errors.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list