OSDN Git Service

[mips] Fix unsigned/signed type error
authorSimon Dardis <simon.dardis@imgtec.com>
Wed, 16 Nov 2016 11:29:07 +0000 (11:29 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Wed, 16 Nov 2016 11:29:07 +0000 (11:29 +0000)
commit684785870d2beef68f152c860d660cf09d6c1996
tree184bf80f021fcb47b777b6aa929344fe4115400a
parentbc5962ad363b8e4d63fb5c53b7530a0e9117870d
[mips] Fix unsigned/signed type error

MipsFastISel uses a a class to represent addresses with a signed member
to represent the offset. MipsFastISel::emitStore, emitLoad and computeAddress
all treated the offset as being positive. In cases where the offset was
actually negative and a frame pointer was used, this would cause the constant
synthesis routine to crash as it would generate an unexpected instruction
sequence when frame indexes are replaced.

Reviewers: vkalintiris

Differential Revision: https://reviews.llvm.org/D26192

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287099 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsFastISel.cpp
test/CodeGen/Mips/Fast-ISel/stackloadstore.ll [new file with mode: 0644]