[PATCH] D144379: [AArch64] Fix abs(sub nsw) -> absd

Ricardo Jesus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 04:21:47 PST 2023


rjj created this revision.
rjj added reviewers: RKSimon, dmgreen, SjoerdMeijer.
Herald added subscribers: ecnelises, pengfei, hiraditya, kristof.beyls.
Herald added a project: All.
rjj requested review of this revision.
Herald added a project: LLVM.

This partially reverts a regression introduced in 8f25e382c5b1 <https://reviews.llvm.org/rG8f25e382c5b1bbaafd738f44de856c85ce845bbe> for AArch64 targets. In particular, we restore the logic of `(abs (sub nsw x, y)) -> abds(x, y)` for all targets except X86, which keeps the logic introduced in 8f25e382c5b1 <https://reviews.llvm.org/rG8f25e382c5b1bbaafd738f44de856c85ce845bbe>. See also https://reviews.llvm.org/D142288.


https://reviews.llvm.org/D144379

Files:
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.h
  llvm/test/CodeGen/AArch64/neon-saba.ll
  llvm/test/CodeGen/AArch64/sve-saba.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144379.498794.patch
Type: text/x-patch
Size: 13291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230220/8cc69a30/attachment.bin>


More information about the llvm-commits mailing list