Hi Andrea, Sorry for the delay
> -----Original Message----- > From: Gcc-patches <gcc-patches-boun...@gcc.gnu.org> On Behalf Of > Andrea Corallo > Sent: 24 June 2020 11:04 > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw <richard.earns...@arm.com>; nd <n...@arm.com>; > Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> > Subject: Re: [PATCH v4] arm: Implement Armv8.1-M low overhead loops > > Andrea Corallo <andrea.cora...@arm.com> writes: > > > Hi all, > > > > here the latest version of the patch to enable Armv8.1-M Mainline > > LOB (low overhead branch) extension low overhead loops (LOL) feature > > using the 'loop-doloop' pass. > > > > I posted a previous version of it during stage 4. > > > > Given the following function: > > > > void > > loop (int *a) > > { > > for (int i = 0; i < 1000; i++) > > a[i] = i; > > } > > > > 'doloop_begin' and 'doloop_end' patterns translates into 'dls' and 'le' > > giving: > > > > loop: > > movw r2, #10000 > > movs r3, #0 > > subs r0, r0, #4 > > push {lr} > > dls lr, r2 > > .L2: > > str r3, [r0, #4]! > > adds r3, r3, #1 > > le lr, .L2 > > ldr pc, [sp], #4 > > > > bootstrapped arm-none-linux-gnueabihf, does not introduce testsuite > regressions. > > > > Andrea > > Hi, > > double checking I spotted another test impacted by the patch that I > missed as first. > > Here the updated patch waving the check. > > Andrea > > gcc/ChangeLog > > 2020-06-18 Andrea Corallo <andrea.cora...@arm.com> > Mihail-Calin Ionescu <mihail.ione...@arm.com> > Iain Apreotesei <iain.apreote...@arm.com> > > * config/arm/arm-protos.h (arm_target_insn_ok_for_lob): New > prototype. > * config/arm/arm.c (TARGET_INVALID_WITHIN_DOLOOP): Define. > (arm_invalid_within_doloop): Implement invalid_within_doloop hook. > (arm_target_insn_ok_for_lob): New function. > * config/arm/arm.h (TARGET_HAVE_LOB): Define macro. > * config/arm/thumb2.md (*doloop_end_internal, doloop_begin) > (dls_insn): Add new patterns. > (doloop_end): Modify to select LR when LOB is available. > * config/arm/unspecs.md: Add new unspec. > * doc/sourcebuild.texi (arm_v8_1_lob_ok) > (arm_thumb2_ok_no_arm_v8_1_lob): Document new target > supports > options. > > gcc/testsuite/ChangeLog > > 2020-06-18 Andrea Corallo <andrea.cora...@arm.com> > Mihail-Calin Ionescu <mihail.ione...@arm.com> > Iain Apreotesei <iain.apreote...@arm.com> > > * gcc.target/arm/lob.h: New header. > * gcc.target/arm/lob1.c: New testcase. > * gcc.target/arm/lob2.c: Likewise. > * gcc.target/arm/lob3.c: Likewise. > * gcc.target/arm/lob4.c: Likewise. > * gcc.target/arm/lob5.c: Likewise. > * gcc.target/arm/lob6.c: Likewise. > * gcc.target/arm/unsigned-extend-2.c: Do not run when generating > low loop overhead. > * gcc.target/arm/ivopts.c: Fix check for low loop overhead. > * lib/target-supports.exp (check_effective_target_arm_v8_1_lob) > (check_effective_target_arm_thumb2_ok_no_arm_v8_1_lob): New > procs. Ok. Thanks for doing this. Kyrill