[Mlir-commits] [flang] [mlir] [OpenMP][Flang][MLIR] Introduce omp.declare_simd op and emit from Flang (PR #175604)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jan 13 17:13:32 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 7326 tests passed
* 598 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Flang
<details>
<summary>Flang.Lower/OpenMP/declare-simd.f90</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang -fc1 -emit-hlfir -fopenmp -fopenmp-version=52 /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/declare-simd.f90 -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/declare-simd.f90
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang -fc1 -emit-hlfir -fopenmp -fopenmp-version=52 /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/declare-simd.f90 -o -
# .---command stderr------------
# | warning: OpenMP support for version 52 in flang is still incomplete
# | LLVM ERROR: TypeID::get<(anonymous namespace)::DeclareSimdResource>(): Using TypeID on a class with an anonymous namespace requires an explicit TypeID definition. The implicit fallback uses string name, which does not guarantee uniqueness in anonymous contexts. Define an explicit TypeID instantiation for this type using `MLIR_DECLARE_EXPLICIT_TYPE_ID`/`MLIR_DEFINE_EXPLICIT_TYPE_ID` or `MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID`.
# | 
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang -fc1 -emit-hlfir -fopenmp -fopenmp-version=52 /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/declare-simd.f90 -o -
# |  #0 0x0000000008274588 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:842:13
# |  #1 0x0000000008271ba5 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# |  #2 0x0000000008275351 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:429:38
# |  #3 0x00007e1c54c9d330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #4 0x00007e1c54cf6b2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# |  #5 0x00007e1c54c9d27e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# |  #6 0x00007e1c54c808ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# |  #7 0x00000000081e33f5 llvm::report_fatal_error(llvm::Twine const&, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/ErrorHandling.cpp:137:5
# |  #8 0x00000000081e346e (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang+0x81e346e)
# |  #9 0x000000000e8fb274 lookupOrInsert /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Support/TypeID.cpp:0:7
# | #10 0x000000000e8fb274 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Support/TypeID.cpp:83:19
# | #11 0x000000000c7979da resolveTypeID /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/Support/TypeID.h:208:24
# | #12 0x000000000c7979da get<(anonymous namespace)::DeclareSimdResource> /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/Support/TypeID.h:246:10
# | #13 0x000000000c7979da getResourceID /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/Interfaces/SideEffectInterfaces.h:96:44
# | #14 0x000000000c7979da Base /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/Interfaces/SideEffectInterfaces.h:104:27
# | #15 0x000000000c7979da (anonymous namespace)::DeclareSimdResource::DeclareSimdResource() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp:4496:8
# | #16 0x000000000c63cd6b get /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/Interfaces/SideEffectInterfaces.h:91:7
# | #17 0x000000000c63cd6b mlir::omp::DeclareSimdOp::getEffects(llvm::SmallVectorImpl<mlir::SideEffects::EffectInstance<mlir::MemoryEffects::Effect>>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp:4506:24
# | #18 0x000000000e72535d DebugEpochBase /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/EpochTracker.h:38:12
# | #19 0x000000000e72535d SmallPtrSetImplBase /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:81:12
# | #20 0x000000000e72535d SmallPtrSetImplBase /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:375:30
# | #21 0x000000000e72535d SmallPtrSet /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:541:19
# | #22 0x000000000e72535d wouldOpBeTriviallyDeadImpl /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Interfaces/SideEffectInterfaces.cpp:78:29
# | #23 0x000000000e72535d mlir::wouldOpBeTriviallyDead(mlir::Operation*) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Interfaces/SideEffectInterfaces.cpp:317:10
# | #24 0x000000000c8a6cf7 propagateLiveness /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/RegionUtils.cpp:380:7
# | #25 0x000000000c8a6cf7 propagateLiveness(mlir::Region&, (anonymous namespace)::LiveMap&) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/RegionUtils.cpp:396:7
# | #26 0x000000000c8a692b mlir::runRegionDCE(mlir::RewriterBase&, llvm::MutableArrayRef<mlir::Region>) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/RegionUtils.cpp:501:25
# | #27 0x000000000866d08a endNewFunction /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Lower/Bridge.cpp:6630:12
# | #28 0x000000000866d08a (anonymous namespace)::FirConverter::lowerFunc(Fortran::lower::pft::FunctionLikeUnit&) /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Lower/Bridge.cpp:6742:7
# | #29 0x000000000860345c run /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Lower/Bridge.cpp:0:63
# | #30 0x000000000860345c Fortran::lower::LoweringBridge::lower(Fortran::parser::Program const&, Fortran::semantics::SemanticsContext const&) /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Lower/Bridge.cpp:7231:13
# | #31 0x00000000082cd377 swap<mlir::ModuleOp> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/move.h:198:11
# | #32 0x00000000082cd377 release /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/../mlir/include/mlir/IR/OwningOpRef.h:69:5
# | #33 0x00000000082cd377 getModuleAndRelease /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Lower/Bridge.h:89:56
# | #34 0x00000000082cd377 Fortran::frontend::CodeGenAction::beginSourceFileAction() /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Frontend/FrontendActions.cpp:294:19
# | #35 0x00000000082c6fe1 Fortran::frontend::FrontendAction::beginSourceFile(Fortran::frontend::CompilerInstance&, Fortran::frontend::FrontendInputFile const&) /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Frontend/FrontendAction.cpp:0:8
# | #36 0x00000000082ae7a3 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Frontend/CompilerInstance.cpp:189:13
# | #37 0x00000000082cc315 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:237:25
# | #38 0x00000000066934dc fc1_main(llvm::ArrayRef<char const*>, char const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/tools/flang-driver/fc1_main.cpp:90:13
# | #39 0x000000000669236a executeFC1Tool /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/tools/flang-driver/driver.cpp:67:12
# | #40 0x000000000669236a main /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/tools/flang-driver/driver.cpp:111:14
# | #41 0x00007e1c54c821ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #42 0x00007e1c54c8228b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #43 0x00000000066912e5 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang+0x66912e5)
# `-----------------------------
# error: command failed with exit status: -6
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/declare-simd.f90
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/declare-simd.f90
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the Mlir-commits mailing list