This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP] Use typed assignment in Atomic Write lowering
ClosedPublic

Authored by kiranchandramohan on Jun 29 2023, 3:35 PM.

Details

Summary

Use typed assignment in Atomic Write lowering to better handle
type conversions of allowed types.

Note: We should make similar changes for other constructs in
later patches.

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 29 2023, 3:35 PM
kiranchandramohan requested review of this revision.Jun 29 2023, 3:35 PM

Can you help me understand this a little bit? Typed assignment in this context is basically helping for an intrinsic conversion from an integer "0" to a floating point variable "r2". Is that it? And we should put up patches for the same in atomic.update and atomic.capture lowerings right?

Can you help me understand this a little bit? Typed assignment in this context is basically helping for an intrinsic conversion from an integer "0" to a floating point variable "r2". Is that it? And we should put up patches for the same in atomic.update and atomic.capture lowerings right?

Yes, that is correct. It helps in the conversion (or creating the constant with the correct type) here. Yes, we should doe the same for update and capture lowerings.

NimishMishra accepted this revision.Jul 14 2023, 12:53 AM

Thank you @kiranchandramohan for the explanation. The patch LG.

This revision is now accepted and ready to land.Jul 14 2023, 12:53 AM