This is an archive of the discontinued LLVM Phabricator instance.

[fir] Add tests for mlir::ComplexType conversion
ClosedPublic

Authored by rovka on Nov 15 2021, 3:57 AM.

Details

Summary

It turns out that mlir::ComplexType is translated the same way with or
without a conversion in TypeConverter.h. Add tests to make sure this
doesn't change in the future.

This patch is part of the upstreaming effort from fir-dev.

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>

Diff Detail

Event Timeline

rovka created this revision.Nov 15 2021, 3:57 AM
rovka requested review of this revision.Nov 15 2021, 3:57 AM

This might need a comment on why it is different from the regular mlir complex type conversion.

This might need a comment on why it is different from the regular mlir complex type conversion.

I am guessing this is for the target-specific conversion which is not available in the regular mlir complex type conversion.

rovka added a comment.Nov 15 2021, 4:12 AM

This might need a comment on why it is different from the regular mlir complex type conversion.

I am guessing this is for the target-specific conversion which is not available in the regular mlir complex type conversion.

Good point. There's actually no target-specific conversion at this point, the target-specific parts are in the target-rewrite pass. I'm not sure why this conversion is needed here. Maybe @schweitz can explain.

rovka updated this revision to Diff 387578.Nov 16 2021, 4:51 AM
rovka retitled this revision from [fir] Add mlir::ComplexType conversion to [fir] Add tests for mlir::ComplexType conversion.
rovka edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Nov 18 2021, 4:30 AM
This revision was automatically updated to reflect the committed changes.