This is an archive of the discontinued LLVM Phabricator instance.

[flang] Set LBOUND() folding for (x) expression as ones
ClosedPublic

Authored by FruitClover on Apr 14 2022, 11:54 PM.

Details

Summary

Set LBOUND() constant folding for parentheses expr. as ones

Array bounds should not propagate throught omitted bounds specifications or
temporary variables - fix constant folding in case of Parentheses<T> expression
by explicitly returning array of ones (or scalar in case of DIM=).

Add set of tests for (x) bounds checks (w/ and w/o 'parameter' arrays)

Diff Detail

Event Timeline

FruitClover created this revision.Apr 14 2022, 11:54 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 14 2022, 11:54 PM
FruitClover changed the visibility from "Public (No Login Required)" to "FruitClover (Mike K)".Apr 15 2022, 4:08 AM

Sync with base

FruitClover edited the summary of this revision. (Show Details)Apr 18 2022, 6:47 AM

Upd commit message

FruitClover published this revision for review.Apr 18 2022, 7:17 AM
FruitClover changed the visibility from "FruitClover (Mike K)" to "Public (No Login Required)".
jeanPerier accepted this revision.Apr 19 2022, 5:04 AM
jeanPerier added reviewers: klausler, jeanPerier.

LGTM

This revision is now accepted and ready to land.Apr 19 2022, 5:06 AM