Skip to content

Missing handling of nontemporal clause inside atomic construct #137121

Open
@kaviya2510

Description

@kaviya2510

This PR : #118751 is handling the translation of nontemporal clause by adding a nontemporal attribute to load and store operation, but the case of atomic construct is not handled.
Here is the minimal example which needs to be handled.

This likely doesn’t need to be addressed in this PR, but keep in mind that some operations—such as atomic operations—may eventually lower to load and store instructions and could be missed.

  integer :: i
  integer :: counter
  integer, dimension(100) :: arr

  counter = 0

  !$omp simd nontemporal(arr)
  do i = 1, 100
    !$omp atomic capture
      arr(i) = counter
      counter = counter + 1
    !$omp end atomic
  end do
  !$omp end simd
end

Originally posted by @kiranchandramohan in #118751 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions