summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 987130403ce..b6ccb59d241 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -898,24 +898,23 @@ ccp_finalize (bool nonzero_p)
{
bool something_changed;
unsigned i;
+ tree name;
do_dbg_cnt ();
/* Derive alignment and misalignment information from partially
constant pointers in the lattice or nonzero bits from partially
constant integers. */
- for (i = 1; i < num_ssa_names; ++i)
+ FOR_EACH_SSA_NAME (i, name, cfun)
{
- tree name = ssa_name (i);
ccp_prop_value_t *val;
unsigned int tem, align;
- if (!name
- || (!POINTER_TYPE_P (TREE_TYPE (name))
- && (!INTEGRAL_TYPE_P (TREE_TYPE (name))
- /* Don't record nonzero bits before IPA to avoid
- using too much memory. */
- || !nonzero_p)))
+ if (!POINTER_TYPE_P (TREE_TYPE (name))
+ && (!INTEGRAL_TYPE_P (TREE_TYPE (name))
+ /* Don't record nonzero bits before IPA to avoid
+ using too much memory. */
+ || !nonzero_p))
continue;
val = get_value (name);
@@ -929,7 +928,7 @@ ccp_finalize (bool nonzero_p)
/* Trailing mask bits specify the alignment, trailing value
bits the misalignment. */
tem = val->mask.to_uhwi ();
- align = (tem & -tem);
+ align = least_bit_hwi (tem);
if (align > 1)
set_ptr_info_alignment (get_ptr_info (name), align,
(TREE_INT_CST_LOW (val->value)