This is an archive of the discontinued LLVM Phabricator instance.

[flang] Allow "non-expandable" scalars in single-element contexts
ClosedPublic

Authored by klausler on Sep 22 2022, 1:52 PM.

Details

Summary

When a scalar expression is not expandable -- i.e., it would have to be
evaluated once and saved in a temporary to avoid changing the semantics
of the program if it were to be evaluated more than once -- it affects
some aspects of folding and expression semantics. In cases where
scalar expansion would not cause multiple evaluations due to the shape
of the result having but a single element, however, these "non-expandable"
scalar expressions can be safely allowed.

Diff Detail

Build Status
Buildable 188256

Event Timeline

klausler created this revision.Sep 22 2022, 1:52 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Sep 22 2022, 1:52 PM
jeanPerier accepted this revision.Sep 23 2022, 12:36 AM
This revision is now accepted and ready to land.Sep 23 2022, 12:36 AM