summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-05-12 01:26:05 +0000
committerEric Christopher <echristo@gmail.com>2015-05-12 01:26:05 +0000
commit824f42f209c4b04d9f43e4b74dd601ced6409ff7 (patch)
treedb1a47b1f504331007c995d19256c06dd4df9a41 /llvm/test/CodeGen
parent8b33567189ea25fbdd454d9c4cc75cb2850a821f (diff)
downloadbcm5719-llvm-824f42f209c4b04d9f43e4b74dd601ced6409ff7.tar.gz
bcm5719-llvm-824f42f209c4b04d9f43e4b74dd601ced6409ff7.zip
Migrate existing backends that care about software floating point
to use the information in the module rather than TargetOptions. We've had and clang has used the use-soft-float attribute for some time now so have the backends set a subtarget feature based on a particular function now that subtargets are created based on functions and function attributes. For the one middle end soft float check go ahead and create an overloadable TargetLowering::useSoftFloat function that just checks the TargetSubtargetInfo in all cases. Also remove the command line option that hard codes whether or not soft-float is set by using the attribute for all of the target specific test cases - for the generic just go ahead and add the attribute in the one case that showed up. llvm-svn: 237079
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/ARM/vfp-libcalls.ll4
-rw-r--r--llvm/test/CodeGen/Generic/2009-03-29-SoftFloatVectorExtract.ll8
-rw-r--r--llvm/test/CodeGen/X86/cvt16.ll4
-rw-r--r--llvm/test/CodeGen/X86/floor-soft-float.ll4
-rw-r--r--llvm/test/CodeGen/X86/soft-fp.ll4
5 files changed, 14 insertions, 10 deletions
diff --git a/llvm/test/CodeGen/ARM/vfp-libcalls.ll b/llvm/test/CodeGen/ARM/vfp-libcalls.ll
index 9d4e194e90e..b08073ab62b 100644
--- a/llvm/test/CodeGen/ARM/vfp-libcalls.ll
+++ b/llvm/test/CodeGen/ARM/vfp-libcalls.ll
@@ -1,6 +1,6 @@
; RUN: llc -mtriple=armv6-apple-ios -mcpu=arm1136jf-s -o - %s | FileCheck %s --check-prefix=CHECK-HARD
; RUN: llc -mtriple=thumbv6-apple-ios -mcpu=arm1136jf-s -o - %s | FileCheck %s --check-prefix=CHECK-SOFTISH
-; RUN: llc -mtriple=armv7s-apple-ios -soft-float -mcpu=arm1136jf-s -o - %s | FileCheck %s --check-prefix=CHECK-SOFT
+; RUN: llc -mtriple=armv7s-apple-ios -mattr=+soft-float -mcpu=arm1136jf-s -o - %s | FileCheck %s --check-prefix=CHECK-SOFT
define float @test_call(float %a, float %b) {
; CHECK-HARD: vadd.f32 {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
@@ -8,4 +8,4 @@ define float @test_call(float %a, float %b) {
; CHECK-SOFT: bl ___addsf3{{$}}
%sum = fadd float %a, %b
ret float %sum
-} \ No newline at end of file
+}
diff --git a/llvm/test/CodeGen/Generic/2009-03-29-SoftFloatVectorExtract.ll b/llvm/test/CodeGen/Generic/2009-03-29-SoftFloatVectorExtract.ll
index c18e3c9009a..f614db00da4 100644
--- a/llvm/test/CodeGen/Generic/2009-03-29-SoftFloatVectorExtract.ll
+++ b/llvm/test/CodeGen/Generic/2009-03-29-SoftFloatVectorExtract.ll
@@ -1,10 +1,14 @@
-; RUN: llc < %s -soft-float
+; RUN: llc < %s
; PR3899
@m = external global <2 x double>
-define double @vector_ex() nounwind {
+define double @vector_ex() nounwind #0 {
%v = load <2 x double>, <2 x double>* @m
%x = extractelement <2 x double> %v, i32 1
ret double %x
}
+
+; Soft-float attribute so that targets that pay attention to soft float will
+; make floating point types illegal and we'll exercise the legalizer code.
+attributes #0 = { "use-soft-float" = "true" }
diff --git a/llvm/test/CodeGen/X86/cvt16.ll b/llvm/test/CodeGen/X86/cvt16.ll
index 9846da546e7..5ee399fc137 100644
--- a/llvm/test/CodeGen/X86/cvt16.ll
+++ b/llvm/test/CodeGen/X86/cvt16.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -march=x86-64 -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=-f16c | FileCheck %s -check-prefix=CHECK -check-prefix=LIBCALL
; RUN: llc < %s -march=x86-64 -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+f16c | FileCheck %s -check-prefix=CHECK -check-prefix=F16C
-; RUN: llc < %s -march=x86-64 -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -soft-float=1 -mattr=-f16c | FileCheck %s -check-prefix=CHECK -check-prefix=SOFTFLOAT
-; RUN: llc < %s -march=x86-64 -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -soft-float=1 -mattr=+f16c | FileCheck %s -check-prefix=CHECK -check-prefix=SOFTFLOAT
+; RUN: llc < %s -march=x86-64 -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=-f16c,+soft-float | FileCheck %s -check-prefix=CHECK -check-prefix=SOFTFLOAT
+; RUN: llc < %s -march=x86-64 -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+f16c,+soft-float | FileCheck %s -check-prefix=CHECK -check-prefix=SOFTFLOAT
; This is a test for float to half float conversions on x86-64.
;
diff --git a/llvm/test/CodeGen/X86/floor-soft-float.ll b/llvm/test/CodeGen/X86/floor-soft-float.ll
index 5644509a86f..7bb738513f5 100644
--- a/llvm/test/CodeGen/X86/floor-soft-float.ll
+++ b/llvm/test/CodeGen/X86/floor-soft-float.ll
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86-64 -mattr=+sse4.1,-avx -soft-float=0 | FileCheck %s --check-prefix=CHECK-HARD-FLOAT
-; RUN: llc < %s -march=x86-64 -mattr=+sse4.1,-avx -soft-float=1 | FileCheck %s --check-prefix=CHECK-SOFT-FLOAT
+; RUN: llc < %s -march=x86-64 -mattr=+sse4.1,-avx | FileCheck %s --check-prefix=CHECK-HARD-FLOAT
+; RUN: llc < %s -march=x86-64 -mattr=+sse4.1,-avx,+soft-float | FileCheck %s --check-prefix=CHECK-SOFT-FLOAT
target triple = "x86_64-unknown-linux-gnu"
diff --git a/llvm/test/CodeGen/X86/soft-fp.ll b/llvm/test/CodeGen/X86/soft-fp.ll
index 97219e4cd90..fa38d1044a4 100644
--- a/llvm/test/CodeGen/X86/soft-fp.ll
+++ b/llvm/test/CodeGen/X86/soft-fp.ll
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -soft-float | FileCheck %s
-; RUN: llc < %s -march=x86-64 -mattr=+sse2 -soft-float | FileCheck %s
+; RUN: llc < %s -march=x86 -mattr=+sse2,+soft-float | FileCheck %s
+; RUN: llc < %s -march=x86-64 -mattr=+sse2,+soft-float | FileCheck %s
; CHECK-NOT: xmm{[0-9]+}
OpenPOWER on IntegriCloud