HomePhabricator

[CGP] form usub with overflow from sub+icmp

Authored by spatel on Feb 18 2019, 3:33 PM.

Description

[CGP] form usub with overflow from sub+icmp

The motivating x86 cases for forming the intrinsic are shown in PR31754 and PR40487:
https://bugs.llvm.org/show_bug.cgi?id=31754
https://bugs.llvm.org/show_bug.cgi?id=40487
..and those are shown in the IR test file and x86 codegen file.

Matching the usubo pattern is harder than uaddo because we have 2 independent values rather than a def-use.

This adds a TLI hook that should preserve the existing behavior for uaddo formation, but disables usubo
formation by default. Only x86 overrides that setting for now although other targets will likely benefit
by forming usbuo too.

Differential Revision: https://reviews.llvm.org/D57789

llvm-svn: 354298

Details

Committed
spatelFeb 18 2019, 3:33 PM
Differential Revision
D57789: [CGP] form usub with overflow from sub+icmp
Parents
rG05709acba49a: [lldbtest] Fix some code to be compatible between py2 and py3.
Branches
Unknown
Tags
Unknown