This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Improve FMINNUM/FMAXNUM/FMINIMUM/FMAXIMUM constant folding
ClosedPublic

Authored by RKSimon on Dec 17 2021, 10:23 AM.

Details

Summary

Merge the node combines into a common DAGCombiner::visitFMinMax (like we do for IMINMAX).

Move the constant folding into SelectionDAG::foldConstantFPMath.

This allows us to fold the vecreduce-propagate-sd-flags.ll test as it reduce constants - so I've refactored it to take variables instead.

Diff Detail

Event Timeline

RKSimon created this revision.Dec 17 2021, 10:23 AM
RKSimon requested review of this revision.Dec 17 2021, 10:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2021, 10:23 AM
spatel accepted this revision.Dec 17 2021, 11:46 AM

LGTM

This revision is now accepted and ready to land.Dec 17 2021, 11:46 AM
This revision was landed with ongoing or failed builds.Dec 19 2021, 4:18 AM
This revision was automatically updated to reflect the committed changes.