This is an archive of the discontinued LLVM Phabricator instance.

ValueTracking: Recognize fpclass clamping select patterns
ClosedPublic

Authored by arsenm on Jun 15 2023, 5:52 PM.

Details

Summary

Improve computeKnownFPClass select handling to cover the case where
the condition performs a class test. This allows us to recognize
no-nans in cases like:

  
%not.nan = fcmp ord float %x, 0.0
%select = select i1 %not.nan, float %x, float 0.0

Math library code has similar edge case filtering on the inputs
and final results.

Diff Detail