aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ifcombine.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-06-03 08:48:28 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-06-03 08:48:28 +0000
commit597c6315ca23f0451be82a7cfb4ebc9fa34105e7 (patch)
tree823b85854ac419e134e1b2ed705b84e2da313f04 /gcc/tree-ssa-ifcombine.c
parentb48e9677e5550d60c4f1b4ea05b88b150173ebe0 (diff)
downloadgcc-597c6315ca23f0451be82a7cfb4ebc9fa34105e7.zip
gcc-597c6315ca23f0451be82a7cfb4ebc9fa34105e7.tar.gz
gcc-597c6315ca23f0451be82a7cfb4ebc9fa34105e7.tar.bz2
re PR tree-optimization/61383 (wrong code at -O2 and -O3 on x86_64-linux-gnu)
2014-06-03 Richard Biener <rguenther@suse.de> PR tree-optimization/61383 * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure stmts can't trap. * gcc.dg/torture/pr61383-1.c: New testcase. From-SVN: r211163
Diffstat (limited to 'gcc/tree-ssa-ifcombine.c')
-rw-r--r--gcc/tree-ssa-ifcombine.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c
index fae389b..fa3c5b1 100644
--- a/gcc/tree-ssa-ifcombine.c
+++ b/gcc/tree-ssa-ifcombine.c
@@ -127,7 +127,11 @@ bb_no_side_effects_p (basic_block bb)
{
gimple stmt = gsi_stmt (gsi);
+ if (is_gimple_debug (stmt))
+ continue;
+
if (gimple_has_side_effects (stmt)
+ || gimple_could_trap_p (stmt)
|| gimple_vuse (stmt))
return false;
}