Emit sub r, #c instead of transforming it to add r, #-c if c fits in 8-bit. This...
authorEvan Cheng <evan.cheng@apple.com>
Tue, 4 Aug 2009 01:41:15 +0000 (01:41 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 4 Aug 2009 01:41:15 +0000 (01:41 +0000)
commitfa2ea1a8cf2e3fe4dae19032868010e917629d16
treebdb4ea7bacd2e3aea4f548f4e2b48c2cc7032871
parenta599bff101095e528198ae85739fe8b97ffba82b
Emit sub r, #c instead of transforming it to add r, #-c if c fits in 8-bit. This is a bit of pre-mature optimization. 8-bit variant makes it likely it will be narrowed to a 16-bit instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78030 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/Thumb2/thumb2-sub.ll