[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp ARMInstrVFP.td

Chris Lattner sabre at nondot.org
Wed May 2 17:32:17 PDT 2007



Changes in directory llvm/lib/Target/ARM:

ARMISelDAGToDAG.cpp updated: 1.110 -> 1.111
ARMInstrVFP.td updated: 1.1 -> 1.2
---
Log message:

match a reassociated form of fnmul.  This implements CodeGen/ARM/fnmul.ll


---
Diffs of the changes:  (+9 -2)

 ARMISelDAGToDAG.cpp |    1 +
 ARMInstrVFP.td      |   10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.110 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.111
--- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.110	Mon Mar 19 02:48:02 2007
+++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp	Wed May  2 19:32:00 2007
@@ -27,6 +27,7 @@
 #include "llvm/CodeGen/SelectionDAGISel.h"
 #include "llvm/CodeGen/SSARegMap.h"
 #include "llvm/Target/TargetLowering.h"
+#include "llvm/Target/TargetOptions.h"
 #include "llvm/Support/Debug.h"
 using namespace llvm;
 


Index: llvm/lib/Target/ARM/ARMInstrVFP.td
diff -u llvm/lib/Target/ARM/ARMInstrVFP.td:1.1 llvm/lib/Target/ARM/ARMInstrVFP.td:1.2
--- llvm/lib/Target/ARM/ARMInstrVFP.td:1.1	Fri Jan 19 01:51:42 2007
+++ llvm/lib/Target/ARM/ARMInstrVFP.td	Wed May  2 19:32:00 2007
@@ -139,8 +139,7 @@
 def FMULS  : ASI<(ops SPR:$dst, SPR:$a, SPR:$b),
                  "fmuls $dst, $a, $b",
                  [(set SPR:$dst, (fmul SPR:$a, SPR:$b))]>;
-
-
+                 
 def FNMULD  : ADI<(ops DPR:$dst, DPR:$a, DPR:$b),
                   "fnmuld $dst, $a, $b",
                   [(set DPR:$dst, (fneg (fmul DPR:$a, DPR:$b)))]>;
@@ -149,6 +148,13 @@
                   "fnmuls $dst, $a, $b",
                   [(set SPR:$dst, (fneg (fmul SPR:$a, SPR:$b)))]>;
 
+// Match reassociated forms only if not sign dependent rounding.
+def : Pat<(fmul (fneg DPR:$a), DPR:$b),
+          (FNMULD DPR:$a, DPR:$b)>, Requires<[NoHonorSignDependentRounding]>;
+def : Pat<(fmul (fneg SPR:$a), SPR:$b),
+          (FNMULS SPR:$a, SPR:$b)>, Requires<[NoHonorSignDependentRounding]>;
+
+
 def FSUBD  : ADI<(ops DPR:$dst, DPR:$a, DPR:$b),
                  "fsubd $dst, $a, $b",
                  [(set DPR:$dst, (fsub DPR:$a, DPR:$b))]>;






More information about the llvm-commits mailing list