]> granicus.if.org Git - clang/commit
[Driver,ARM] Make -mfloat-abi=soft turn off MVE.
authorSimon Tatham <simon.tatham@arm.com>
Wed, 16 Oct 2019 13:23:39 +0000 (13:23 +0000)
committerSimon Tatham <simon.tatham@arm.com>
Wed, 16 Oct 2019 13:23:39 +0000 (13:23 +0000)
commitd87cdd38be750b613bb8c68174e4eaca23a6084a
tree9b45e941b9eef678761e1b85c06b121c78537864
parentd57d5c1b579d21196a502b86a40f0ace42545d29
[Driver,ARM] Make -mfloat-abi=soft turn off MVE.

Since `-mfloat-abi=soft` is taken to mean turning off all uses of the
FP registers, it should turn off the MVE vector instructions as well
as NEON and scalar FP. But it wasn't doing so.

So the options `-march=armv8.1-m.main+mve.fp+fp.dp -mfloat-abi=soft`
would cause the underlying LLVM to //not// support MVE (because it
knows the real target feature relationships and turned off MVE when
the `fpregs` feature was removed), but the clang layer still thought
it //was// supported, and would misleadingly define the feature macro
`__ARM_FEATURE_MVE`.

The ARM driver code already has a long list of feature names to turn
off when `-mfloat-abi=soft` is selected. The fix is to add the missing
entries `mve` and `mve.fp` to that list.

Reviewers: dmgreen

Subscribers: kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69025

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375001 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains/Arch/ARM.cpp
test/Driver/arm-mfpu.c