This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix overflow detection for folding SUM/PRODUCT
ClosedPublic

Authored by klausler on Jul 3 2023, 10:27 AM.

Details

Summary

The overflow detection code in the templates that fold SUM and PRODUCT
was checking for overflow before performing the reduction, not after.
Fix and add tests.

Diff Detail

Event Timeline

klausler created this revision.Jul 3 2023, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2023, 10:27 AM
klausler requested review of this revision.Jul 3 2023, 10:27 AM
PeteSteinfeld accepted this revision.Jul 3 2023, 11:56 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jul 3 2023, 11:56 AM
This revision was landed with ongoing or failed builds.Jul 3 2023, 1:03 PM
This revision was automatically updated to reflect the committed changes.