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.