diff options
author | Nikita Popov <npopov@redhat.com> | 2025-10-07 17:19:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-07 17:19:48 +0200 |
commit | 7e5bb1e58a5c1c96974f7984bd1a2d70bc360d4f (patch) | |
tree | 786e067ff3f209a70e374ab236f963e8e2bf434e /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | e40ff72df1b0e03b17e2abad40c4b97e7ae447d7 (diff) | |
download | llvm-7e5bb1e58a5c1c96974f7984bd1a2d70bc360d4f.zip llvm-7e5bb1e58a5c1c96974f7984bd1a2d70bc360d4f.tar.gz llvm-7e5bb1e58a5c1c96974f7984bd1a2d70bc360d4f.tar.bz2 |
[IR] Require DataLayout for pointer cast elimination (#162279)
isEliminableCastPair() currently tries to support elimination of
ptrtoint/inttoptr cast pairs by assuming that the maximum possible
pointer size is 64 bits. Of course, this is no longer the case nowadays.
This PR changes isEliminableCastPair() to accept an optional DataLayout
argument, which is required to eliminate pointer casts.
This means that we no longer eliminate these cast pairs during ConstExpr
construction, and instead only do it during DL-aware constant folding.
This had a lot of annoying fallout on tests, most of which I've
addressed in advance of this change.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions