This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Additional folding for SelectOp
ClosedPublic

Authored by Hardcode84 on Mar 13 2021, 3:07 AM.

Details

Summary
  • Fold SelectOp when both true and false args are same SSA value
  • Fold some cmp + select patterns

Diff Detail

Event Timeline

Hardcode84 created this revision.Mar 13 2021, 3:07 AM
Hardcode84 requested review of this revision.Mar 13 2021, 3:07 AM
mehdi_amini accepted this revision.Mar 13 2021, 11:58 AM
mehdi_amini added inline comments.
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
2470

Can you document the pattern? It wasn't immediately obvious to me.

This revision is now accepted and ready to land.Mar 13 2021, 11:58 AM
Hardcode84 updated this revision to Diff 330470.EditedMar 13 2021, 12:45 PM

Added example

@mehdi_amini I don't have commit access, if you ok with this patch can you please merge it

You have commit access now right?

Will merge tomorrow

This revision was automatically updated to reflect the committed changes.