mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-24 17:36:04 +08:00
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
This commit is contained in:
parent
2d4dc2233b
commit
9dc03c974f
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
2016-02-02 Yuri Rumyantsev <ysrumyan@gmail.com>
|
||||
|
||||
PR middle-end/68542
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-02-02 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/69606
|
||||
* gcc.dg/torture/pr69606.c: New testcase.
|
||||
|
||||
2016-02-02 Yuri Rumyantsev <ysrumyan@gmail.com>
|
||||
|
||||
PR middle-end/68542
|
||||
|
20
gcc/testsuite/gcc.dg/torture/pr69606.c
Normal file
20
gcc/testsuite/gcc.dg/torture/pr69606.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* { dg-do run } */
|
||||
|
||||
char a;
|
||||
unsigned short b;
|
||||
int c, d;
|
||||
unsigned char e;
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int f = 1, g = ~a;
|
||||
if (b > f)
|
||||
{
|
||||
e = b;
|
||||
d = b | e;
|
||||
g = 0;
|
||||
}
|
||||
c = 1 % g;
|
||||
return 0;
|
||||
}
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user