summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-12-08 16:15:06 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-12-08 16:15:06 +0000
commitafca0898bc7728495064f251d6094970e036a5c7 (patch)
tree0f21a9ba80edfe5be28ed465ffa72b1c35017992 /gcc/tree-ssa-sccvn.c
parentfdd7cdbfeed6b3bb25af2221fe00ccf44e6e51b2 (diff)
downloadgcc-afca0898bc7728495064f251d6094970e036a5c7.tar.gz
tree-ssa-sccvn.c (copy_reference_ops_from_ref): Use a shift instead of a division to divide by BITS_PER_UNIT.
2010-12-08 Richard Guenther <rguenther@suse.de> * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Use a shift instead of a division to divide by BITS_PER_UNIT. From-SVN: r167592
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index ed1dabea1ca..6efb2453d3a 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -644,10 +644,11 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result)
{
double_int off
= double_int_add (tree_to_double_int (this_offset),
- double_int_sdiv
+ double_int_rshift
(tree_to_double_int (bit_offset),
- uhwi_to_double_int (BITS_PER_UNIT),
- TRUNC_DIV_EXPR));
+ BITS_PER_UNIT == 8
+ ? 3 : exact_log2 (BITS_PER_UNIT),
+ HOST_BITS_PER_DOUBLE_INT, true));
if (double_int_fits_in_shwi_p (off))
temp.off = off.low;
}