[PATCH] D154217: [AArch64] Use known zero bits when creating BIC

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 06:48:05 PDT 2023


dmgreen created this revision.
dmgreen added reviewers: jaykang10, RKSimon, samtebbs, bipmis, chill, labrinea.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D154217

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154217.536212.patch
Type: text/x-patch
Size: 5011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230630/b43496bc/attachment.bin>


More information about the llvm-commits mailing list