If the llvm. prefix is dropped other parts of llvm don't see this as an intrinsic. This means that the number of regular symbols depends on the context the module is loaded into, which causes LTO to abort.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The change seems fine, but I'm curious how we end up with an old renamed intrinsic declaration? For some reason I can't reproduce the problem locally.
If we materialize the whole module we must remove old declarations from the module (see BitcodeReader::materializeModule). Althought if we use BitcodeReader::materialize old declaration will be kept in the module.
Comment Actions
I reproduced the problem with the testcase from the review. From what I see we lazily materialize the module, so old versions of upgraded intrinsics are not removed.