[Flang,MLIR,OpenMP] Fix a few tests that were not converting to LLVM
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Tue, 7 Jun 2022 09:44:20 +0000 (09:44 +0000)
committerKiran Chandramohan <kiran.chandramohan@arm.com>
Tue, 7 Jun 2022 09:55:53 +0000 (09:55 +0000)
commitdd32bf9a7792dd3fd1ce3abe112ef6360ac04270
tree2e761de087ebeb5e984aa7222624edd3bb497467
parent3326eddcd1236c6d4763cd2d8ea6adf5dbf51adf
[Flang,MLIR,OpenMP] Fix a few tests that were not converting to LLVM

A few OpenMP tests were retaining the FIR operands even after running
the LLVM conversion pass. To fix these tests the legality checkes for
OpenMP conversion are made stricter to include operands and results.
The Flush, Single and Sections operations are added to conversions or
legality checks. The RegionLessOpConversion is appropriately renamed
to clarify that it works only for operations with Variable operands.
The operands of the flush operation are changed to match those of
Variable Operands.

Fix for an OpenMP issue mentioned in
https://github.com/llvm/llvm-project/issues/55210.

Reviewed By: shraiysh, peixin, awarzynski

Differential Revision: https://reviews.llvm.org/D127092
flang/test/Lower/OpenMP/flush.f90
flang/test/Lower/OpenMP/parallel-sections.f90
flang/test/Lower/OpenMP/parallel.f90
flang/test/Lower/OpenMP/single.f90
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
mlir/test/Dialect/OpenMP/ops.mlir
mlir/test/Target/LLVMIR/openmp-llvm.mlir