This is an archive of the discontinued LLVM Phabricator instance.

[mlir][arith] Add andi, ori, and xori support to WIE
ClosedPublic

Authored by kuhar on Oct 4 2022, 2:57 PM.

Diff Detail

Event Timeline

kuhar created this revision.Oct 4 2022, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 2:57 PM
kuhar requested review of this revision.Oct 4 2022, 2:57 PM
kuhar updated this revision to Diff 465181.Oct 4 2022, 2:58 PM

Fix naming

kuhar updated this revision to Diff 465185.Oct 4 2022, 3:01 PM

Fix formatting in tests

kuhar updated this revision to Diff 465199.Oct 4 2022, 3:15 PM

Drop redundant extractions and insertions

kuhar updated this revision to Diff 465237.Oct 4 2022, 5:28 PM

Switch back to the elementwise implementation. I checked some real inputs and this is cleaner because sequences of i64 ops will be kept as ops over 2 scalars.

This revision is now accepted and ready to land.Oct 5 2022, 11:05 AM
This revision was automatically updated to reflect the committed changes.
Mogball added inline comments.Oct 10 2022, 9:12 AM
mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
308
kuhar added inline comments.Oct 11 2022, 6:54 AM
mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
308

This won't work because notifyMatchFailure returns LogicalResult. I think we would have to pass in a callback that appends to the Diagnostic

jpienaar added inline comments.
mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
308

I think here formatv would probably be easiest.