https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67295
--- Comment #2 from ktkachov at gcc dot gnu.org --- (In reply to Alexandre Oliva from comment #1) > I get exactly the same code with r226900, before the copyrename patch: > > cmp r1, #0 > rev16ne r0, r0 > uxthne r0, r0 > .L2: > sxth r0, r0 > b foos16 > > Did you use any other configuration flags or compiler options or assembler > version or something to get you the better-optimized code? Hmmm, I double checked, and with r226900 before the patch I definitely get: cmp r1, #0 revshne r0, r0 .L2: b foos16 The options are just -O2 -S. It is an arm-none-eabi toolchain (with newlib as the C-library) and the relevant configure options I can think of are: --disable-shared --disable-nls --disable-threads --disable-tls --enable-checking=yes --enable-languages=c,c++,fortran --with-newlib --with-fpu=neon-fp-armv8 --with-arch=armv8-a --without-isl