[all-commits] [llvm/llvm-project] 4b00dd: [OpenMP][OMPIRBuilder] Support complex types in at...
Chi-Chun, Chen via All-commits
all-commits at lists.llvm.org
Mon Apr 13 22:51:04 PDT 2026
Branch: refs/heads/users/cchen/atomic-update-complex
Home: https://github.com/llvm/llvm-project
Commit: 4b00dd5722213277e749c723e96e778040cab176
https://github.com/llvm/llvm-project/commit/4b00dd5722213277e749c723e96e778040cab176
Author: Chi Chun, Chen <chichun.chen at hpe.com>
Date: 2026-04-14 (Tue, 14 Apr 2026)
Changed paths:
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M mlir/test/Target/LLVMIR/openmp-llvm.mlir
Log Message:
-----------
[OpenMP][OMPIRBuilder] Support complex types in atomic update/capture
Route struct-typed values through the libcall path in
`emitAtomicUpdate`.
Previously, the libcall path was gated on `RMWOp == BAD_BINOP`, so
atomic capture swap patterns (`v = x; x = expr`) for complex values
lowered as structs fell through to the cmpxchg path. That path called
`getScalarSizeInBits()` on a struct type, produced 0, and triggered an
assertion in `IntegerType::get()`.
Remove the `BAD_BINOP` restriction so struct types always use the
libcall path. This is safe because the libcall path does not use
`RMWOp` and already handles arbitrary type sizes correctly.
Also fix `LoadSize` in the libcall path to use `XElemTy` rather than
the pointer type, which previously gave the wrong size for larger
complex types such as `complex(8)`.
Fixes https://github.com/llvm/llvm-project/issues/191317
Assisted with copilot and GPT-5.4
Commit: 2db12cc7ecc667e3ce1628f54fd3b4a4b5177436
https://github.com/llvm/llvm-project/commit/2db12cc7ecc667e3ce1628f54fd3b4a4b5177436
Author: Chi Chun, Chen <chichun.chen at hpe.com>
Date: 2026-04-14 (Tue, 14 Apr 2026)
Changed paths:
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M mlir/test/Target/LLVMIR/openmp-llvm.mlir
Log Message:
-----------
Add test for fallback path and update assert message
Compare: https://github.com/llvm/llvm-project/compare/10c9d1e0d074...2db12cc7ecc6
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list