Skip to content

llvm-dis < bytecode | llvm-as fails: "Reference to an invalid definition" #742

@llvmbot

Description

@llvmbot
Bugzilla Link 370
Resolution FIXED
Resolved on Nov 07, 2018 00:17
Version trunk
OS All
Attachments bytecode which fails
Reporter LLVM Bugzilla Contributor

Extended Description

While working on the reoptimizer test framework I happened upon an llvm
bytecode file that I can't disassemble and reassemble successfully. I get the
following error:

216 kain> llvm-dis < lists.bc | llvm-as > sigh
llvm-as: :441: Reference to an invalid definition: #​6 of type ''

By the way, I don't think the error message type '' is correct.
I think it may be referencing the definition from main() marked below:

endif.8.i: ; preds = %endif.7.i
%tmp.2.i.i = load int* %tmp.83.i.i2099 ; [#uses=1]
cast %struct.DLL* %tmp.12.i.i.sub169 to sbyte* ; <sbyte*>:4 [#uses=1]
call void %free( sbyte* %4 )
cast %struct.DLL* %tmp.2.i.i.sub21101 to sbyte* ; <sbyte*>:5 [#uses=1]
call void %free( sbyte* %5 )
cast %struct.DLL* %1 to sbyte* ; <sbyte*>:6 [#uses=1] ** THIS ONE **
call void %free( sbyte* %6 )
br label %test_lists.entry

I will attach the bytecode to this bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions