--- /dev/null
+# Regression driver checking precompiled header compatibility of acle headers.
+# Copyright (C) 2025 Free Software Foundation, Inc.
+# Contributed by ARM Ltd.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+# GCC testsuite checking acle headers can be included in precompiled headers
+# that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an AArch64 target.
+if {![istarget aarch64*-*-*] } then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+load_lib dg-pch.exp
+load_lib torture-options.exp
+
+# Initialize `dg'.
+dg-init
+torture-init
+set-torture-options $DG_TORTURE_OPTIONS
+pch-init
+
+set arch_flags "-march=armv8.5-a+sve2+sme"
+set old_dg_do_what_default "${dg-do-what-default}"
+# Main loop.
+foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
+ global torture_without_loops
+ dg-flags-pch $subdir $test $arch_flags \
+ [concat [list {-O0 -g}] $torture_without_loops] ".h"
+}
+
+# All done.
+pch-finish
+torture-finish
+dg-finish
--- /dev/null
+#include "pch_arm_acle.h"
+
+uint32_t ror(uint32_t a, uint32_t b)
+{
+ return __ror(a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_acle.h>
--- /dev/null
+#include "pch_arm_acle_include_post.h"
+#include <arm_acle.h>
+
+uint32_t ror(uint32_t a, uint32_t b)
+{
+ return __ror(a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_acle.h>
--- /dev/null
+#include "pch_arm_multiple.h"
+
+svint32_t add_vectors(svint32_t a, svint32_t b)
+{
+ return svadd_s32_z(svptrue_b32(), a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_sme.h>
+#include <arm_sve.h>
+#include <arm_neon_sve_bridge.h>
+#include <arm_neon.h>
+#include <arm_acle.h>
--- /dev/null
+#include "pch_arm_multiple_include_post.h"
+#include <arm_sme.h>
+#include <arm_sve.h>
+#include <arm_neon_sve_bridge.h>
+#include <arm_neon.h>
+#include <arm_acle.h>
+
+svint32_t add_vectors(svint32_t a, svint32_t b)
+{
+ return svadd_s32_z(svptrue_b32(), a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_sme.h>
+#include <arm_sve.h>
+#include <arm_neon_sve_bridge.h>
+#include <arm_neon.h>
+#include <arm_acle.h>
--- /dev/null
+#include "pch_arm_neon.h"
+
+uint32x4_t add_vectors(uint32x4_t a, uint32x4_t b)
+{
+ return vaddq_u32(a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_neon.h>
--- /dev/null
+#include "pch_arm_neon_include_post.h"
+#include "arm_neon.h"
+
+uint32x4_t add_vectors(uint32x4_t a, uint32x4_t b)
+{
+ return vaddq_u32(a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_neon.h>
--- /dev/null
+#include "pch_arm_neon_sve_bridge.h"
+
+svint8_t set(svint8_t a, int8x16_t b)
+{
+ return svset_neonq(a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_neon_sve_bridge.h>
--- /dev/null
+#include "pch_arm_neon_sve_bridge_include_post.h"
+#include <arm_neon_sve_bridge.h>
+
+svint8_t set(svint8_t a, int8x16_t b)
+{
+ return svset_neonq(a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_neon_sve_bridge.h>
--- /dev/null
+#include "pch_arm_sme.h"
+
+void st(svbool_t pg, void *ptr, uint32_t slice_base)
+ __arm_streaming __arm_inout("za"){
+ svst1_hor_za8(0, slice_base, pg, ptr);
+}
--- /dev/null
+#pragma once
+#include <arm_sme.h>
--- /dev/null
+#include "pch_arm_sme_include_post.h"
+#include <arm_sme.h>
+
+void st(svbool_t pg, void *ptr, uint32_t slice_base)
+ __arm_streaming __arm_inout("za"){
+ svst1_hor_za8(0, slice_base, pg, ptr);
+}
--- /dev/null
+#pragma once
+#include <arm_sme.h>
--- /dev/null
+#include "pch_arm_sve.h"
+
+svint32_t add_vectors(svint32_t a, svint32_t b)
+{
+ return svadd_s32_z(svptrue_b32(), a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_sve.h>
--- /dev/null
+#include "pch_arm_sve_include_post.h"
+#include "arm_sve.h"
+
+svint32_t add_vectors(svint32_t a, svint32_t b)
+{
+ return svadd_s32_z(svptrue_b32(), a, b);
+}
--- /dev/null
+#pragma once
+#include <arm_sve.h>