This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by jacquesguan on Aug 2 2022, 11:59 PM.

Details

Summary

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

Diff Detail

Event Timeline

jacquesguan created this revision.Aug 2 2022, 11:59 PM
jacquesguan requested review of this revision.Aug 2 2022, 11:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2022, 11:59 PM
Mogball requested changes to this revision.Aug 3 2022, 7:19 AM
Mogball added inline comments.
mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir
455

This doesn't seem correct. I don't think the math atan2 is returning the correct results for undefined

This revision now requires changes to proceed.Aug 3 2022, 7:19 AM

Fix undefined case.

jacquesguan added inline comments.Aug 4 2022, 1:06 AM
mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir
455

Done.

Mogball accepted this revision.Aug 4 2022, 7:23 AM
This revision is now accepted and ready to land.Aug 4 2022, 7:23 AM
This revision was automatically updated to reflect the committed changes.