From b828bb2a15c00204514d7a9585ffe743d8858237 Mon Sep 17 00:00:00 2001 From: Bernard Ogden Date: Fri, 17 Aug 2018 11:29:49 +0000 Subject: [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 --- llvm/lib/Support/TargetParser.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/Support/TargetParser.cpp') diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp index 2c167a4..1e12683 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) -- cgit v1.1