summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-03-18 10:29:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-03-18 10:29:43 +0000
commit31348d52c09909e89c7f1a99c72e1d0def60277d (patch)
treef21a962e1c2d439f50cf583d38c7881af0f9a39f /gcc/cfgexpand.c
parentfcac74a177b6c86bf70320aae7145f3b79e54739 (diff)
downloadgcc-31348d52c09909e89c7f1a99c72e1d0def60277d.tar.gz
re PR middle-end/56483 (LTO issue with expanding GIMPLE_COND)
2013-03-18 Richard Biener <rguenther@suse.de> PR middle-end/56483 * cfgexpand.c (expand_gimple_cond): Inline gimple_cond_single_var_p and implement properly. * gimple.h (gimple_cond_single_var_p): Remove. From-SVN: r196776
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 5acc42d73f5..7242b2107f4 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1886,9 +1886,14 @@ expand_gimple_cond (basic_block bb, gimple stmt)
be cleaned up by combine. But some pattern matchers like if-conversion
work better when there's only one compare, so make up for this
here as special exception if TER would have made the same change. */
- if (gimple_cond_single_var_p (stmt)
- && SA.values
+ if (SA.values
&& TREE_CODE (op0) == SSA_NAME
+ && TREE_CODE (TREE_TYPE (op0)) == BOOLEAN_TYPE
+ && TREE_CODE (op1) == INTEGER_CST
+ && ((gimple_cond_code (stmt) == NE_EXPR
+ && integer_zerop (op1))
+ || (gimple_cond_code (stmt) == EQ_EXPR
+ && integer_onep (op1)))
&& bitmap_bit_p (SA.values, SSA_NAME_VERSION (op0)))
{
gimple second = SSA_NAME_DEF_STMT (op0);