[all-commits] [llvm/llvm-project] 74cdb8: [llvm][ARM] Emit MVE .arch_extension after .fpu di...
simpal01 via All-commits
all-commits at lists.llvm.org
Wed Nov 22 01:17:14 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 74cdb8e6f8c88b97204f540601a553b412d1cd56
https://github.com/llvm/llvm-project/commit/74cdb8e6f8c88b97204f540601a553b412d1cd56
Author: simpal01 <55694978+simpal01 at users.noreply.github.com>
Date: 2023-11-22 (Wed, 22 Nov 2023)
Changed paths:
M llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
M llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
A llvm/test/CodeGen/ARM/arm-v8.1m-check-mve-extension.ll
A llvm/test/MC/ARM/arm-v8.1m-check-mve-extension.s
Log Message:
-----------
[llvm][ARM] Emit MVE .arch_extension after .fpu directive if it does not include MVE features (#71545)
The floating-point and MVE features together specify the MVE
functionality that is supported on the Cortex-M85 processor. But the FPU
extension for the underlying architecture(armv8.1-m.main) is FPV5 which
does not include MVE-F. So Compiler's -S output and `-save-temps=obj`
loses MVE feature which leads to assembler error. What happening here is
.fpu directive overrides any previously set features by .cpu directive.
Since the the corresponding .fpu generated (.fpu fpv5-d16) does not
include MVE-F, it overrides those features even though it is supported
and set by the .cpu directive. Looks like .fpu is supposed to do this.
In this case, there should be an .arch_extension directive re-enabling
the relevant extensions after .fpu if the goal is to keep these
extensions enabled. GCC also does the same.
So this patch enables the MVE features by emitting the below arch
extension:
.fpu fpv5-d16
.arch_extension mve.fp
---------
Co-authored-by: Simi Pallipurath <simi.pallipurath.com>
More information about the All-commits
mailing list