| Issue |
55377
|
| Summary |
LTO fails combining modules with and without opaque pointers
|
| Labels |
|
| Assignees |
|
| Reporter |
fhahn
|
It looks like doing LTO doesn't work when some modules use opaque pointers and some don't. I *think* up to now doing LTO with modules generated by older versions of LLVM worked.
a.ll:
```
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i8* @foo() {
ret i8* null
}
```
b.ll:
```
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
define ptr @bar2() {
ret ptr null
}
```
```
bin/llvm-as a.ll
bin/llvm-as b.ll
bin/llvm-lto2 run a.bc b.bc -o res.bc -r a.bc,foo,plx -r b.bc,bar2,plx <<<
llvm-lto2: b.bc: Opaque pointers are only supported in -opaque-pointers mode (Producer: 'LLVM15.0.0git' Reader: 'LLVM 15.0.0git')
```
At the moment, this is causing plenty of `Bitcode` tests to fail from `llvm-test-suite`, when building the test suite with LTO.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs