summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorMichael Kuperstein <michael.m.kuperstein@intel.com>2015-11-04 11:17:53 +0000
committerMichael Kuperstein <michael.m.kuperstein@intel.com>2015-11-04 11:17:53 +0000
commitb34de72269ee8bd92917465328c17aa7ece9f581 (patch)
tree8ee149e1402766b8c74b7a6ca84849d24069cb97 /llvm/test/CodeGen
parent3d7d92283274d835463d35829c3e6523f153612a (diff)
downloadbcm5719-llvm-b34de72269ee8bd92917465328c17aa7ece9f581.tar.gz
bcm5719-llvm-b34de72269ee8bd92917465328c17aa7ece9f581.zip
[X86] DAGCombine should not introduce FILD in soft-float mode
The x86 "sitofp i64 to double" dag combine, in 32-bit mode, lowers sitofp directly to X86ISD::FILD (or FILD_FLAG). This should not be done in soft-float mode. llvm-svn: 252042
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/soft-sitofp.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/soft-sitofp.ll b/llvm/test/CodeGen/X86/soft-sitofp.ll
new file mode 100644
index 00000000000..da26c7f7641
--- /dev/null
+++ b/llvm/test/CodeGen/X86/soft-sitofp.ll
@@ -0,0 +1,15 @@
+; RUN: llc < %s | FileCheck %s
+
+target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
+target triple = "i386-pc-linux"
+
+; Function Attrs: nounwind
+; CHECK-LABEL: ll_to_d:
+; CHECK: calll __floatdidf
+define double @ll_to_d(i64 %n) #0 {
+entry:
+ %conv = sitofp i64 %n to double
+ ret double %conv
+}
+
+attributes #0 = { nounwind "use-soft-float"="true" }
OpenPOWER on IntegriCloud