rs6000: clz/ctz/ffs improvement (PR78683)
On CPUs that implement popcnt[wd] but not cnttz[wd] we can do better for the ctz sequences than we do today. CL[TZ]_DEFINED_VALUE_AT_ZERO can return 2, since we always return the same fixed value (only dependent on TARGET_* options). PR target/78683 * config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Use GET_MODE_BITSIZE. Return 2. (CTZ_DEFINED_VALUE_AT_ZERO): Use GET_MODE_BITSIZE. Return 2. Handle TARGET_POPCNTD the same as TARGET_CTZ. * config/rs6000/rs6000.md (ctz<mode>2): Reimplement. (ffs<mode>2): Reimplement. From-SVN: r243499
Showing
Please
register
or
sign in
to comment