aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2017-10-04 20:47:33 +0000
committerJustin Lebar <jlebar@google.com>2017-10-04 20:47:33 +0000
commitf84f7c7467956c50c2c92b49f90666580bf33d13 (patch)
tree2f9f7a583b3d352892ab892fbd705d128f7b61d3 /llvm/lib/CodeGen/MachineBlockPlacement.cpp
parentdf3e71e037715b3dd2fd0b9b34d70b8b8c836ff3 (diff)
downloadllvm-f84f7c7467956c50c2c92b49f90666580bf33d13.zip
llvm-f84f7c7467956c50c2c92b49f90666580bf33d13.tar.gz
llvm-f84f7c7467956c50c2c92b49f90666580bf33d13.tar.bz2
Convert an APInt to int64_t properly in TTI::getGEPCost().
Summary: If the pointer width is 32 bits and the calculated GEP offset is negative, we call APInt::getLimitedValue(), which does a *zero*-extension of the offset. That's wrong -- we should do an sext. Fixes a bug introduced in rL314362 and found by Evgeny Astigeevich. Reviewers: efriedma Subscribers: sanjoy, javed.absar, llvm-commits, eastig Differential Revision: https://reviews.llvm.org/D38557 llvm-svn: 314935
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
0 files changed, 0 insertions, 0 deletions