[ARM] Ensure we do not attempt to create lsll #0
authorDavid Green <david.green@arm.com>
Wed, 25 Sep 2019 10:16:48 +0000 (10:16 +0000)
committerDavid Green <david.green@arm.com>
Wed, 25 Sep 2019 10:16:48 +0000 (10:16 +0000)
commit10d10102a44318972a985385f6156e72afbfb513
treeb8029b5be9695efdd6dcdad49b5549abf4368f6a
parent5b9a408113ee2e3c25d51b13cbe6e6281401e25a
[ARM] Ensure we do not attempt to create lsll #0

During legalisation we can end up with some pretty strange nodes, like shifts
of 0. We need to make sure we don't try to make long shifts of these, ending up
with invalid assembly instructions. A long shift with a zero immediate actually
encodes a shift by 32.

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

llvm-svn: 372839
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/test/CodeGen/Thumb2/lsll0.ll [new file with mode: 0644]