r240929 - [ARM]: Extend -mfpu options for half-precision and vfpv3xd

Javed Absar javed.absar at arm.com
Mon Jun 29 02:30:19 PDT 2015


Author: javed.absar
Date: Mon Jun 29 04:30:19 2015
New Revision: 240929

URL: http://llvm.org/viewvc/llvm-project?rev=240929&view=rev
Log:
[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


Modified:
    cfe/trunk/test/Driver/arm-mfpu.c

Modified: cfe/trunk/test/Driver/arm-mfpu.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-mfpu.c?rev=240929&r1=240928&r2=240929&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arm-mfpu.c (original)
+++ cfe/trunk/test/Driver/arm-mfpu.c Mon Jun 29 04:30:19 2015
@@ -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"





More information about the cfe-commits mailing list