https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103
Uroš Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |middle-end --- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Richard Biener from comment #2) > There isn't a find-last-set builtin thus this is a target (or RTL > optimization) issue. I believe find-last-set is also computed by ffs (x & > -x) so that might be a more canonical way to express this on GIMPLE? Please try with -mlzcnt that expands the builtin to a single insn. But looking at a _t.optimized dump the RTL/target backend just expands what tree optimizers push to the backend. Probably a __builtin_fls needs to be introduced, to enable middle-end to fold these constructs. This is a middle-end issue, backend can't do anything there...