[PATCH] D132237: [AArch64] expand is-power-of-2 pattern that uses popcount

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 06:18:40 PDT 2022


spatel updated this revision to Diff 454479.
spatel added a comment.

Patch updated:
Adjust the legality checks instead of adding custom combining for AArch64.
This preserves x86 codegen for these patterns by keeping the hacky vector type check in place (without that we'd create a likely slower scalar "popcnt+cmp+set" instead of an "lea+test+set".


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

https://reviews.llvm.org/D132237

Files:
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/test/CodeGen/AArch64/arm64-popcnt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132237.454479.patch
Type: text/x-patch
Size: 5183 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220822/50c35d1f/attachment.bin>


More information about the llvm-commits mailing list