[PATCH] D141119: [AArch64] Fold And/Or into CSel if possible

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 06:44:05 PST 2023


spatel added a comment.

I had not pushed the test files for D141086 <https://reviews.llvm.org/D141086> until bd87b84a02252635cd <https://reviews.llvm.org/rGbd87b84a02252635cda96e9b5d24d503144dd91d>, so this needs an update to regenerate the extra tests. Thanks for the fast update!



================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:555
 
+// topbitsallzero - Return true if only the lower bit is known non-zero
+def topbitsallzero32: PatLeaf<(i32 GPR32:$src), [{
----------------
samtebbs wrote:
> If I understand these PatLeafs right then they return true if the top bits are zero with the bottom bit being unknown. If so then I think the "known non-zero" part of the comment could be reworded.
Yes, could be "is_zext_of_one_bit" or something like that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141119/new/

https://reviews.llvm.org/D141119



More information about the llvm-commits mailing list