Restore alignment in rs6000 target.
authorMartin Liska <mliska@suse.cz>
Mon, 9 Mar 2020 13:13:04 +0000 (14:13 +0100)
committerMartin Liska <mliska@suse.cz>
Mon, 9 Mar 2020 13:13:04 +0000 (14:13 +0100)
PR target/93800
* config/rs6000/rs6000.c (rs6000_option_override_internal):
Remove set of str_align_loops and str_align_jumps as these
should be set in previous 2 conditions in the function.
PR target/93800
* gcc.target/powerpc/pr93800.c: New test.

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr93800.c [new file with mode: 0644]

index c9c4e7503c7e8ba02a27d4e08478bac75f5a219d..6c4a5053f444c2b0aa59d895190d556856e096fe 100644 (file)
@@ -1,3 +1,10 @@
+2020-03-09  Martin Liska  <mliska@suse.cz>
+
+       PR target/93800
+       * config/rs6000/rs6000.c (rs6000_option_override_internal):
+       Remove set of str_align_loops and str_align_jumps as these
+       should be set in previous 2 conditions in the function.
+
 2020-03-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/94045
index ecbf7ae0c59a32a399b55a9f6c00570902dc0361..848a4ef451e49b1463732667cfbbea1af1751a4c 100644 (file)
@@ -4363,11 +4363,6 @@ rs6000_option_override_internal (bool global_init_p)
                  str_align_loops = "16";
                }
            }
-
-         if (flag_align_jumps && !str_align_jumps)
-           str_align_jumps = "16";
-         if (flag_align_loops && !str_align_loops)
-           str_align_loops = "16";
        }
 
       /* Arrange to save and restore machine status around nested functions.  */
index cf7243d99c88e5229712feb3b59fcbf163d69a1f..e4885b2b1edf73771876009c5b92c7bb8542138d 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-09  Martin Liska  <mliska@suse.cz>
+
+       PR target/93800
+       * gcc.target/powerpc/pr93800.c: New test.
+
 2020-03-09  Bin Cheng  <bin.cheng@linux.alibaba.com>
 
        * g++.dg/coroutines/torture/co-ret-15-default-return_void.C: New.
diff --git a/gcc/testsuite/gcc.target/powerpc/pr93800.c b/gcc/testsuite/gcc.target/powerpc/pr93800.c
new file mode 100644 (file)
index 0000000..f8dfbe7
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mcpu=860 -O2" } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-final { scan-assembler-not "\\.p2align 4" } } */
+
+volatile int g;
+int f(int a, int b)
+{
+       int i;
+
+       for (i = 0; i < b; i++)
+               a += g;
+       return a;
+}