This is an archive of the discontinued LLVM Phabricator instance.

[PatternMatch] Add support for matching ConstantExpr.
AbandonedPublic

Authored by huihuiz on Dec 17 2019, 4:29 PM.

Details

Summary

Motivated in D71389. For scalable vector type, constant folding
will be applied on ConstantExprs. It would be usefull to support
pattern matcher for ConstantExprs.

Diff Detail

Event Timeline

It looks like we've always matched ConstantExprs for binary operators, but not for other operations. It probably makes sense to be more consistent.

If we're going to do this, probably makes sense to change OneOps_match/TwoOps_match at the same time.

Can you add testcases for a few of the existing transforms that are changing? There are too many transforms for it to make sense to cover everything, but it makes sense to illustrate what's actually changing.

lebedev.ri requested changes to this revision.Jan 4 2020, 12:23 AM

It looks like we've always matched ConstantExprs for binary operators, but not for other operations. It probably makes sense to be more consistent.

If we're going to do this, probably makes sense to change OneOps_match/TwoOps_match at the same time.

Can you add testcases for a few of the existing transforms that are changing? There are too many transforms for it to make sense to cover everything, but it makes sense to illustrate what's actually changing.

This revision now requires changes to proceed.Jan 4 2020, 12:23 AM
lebedev.ri resigned from this revision.Jan 12 2023, 4:44 PM

This review seems to be stuck/dead, consider abandoning if no longer relevant.

This revision now requires review to proceed.Jan 12 2023, 4:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 4:44 PM
huihuiz abandoned this revision.Jan 13 2023, 9:23 AM