[flang-commits] [flang] [Flang][OpenMP] Disable lowering of omp.simd reductions in composites (PR #112686)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Mon Oct 21 02:49:20 PDT 2024


skatrak wrote:

Sorry Kiran for the delay responding to your comments. Basically what I did here was to revert to the previous behavior for composite constructs, which was to not add it to the operation ([here](https://github.com/llvm/llvm-project/pull/112194/files#diff-a897370ad8f5ad37e8c1adb3c145c2304aaa38da3227bc1d02ac701ee8dc0754) I added it to the builder of `omp.simd`), while keeping it for standalone `simd`.

I think we wouldn't want to trigger a TODO for this because the spec allows us to actually ignore simd constructs (i.e. use always a vector size of 1). That's why the MLIR to LLVM IR lowering can just ignore these nested `omp.simd` wrappers. This patch is sort of a short term solution to prevent crashes in that pass, but I think we should probably do something in MLIR to LLVM IR translation to prevent references to block arguments of an ignored `omp.simd` wrapper from causing a null pointer reference until eventually we implement proper translation of the composite SIMD information.

I have an idea on how to do that, but I'd need some time to get to implementing it, so I created this so that [this Fujitsu test suite regression](https://linaro.atlassian.net/browse/LLVM-1403) is addressed quickly.

https://github.com/llvm/llvm-project/pull/112686


More information about the flang-commits mailing list