]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport 314b91220a07bd63f13c58e37f1b5b9430a3702b
authorMartin Liska <mliska@suse.cz>
Thu, 12 Mar 2020 12:36:17 +0000 (13:36 +0100)
committerMartin Liska <mliska@suse.cz>
Thu, 12 Mar 2020 12:36:17 +0000 (13:36 +0100)
Backport from mainline
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.
Backport from mainline
2020-03-09  Martin Liska  <mliska@suse.cz>

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 3bf79f39d7e53bce7dfabbe84be77428602a06b2..c141669d941af1fb706055bca85cb6d825a9d440 100644 (file)
@@ -1,3 +1,13 @@
+2020-03-12  Martin Liska  <mliska@suse.cz>
+
+       Backport from mainline
+       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-12  Jakub Jelinek  <jakub@redhat.com>
 
        * BASE-VER: Set to 9.3.1.
index 87d60078bb0d14ceaba6ccad54a3e564e875d6c7..d45294302cb94ad925b9fadc5f9e01ae23aa8ab0 100644 (file)
@@ -4715,11 +4715,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 e132f2657ef06ba62aa3fe61113364d98f051a04..ce957685132610bd6249ba429fb2f7686c228996 100644 (file)
@@ -1,3 +1,11 @@
+2020-03-12  Martin Liska  <mliska@suse.cz>
+
+       Backport from mainline
+       2020-03-09  Martin Liska  <mliska@suse.cz>
+
+       PR target/93800
+       * gcc.target/powerpc/pr93800.c: New test.
+
 2020-03-12  Release Manager
 
        * GCC 9.3.0 released.
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;
+}