aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-math-opts.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-02-02 12:39:36 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-02-02 12:39:36 +0000
commit9dc03c974ffc1fa29217cf0fb83b4d662a6e7a93 (patch)
tree6f92c403a04e103eba6de4e45be4c89bd271849d /gcc/tree-ssa-math-opts.c
parent2d4dc2233b4a3aef3edeb23d6acaaa8a5327c137 (diff)
downloadgcc-9dc03c974ffc1fa29217cf0fb83b4d662a6e7a93.zip
gcc-9dc03c974ffc1fa29217cf0fb83b4d662a6e7a93.tar.gz
gcc-9dc03c974ffc1fa29217cf0fb83b4d662a6e7a93.tar.bz2
re PR tree-optimization/69606 (wrong code at -Os and above on x86_64-linux-gnu)
2016-02-02 Richard Biener <rguenther@suse.de> PR tree-optimization/69606 * tree-ssa-math-opts.c (bswap_replace): Clear flow sensitive info on the result before moving a stmt. * gcc.dg/torture/pr69606.c: New testcase. From-SVN: r233069
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r--gcc/tree-ssa-math-opts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index abd77e7..3aa4a07 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -2622,6 +2622,8 @@ bswap_replace (gimple *cur_stmt, gimple *src_stmt, tree fndecl,
/* Move cur_stmt just before one of the load of the original
to ensure it has the same VUSE. See PR61517 for what could
go wrong. */
+ if (gimple_bb (cur_stmt) != gimple_bb (src_stmt))
+ reset_flow_sensitive_info (gimple_assign_lhs (cur_stmt));
gsi_move_before (&gsi, &gsi_ins);
gsi = gsi_for_stmt (cur_stmt);