]> granicus.if.org Git - llvm/commit
[ARM] Transform compare of masked value to shift on Thumb1.
authorEli Friedman <efriedma@quicinc.com>
Wed, 31 Jul 2019 23:17:34 +0000 (23:17 +0000)
committerEli Friedman <efriedma@quicinc.com>
Wed, 31 Jul 2019 23:17:34 +0000 (23:17 +0000)
commit23b51c9554a442e4e6f50a429b31e0134b7c8840
treeaa9d5ae49428effa29980bf6972294fd95ead595
parent763309cf2a8bce100e7b293444f2e18e0bd7440e
[ARM] Transform compare of masked value to shift on Thumb1.

Thumb1 has very limited immediate modes, so turning an "and" into a
shift can save multiple instructions.

It's possible to simplify the generated code for test2 and test3 in
cmp-and-fold.ll a little more, but I'll implement that as a followup.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367491 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/Thumb/cmp-and-fold.ll [new file with mode: 0644]