summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-04-11 01:21:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-04-11 01:21:25 +0000
commit67a09fc397b9185c082c381e8885fd81a7bac838 (patch)
treec50d52ab4fc8a0d45df22c441b14bc1de73aa8f8 /llvm/lib
parent74c282b5effdd3c717a454074866cce27f984f96 (diff)
downloadbcm5719-llvm-67a09fc397b9185c082c381e8885fd81a7bac838.tar.gz
bcm5719-llvm-67a09fc397b9185c082c381e8885fd81a7bac838.zip
Match (fneg (fma) to vfnma. rdar://10139676
llvm-svn: 154469
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMInstrVFP.td8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrVFP.td b/llvm/lib/Target/ARM/ARMInstrVFP.td
index a9ad4fa4ec4..1b0d58784dd 100644
--- a/llvm/lib/Target/ARM/ARMInstrVFP.td
+++ b/llvm/lib/Target/ARM/ARMInstrVFP.td
@@ -1140,6 +1140,14 @@ def : Pat<(fsub_mlx (fneg (fmul_su SPR:$a, SPR:$b)), SPR:$dstin),
(VFNMAS SPR:$dstin, SPR:$a, SPR:$b)>,
Requires<[HasVFP4,DontUseNEONForFP,FPContractions]>;
+// Match @llvm.fma.* intrinsics
+def : Pat<(fneg (fma (f64 DPR:$Ddin), (f64 DPR:$Dn), (f64 DPR:$Dm))),
+ (VFNMAD DPR:$Ddin, DPR:$Dn, DPR:$Dm)>,
+ Requires<[HasVFP4]>;
+def : Pat<(fneg (fma (f32 SPR:$Sdin), (f32 SPR:$Sn), (f32 SPR:$Sm))),
+ (VFNMAS SPR:$Sdin, SPR:$Sn, SPR:$Sm)>,
+ Requires<[HasVFP4]>;
+
def VFNMSD : ADbI<0b11101, 0b01, 0, 0,
(outs DPR:$Dd), (ins DPR:$Ddin, DPR:$Dn, DPR:$Dm),
IIC_fpFMAC64, "vfnms", ".f64\t$Dd, $Dn, $Dm",
OpenPOWER on IntegriCloud