aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Object.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-10-13 11:10:41 +0200
committerGitHub <noreply@github.com>2025-10-13 09:10:41 +0000
commit4a3e0001e367a930cb7dec2dcd072cc512825aff (patch)
treebcc6ad8f2db1621a3022bc1df3e0ae0e4bf5cd97 /llvm/lib/Object/Object.cpp
parentea251536d55f493d9eb4bb18fb027709c4d39509 (diff)
downloadllvm-4a3e0001e367a930cb7dec2dcd072cc512825aff.zip
llvm-4a3e0001e367a930cb7dec2dcd072cc512825aff.tar.gz
llvm-4a3e0001e367a930cb7dec2dcd072cc512825aff.tar.bz2
[IR] Handle trunc for ptrtoaddr(inttoptr) cast pair (#162842)
For ptrtoint(inttoptr) and ptrtoaddr(inttoptr), handle the case where the source and destination size do not match and convert to either zext or trunc. We can't do this if the middle size is smaller than both src/dest, because we'd have to perform an additional masking operation in that case. Most of these cases are handled by dint of ptrtoint/inttoptr size canonicalization (so I added some unit tests instead). However, the ptrtoaddr(inttoptr) case where the pointer size and address size differ is relevant, as in that case the mismatch in integer sizes is canonical.
Diffstat (limited to 'llvm/lib/Object/Object.cpp')
0 files changed, 0 insertions, 0 deletions