HomePhabricator

[GlobalISel][AMDGPU] Legalize saturating add/subtract

Authored by foad on Jul 12 2020, 11:18 AM.

Description

[GlobalISel][AMDGPU] Legalize saturating add/subtract

Add support in LegalizerHelper for lowering G_SADDSAT etc. either
using add/subtract-with-overflow or using max/min instructions.

Enable this lowering for AMDGPU so it can be tested. The legalization
rules are still approximate and skips out on using the clamp bit to
treat these as legal, which has never been used before. This also
doesn't yet try to deal with expanding SALU cases.

Details

Committed
arsenmJul 23 2020, 6:06 AM
Parents
rG82e35197e683: [LSR] Re-generate check lines for test.
Branches
Unknown
Tags
Unknown