Page MenuHomePhabricator

[PatternMatch] Add m_BinOp/m_c_BinOp with specific opcode
ClosedPublic

Authored by rampitec on Nov 9 2021, 12:28 PM.

Diff Detail

Event Timeline

rampitec created this revision.Nov 9 2021, 12:28 PM
rampitec requested review of this revision.Nov 9 2021, 12:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2021, 12:28 PM
rampitec updated this revision to Diff 386267.Nov 10 2021, 11:48 AM

Inherit from BinaryOp_match instead of duplication of match.

rampitec updated this revision to Diff 386385.Nov 10 2021, 5:52 PM

Make tidy happy.

spatel accepted this revision.Nov 15 2021, 11:00 AM

LGTM - there may be more potential uses in functions like InstCombinerImpl::SimplifyUsingDistributiveLaws() or other reassociation folds.

This revision is now accepted and ready to land.Nov 15 2021, 11:00 AM

LGTM - there may be more potential uses in functions like InstCombinerImpl::SimplifyUsingDistributiveLaws() or other reassociation folds.

D114038 adds 2 more places. That's all I found.

I can also add the same matcher to the m_UnOp for completeness, but I didn't find a use for it (and that also means there is no code which would test template instantiation).