[Flang][OpenMP] Fix crash in MAX intrinsic reduction
authorKavitha Natarajan <kavitha.natarajan@amd.com>
Wed, 29 Mar 2023 15:35:42 +0000 (21:05 +0530)
committerKavitha Natarajan <kavitha.natarajan@amd.com>
Wed, 29 Mar 2023 18:11:21 +0000 (23:41 +0530)
commitda9f890d09e78614da86ce2a14e2e92786038497
tree31c567e0c6f52099239aa9220c74543d8cb00101
parenta7e91b18b73b9971d3af2c6df1811e3da63e61c8
[Flang][OpenMP] Fix crash in MAX intrinsic reduction

This patch fixes a crash that appear in an OpenMP MAX intrinsic
reduction when the reduction is not expressed using MAX intrinsic
function. Updated flang/test/Lower/OpenMP/wsloop-reduction-max.f90
test case with additional way of expressing MAX reduction.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D146967
flang/lib/Lower/OpenMP.cpp
flang/test/Lower/OpenMP/wsloop-reduction-max.f90