This is an archive of the discontinued LLVM Phabricator instance.

[fir] Add fir.no_reassoc conversion
ClosedPublic

Authored by clementval on Nov 18 2021, 4:57 AM.

Details

Summary

Currently fir.no_reassoc is just removed in the conversion.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>

Diff Detail

Event Timeline

clementval created this revision.Nov 18 2021, 4:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2021, 4:57 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Nov 18 2021, 4:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2021, 4:57 AM
flang/lib/Optimizer/CodeGen/CodeGen.cpp
1131–1132

Does lowering generate this operation now? If not then notifyMatchFailure would be better here.

flang/test/Fir/convert-to-llvm.fir
1549

The reassoc is after the load right? Or are you simulating a reassociation here?

Anyway checking an fir op here does not help I think.

schweitz added inline comments.Nov 18 2021, 2:57 PM
flang/lib/Optimizer/CodeGen/CodeGen.cpp
1131–1132

Yes. It does.

Update test

clementval marked 3 inline comments as done.Nov 19 2021, 12:30 AM
clementval added inline comments.
flang/test/Fir/convert-to-llvm.fir
1549

Removed

This revision is now accepted and ready to land.Nov 19 2021, 12:51 AM
clementval marked an inline comment as done.

Rebase

This revision was automatically updated to reflect the committed changes.