[PATCH] D153575: [TargetLowering] Better code generation for ISD::SADDSAT/SSUBSAT when operand sign is known

Dhruv Chawla via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 10:13:37 PDT 2023


0xdc03 created this revision.
0xdc03 added a reviewer: nikic.
Herald added subscribers: StephenFan, pengfei, hiraditya.
Herald added a project: All.
0xdc03 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When the sign of either of the operands is known, it is possible to
determine what the saturating value will be without having to compute it
using the sign bits.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153575

Files:
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/test/CodeGen/AArch64/aarch64-saturating-arithmetic.ll
  llvm/test/CodeGen/X86/combine-add-ssat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153575.533681.patch
Type: text/x-patch
Size: 9778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230622/9a8189ff/attachment.bin>


More information about the llvm-commits mailing list