[Mlir-commits] [llvm] [mlir] [llvm][OpenMP] Handle complex types in atomic read (PR #111377)

Tom Eccles llvmlistbot at llvm.org
Fri Oct 18 04:07:50 PDT 2024


tblah wrote:

Thanks for taking a look.

> GDB shows the segfault is in atomic_load. I have a couple of questions regarding the test that can help in triaging this better:

I have tried this using both gnu libatomic and compiler-rt so I expect the bug is in what we are passing to `atomic_load` rather than `atomic_load` itself.

I get the same results on your three examples:
1. Compiles and runs correctly
2. **compiler** crash in `llvm::CodeExtractor::findAllocas`
3. **compiler** crash in `llvm::CodeExtractor::findAllocas`

It isn't clear to me if the **runtime** crash in my test is the same bug or not. It might be. I have seen those compiler crashes before while making changes to `mlir/lib/Target/LLVMIR/OpenMPToLLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp` - if we generate malformed IR in the callbacks passed into `OpenMPIRBuilder` the code extractor can crash while trying to outline the openmp region.

I don't have a machine available to confirm, but I would guess (2) and (3) are reproducible on x86?

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


More information about the Mlir-commits mailing list