diff options
author | Richard Biener <rguenther@suse.de> | 2019-07-23 10:00:24 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-07-23 10:00:24 +0000 |
commit | 62e3e66f130fc280eac0bbb6b69e9adca328c03b (patch) | |
tree | 83ec6d9b0fd5b3a0800a0d673c2e9204136fe1ff /gcc/testsuite | |
parent | e1eb82f5aa4f6e9ed9a6a368b54d0eda785be85c (diff) | |
download | gcc-62e3e66f130fc280eac0bbb6b69e9adca328c03b.zip gcc-62e3e66f130fc280eac0bbb6b69e9adca328c03b.tar.gz gcc-62e3e66f130fc280eac0bbb6b69e9adca328c03b.tar.bz2 |
re PR tree-optimization/83518 (Missing optimization: useless instructions should be dropped)
2019-07-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/83518
* tree-ssa-sccvn.c (vn_reference_lookup_3): Handle aggregate
init from a constant even when partial defs are already recorded.
c/
* gimple-parser.c (c_parser_parse_gimple_body): When we have
a CFG also rebuild cgraph edges.
* gcc.dg/tree-ssa/ssa-fre-79.c: New testcase.
From-SVN: r273732
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-79.c | 29 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d5efd50..8e6b026 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-23 Richard Biener <rguenther@suse.de> + + PR tree-optimization/83518 + * gcc.dg/tree-ssa/ssa-fre-79.c: New testcase. + 2019-07-23 Ed Schonberg <schonberg@adacore.com> * gnat.dg/task4.adb: New testcase. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-79.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-79.c new file mode 100644 index 0000000..83aef9a --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-79.c @@ -0,0 +1,29 @@ +/* { dg-do run } */ +/* { dg-options "-O -fgimple -fdump-tree-fre1" } */ + +struct S { char a[4]; }; +const struct S cs = { 1, 2, 3, 4 }; + +int __GIMPLE(ssa,startwith("fre")) +main () +{ + struct S s; + short _1; + + __BB(2): + s = cs; + s.a[1] = _Literal (char) 3; + _1 = __MEM <short, 1> (&s + 1); + if (_1 != _Literal (short) 0x303) + goto __BB3; + else + goto __BB4; + + __BB(3): + __builtin_abort (); + + __BB(4): + return 0; +} + +/* { dg-final { scan-tree-dump-not "abort" "fre1" } } */ |