diff options
author | Zhaoshi Zheng <zhaoshiz@coduaurora.org> | 2018-08-28 23:00:59 +0000 |
---|---|---|
committer | Zhaoshi Zheng <zhaoshiz@coduaurora.org> | 2018-08-28 23:00:59 +0000 |
commit | 35818e27894db154a9c884cb4d203dc84684ef59 (patch) | |
tree | 5469ed804187264aa3e697340bfd579fcff4c91d /llvm/lib/MC/MCObjectStreamer.cpp | |
parent | 5f711c794d7698bf22c08d17318788cf63a927ea (diff) | |
download | bcm5719-llvm-35818e27894db154a9c884cb4d203dc84684ef59.tar.gz bcm5719-llvm-35818e27894db154a9c884cb4d203dc84684ef59.zip |
[QTOOL-37352] Consider isLegalAddressingImm in Constant Hoisting
In Thumb1, legal imm range is [0, 255] for ADD/SUB instructions. However, the
legal imm range for LD/ST in (R+Imm) addressing mode is [0, 127]. Imms in
[128, 255] are materialized by mov R, #imm, and LD/STs use them in (R+R)
addressing mode.
This patch checks if a constant is used as offset in (R+Imm), if so, it checks
isLegalAddressingMode passing the constant value as BaseOffset.
Differential Revision: https://reviews.llvm.org/D50931
llvm-svn: 340882
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
0 files changed, 0 insertions, 0 deletions