diff options
author | Bernard Ogden <bogden@arm.com> | 2018-08-17 11:29:49 +0000 |
---|---|---|
committer | Bernard Ogden <bogden@arm.com> | 2018-08-17 11:29:49 +0000 |
commit | b828bb2a15c00204514d7a9585ffe743d8858237 (patch) | |
tree | 5611815c44aad414271d169a6f10e0f162ab571d /llvm/lib/Support/TargetParser.cpp | |
parent | 6cb07d2bedb9125c317dc13962b0341a4667ba3b (diff) | |
download | bcm5719-llvm-b828bb2a15c00204514d7a9585ffe743d8858237.tar.gz bcm5719-llvm-b828bb2a15c00204514d7a9585ffe743d8858237.zip |
[ARM/AArch64] Support FP16 +fp16fml instructions
Add +fp16fml feature for new FP16 instructions, which are a
mandatory part of FP16 from v8.4-A and an optional part of FP16
from v8.2-A. It doesn't seem to be possible to model this in
LLVM, but the relationship between the options is handled by
the related clang patch.
In keeping with what I think is the usual practice, the fp16fml
extension is accepted regardless of base architecture version.
Builds on/replaces Sjoerd Meijer's patch to add these instructions at
https://reviews.llvm.org/D49839.
Differential Revision: https://reviews.llvm.org/D50228
llvm-svn: 340013
Diffstat (limited to 'llvm/lib/Support/TargetParser.cpp')
-rw-r--r-- | llvm/lib/Support/TargetParser.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp index 2c167a4d086..1e12683f500 100644 --- a/llvm/lib/Support/TargetParser.cpp +++ b/llvm/lib/Support/TargetParser.cpp @@ -234,6 +234,11 @@ bool llvm::ARM::getExtensionFeatures(unsigned Extensions, else Features.push_back("-dsp"); + if (Extensions & ARM::AEK_FP16FML) + Features.push_back("+fp16fml"); + else + Features.push_back("-fp16fml"); + if (Extensions & ARM::AEK_RAS) Features.push_back("+ras"); else @@ -460,6 +465,8 @@ bool llvm::AArch64::getExtensionFeatures(unsigned Extensions, Features.push_back("+crypto"); if (Extensions & AArch64::AEK_DOTPROD) Features.push_back("+dotprod"); + if (Extensions & AArch64::AEK_FP16FML) + Features.push_back("+fp16fml"); if (Extensions & AArch64::AEK_FP16) Features.push_back("+fullfp16"); if (Extensions & AArch64::AEK_PROFILE) |