This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Enable reassociate for SMAX/SMIN/UMAX/UMIN nodes
Changes PlannedPublic

Authored by RKSimon on Jan 21 2023, 7:41 AM.

Details

Summary

This helps us fold a number of cases where we're clamping chains of values with constant min/max values.

There is an instruction increase in the vtrunc_v128i32_v128i64 test in fixed-vector-trunc-vp.ll as what had been chains of umin(umin(umin(x,c1),c2),c3), created by multiple levels of SplitEVL legalization calls, are flattened, resulting in better instruction parallelism but also an increase in in-flight values. This is a common issue with node reassociation, so I'm not sure if this is of any particular concern?

Fixes #58110

Diff Detail

Event Timeline

RKSimon created this revision.Jan 21 2023, 7:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 21 2023, 7:41 AM
RKSimon requested review of this revision.Jan 21 2023, 7:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 21 2023, 7:41 AM
RKSimon edited the summary of this revision. (Show Details)Jan 21 2023, 7:43 AM

Create a test with the clamp pattern improvement that we expect from this change?

Matt added a subscriber: Matt.Feb 1 2023, 8:30 PM
RKSimon planned changes to this revision.Feb 14 2023, 12:06 AM