summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2014-11-14 12:10:40 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2014-11-14 12:10:40 +0000
commit76746929611423cc2788b6c4e8251a4e94063c08 (patch)
treeaeeb0d52eba300c29200513a8bbaa9cf4c7d7e66 /llvm/lib/Target
parentc98a8fccf7ae165041d4cfd27a398960e66d839a (diff)
downloadbcm5719-llvm-76746929611423cc2788b6c4e8251a4e94063c08.tar.gz
bcm5719-llvm-76746929611423cc2788b6c4e8251a4e94063c08.zip
[PowerPC] Add VSX builtins for vec_div
This patch adds builtin support for xvdivdp and xvdivsp, along with a test case. Straightforward stuff. There's a companion patch for Clang. llvm-svn: 221983
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/PowerPC/PPCInstrVSX.td6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrVSX.td b/llvm/lib/Target/PowerPC/PPCInstrVSX.td
index 522e0de7386..2c8f9981ec2 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrVSX.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrVSX.td
@@ -887,6 +887,12 @@ def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETGT)),
def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETNE)),
(SELECT_VSFRC (CRXOR $lhs, $rhs), $tval, $fval)>;
+// Divides.
+def : Pat<(int_ppc_vsx_xvdivsp v4f32:$A, v4f32:$B),
+ (XVDIVSP $A, $B)>;
+def : Pat<(int_ppc_vsx_xvdivdp v2f64:$A, v2f64:$B),
+ (XVDIVDP $A, $B)>;
+
} // AddedComplexity
} // HasVSX
OpenPOWER on IntegriCloud