This is an archive of the discontinued LLVM Phabricator instance.

[mlir][index] Add `index.mul` identity folders
ClosedPublic

Authored by Mogball on Jun 25 2023, 6:19 PM.

Details

Summary

Fold mul(x, 1) and mul(x, 0).

Depends on D153736

Diff Detail

Event Timeline

Mogball created this revision.Jun 25 2023, 6:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2023, 6:19 PM
Mogball requested review of this revision.Jun 25 2023, 6:19 PM
Mogball updated this revision to Diff 534399.Jun 25 2023, 6:24 PM

update stack

Mogball edited the summary of this revision. (Show Details)Jun 25 2023, 6:24 PM
rriddle accepted this revision.Jun 26 2023, 11:47 AM
rriddle added inline comments.
mlir/lib/Dialect/Index/IR/IndexOps.cpp
145–161

I would assume this would just work (given it's just a PointerUnion internally, which defines an operator bool)

This revision is now accepted and ready to land.Jun 26 2023, 11:47 AM
This revision was automatically updated to reflect the committed changes.
Mogball added inline comments.Jun 26 2023, 11:54 AM
mlir/lib/Dialect/Index/IR/IndexOps.cpp
145–161

Yep. I fixed it in the next patch