[flang-commits] [flang] [flang] Fix aarch64 CI failures from #92364 (PR #110969)

via flang-commits flang-commits at lists.llvm.org
Thu Oct 3 00:47:56 PDT 2024


https://github.com/NimishMishra created https://github.com/llvm/llvm-project/pull/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.

>From 543a9076cacc239c8130192e9ebd64e07c9c581a Mon Sep 17 00:00:00 2001
From: Nimish Mishra <neelam.nimish at gmail.com>
Date: Thu, 3 Oct 2024 13:15:06 +0530
Subject: [PATCH] [flang] Fix aarch64 CI failures from #92364

---
 .../OpenMP/atomic-capture-complex.f90         | 47 -------------------
 flang/test/Integration/OpenMP/atomic-read.f90 | 22 +++++++++
 2 files changed, 22 insertions(+), 47 deletions(-)
 delete mode 100644 flang/test/Integration/OpenMP/atomic-capture-complex.f90
 create mode 100644 flang/test/Integration/OpenMP/atomic-read.f90

diff --git a/flang/test/Integration/OpenMP/atomic-capture-complex.f90 b/flang/test/Integration/OpenMP/atomic-capture-complex.f90
deleted file mode 100644
index 72329f0b2eb10d..00000000000000
--- a/flang/test/Integration/OpenMP/atomic-capture-complex.f90
+++ /dev/null
@@ -1,47 +0,0 @@
-!===----------------------------------------------------------------------===!
-! This directory can be used to add Integration tests involving multiple
-! stages of the compiler (for eg. from Fortran to LLVM IR). It should not
-! contain executable tests. We should only add tests here sparingly and only
-! if there is no other way to test. Repeat this message in each test that is
-! added to this directory and sub-directories.
-!===----------------------------------------------------------------------===!
-
-!RUN: %flang_fc1 -emit-llvm -fopenmp %s -o - | FileCheck %s
-
-!CHECK: %[[X_NEW_VAL:.*]] = alloca { float, float }, align 8
-!CHECK: %[[VAL_1:.*]] = alloca { float, float }, i64 1, align 8
-!CHECK: %[[ORIG_VAL:.*]] = alloca { float, float }, i64 1, align 8
-!CHECK: store { float, float } { float 2.000000e+00, float 2.000000e+00 }, ptr %[[ORIG_VAL]], align 4
-!CHECK: br label %entry
-
-!CHECK: entry:
-!CHECK: %[[ATOMIC_TEMP_LOAD:.*]] = alloca { float, float }, align 8
-!CHECK: call void @__atomic_load(i64 8, ptr %[[ORIG_VAL]], ptr %[[ATOMIC_TEMP_LOAD]], i32 0)
-!CHECK: %[[PHI_NODE_ENTRY_1:.*]] = load { float, float }, ptr %[[ATOMIC_TEMP_LOAD]], align 8
-!CHECK: br label %.atomic.cont
-
-!CHECK: .atomic.cont
-!CHECK: %[[VAL_4:.*]] = phi { float, float } [ %[[PHI_NODE_ENTRY_1]], %entry ], [ %{{.*}}, %.atomic.cont ]
-!CHECK: %[[VAL_5:.*]] = extractvalue { float, float } %[[VAL_4]], 0
-!CHECK: %[[VAL_6:.*]] = extractvalue { float, float } %[[VAL_4]], 1
-!CHECK: %[[VAL_7:.*]] = fadd contract float %[[VAL_5]], 1.000000e+00
-!CHECK: %[[VAL_8:.*]] = fadd contract float %[[VAL_6]], 1.000000e+00
-!CHECK: %[[VAL_9:.*]] = insertvalue { float, float } undef, float %[[VAL_7]], 0
-!CHECK: %[[VAL_10:.*]] = insertvalue { float, float } %[[VAL_9]], float %[[VAL_8]], 1
-!CHECK: store { float, float } %[[VAL_10]], ptr %[[X_NEW_VAL]], align 4
-!CHECK: %[[VAL_11:.*]] = call i1 @__atomic_compare_exchange(i64 8, ptr %[[ORIG_VAL]], ptr %[[ATOMIC_TEMP_LOAD]], ptr %[[X_NEW_VAL]],
-!i32 2, i32 2)
-!CHECK: %[[VAL_12:.*]] = load { float, float }, ptr %[[ATOMIC_TEMP_LOAD]], align 4
-!CHECK: br i1 %[[VAL_11]], label %.atomic.exit, label %.atomic.cont
-
-!CHECK: .atomic.exit
-!CHECK: store { float, float } %[[VAL_10]], ptr %[[VAL_1]], align 4
-
-program main
-      complex*8 ia, ib
-      ia = (2, 2)
-      !$omp atomic capture
-        ia = ia + (1, 1)
-        ib = ia
-      !$omp end atomic
-end program
diff --git a/flang/test/Integration/OpenMP/atomic-read.f90 b/flang/test/Integration/OpenMP/atomic-read.f90
new file mode 100644
index 00000000000000..726781b5442119
--- /dev/null
+++ b/flang/test/Integration/OpenMP/atomic-read.f90
@@ -0,0 +1,22 @@
+!===----------------------------------------------------------------------===!
+! This directory can be used to add Integration tests involving multiple
+! stages of the compiler (for eg. from Fortran to LLVM IR). It should not
+! contain executable tests. We should only add tests here sparingly and only
+! if there is no other way to test. Repeat this message in each test that is
+! added to this directory and sub-directories.
+!===----------------------------------------------------------------------===!
+
+!RUN: %flang_fc1 -emit-llvm -fopenmp %s -o - | FileCheck %s
+
+!CHECK: %[[VAL_1:.*]] = alloca { float, float }, i64 1, align 8
+!CHECK: %[[VAL_2:.*]] = alloca { float, float }, i64 1, align 8
+!CHECK: %[[ATOMIC_TEMP_LOAD:.*]] = alloca { float, float }, align 16
+!CHECK: call void @__atomic_load(i64 8, ptr %[[VAL_2]], ptr %[[ATOMIC_TEMP_LOAD]], i32 0)
+!CHECK: %[[VAL_3:.*]] = load { float, float }, ptr %[[ATOMIC_TEMP_LOAD]], align 16
+!CHECK: store { float, float } %[[VAL_3]], ptr %[[VAL_1]], align 4
+
+program main
+      complex*8 ia, ib
+      !$omp atomic read
+        ib = ia
+end program



More information about the flang-commits mailing list