diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2021-03-06 22:58:53 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2021-03-06 23:00:25 +0300 |
commit | 2ad1f5eb1a47275593bd9baf75dcf3e9c3977473 (patch) | |
tree | ae7d2aea7a019ef18b024bfa025529e0be7fd894 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | |
parent | 75c7e3e3145f06d85b9580d4a1c9bc7f4b5a9a9e (diff) | |
download | llvm-2ad1f5eb1a47275593bd9baf75dcf3e9c3977473.zip llvm-2ad1f5eb1a47275593bd9baf75dcf3e9c3977473.tar.gz llvm-2ad1f5eb1a47275593bd9baf75dcf3e9c3977473.tar.bz2 |
[InstCombine] Don't canonicalize (gep i8* X, -(ptrtoint Y)) as (inttoptr (sub (ptrtoint X), (ptrtoint Y)))
It's just a wrong thing to do.
We introduce inttoptr where there were none, which results in
loosing all provenance information because we no longer have a GEP{i,},
and pessimize all future optimizations,
because we are basically not allowed to look past `inttoptr`.
(gep i8* X, -(ptrtoint Y)) *is* the canonical form.
So just drop this fold.
Noticed while reviewing D98120.
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions