[flang-commits] [flang] [mlir] [Flang][OpenMP] Fix to resolve the crash with SIMD aligned clause. (PR #150612)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Thu Aug 7 03:59:25 PDT 2025
skatrak wrote:
Assuming the spec indeed does not mandate this alignment to be a power of 2, which is what I understand to be the case, then I believe any solution involving triggering compilation errors should probably be discarded. Otherwise, a semantics error + MLIR verifier check would be my suggestion.
I can see @tblah's concerns about using MLIR warnings, since their format is currently different from Flang diagnostics and we can't selectively turn them off, though my understanding is that we can actually do something about that with [diagnostic handlers](https://mlir.llvm.org/docs/Diagnostics/#diagnostic-engine), which is probably worth doing at some point regardless of this particular issue. However, I do think we'd have to emit warnings at the MLIR to LLVM IR stage so that other users of the dialect are made aware of this limitation.
Perhaps we could emit this warning both during semantics checks and then again when translating MLIR, if giving users a better warning message for this is important. The problem would be notified multiple times, but we could potentially deal with that once we put our own MLIR diagnostic handler in place.
https://github.com/llvm/llvm-project/pull/150612
More information about the flang-commits
mailing list