diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc index 102b7a2cc99..7555793948e 100644 --- a/gcc/tree-ssa-math-opts.cc +++ b/gcc/tree-ssa-math-opts.cc @@ -1462,7 +1462,7 @@ powi_cost (HOST_WIDE_INT n) return 0; /* Ignore the reciprocal when calculating the cost. */ - val = (n < 0) ? -n : n; + val = absu_hwi (n); /* Initialize the exponent cache. */ memset (cache, 0, POWI_TABLE_SIZE * sizeof (bool));