aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-12-13 12:02:10 -0800
committerCraig Topper <craig.topper@sifive.com>2022-12-13 12:02:11 -0800
commitd08e3ae271a9748af6c99be7e455730fb110b0a5 (patch)
treef573577b7ab6553edd8604c270063f8c85ca52cd /llvm/lib/Object/MachOObjectFile.cpp
parentadfb23c607ce35f090cf3e29fba9d382b22c3a50 (diff)
downloadllvm-d08e3ae271a9748af6c99be7e455730fb110b0a5.zip
llvm-d08e3ae271a9748af6c99be7e455730fb110b0a5.tar.gz
llvm-d08e3ae271a9748af6c99be7e455730fb110b0a5.tar.bz2
[InstCombine] Support vectors in simplifyIntToPtrRoundTripCast.
This code compares getPointerTypeSizeInBits and getTypeSizeInBits. getPointerTypeSizeInBits contains a call to getScalarType while getTypeSizeInBits does not. This makes the code incorrect for vectors. For scalable vectors this caused a warning about a scalable TypeSize being converted to unsigned. Switch to DL.getTypeSizeInBits for the pointers too. This should work since inttoptr/ptrtoint can't change the number of elements. This was suggested by @nikic in D139911. Fixes PR59480. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D139962
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions