https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95685
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- With -funroll-loops on the trunk for the aarch64 target, I get no loop any more: bar and seems like good code: .LFB0: .cfi_startproc and w1, w1, 65535 mov w2, 8193 tst w0, 2 eor w3, w1, w2 csel w4, w1, w3, eq tst w0, 4 eor w5, w4, w2 and w6, w5, 65535 csel w7, w6, w4, ne tst w0, 8 eor w0, w7, w2 and w8, w0, 65535 csel w0, w8, w7, ne ret Oh I recongize this loop too, it is from coremark.