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.
| Paths 
 |  Differential  D43463  
[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 
 Event TimelineThis revision is now accepted and ready to land.Feb 19 2018, 9:27 AM Closed by commit rL325521: [SelectionDAG] ComputeKnownBits - add support for SMIN+SMAX clamp patterns (authored by RKSimon).  ·  Explain WhyFeb 19 2018, 10:10 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 134940 llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
 
 llvm/trunk/test/CodeGen/X86/vector-trunc-packus.ll
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||