[AArch64] Use known zero bits when creating BIC
authorDavid Green <david.green@arm.com>
Wed, 5 Jul 2023 14:42:33 +0000 (15:42 +0100)
committerDavid Green <david.green@arm.com>
Wed, 5 Jul 2023 14:42:33 +0000 (15:42 +0100)
commitae8f929b93e685dcb0bf6d6d1999bf70758917f5
tree1224e3f059c127511c0bc95b7629ce1c82985d31
parent86bd9a420fbbd6bad9c59b57d53c25a0222da753
[AArch64] Use known zero bits when creating BIC

If we know bits are already 0, we will not need to clear them again with a BIC.
So we can use KnownBits to shrink the size of the constant in the creation BIC
from And, potentially undoing the known-bits folds that happen during
compilation.

BIC only has a single register operand for input and output, so has less
scheduling freedom than a AND, but usually saves the materialization of a
constant.

Differential Revision: https://reviews.llvm.org/D154217
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/neon-bitwise-instructions.ll
llvm/test/CodeGen/AArch64/shiftregister-from-and.ll
llvm/test/CodeGen/AArch64/vec_uaddo.ll