This is an archive of the discontinued LLVM Phabricator instance.

[mlir][arith] Add `sitofp` support to WIE
ClosedPublic

Authored by kuhar on Mar 21 2023, 7:02 PM.

Diff Detail

Event Timeline

kuhar created this revision.Mar 21 2023, 7:02 PM
kuhar requested review of this revision.Mar 21 2023, 7:02 PM
kuhar updated this revision to Diff 507200.Mar 21 2023, 7:03 PM

Clean up

kuhar planned changes to this revision.Mar 21 2023, 8:08 PM
kuhar added inline comments.
mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
945

This doesn't work for negative numbers, fixing...

kuhar updated this revision to Diff 507222.Mar 21 2023, 9:19 PM

Handle negative numbers WIP. Add integration tests.

Still WIP.

kuhar planned changes to this revision.Mar 21 2023, 10:30 PM
kuhar retitled this revision from [mlir][arith] Add `sitofp` support to WIE to [WIP][mlir][arith] Add `sitofp` support to WIE.
kuhar updated this revision to Diff 507350.Mar 22 2023, 7:11 AM

Rebase. Fix negative number handling.

kuhar updated this revision to Diff 507351.Mar 22 2023, 7:11 AM

Clean up

kuhar retitled this revision from [WIP][mlir][arith] Add `sitofp` support to WIE to [mlir][arith] Add `sitofp` support to WIE.Mar 22 2023, 7:12 AM
kuhar edited the summary of this revision. (Show Details)
antiagainst accepted this revision.Mar 22 2023, 3:06 PM

Nice, thanks!

mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
948

Worth calling out that this depends on the other pattern to kick in to really do the emulation. Otherwise it can be a bit confusing on its own.

This revision is now accepted and ready to land.Mar 22 2023, 3:06 PM
This revision was landed with ongoing or failed builds.Mar 22 2023, 4:13 PM
This revision was automatically updated to reflect the committed changes.
kuhar marked an inline comment as done.