Hi,

On 2019/11/5 06:57, Joseph Myers wrote:
> On Mon, 4 Nov 2019, luoxhu wrote:
> 
>> -finline-functions is enabled by default for O2 since r276469, update the
>> test cases with -fno-inline-functions.
>>
>> v2: disable inlining for the failed cases.  Add two more failed cases
>> not listed in BZ.  Tested on P8LE, P8BE and P9LE.
> 
> If inlining (or other interprocedural analysis) invalidates a test's
> intent (e.g. all the code gets optimized away), our normal approach is to
> use noinline etc. function attributes to prevent that inlining.
> 
> If you're adding such options to work around an ICE, which certainly
> appears to be the case in the architecture-independent testcases here, you
> should (a) have comments in the tests saying explicitly that the options
> are there temporarily to work around the ICE in a bug whose number is
> given in the comment, and (b) a remark in the open regression bug for the
> ICE saying that those options have been added as a temporary workaround
> and that a patch fixing the ICE should remove them again.  The commit
> message also needs to make very clear that the commit is *not* a fix for
> that bug and so it must *not* be closed as fixed until there is an actual
> fix for the ICE.
> 
> So I don't think this patch is OK without having such comments in the
> tests to explain the issue and a carefully written commit message warning
> that the patch is a workaround, not a fix and the bug in question must not
> be closed simply because of the commit mentioning it.
> 

Thanks. Updated the comments and message to mark the unsolved ICE issue as 
below,
will commit it soon:


-finline-functions is enabled by default for O2 since r276469, update the
test cases with -fno-inline-functions.
The options "-fno-inline-funtions --param max-inline-insns-single-O2=200"
for c11-atomic-exec-5.c is a temporary work around to the ICE of LRA on
BE systems in PR92090.  This commit is NOT a fix for the ICE bug and so it
must NOT be closed.

v2: Disable inlining for the failed cases.  Add two more failed cases
not listed in BZ.  Tested on P8LE, P8BE and P9LE.
v3: Update commit message and comments for atomic ICE.

gcc/testsuite/ChangeLog:

        2019-10-30  Xiong Hu Luo  <luo...@linux.ibm.com>

        PR92090
        * g++.dg/tree-ssa/pr61034.C: Add -fno-inline-functions --param
        max-inline-insns-single-O2=200.
        * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise.
        * gcc.target/powerpc/pr72804.c: Likewise.
        * gcc.target/powerpc/pr79439-1.c: Add -fno-inline-functions.
        * gcc.target/powerpc/vsx-builtin-7.c: Likewise.
---
 gcc/testsuite/g++.dg/tree-ssa/pr61034.C          | 2 +-
 gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c  | 2 +-
 gcc/testsuite/gcc.target/powerpc/pr72804.c       | 2 +-
 gcc/testsuite/gcc.target/powerpc/pr79439-1.c     | 2 +-
 gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr61034.C 
b/gcc/testsuite/g++.dg/tree-ssa/pr61034.C
index 2e3dfecacb4..338de1ebb13 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr61034.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr61034.C
@@ -1,5 +1,5 @@
 // { dg-do compile }
-// { dg-options "-O2 -fdump-tree-fre3 -fdump-tree-optimized 
-fdelete-null-pointer-checks --param early-inlining-insns-O2=14" }
+// { dg-options "-O2 -fdump-tree-fre3 -fdump-tree-optimized 
-fdelete-null-pointer-checks --param early-inlining-insns-O2=14 
-fno-inline-functions --param max-inline-insns-single-O2=200"  }
 
 #define assume(x) if(!(x))__builtin_unreachable()
 
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c 
b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c
index 692c64ad207..a3a5a05da30 100644
--- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c
@@ -3,7 +3,7 @@
    iterations of the compare-and-exchange loop are needed, exceptions
    get properly cleared).  */
 /* { dg-do run } */
-/* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE 
-D_POSIX_C_SOURCE=200809L" } */
+/* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE 
-D_POSIX_C_SOURCE=200809L -fno-inline-functions --param 
max-inline-insns-single-O2=200" } */  /* Disable inline here as "-Os" will hit 
ICE in LRA on Power8 BE, see PR92090.  */
 /* { dg-add-options ieee } */
 /* { dg-additional-options "-mfp-trap-mode=sui" { target alpha*-*-* } } */
 /* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2* } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr72804.c 
b/gcc/testsuite/gcc.target/powerpc/pr72804.c
index b83b6350d75..0fc3df1d89b 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr72804.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr72804.c
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
-/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-require-effective-target powerpc_vsx_ok  -fno-inline-functions --param 
max-inline-insns-single-O2=200 } */
 /* { dg-options "-O2 -mvsx" } */
 
 __int128_t
diff --git a/gcc/testsuite/gcc.target/powerpc/pr79439-1.c 
b/gcc/testsuite/gcc.target/powerpc/pr79439-1.c
index 5732a236c8e..539c96f571e 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr79439-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr79439-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
-/* { dg-options "-O2 -fpic -fno-reorder-blocks" } */
+/* { dg-options "-O2 -fpic -fno-reorder-blocks -fno-inline-functions" } */
 
 /* On the Linux 64-bit ABIs, we eliminate NOP in the 'rec' call even if
    -fpic is used.  The recursive call should call the local alias.  The
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c 
b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
index 5d31309f272..0780b01ffab 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-O2 -mdejagnu-cpu=power7" } */
+/* { dg-options "-O2 -mdejagnu-cpu=power7 -fno-inline-functions" } */
 
 /* Test simple extract/insert/slat operations.  Make sure all types are
    supported with various options.  */
-- 
2.21.0.777.g83232e3864

Reply via email to