diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2009-08-11 17:31:09 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2009-08-11 17:31:09 +0000 |
commit | 842e098c5ff56730b4d84d5560eb4053a12ebd61 (patch) | |
tree | 3685d54374ef0fee2a34f53968de7c8ccad1f008 /gcc/combine.c | |
parent | c53c2591f607409e311a2b319d95d17ea336a836 (diff) | |
download | gcc-842e098c5ff56730b4d84d5560eb4053a12ebd61.zip gcc-842e098c5ff56730b4d84d5560eb4053a12ebd61.tar.gz gcc-842e098c5ff56730b4d84d5560eb4053a12ebd61.tar.bz2 |
combine.c (try_widen_shift_mode): Factor out code to check if an integer constant is a low-order bitmask from here ...
* combine.c (try_widen_shift_mode): Factor out code to check if an
integer constant is a low-order bitmask from here ...
* rtlanal.c (low_bitmask_len): ... to here.
* rtl.h (low_bitmask_len): Declare.
From-SVN: r150656
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 3a2c412..faa7e0d 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -9027,13 +9027,9 @@ try_widen_shift_mode (enum rtx_code code, rtx op, int count, /* We can also widen if the bits brought in will be masked off. This operation is performed in ORIG_MODE. */ - if (outer_code == AND - && GET_MODE_BITSIZE (orig_mode) <= HOST_BITS_PER_WIDE_INT) + if (outer_code == AND) { - int care_bits; - - outer_const &= GET_MODE_MASK (orig_mode); - care_bits = exact_log2 (outer_const + 1); + int care_bits = low_bitmask_len (orig_mode, outer_const); if (care_bits >= 0 && GET_MODE_BITSIZE (orig_mode) - care_bits >= count) |