aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-03 11:09:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-03 11:09:59 +0000
commit07bfc9ece12554016cf8c39b17301ab94df6f176 (patch)
tree7d533f06f94bafb5dd09f062d0ef17a1ab83a989 /gcc/expr.c
parent7769bb64f35fea465d47288bcc8dae542257162f (diff)
downloadgcc-07bfc9ece12554016cf8c39b17301ab94df6f176.zip
gcc-07bfc9ece12554016cf8c39b17301ab94df6f176.tar.gz
gcc-07bfc9ece12554016cf8c39b17301ab94df6f176.tar.bz2
double-int.h (lshift): New overload without precision and arith argument.
2013-05-03 Richard Biener <rguenther@suse.de> * double-int.h (lshift): New overload without precision and arith argument. (operator *=, operator +=, operator -=): Move ... * double-int.c (operator *=, operator +=, operator -=): ... here and implement more efficiently. (mul_double_with_sign): Remove. (lshift_double): Adjust to take unsinged shift argument, push dispatching code to callers. (mul_double_wide_with_sign): Add early out for callers that are not interested in high parts or overflow. (lshift): New function. (lshift, rshift, alshift, arshift, llshift, lrshift): Add dispatch code here. (lrotate, rrotate): Use logical shifts. * expr.c (get_inner_reference): Use lshift. * fixed-value.c (do_fixed_divide): Likewise. * tree-dfa.c (get_ref_base_and_extent): Likewise. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Likewise. (indirect_refs_may_alias_p): Likewise. (stmt_kills_ref_p_1): Likewise. From-SVN: r198576
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index e3fb0b6..acf282e 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6704,9 +6704,8 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
if (!integer_zerop (off))
{
double_int boff, coff = mem_ref_offset (exp);
- boff = coff.alshift (BITS_PER_UNIT == 8
- ? 3 : exact_log2 (BITS_PER_UNIT),
- HOST_BITS_PER_DOUBLE_INT);
+ boff = coff.lshift (BITS_PER_UNIT == 8
+ ? 3 : exact_log2 (BITS_PER_UNIT));
bit_offset += boff;
}
exp = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
@@ -6732,8 +6731,7 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
{
double_int tem = tree_to_double_int (offset);
tem = tem.sext (TYPE_PRECISION (sizetype));
- tem = tem.alshift (BITS_PER_UNIT == 8 ? 3 : exact_log2 (BITS_PER_UNIT),
- HOST_BITS_PER_DOUBLE_INT);
+ tem = tem.lshift (BITS_PER_UNIT == 8 ? 3 : exact_log2 (BITS_PER_UNIT));
tem += bit_offset;
if (tem.fits_shwi ())
{