diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2020-03-03 14:16:42 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2020-03-06 15:48:25 +0800 |
commit | 46275300312b44e1388b86a45f1600a5a1722303 (patch) | |
tree | d82319bedc82c4d45ef30578a37b9c2f1140b9b8 /gcc | |
parent | 5358e8f5800daa0012fc9d06705d64bbb21fa07b (diff) | |
download | gcc-46275300312b44e1388b86a45f1600a5a1722303.zip gcc-46275300312b44e1388b86a45f1600a5a1722303.tar.gz gcc-46275300312b44e1388b86a45f1600a5a1722303.tar.bz2 |
re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/tree-ssa/pr90883.C | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6b4f301..6b8b5c0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr90883.C b/gcc/testsuite/g++.dg/tree-ssa/pr90883.C index c5faffa..0e622f2 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr90883.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr90883.C @@ -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*-*-* } } } } |