This is an archive of the discontinued LLVM Phabricator instance.

[flang] HLFIR to FIR lowering for complex parts
ClosedPublic

Authored by elmcdonough on Mar 20 2023, 6:05 PM.

Details

Summary

This revision implements HLFIR to FIR lowering for complex parts.

Diff Detail

Event Timeline

elmcdonough created this revision.Mar 20 2023, 6:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 6:05 PM
elmcdonough requested review of this revision.Mar 20 2023, 6:05 PM
luporl added a subscriber: luporl.Mar 21 2023, 4:41 AM

Shouldn't the title of this patch be "HLFIR to FIR ..."?

elmcdonough retitled this revision from [flang] FIR to HLFIR lowering for complex parts to [flang] HLFIR to FIR lowering for complex parts.Mar 21 2023, 7:35 AM

Shouldn't the title of this patch be "HLFIR to FIR ..."?

Yeah, sorry for that oversight.

Thanks, this looks great to me.

flang/lib/Optimizer/Dialect/FIROps.cpp
2331

Interesting, I was curious why this came out in this patch and not with the current lowering, but it turns out you are also fixing a bug with the current lowering, thanks!

However, did you check if fir.rebox codegen works properly with this case?
I think it would be great to add a fir.rebox codegen test in https://github.com/llvm/llvm-project/blob/main/flang/test/Fir/rebox.fir to ensure the op verifier can be relaxed without further changes.

Added reboxing tests

Thanks a lot, looks great!

jeanPerier accepted this revision.Apr 4 2023, 2:20 AM
This revision is now accepted and ready to land.Apr 4 2023, 2:20 AM
This revision was automatically updated to reflect the committed changes.