This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fold CSHIFT
ClosedPublic

Authored by klausler on Aug 30 2021, 11:41 AM.

Details

Summary

Implement folding of the transformational intrinsic function
CSHIFT for all types.

Diff Detail

Event Timeline

klausler created this revision.Aug 30 2021, 11:41 AM
klausler requested review of this revision.Aug 30 2021, 11:41 AM
PeteSteinfeld accepted this revision.Aug 30 2021, 12:53 PM

I had one comment in fold-implementation.h. Otherwise, all builds, tests, and looks good.

Thanks for doing this!

flang/lib/Evaluate/fold-implementation.h
557–559

Can you move this code down below after you get the "shift" variable below and avoid the "if" statement at line 563?

This revision is now accepted and ready to land.Aug 30 2021, 12:53 PM
klausler added inline comments.Aug 30 2021, 1:00 PM
flang/lib/Evaluate/fold-implementation.h
557–559

If shiftExpr isn't available, I can't try to convert it.

This revision was landed with ongoing or failed builds.Aug 30 2021, 1:02 PM
Closed by commit rG0bbb2d003622: [flang] Fold CSHIFT (authored by klausler). · Explain Why
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2021, 1:02 PM