From: Martin Liska Date: Mon, 9 Mar 2020 13:13:04 +0000 (+0100) Subject: Restore alignment in rs6000 target. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=314b91220a07bd63f13c58e37f1b5b9430a3702b;p=gcc.git Restore alignment in rs6000 target. 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. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9c4e7503c7..6c4a5053f44 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-03-09 Martin Liska + + 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 PR rtl-optimization/94045 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ecbf7ae0c59..848a4ef451e 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cf7243d99c8..e4885b2b1ed 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-03-09 Martin Liska + + PR target/93800 + * gcc.target/powerpc/pr93800.c: New test. + 2020-03-09 Bin Cheng * 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 index 00000000000..f8dfbe7c082 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr93800.c @@ -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; +}