llvm-6502/test/Linker/Inputs/type-unique-opaque.ll
Rafael Espindola f716393db9 Add back r222727 with a fix.
The original patch would fail when:

* A dst opaque type (%A) is matched with a src type (%A).
* A src opaque (%E) type is then speculatively matched with %A and the
  speculation fails afterward.
* When rolling back the speculation we would cancel the source %A to dest
  %A mapping.

The fix is to keep an explicit list of which resolutions are speculative.

Original message:

Fix overly aggressive type merging.

If we find out that two types are *not* isomorphic, we learn nothing about
opaque sub types in both the source and destination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222923 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-28 16:41:24 +00:00

7 lines
79 B
LLVM

%t = type { i8 }
%t2 = type { %t*, i16 }
define %t2* @f() {
ret %t2* null
}