ARM: spot SBFX-compatbile code expressed with sign_extend_inreg
authorTim Northover <tnorthover@apple.com>
Wed, 23 Jul 2014 13:59:12 +0000 (13:59 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 23 Jul 2014 13:59:12 +0000 (13:59 +0000)
commitafb1938c3955a45d90e681a0e51a8055a0f9bcf3
treeb0be507dabd27532b92c745528bae4f078626cd2
parent52aa80b06852f30356fb939b1fe59f201f5dcdd6
ARM: spot SBFX-compatbile code expressed with sign_extend_inreg

We were assuming all SBFX-like operations would have the shl/asr form, but
often when the field being extracted is an i8 or i16, we end up with a
SIGN_EXTEND_INREG acting on a shift instead. Simple enough to check for though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213754 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelDAGToDAG.cpp
test/CodeGen/ARM/sbfx.ll
test/CodeGen/Thumb2/thumb2-sxt_rot.ll