This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Math] Add constant folder for sqrt.
ClosedPublic

Authored by jacquesguan on Mar 17 2022, 11:43 PM.

Diff Detail

Event Timeline

jacquesguan created this revision.Mar 17 2022, 11:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2022, 11:43 PM
jacquesguan requested review of this revision.Mar 17 2022, 11:43 PM
wsmoses accepted this revision.Mar 17 2022, 11:47 PM
This revision is now accepted and ready to land.Mar 17 2022, 11:47 PM
This revision was automatically updated to reflect the committed changes.
bondhugula added inline comments.
mlir/lib/Dialect/Math/IR/MathOps.cpp
109–111

These are all guaranteed by the verifier and by the op's design. We shouldn't be checking for invalid IR.

jacquesguan added inline comments.Mar 18 2022, 2:08 AM
mlir/lib/Dialect/Math/IR/MathOps.cpp
109–111

Thanks, I create a new revision to remove these https://reviews.llvm.org/D121986.

bondhugula added inline comments.Mar 19 2022, 5:14 AM
mlir/lib/Dialect/Math/IR/MathOps.cpp
109–111

Sorry, I was mistaken here. This is fine as is.