Add support for emitting both signed- and zero-extend loads. Fix
authorChad Rosier <mcrosier@apple.com>
Sun, 13 Nov 2011 02:23:59 +0000 (02:23 +0000)
committerChad Rosier <mcrosier@apple.com>
Sun, 13 Nov 2011 02:23:59 +0000 (02:23 +0000)
commitb29b950bf227b65e193abf924f77ef3fa4eceaae
treea708dfb42fcc7a91c7647794b2b4b14e59b83593
parent569561c7eedbd96b8f78c30505d2bdc265a1efc5
Add support for emitting both signed- and zero-extend loads.  Fix
SimplifyAddress to handle either a 12-bit unsigned offset or the ARM +/-imm8
offsets (addressing mode 3).  This enables a load followed by an integer
extend to be folded into a single load.

For example:
ldrb r1, [r0]       ldrb r1, [r0]
uxtb r2, r1     =>
mov  r3, r2         mov  r3, r1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144488 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMFastISel.cpp
test/CodeGen/ARM/fast-isel-fold.ll [new file with mode: 0644]