On 12/9/25 10:01 AM, Konstantinos Eleftheriou wrote:
From: kelefth <[email protected]>

This patch enables the avoid-store-forwarding patch by default at O2 or
higher on AArch64.

The assembly patterns in `bitfield-bitint-abi-align16.c` and
`bitfield-bitint-abi-align8.c` have been updated to account for
the asf transformations.

gcc/ChangeLog:

        * common/config/aarch64/aarch64-common.cc: Enable asf at O2.
        * doc/invoke.texi: Document asf as an O2 enabled option for AArch64.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/bitfield-bitint-abi-align16.c:
        Modify testcases to account for the asf transformations.
        * gcc.target/aarch64/bitfield-bitint-abi-align8.c: Likewise.
        * gcc.target/aarch64/avoid-store-forwarding-6.c: New test.

Co-Authored-By: Christoph Müllner <[email protected]>
Signed-off-by: Konstantinos Eleftheriou <[email protected]>
---

diff --git a/gcc/testsuite/gcc.target/aarch64/avoid-store-forwarding-6.c 
b/gcc/testsuite/gcc.target/aarch64/avoid-store-forwarding-6.c
new file mode 100644
index 000000000000..320fa5e101e6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/avoid-store-forwarding-6.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+/* Same as avoid-store-forwarding-1.c but without -favoid-store-forwarding.  */
So if you're just twiddling flags, do this instead:

/* { dg-do compile } */
/* { dg-options "-O2" } */
#include "avoid-store-forwarding-1.c"

/* { dg-final ... }


Jeff

Reply via email to