[PATCH] D111888: [AArch64][GISel] Optimize 8 and 16 bit variants of uaddo.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 15 07:03:05 PDT 2021


fhahn created this revision.
fhahn added reviewers: aemerson, paquette, t.p.northover, foad.
Herald added subscribers: hiraditya, kristof.beyls.
fhahn requested review of this revision.
Herald added a project: LLVM.

Try simplify G_UADDO with 8 or 16 bit operands to wide G_ADD and TBNZ if
result is only used in the no-overflow case. It is restricted to cases
where we know that the high-bits of the operands are 0. If there's an
overflow, then the the 9th or 17th bit must be set, which can be checked
using TBNZ.

This is my first GISel patch so this is probably not the right place :)
I also couldn't find a convenient way to get MRI other than getting it
from the helper.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111888

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/uaddo-8-16-bits.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111888.379990.patch
Type: text/x-patch
Size: 13387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211015/fe272f27/attachment.bin>


More information about the llvm-commits mailing list