https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54089
--- Comment #73 from Alexander Klepikov <klepikov.alex+bugs at gmail dot com> --- I had to check everything a few more times because I found a bug in my patch that caused the long shifts to expand incorrectly. I added a test that checks correct shifts expansion in this regard. I also managed to make a test that verifies hoisting. It can be done with 'scan-assembler' command and regexp. If you're interested, there's more powerful command 'check-function-bodies', but it looks like it works only when C++ cross compiler is built, so I decided to leave the regexp.