This is an archive of the discontinued LLVM Phabricator instance.

[ISEL] Move trivial step_vector folds to FoldConstantArithmetic.
ClosedPublic

Authored by sdesmalen on Jan 21 2022, 1:09 AM.

Details

Summary

Given that step_vector is practically a constant, doing this early
helps with DAGCombine folds that happen before type legalization.

There is currently no way to test this happens earlier, although existing
tests for step_vector folds continue protect the folds happening at all.

Diff Detail

Event Timeline

sdesmalen created this revision.Jan 21 2022, 1:09 AM
sdesmalen requested review of this revision.Jan 21 2022, 1:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 21 2022, 1:09 AM
This revision is now accepted and ready to land.Jan 21 2022, 1:32 AM
sdesmalen updated this revision to Diff 402430.Jan 24 2022, 1:49 AM

Readded code for the original combines, because in a different patch
I realised that if a node's operands get updated using ReplaceAllUses,
the updated node may again become a candidate for a fold, even though
it doesn't reach the code in getNode() (i.e. no new node is created).

This revision was landed with ongoing or failed builds.Jan 24 2022, 8:38 AM
This revision was automatically updated to reflect the committed changes.