[PATCH] D138814: [InstCombine] Combine a/lshr of add -> uadd.with.overflow

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 06:03:52 PST 2022


arsenm added a comment.

In D138814#3981324 <https://reviews.llvm.org/D138814#3981324>, @Pierre-vh wrote:

> By `a + b < a` do you mean that the combine would:
>
> - Still reduce the add to the smaller type
> - Replace the overflow bit (lshr) with `icmp lt (add a, b), a`?
>
> Does the backend already transform that to uaddo or will that need a separate patch in the target's CGP?

Looks like no: https://godbolt.org/z/nTrzqxeo9


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138814/new/

https://reviews.llvm.org/D138814



More information about the llvm-commits mailing list