This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] ComputeKnownBits - add support for SMIN+SMAX clamp patterns
ClosedPublic

Authored by RKSimon on Feb 19 2018, 6:51 AM.

Details

Summary

If we have a clamp pattern, SMIN(SMAX(X, LO),HI) or SMAX(SMIN(X, HI),LO) then we can deduce that the number of signbits (zeros/ones) will be at least the minimum of the LO and HI constants.

ComputeKnownBits equivalent of D43338.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Feb 19 2018, 6:51 AM
This revision is now accepted and ready to land.Feb 19 2018, 9:27 AM
This revision was automatically updated to reflect the committed changes.