[PATCH] D137433: [AArch64][CodeGen] Remove redundant vector negations before concat

Benjamin Maxwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 4 08:29:42 PDT 2022


benmxwl-arm created this revision.
benmxwl-arm added reviewers: c-rhodes, peterwaller-arm, dtemirbulatov, MattDevereau.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
benmxwl-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This adds a new canonicalization rule to replace concats of truncated
negations with a negation of the concatenated truncates, e.g.

   (concat_vectors (v4i16 (truncate (not (v4i32)))),
                   (v4i16 (truncate (not (v4i32)))))
  ->
   (not (concat_vectors (v4i16 (truncate (v4i32))),
                        (v4i16 (truncate (v4i32)))))

Doing this allows avoiding redundant negations (mvn instructions) being
emitted in certain cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137433

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/illegal-floating-point-vector-compares.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137433.473251.patch
Type: text/x-patch
Size: 4653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221104/0a5529f1/attachment.bin>


More information about the llvm-commits mailing list