-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[Flang][OpenMP] Compilation error of using a reduction clause (min) with a variable (kind=16) #87955
Comments
@llvm/issue-subscribers-openmp Author: None (ohno-fj)
```
Version of flang-new : 19.0.0(cbcdf12)/AArch64
```
A compilation error occurs when using a `reduction` clause (`min`) with a variable (`kind=16`).
The same error occurs when `max` intrinsic function is used.
Compilation terminates normally in the following cases:
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result. snfmm235_3.f90: program main
real(kind=16) r3/1/
!$omp parallel reduction(min:r3)
r3=min(r3,1.0_16)
write(6,*) "r3 = ", r3
if (r3 < 1.0_16) then
r3 = 1.0_16
end if
!$omp end parallel
write(6,*) "pass"
end program main
|
@llvm/issue-subscribers-flang-ir Author: None (ohno-fj)
```
Version of flang-new : 19.0.0(cbcdf12)/AArch64
```
A compilation error occurs when using a `reduction` clause (`min`) with a variable (`kind=16`).
The same error occurs when `max` intrinsic function is used.
Compilation terminates normally in the following cases:
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result. snfmm235_3.f90: program main
real(kind=16) r3/1/
!$omp parallel reduction(min:r3)
r3=min(r3,1.0_16)
write(6,*) "r3 = ", r3
if (r3 < 1.0_16) then
r3 = 1.0_16
end if
!$omp end parallel
write(6,*) "pass"
end program main
|
…perators (#89258) This patch changes the lowering of max and min to be lowered to arith::MaxNumFop and arith::MinNumFOp instead of using arith::MaximumFOp and arith::MinimumFOp. The arith::MaximumFOp and arith::MinimumFOp map to the corresponding intrinsics llvm.maximum.* and llvm.minimum.* intrinsics which conform to the semantics specified in the draft of IEEE 754-2019, which is not supported by all hardware. Instead using arith::MaximumFOp and arith::MinimumFOp will allow code generation for more targets and match the code generated by clang OpenMP. fixes #87955
…perators (llvm#89258) This patch changes the lowering of max and min to be lowered to arith::MaxNumFop and arith::MinNumFOp instead of using arith::MaximumFOp and arith::MinimumFOp. The arith::MaximumFOp and arith::MinimumFOp map to the corresponding intrinsics llvm.maximum.* and llvm.minimum.* intrinsics which conform to the semantics specified in the draft of IEEE 754-2019, which is not supported by all hardware. Instead using arith::MaximumFOp and arith::MinimumFOp will allow code generation for more targets and match the code generated by clang OpenMP. fixes llvm#87955
A compilation error occurs when using a
reduction
clause (min
) with a variable (kind=16
).The same error occurs when
max
intrinsic function is used.Compilation terminates normally in the following cases:
kind=16
tokind=8
reduction
clause (min
)-fopenmp
optionThe following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
snfmm235_3.f90:
The text was updated successfully, but these errors were encountered: