[LLVMbugs] [Bug 22807] New: Type merging regression in lib/Linker

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 5 08:36:48 PST 2015


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

            Bug ID: 22807
           Summary: Type merging regression in lib/Linker
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Linker
          Assignee: unassignedbugs at nondot.org
          Reporter: dexonsmith at apple.com
                CC: llvmbugs at cs.uiuc.edu, rafael.espindola at gmail.com
    Classification: Unclassified

Created attachment 13988
  --> http://llvm.org/bugs/attachment.cgi?id=13988&action=edit
reinitialize-linker.patch: patch that "fixes" the bug (the wrong way)

Here's an interesting regression in type merging in lib/Linker.  The example
that follows would merge %struct.A in 3.5, but doesn't in ToT.

I've attached a patch that "fixes" the problem (the wrong way) by not reusing
the `Linker` in `llvm-link`.  I haven't dug into what's going on though.

Here's the example:

$ cat A1.ll
%struct.A = type { %struct.B* }
%struct.B = type opaque

define i32 @foo(%struct.A** %A) {
  ret i32 0
}
$ cat A2.ll
%struct.A = type { %struct.B* }
%struct.B = type opaque

define i32 @bar(%struct.A* %A) {
   ret i32 0
}
$ cat B.ll
%struct.B = type { %struct.A* }
%struct.A = type opaque

define i32 @baz(%struct.B* %BB) {
  ret i32 0
}
$ llvm-link -S -o - B.ll A1.ll A2.ll
; ModuleID = 'llvm-link'

%struct.B = type { %struct.A* }
%struct.A = type { %struct.B* }
%struct.A.2 = type { %struct.B* }

define i32 @baz(%struct.B* %BB) {
  ret i32 0
}

define i32 @foo(%struct.A** %A) {
  ret i32 0
}

define i32 @bar(%struct.A.2* %A) {
  ret i32 0
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150305/2ab74301/attachment.html>


More information about the llvm-bugs mailing list