[all-commits] [llvm/llvm-project] faf848: [Inline] Fix in handling of ptrtoint in InlineCost
mikaelholmen via All-commits
all-commits at lists.llvm.org
Mon Nov 23 05:38:03 PST 2020
Branch: refs/heads/temp-test-main
Home: https://github.com/llvm/llvm-project
Commit: faf848ac321801ba92b1d3038fccc84988d46ac8
https://github.com/llvm/llvm-project/commit/faf848ac321801ba92b1d3038fccc84988d46ac8
Author: Mikael Holmen <mikael.holmen at ericsson.com>
Date: 2020-11-23 (Mon, 23 Nov 2020)
Changed paths:
M llvm/lib/Analysis/InlineCost.cpp
A llvm/test/Transforms/Inline/inline-ptrtoint-different-sizes.ll
Log Message:
-----------
[Inline] Fix in handling of ptrtoint in InlineCost
ConstantOffsetPtrs contains mappings from a Value to a base pointer and
an offset. The offset is typed and has a size, and at least when dealing
with ptrtoint, it could happen that we had a mapping from a ptrtoint
with type i32 to an offset with type i16. This could later cause
problems, showing up in PR 47969 and PR 38500.
In PR 47969 we ended up in an assert complaining that trunc i16 to i16
is invalid and in Pr 38500 that a cmp on an i32 and i16 value isn't
valid.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D90610
More information about the All-commits
mailing list