From 9ce3f9b7fa0c0c40f7489e72247e45c18f94cb33 Mon Sep 17 00:00:00 2001
From: Michael Kuron <m.kuron@gmx.de>
Date: Thu, 16 Jun 2022 14:57:48 +0200
Subject: [PATCH] Try to remove ARM SVE compiler workarounds

---
 .gitlab-ci.yml | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bf4b2d259..3079a6339 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -180,13 +180,25 @@ arm64v9:
   image: i10git.cs.fau.de:5005/pycodegen/pycodegen/arm64:testing
   variables:
     PYSTENCILS_SIMD: "sve256,sve512,sve"
-    ASAN_OPTIONS: detect_leaks=0
-    LD_PRELOAD: /usr/lib/aarch64-linux-gnu/libasan.so.6
   before_script:
     - *multiarch_before_script
     - sed -i s/march=native/march=armv8-a+sve/g ~/.config/pystencils/config.json
     - sed -i s/g\+\+/clang++/g ~/.config/pystencils/config.json
 
+arm64v9-gcc:
+  # Compiler support for SVE is still pretty rough: GCC 10+11 produce incorrect code for fixed-width vectors,
+  # while Clang 12 produces memory-corrupting heisenbugs unless we enable the address sanitizer.
+  # In the RNG tests, GCC 10+11 produce an internal compiler error.
+  # The memory corruption seems to only happen with qemu-user, not with qemu-system.
+  # Once the compilers and QEMU have improved, this job should be cleaned up to match the others.
+  extends: .multiarch_template
+  image: i10git.cs.fau.de:5005/pycodegen/pycodegen/arm64:testing
+  variables:
+    PYSTENCILS_SIMD: "sve256,sve512,sve"
+  before_script:
+    - *multiarch_before_script
+    - sed -i s/march=native/march=armv8-a+sve/g ~/.config/pystencils/config.json
+
 riscv64:
   # The RISC-V vector extension are so new they are not supported by GCC yet.
   # Also, the image is built without the libomp package which is not yet available on Ubuntu.
-- 
GitLab