Hi Ramana,

On 19/05/16 14:36, Ramana Radhakrishnan wrote:
On 11/05/16 15:32, Kyrill Tkachov wrote:
Hi all,

In this PR a NEON builtin is introduced during SLP vectorisation even when NEON 
is not available
because arm_builtin_vectorized_function is missing an appropriate check in the 
BSWAP handling code.

Then during expand when we try to expand the NEON builtin the code in 
arm_expand_neon_builtin rightly
throws an error telling the user to enable NEON, even though the testcase 
doesn't use any intrinsics.

This patch fixes the bug by bailing out early if !TARGET_NEON. This allows us 
to remove a redundant
TARGET_NEON check further down in the function as well.

Bootstrapped and tested on arm-none-linux-gnueabihf.
Ok for trunk?

This appears on GCC 6 as well.
On older branches the test failure doesn't trigger but the logic looks buggy 
anyway.
Ok for the branches as well if testing is clean?

Thanks,
Kyrill

2016-05-11  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

     PR target/71056
     * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Return
     NULL_TREE early if NEON is not available.  Remove now redundant check
     in ARM_CHECK_BUILTIN_MODE.

2016-05-11  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

     PR target/71056
     * gcc.target/arm/pr71056.c: New test.
OK. LGTM - please apply if no regressions and backport onto GCC 6 after the 
auto-testers have let this bake on trunk for a little while.

I'd rather not apply it to the release branches unless we can trigger it there 
but it maybe newer logic in the bswap pass that detects this.

Thanks, the patch has been in trunk for a week without any complaints.
I'll apply it to GCC 6 next week.
As for the other branches, the logic in arm_builtin_vectorized_function there 
looks vulnerable
as well, but I haven't been able to trigger this there.
I think this needs certain combinations of bswap and SLP vectorisation 
improvements to trigger.
I've tried writing a few testcases manually to trigger this but was not able to.
I'm happy to not apply this to the other branches unless we get a bug report 
about it.

Thanks for the review,
Kyrill



regards
Ramana

Reply via email to