[PATCH] D146518: [AArch64] Extend icmp bitcast to vecreduce fold to comparison with -1

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 05:25:12 PDT 2023


nikic created this revision.
nikic added reviewers: paulwalker-arm, c-rhodes.
Herald added subscribers: StephenFan, hiraditya, kristof.beyls.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

D130163 <https://reviews.llvm.org/D130163> added support for folding `setcc (iN (bitcast (vNi1 X))), 0, (eq|ne)` to `setcc (iN (zext (i1 (vecreduce_or (vNi1 X))))), 0, (eq|ne)`. There is a conjugate fold for comparison with `-1` which uses `vecreduce_and` and `sext` instead. Proof: https://alive2.llvm.org/ce/z/Zz--xy


https://reviews.llvm.org/D146518

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/dag-combine-setcc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146518.506923.patch
Type: text/x-patch
Size: 31778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230321/7485473c/attachment.bin>


More information about the llvm-commits mailing list