[ARM] Prefer lsls+lsrs over lsls+ands or lsrs+ands in Thumb1.
authorEli Friedman <efriedma@codeaurora.org>
Wed, 25 Jul 2018 18:22:22 +0000 (18:22 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 25 Jul 2018 18:22:22 +0000 (18:22 +0000)
commit733f4ed1bb42d2080fd24dd5c4155e7277abafc4
treec3209bcf4c2cf0a92802add7e895af6feaf24176
parentc9588578c49e0d61924c33b1082dc5cf1cd96aac
[ARM] Prefer lsls+lsrs over lsls+ands or lsrs+ands in Thumb1.

Saves materializing the immediate for the "ands".

Corresponding patterns exist for lsrs+lsls, but that seems less common
in practice.

Now implemented as a DAGCombine.

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

llvm-svn: 337945
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb/shift-and.ll [new file with mode: 0644]