diff options
author | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2024-05-07 14:12:55 +0200 |
---|---|---|
committer | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2024-05-07 14:12:55 +0200 |
commit | e1f56c67a82172730c377a96a46e8d75445e6a48 (patch) | |
tree | 6bf3284e0a191f3412644b06872a67d682c484ad /gcc/gimple-range-path.cc | |
parent | c69eda94f28384b7f30e2b40aebb097ef59e522f (diff) | |
download | gcc-e1f56c67a82172730c377a96a46e8d75445e6a48.zip gcc-e1f56c67a82172730c377a96a46e8d75445e6a48.tar.gz gcc-e1f56c67a82172730c377a96a46e8d75445e6a48.tar.bz2 |
tree-optimization/110490 - bitcount for narrow modes
Bitcount operations popcount, clz, and ctz are emulated for narrow modes
in case an operation is only supported for wider modes. Beside that ctz
may be emulated via clz in expand_ctz. Reflect this in
expression_expensive_p.
I considered the emulation of ctz via clz as not expensive since this
basically reduces to ctz (x) = c - (clz (x & ~x)) where c is the mode
precision minus 1 which should be faster than a loop.
gcc/ChangeLog:
PR tree-optimization/110490
* tree-scalar-evolution.cc (expression_expensive_p): Also
consider mode widening for popcount, clz, and ctz.
Diffstat (limited to 'gcc/gimple-range-path.cc')
0 files changed, 0 insertions, 0 deletions