HomePhabricator

[CGP] add special-cases to form unsigned add with overflow (PR40486)

Authored by spatel on Feb 24 2019, 7:31 AM.

Description

[CGP] add special-cases to form unsigned add with overflow (PR40486)

There's likely a missed IR canonicalization for at least 1 of these
patterns. Otherwise, we wouldn't have needed the pattern-matching
enhancement in D57516.

Note that -- unlike usubo added with D57789 -- the TLI hook for
this transform defaults to 'on'. So if there's any perf fallout
from this, targets should look at how they're lowering the uaddo
node in SDAG and/or override that hook.

The x86 diffs suggest that there's some missing pattern-matching
for forming inc/dec.

This should fix the remaining known problems in:
https://bugs.llvm.org/show_bug.cgi?id=40486
https://bugs.llvm.org/show_bug.cgi?id=31754

llvm-svn: 354746

Details

Committed
spatelFeb 24 2019, 7:31 AM
Parents
rG9b49f36a036a: Fix "enumeral and non-enumeral type in conditional expression" gcc7 warning.
Branches
Unknown
Tags
Unknown