-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Description
Hi all,
when building LLVM in release mode, enabling mlir
, like so
cmake -G Ninja <llvm-source-path> -DCMAKE_BUILD_TYPE=Release \
'-DLLVM_ENABLE_PROJECTS=clang;mlir' \
-DLLVM_USE_LINKER=lld \
-DLLVM_ENABLE_LIBCXX=ON
Then I see the following failures on check-mlir
.
Failed Tests (3):
MLIR :: Dialect/LLVMIR/sroa-statistics.mlir
MLIR :: Dialect/MemRef/mem2reg-statistics.mlir
MLIR :: Dialect/Transform/test-repro-dump.mlir
(libc++ and LLD may not be necessary when building but I'm consistently able to trigger the errors under that build configuration)
System is an x86-64 Ubuntu 22.04 LTS building with Clang 15.0.6 from llvm.org
I've investigated a bit, the tests does not crash but does not print what it is expected from it.
From what I saw in the debugger, the switch in https://github.com/llvm/llvm-project/blob/main/mlir/lib/Pass/PassStatistics.cpp#L152 even if it covers all the cases of the enum class PassDisplayMode
(https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Pass/PassManager.h#L195) is never executed.
At firstg it seems a miscompilation triggered by building in Release mode (a lot of things get inlined) but I have not found anything obvious.