From: Javed Absar Date: Mon, 29 Jun 2015 09:30:19 +0000 (+0000) Subject: [ARM]: Extend -mfpu options for half-precision and vfpv3xd X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb891808c667d281e605846dcf8acb16c6ef59e5;p=clang [ARM]: Extend -mfpu options for half-precision and vfpv3xd Some of the the permissible ARM -mfpu options, which are supported in GCC, are currently not present in llvm/clang.This patch adds the options: 'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16. These are related to half-precision floating-point and single precision. Reviewers: rengolin, ranjeet.singh Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10764 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240929 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/arm-mfpu.c b/test/Driver/arm-mfpu.c index 8439cddf9d..93fb0a8eb4 100644 --- a/test/Driver/arm-mfpu.c +++ b/test/Driver/arm-mfpu.c @@ -34,6 +34,17 @@ // CHECK-VFP3: "-target-feature" "-fp-armv8" // CHECK-VFP3: "-target-feature" "-neon" +// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-fp16 %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP3-FP16 %s +// CHECK-VFP3-FP16: "-target-feature" "-fp-only-sp" +// CHECK-VFP3-FP16: "-target-feature" "-d16" +// CHECK-VFP3-FP16: "-target-feature" "+vfp3" +// CHECK-VFP3-FP16: "-target-feature" "+fp16" +// CHECK-VFP3-FP16: "-target-feature" "-vfp4" +// CHECK-VFP3-FP16: "-target-feature" "-fp-armv8" +// CHECK-VFP3-FP16: "-target-feature" "-neon" +// CHECK-VFP3-FP16: "-target-feature" "-crypto" + // RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \ @@ -45,6 +56,39 @@ // CHECK-VFP3-D16: "-target-feature" "-fp-armv8" // CHECK-VFP3-D16: "-target-feature" "-neon" +// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16-fp16 %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16-FP16 %s +// CHECK-VFP3-D16-FP16: "-target-feature" "-fp-only-sp" +// CHECK-VFP3-D16-FP16: "-target-feature" "+d16" +// CHECK-VFP3-D16-FP16: "-target-feature" "+vfp3" +// CHECK-VFP3-D16-FP16: "-target-feature" "+fp16" +// CHECK-VFP3-D16-FP16: "-target-feature" "-vfp4" +// CHECK-VFP3-D16-FP16: "-target-feature" "-fp-armv8" +// CHECK-VFP3-D16-FP16: "-target-feature" "-neon" +// CHECK-VFP3-D16-FP16: "-target-feature" "-crypto" + +// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP3XD %s +// CHECK-VFP3XD: "-target-feature" "+fp-only-sp" +// CHECK-VFP3XD: "-target-feature" "+d16" +// CHECK-VFP3XD: "-target-feature" "+vfp3" +// CHECK-VFP3XD: "-target-feature" "-fp16" +// CHECK-VFP3XD: "-target-feature" "-vfp4" +// CHECK-VFP3XD: "-target-feature" "-fp-armv8" +// CHECK-VFP3XD: "-target-feature" "-neon" +// CHECK-VFP3XD: "-target-feature" "-crypto" + +// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd-fp16 %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP3XD-FP16 %s +// CHECK-VFP3XD-FP16: "-target-feature" "+fp-only-sp" +// CHECK-VFP3XD-FP16: "-target-feature" "+d16" +// CHECK-VFP3XD-FP16: "-target-feature" "+vfp3" +// CHECK-VFP3XD-FP16: "-target-feature" "+fp16" +// CHECK-VFP3XD-FP16: "-target-feature" "-vfp4" +// CHECK-VFP3XD-FP16: "-target-feature" "-fp-armv8" +// CHECK-VFP3XD-FP16: "-target-feature" "-neon" +// CHECK-VFP3XD-FP16: "-target-feature" "-crypto" + // RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-VFP4 %s // RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 %s -### -o %t.o 2>&1 \ @@ -97,6 +141,17 @@ // RUN: | FileCheck --check-prefix=CHECK-NEON %s // CHECK-NEON: "-target-feature" "+neon" +// RUN: %clang -target arm-linux-eabi -mfpu=neon-fp16 %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NEON-FP16 %s +// CHECK-NEON-FP16: "-target-feature" "-fp-only-sp" +// CHECK-NEON-FP16: "-target-feature" "-d16" +// CHECK-NEON-FP16: "-target-feature" "+vfp3" +// CHECK-NEON-FP16: "-target-feature" "+fp16" +// CHECK-NEON-FP16: "-target-feature" "-vfp4" +// CHECK-NEON-FP16: "-target-feature" "-fp-armv8" +// CHECK-NEON-FP16: "-target-feature" "+neon" +// CHECK-NEON-FP16: "-target-feature" "-crypto" + // RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 %s -### -o %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV3 %s // CHECK-NEON-VFPV3: "-target-feature" "+neon"