On Mon, Jul 13, 2015 at 12:17 AM, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > - for -O2 temps introduced by peephole2 due to define_peephole2 > pattern in thumb2.md:1540 > http://pastebin.com/3rEF8Te4 > So this intentionally transforms rtx from > zeroextractsi_compare0_scratch to rtx from shiftsi3_compare0_scratch. > Why is it beneficial to do this transform ?
I used svn blame to find the revision where the pattern was added, then svn log to get the changelog entry and date from that revision, and searching the gcc-patches mailing list on that date I found this https://gcc.gnu.org/ml/gcc-patches/2010-06/msg02518.html It doesn't explain much, but refers to an earlier change, so I did a google search for thumb2_tlobits_cbranch to find when this pattern was added, and that gives me https://gcc.gnu.org/ml/gcc-patches/2010-05/msg00003.html which refers to bug 42879 which has the explanation we want https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42879 tst is a 32-bit thumb2 instruction, but lsls is a 16-bit instruction, so it is a minor size optimization. Jim _______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-toolchain