In particular, we shouldn't make assumptions about globals which are unnamed_addr: we can fold them together with other globals.
Also while I'm here, use isInterposable() instead of trying to explicitly name all the different kinds of weak linkage.
Paths
| Differential D87123
[ConstantFold] Make areGlobalsPotentiallyEqual less aggressive. ClosedPublic Authored by efriedma on Sep 3 2020, 9:11 PM.
Details Summary In particular, we shouldn't make assumptions about globals which are unnamed_addr: we can fold them together with other globals. Also while I'm here, use isInterposable() instead of trying to explicitly name all the different kinds of weak linkage.
Diff Detail
Unit TestsFailed Event TimelineComment Actions LGTM, thanks!
This revision is now accepted and ready to land.Sep 6 2020, 7:41 AM This revision was landed with ongoing or failed builds.Sep 11 2020, 5:23 PM Closed by commit rGd751f86189a7: [ConstantFold] Make areGlobalsPotentiallyEqual less aggressive. (authored by efriedma). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 289851 llvm/lib/IR/ConstantFold.cpp
llvm/test/Assembler/ConstantExprNoFold.ll
llvm/test/Transforms/InstCombine/2010-03-03-ExtElim.ll
|
Looks like the precommit checks complain about this. Shouldn't this be c"...." for string constants? Also, it seems like escape sequences are not supported by the bitcode parser and \0 counts as 2 chars.