[ARM] Constant long shift combines
authorDavid Green <david.green@arm.com>
Thu, 12 Mar 2020 19:40:27 +0000 (19:40 +0000)
committerDavid Green <david.green@arm.com>
Fri, 13 Mar 2020 08:54:59 +0000 (08:54 +0000)
commitf67d93dc23f97700253538dfebcfbcc22c6d4a2d
treef1ca5e0fb1b880f0d96c693cea1f1c1b98e98927
parentecd3e678bbb11cf899603037ec2c5949b8d7fa6c
[ARM] Constant long shift combines

This changes the way that asrl and lsrl intrinsics are lowered, going
via a the ISEL ASRL and LSLL nodes instead of straight to machine nodes.
On top of that, it adds some constant folds for long shifts, in case it
turns out that the shift amount was either constant or 0.

Differential Revision: https://reviews.llvm.org/D75553
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-intrinsics/longshift-const.ll
llvm/test/CodeGen/Thumb2/mve-intrinsics/longshift-demand.ll