diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-23 14:46:35 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-23 14:46:35 +0000 |
commit | 885a26948e348571c7236f6356b7757b730e1b14 (patch) | |
tree | 245545697f281f0a40d4eb7de7e709711d91bb19 /gcc/tree-dfa.c | |
parent | 265815a249c2e0481564e204fd90270e1fbea8fd (diff) | |
download | gcc-885a26948e348571c7236f6356b7757b730e1b14.tar.gz |
Use LOG2_BITS_PER_UNIT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@209700 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-dfa.c')
-rw-r--r-- | gcc/tree-dfa.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index 312931babc4..77f3cc0a98d 100644 --- a/gcc/tree-dfa.c +++ b/gcc/tree-dfa.c @@ -463,10 +463,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset, { offset_int tem = (wi::to_offset (ssize) - wi::to_offset (fsize)); - if (BITS_PER_UNIT == 8) - tem = wi::lshift (tem, 3); - else - tem *= BITS_PER_UNIT; + tem = wi::lshift (tem, LOG2_BITS_PER_UNIT); tem -= woffset; maxsize += tem; } @@ -583,8 +580,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset, else { offset_int off = mem_ref_offset (exp); - off = wi::lshift (off, (BITS_PER_UNIT == 8 - ? 3 : exact_log2 (BITS_PER_UNIT))); + off = wi::lshift (off, LOG2_BITS_PER_UNIT); off += bit_offset; if (wi::fits_shwi_p (off)) { |