]> granicus.if.org Git - llvm/commit
[ARM] Fix offset calculation in ARMBaseRegisterInfo::needsFrameBaseReg
authorRichard Barton <richard.barton@arm.com>
Tue, 17 Mar 2015 18:20:47 +0000 (18:20 +0000)
committerRichard Barton <richard.barton@arm.com>
Tue, 17 Mar 2015 18:20:47 +0000 (18:20 +0000)
commitb59aee170ffc087ec0e76aa83669b5181329a8bc
tree66d507ade52877d466a561771c65815c298b8ab3
parentde3983775efdbcd0121bcaf65a6d45d21a7fb269
[ARM] Fix offset calculation in ARMBaseRegisterInfo::needsFrameBaseReg

The input offset to needsFrameBaseReg is a negative value below the top of the
stack frame, but when converting to a positive offset from the bottom of the
stack frame this value was negated, causing the final offset to be too large
by twice the input offset's magnitude. Fix that by not negating the offset.

Patch by John Brawn

Differential Revision: http://reviews.llvm.org/D8316

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232513 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseRegisterInfo.cpp
test/CodeGen/ARM/ssp-data-layout.ll
test/CodeGen/Thumb/stack-access.ll