diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2015-08-19 15:09:38 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-08-19 15:09:38 +0000 |
commit | 8d55c61ba84df5753cad7e04cabaed0f11af76b5 (patch) | |
tree | 274980cf571a9e822ff50c5d0d9f38005e4918a8 /gcc | |
parent | 474b0f70a867afda61d0f83de614bf6c6fff5424 (diff) | |
download | gcc-8d55c61ba84df5753cad7e04cabaed0f11af76b5.zip gcc-8d55c61ba84df5753cad7e04cabaed0f11af76b5.tar.gz gcc-8d55c61ba84df5753cad7e04cabaed0f11af76b5.tar.bz2 |
[AArch64] Use popcount_hwi instead of homebrew version
* config/aarch64/aarch64.c (bit_count): Delete prototype
and definition.
(aarch64_print_operand): Use popcount_hwi instead of the above.
From-SVN: r227012
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 16 |
2 files changed, 7 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8357979..9ef8497 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2015-08-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + * config/aarch64/aarch64.c (bit_count): Delete prototype + and definition. + (aarch64_print_operand): Use popcount_hwi instead of the above. + +2015-08-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + * config/aarch64/aarch64-option-extensions.def: Delete obsolete comment. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 0f3be3c..382be2c 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -150,7 +150,6 @@ static void aarch64_elf_asm_constructor (rtx, int) ATTRIBUTE_UNUSED; static void aarch64_elf_asm_destructor (rtx, int) ATTRIBUTE_UNUSED; static void aarch64_override_options_after_change (void); static bool aarch64_vector_mode_supported_p (machine_mode); -static unsigned bit_count (unsigned HOST_WIDE_INT); static bool aarch64_vectorize_vec_perm_const_ok (machine_mode vmode, const unsigned char *sel); static int aarch64_address_cost (rtx, machine_mode, addr_space_t, bool); @@ -4163,19 +4162,6 @@ aarch64_const_vec_all_same_int_p (rtx x, HOST_WIDE_INT val) return aarch64_const_vec_all_same_in_range_p (x, val, val); } -static unsigned -bit_count (unsigned HOST_WIDE_INT value) -{ - unsigned count = 0; - - while (value) - { - count++; - value &= value - 1; - } - - return count; -} /* N Z C V. */ #define AARCH64_CC_V 1 @@ -4330,7 +4316,7 @@ aarch64_print_operand (FILE *f, rtx x, char code) return; } - asm_fprintf (f, "%u", bit_count (INTVAL (x))); + asm_fprintf (f, "%u", popcount_hwi (INTVAL (x))); break; case 'H': |