aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-04-13 12:42:41 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-04-13 12:42:41 +0000
commitc4ef2f8634669376c85304a5ebe181edf4f73a4c (patch)
treef454e18a763b6ae39cd70081499f44af78a8165f /gcc/tree-ssa-ccp.c
parent54a3a620046c47bfda0deb529cf3c4284561ce8a (diff)
downloadgcc-c4ef2f8634669376c85304a5ebe181edf4f73a4c.zip
gcc-c4ef2f8634669376c85304a5ebe181edf4f73a4c.tar.gz
gcc-c4ef2f8634669376c85304a5ebe181edf4f73a4c.tar.bz2
re PR tree-optimization/65204 (Aligned address optimization not detected)
2015-04-13 Richard Biener <rguenther@suse.de> PR tree-optimization/65204 * tree-ssa-ccp.c (evaluate_stmt): Always evaluate address takens for bit-CCP. * gcc.dg/tree-ssa/ssa-ccp-35.c: New testcase. From-SVN: r222049
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index d45a3ff..9fbea3a 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1748,7 +1748,9 @@ evaluate_stmt (gimple stmt)
/* Resort to simplification for bitwise tracking. */
if (flag_tree_bit_ccp
- && (likelyvalue == CONSTANT || is_gimple_call (stmt))
+ && (likelyvalue == CONSTANT || is_gimple_call (stmt)
+ || (gimple_assign_single_p (stmt)
+ && gimple_assign_rhs_code (stmt) == ADDR_EXPR))
&& !is_constant)
{
enum gimple_code code = gimple_code (stmt);