3 Commits

Author SHA1 Message Date
Tom Eccles
6ce4b6dd07
[flang][OpenMP][test] re-add complex atomic capture regression test (#112736)
This was reverted in https://github.com/llvm/llvm-project/pull/110969
due to a failure on aarch64.

Weirdly aarch64 (but apparently not x86?) has a spurious phi
instruction. flang -fc1 -emit-llvm will run midle-end optimization
passes. Presumably one of those is behaving differently on different
targets. I have adapted the test to work correctly on aarch64.

The difference is in the RUN lines and the atomic exit block.
2024-10-18 11:00:55 +01:00
NimishMishra
612760ede6
[flang] Fix aarch64 CI failures from #92364 (#110969)
An integration test added in #92364 causes aarch64 buildbot failures.
Reverting the same. The relevant functionality added in #92364 is still
tested by the MLIR tests added in that PR, which pass on the relevant
aarch64 builds.
2024-10-03 01:45:58 -07:00
NimishMishra
aec87a2143
[llvm][mlir][flang][OpenMP] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (#92364)
This patch adds functionality to emit relevant libcalls in case
atomicrmw instruction can not be emitted (for instance, in case of
complex types). The IRBuilder is modified to directly emit __atomic_load
and __atomic_compare_exchange libcalls. The added functions follow a
similar codegen path as Clang, so that LLVM Flang generates almost
similar IR as Clang.

Fixes https://github.com/llvm/llvm-project/issues/83760 and
https://github.com/llvm/llvm-project/issues/75138

Co-authored-by: Michael Kruse <llvm-project@meinersbur.de>
2024-10-02 23:32:36 -07:00