Commit c4ef2f86 by Richard Biener Committed by Richard Biener

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
parent 54a3a620
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.
2015-04-13 Richard Biener <rguenther@suse.de>
PR target/65660
* config/i386/i386.c (bdver1_cost): Double cond_taken_branch_cost
and cond_not_taken_branch_cost to 4 and 2.
......
2015-04-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/65204
* gcc.dg/tree-ssa/ssa-ccp-35.c: New testcase.
2015-04-13 Terry Guo <terry.guo@arm.com>
PR target/65710
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-ccp1" } */
typedef char char16[16] __attribute__ ((aligned (16)));
char16 c16[4] __attribute__ ((aligned (4)));
int f5 (int i)
{
__SIZE_TYPE__ s = (__SIZE_TYPE__)&c16[i];
/* 0 */
return 3 & s;
}
/* { dg-final { scan-tree-dump "return 0;" "ccp1" } } */
/* { dg-final { cleanup-tree-dump "ccp1" } } */
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment