This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix NEON being enabled with soft-float
AbandonedPublic

Authored by aemerson on Feb 11 2014, 2:45 AM.

Details

Reviewers
None
Summary

Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex-A53/A57.

This was caused by r200708 which enabled the crypto feature for these cores.

Diff Detail

Event Timeline

Will this flag also appear in AArch32 command lines?

lib/Driver/Tools.cpp
728

I'd have thought that crypto would be disabled by default without the need of a flag...

Not sure what you mean? This isn't a front-end flag, just ensuring that we explicitly disable a subtarget feature from within the driver.

Amara

Wouldn't getARMTargetFeatures() be called for both targets? If you call clang with -target arm and no neon, would that also add -crypto to it?

Maybe having a check on an ARM test earlier would make things clearer (like CHECK-NOT: -crypto).

Hi Amara, Renato,

Amara asked me to take a look at this too - it looks fine. The addition of
-crypto should be a noop if crypto was disabled already, and will disable it
if it would be automatically enabled in LLVM (outside the scope of the clang
driver).

Renato, could you explain your objections a little more please? I'm not sure
I fully understand.

Cheers,
James

-----Original Message-----
From: cfe-commits-bounces@cs.uiuc.edu [mailto:cfe-commits-
bounces@cs.uiuc.edu] On Behalf Of Renato Golin
Sent: 11 February 2014 12:37
To: t.p.northover@gmail.com; Amara Emerson
Cc: cfe-commits@cs.uiuc.edu
Subject: Re: [PATCH] [ARM] Fix NEON being enabled with soft-float

Wouldn't getARMTargetFeatures() be called for both targets? If you call

clang with -target arm and no neon, would that also add -crypto to it?

Maybe having a check on an ARM test earlier would make things clearer

(like CHECK-NOT: -crypto).

http://llvm-reviews.chandlerc.com/D2736


cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Ah I see, I get where you're coming from. But -soft-float should be a very rarely used option I think (as it disables VFP and NEON), so I personally don't think this is much of an issue.

Cheers,

James

-----Original Message-----
From: Renato Golin [mailto:renato.golin@linaro.org]
Sent: 12 February 2014 09:41
To: reviews+D2736+public+9caa4a6cdf1a6c5a@llvm-reviews.chandlerc.com
Cc: James Molloy
Subject: Re: [PATCH] [ARM] Fix NEON being enabled with soft-float

LGTM, then.

--renato

Thanks guys, r201223.

Amara

aemerson abandoned this revision.Jul 6 2017, 11:01 AM
aemerson removed a reviewer: t.p.northover.
aemerson removed subscribers: jmolloy, rengolin, cfe-commits.