After
r16-3956-gf613fdc6920c83, these 2 testcases start to fail as
now SRA will fully scalarize the structs and only provide with the piece
that was used. But the testcase is testing about the padding so turning
off SRA is correct in this case.
Pushed as obvious after testing the testcases now pass.
PR target/122402
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/auto-init-padding-2.c: Turn off SRA.
* gcc.target/aarch64/auto-init-padding-4.c: Likewise.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
/* Verify pattern initialization for structure type automatic variables with
padding. */
/* { dg-do compile } */
-/* { dg-options "-O -ftrivial-auto-var-init=pattern" } */
+/* SRA should be turned off as it can fully scalarize var as the padding is not touched. */
+/* { dg-options "-O -ftrivial-auto-var-init=pattern -fno-tree-sra" } */
struct test_aligned {
int internal1;
/* Verify pattern initialization for nested structure type automatic variables with
padding. */
/* { dg-do compile } */
-/* { dg-options "-O -ftrivial-auto-var-init=pattern" } */
+/* SRA should be turned off as it can fully scalarize var as the padding is not touched. */
+/* { dg-options "-O -ftrivial-auto-var-init=pattern -fno-tree-sra" } */
struct test_aligned {
unsigned internal1;