This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by jacquesguan on Jul 14 2022, 1:18 AM.

Details

Summary

This patch adds constant folder for Log10Op which only support single and double precision floating-point.

Diff Detail

Event Timeline

jacquesguan created this revision.Jul 14 2022, 1:18 AM
jacquesguan requested review of this revision.Jul 14 2022, 1:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 1:18 AM
Mogball accepted this revision.Jul 14 2022, 9:00 AM
Mogball added inline comments.
mlir/test/Dialect/Math/canonicalize.mlir
188

I'm not certain what the best practice is with regards to floating point values in lit tests. I know people have encountered precision issues with lit tests before. What have you seen elsewhere in the codebase?

This revision is now accepted and ready to land.Jul 14 2022, 9:00 AM
jacquesguan added inline comments.Jul 17 2022, 6:57 PM
mlir/test/Dialect/Math/canonicalize.mlir
188

I use the same way with other mlir lit test cases, just like mlir/test/Dialect/Math/polynomial-approximation.mlir.

This revision was automatically updated to reflect the committed changes.