[Bug tree-optimization/107342] Optimization opportunity where integer '/' corresponds to '>>'

aldyh at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 21 19:10:37 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107342

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Created attachment 53749
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53749&action=edit
untested patch

I'm sure somebody smarter could handle other shift amounts that are not powers
of 2, but this seems to do the trick for the test case. DOM2 does the threading
and DOM3 will remove the second call to foo4b.


More information about the Gcc-bugs mailing list