This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Standard] Extend n-D vector lowering to LLVM to [s|z]exti ops.
ClosedPublic

Authored by nicolasvasilache on Jan 31 2021, 6:06 AM.

Details

Summary

[s|z]exti ops do not have the same operand and result type.
As a consequence, the lowering of the n-D vector form needs to be relaxed a bit.
This revision additionally performs a few NFC renamings of variables to make them more intuitive.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jan 31 2021, 6:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2021, 6:06 AM
ftynse accepted this revision.Feb 1 2021, 12:33 AM
ftynse added inline comments.
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
658–659

Can we just drop this? SameResultType does not seem to be used in the code, which seems to just support such ops now,

mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
1596

If operandNDVector type is null, it would fail two lines above. Either change to dyn_cast there, or remove the check here.

mlir/test/Conversion/StandardToLLVM/convert-nd-vector-to-llvmir.mlir
25–26

Do we need this?

This revision is now accepted and ready to land.Feb 1 2021, 12:33 AM
nicolasvasilache marked 3 inline comments as done.Feb 1 2021, 11:26 PM

Address review.

This revision was landed with ongoing or failed builds.Feb 1 2021, 11:46 PM
This revision was automatically updated to reflect the committed changes.