]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)
authorKito Cheng <kito.cheng@sifive.com>
Tue, 3 Mar 2020 06:16:42 +0000 (14:16 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Fri, 6 Mar 2020 07:48:25 +0000 (15:48 +0800)
After add --param max-inline-insns-size=1 all target will remove the
redundant store at dse1, except some targets like AArch64 and MIPS will
expand the struct initialization into loop due to CLEAR_RATIO.

Tested on cross compiler of riscv32, riscv64, x86, x86_64, mips, mips64,
aarch64, nds32 and arm.

gcc/testsuite/ChangeLog

PR tree-optimization/90883
* g++.dg/tree-ssa/pr90883.c: Add --param max-inline-insns-size=1.
Add aarch64-*-* mips*-*-* to XFAIL.

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr90883.C

index 6b4f301bb39cd73a31bae11375c24ca42ed07106..6b8b5c03c4d90680ec1d7ac6d520aff49b84e5b1 100644 (file)
@@ -1,3 +1,9 @@
+2020-03-06  Kito Cheng  <kito.cheng@sifive.com>
+
+       PR tree-optimization/90883
+       * g++.dg/tree-ssa/pr90883.c: Add --param max-inline-insns-size=1.
+       Add aarch64-*-* mips*-*-* to XFAIL.
+
 2020-03-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/89229
index c5faffa1f32deb54f31dcfcd5828a08486d63dfd..0e622f263d2697e22999512142d5296d59af479a 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-O2 -Os -fdump-tree-dse-details -std=c++11" }
+// { dg-options "-O2 -Os -fdump-tree-dse-details -std=c++11 --param max-inline-insns-size=1" }
 
 
     class C
@@ -15,6 +15,6 @@
 
 // We want to match enough here to capture that we deleted an empty
 // constructor store
-// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse1" { target { ! i?86-*-* } } } }
-// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse2" { target i?86-*-* } } }
+// aarch64 and mips will expand to loop to clear because CLEAR_RATIO.
+// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse1" { xfail { aarch64-*-* mips*-*-* } } } }
 
This page took 0.072388 seconds and 5 git commands to generate.