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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs