This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Weaken PR47661
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 21 Mar 2011 14:48:18 +0100 (CET)
- Subject: [PATCH] Weaken PR47661
We force all maybe-trapping conditions into separate stmts, but this
isn't necessary w/o -fno-call-exceptions. It also confuses our
branch prediction.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
The bug remains for -fnon-call-exceptions.
Richard.
2011-03-21 Richard Guenther <rguenther@suse.de>
PR middle-end/47661
* gimple.c (is_gimple_condexpr): Use tree_could_throw_p.
Index: gcc/gimple.c
===================================================================
--- gcc/gimple.c (revision 171142)
+++ gcc/gimple.c (working copy)
@@ -2581,7 +2581,7 @@ bool
is_gimple_condexpr (tree t)
{
return (is_gimple_val (t) || (COMPARISON_CLASS_P (t)
- && !tree_could_trap_p (t)
+ && !tree_could_throw_p (t)
&& is_gimple_val (TREE_OPERAND (t, 0))
&& is_gimple_val (TREE_OPERAND (t, 1))));
}