aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMInstrVFP.td
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-06-21 06:10:00 +0000
committerLang Hames <lhames@gmail.com>2012-06-21 06:10:00 +0000
commitdc13d2ed2feb3fd9d4953a1dd49d6a93d6867bc5 (patch)
tree76a4b70def807ded900f6922d487b0f2012ef634 /lib/Target/ARM/ARMInstrVFP.td
parent1d4e62878e188704e4c599d50b4e3679a8189567 (diff)
downloadexternal_llvm-dc13d2ed2feb3fd9d4953a1dd49d6a93d6867bc5.zip
external_llvm-dc13d2ed2feb3fd9d4953a1dd49d6a93d6867bc5.tar.gz
external_llvm-dc13d2ed2feb3fd9d4953a1dd49d6a93d6867bc5.tar.bz2
Add a missing llvm.fma -> VFNMS pattern to the ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrVFP.td')
-rw-r--r--lib/Target/ARM/ARMInstrVFP.td8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMInstrVFP.td b/lib/Target/ARM/ARMInstrVFP.td
index dccbffa..4e2cda4 100644
--- a/lib/Target/ARM/ARMInstrVFP.td
+++ b/lib/Target/ARM/ARMInstrVFP.td
@@ -1207,6 +1207,14 @@ def : Pat<(fsub_mlx (fmul_su SPR:$a, SPR:$b), SPR:$dstin),
Requires<[HasVFP4,DontUseNEONForFP,UseFusedMAC]>;
// Match @llvm.fma.* intrinsics
+
+// (fma x, y, (fneg z)) -> (vfnms z, x, y))
+def : Pat<(f64 (fma DPR:$Dn, DPR:$Dm, (fneg DPR:$Ddin))),
+ (VFNMSD DPR:$Ddin, DPR:$Dn, DPR:$Dm)>,
+ Requires<[HasVFP4]>;
+def : Pat<(f32 (fma SPR:$Sn, SPR:$Sm, (fneg SPR:$Sdin))),
+ (VFNMSS SPR:$Sdin, SPR:$Sn, SPR:$Sm)>,
+ Requires<[HasVFP4]>;
// (fneg (fma (fneg x), y, z)) -> (vfnms z, x, y)
def : Pat<(fneg (f64 (fma (fneg DPR:$Dn), DPR:$Dm, DPR:$Ddin))),
(VFNMSD DPR:$Ddin, DPR:$Dn, DPR:$Dm)>,