Skip to content

[flang][OpenMP] TODO in atomic capture for different yet compatible types #138123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NimishMishra opened this issue May 1, 2025 · 1 comment · Fixed by #138163
Closed

[flang][OpenMP] TODO in atomic capture for different yet compatible types #138123

NimishMishra opened this issue May 1, 2025 · 1 comment · Fixed by #138163

Comments

@NimishMishra
Copy link
Contributor

The PR #131603 introduces a TODO for atomic capture for different yet compatible types. Such scenarios require implicit type casting, and end up emitting > 3 operations in the atomic capture region:

program main
   integer :: x
   real :: y

   !$omp atomic capture
        y = x
        x = x + 1
   !$omp end atomic
end program main

The above test produces the following TODO: not yet implemented: atomic capture requiring implicit type casts

@NimishMishra NimishMishra self-assigned this May 1, 2025
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this issue May 9, 2025
…(#138163)

This patch adds support for emitting implicit casts for atomic capture
if its constituent operations have different yet compatible types.

Fixes: llvm/llvm-project#138123 and
llvm/llvm-project#94177
@llvmbot
Copy link
Member

llvmbot commented May 9, 2025

@llvm/issue-subscribers-flang-ir

Author: None (NimishMishra)

The PR https://github.com//pull/131603 introduces a TODO for atomic capture for different yet compatible types. Such scenarios require implicit type casting, and end up emitting > 3 operations in the atomic capture region:
program main
   integer :: x
   real :: y

   !$omp atomic capture
        y = x
        x = x + 1
   !$omp end atomic
end program main

The above test produces the following TODO: not yet implemented: atomic capture requiring implicit type casts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants