re PR tree-optimization/48317 (SCCVN does not handle vector constructors)
authorRichard Guenther <rguenther@suse.de>
Tue, 6 Sep 2011 13:17:50 +0000 (13:17 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 6 Sep 2011 13:17:50 +0000 (13:17 +0000)
commit5a7d7f9cf3bc2cacd798cae88a3de28bd1d7259d
tree79a6f72b4c729032adb2e9fb056921d1ebcc1a92
parent0a03460680a09ac9dc7119f569ae9e59d5fc778b
re PR tree-optimization/48317 (SCCVN does not handle vector constructors)

2011-09-06  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/48317
* tree-ssa-sccvn.h (struct vn_nary_op_s): Make op a true
trailing array.
(sizeof_vn_nary_op): New inline function.
(vn_nary_op_lookup_pieces): Adjust.
(vn_nary_op_insert_pieces): Likewise.
* tree-ssa-sccvn.c (vn_nary_op_eq): Also compare the length.
(init_vn_nary_op_from_pieces): Adjust signature.  Deal with
any number of operands.
(vn_nary_length_from_stmt): New function.
(init_vn_nary_op_from_stmt): Adjust for CONSTRUCTOR handling.
(vn_nary_op_lookup_pieces): Adjust signature and allocate properly
sized temporary.
(vn_nary_op_lookup): Likewise.
(vn_nary_op_lookup_stmt): Likewise.
(vn_nary_op_insert_into): Likewise.
(vn_nary_op_insert_stmt): Likewise.
(visit_use): Handle CONSTRUCTOR as nary.
* tree-ssa-pre.c (phi_translate_1): Adjust.
(create_expression_by_pieces): Likewise.
(compute_avail): Likewise.

* gcc.dg/tree-ssa/ssa-fre-31.c: New testcase.

From-SVN: r178595
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-31.c [new file with mode: 0644]
gcc/tree-ssa-pre.c
gcc/tree-ssa-sccvn.c
gcc/tree-ssa-sccvn.h