This is an archive of the discontinued LLVM Phabricator instance.

[flang][hlfir] Removed incorrect clean-up in the implied-do lowering.
ClosedPublic

Authored by vzakhari on Jul 18 2023, 5:45 PM.

Details

Summary

The lowering of calls/expressions unconditionally inserts DestroyOp
clean-up for hlfir.expr values, which is wrong in the case where
the value is used as a result of the elemental operation created
during the implied-do lowering. A cleaner fix could be to avoid
DestroyOp insertion at all, but I have not figure out an easy
way to do it. The DestroyOp look-up I used seems to be quite
reliable, so it should just work.

Diff Detail

Event Timeline

vzakhari created this revision.Jul 18 2023, 5:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 5:45 PM
vzakhari requested review of this revision.Jul 18 2023, 5:45 PM
This revision is now accepted and ready to land.Jul 19 2023, 9:49 AM