This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC [2/3] divmod transform v2 - override expand_divmod_libfunc for ARM port
- From: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- To: Prathamesh Kulkarni <prathamesh dot kulkarni at linaro dot org>, gcc Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>, Kugan <kugan dot vivekanandarajah at linaro dot org>, Jim Wilson <jim dot wilson at linaro dot org>, Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- Date: Wed, 26 Oct 2016 14:21:59 +0100
- Subject: Re: RFC [2/3] divmod transform v2 - override expand_divmod_libfunc for ARM port
- Authentication-results: sourceware.org; auth=none
- References: <CAAgBjMnE8Ek5=bK=i5gHvfZMBX94v5BjVF+=+rDKEY9iseLmFg@mail.gmail.com>
On 16/10/16 07:00, Prathamesh Kulkarni wrote:
Hi,
This patch overrides expand_divmod_libfunc hook for ARM port.
I separated the SImode tests into separate file from DImode tests
because certain arm configs (cortex-15) have hardware div insn for
SImode but not for DImode, and for that config we want SImode tests to
be disabled but not DImode tests. The patch therefore has two
target-effective checks: divmod and divmod_simode.
Cross-tested on arm*-*-*.
OK to commit ?
Looks ok to me, the implementation of the hook is straightforward though
I have a question.
arm_expand_divmod_libfunc is not supposed to ever be called for SImode TARGET_IDIV.
It asserts it rather than just failing the expansion in some way.
How does the midend know not to call TARGET_EXPAND_DIVMOD_LIBFUNC in that case, does it
just check if the relevant sdiv optab is not available?
If so, this is ok for trunk assuming a bootstrap and test run on arm-none-linux-gnueabihf
shows no issues. Would be good to try one for --with-cpu=cortex-a15 and one with a !TARGET_IDIV
target, say --with-cpu=cortex-a9.
Sorry for the delay.
Thanks,
Kyrill
Thanks,
Prathamesh