summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZOperators.td
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-13 15:35:00 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-13 15:35:00 +0000
commit57485472e29cf063c765d231c65c0be4f075e299 (patch)
tree971a37e667baf1e38cde85330b390002355b5f85 /llvm/lib/Target/SystemZ/SystemZOperators.td
parentd420f7344fed3ee18d386cd57dc0608675aa55d9 (diff)
downloadbcm5719-llvm-57485472e29cf063c765d231c65c0be4f075e299.tar.gz
bcm5719-llvm-57485472e29cf063c765d231c65c0be4f075e299.zip
[SystemZ] Extend integer absolute selection
This patch makes more use of LPGFR and LNGFR. It builds on top of the LTGFR selection from r197234. Most of the tests are motivated by what InstCombine would produce. llvm-svn: 197236
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZOperators.td')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZOperators.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZOperators.td b/llvm/lib/Target/SystemZ/SystemZOperators.td
index 771fbc32f3c..bffe1a56187 100644
--- a/llvm/lib/Target/SystemZ/SystemZOperators.td
+++ b/llvm/lib/Target/SystemZ/SystemZOperators.td
@@ -103,6 +103,7 @@ def z_sibcall : SDNode<"SystemZISD::SIBCALL", SDT_ZCall,
def z_pcrel_wrapper : SDNode<"SystemZISD::PCREL_WRAPPER", SDT_ZWrapPtr, []>;
def z_pcrel_offset : SDNode<"SystemZISD::PCREL_OFFSET",
SDT_ZWrapOffset, []>;
+def z_iabs : SDNode<"SystemZISD::IABS", SDTIntUnaryOp, []>;
def z_icmp : SDNode<"SystemZISD::ICMP", SDT_ZICmp, [SDNPOutGlue]>;
def z_fcmp : SDNode<"SystemZISD::FCMP", SDT_ZCmp, [SDNPOutGlue]>;
def z_tm : SDNode<"SystemZISD::TM", SDT_ZICmp, [SDNPOutGlue]>;
@@ -349,6 +350,9 @@ def or_as_revinserti8 : PatFrag<(ops node:$src1, node:$src2),
APInt::getLowBitsSet(BitWidth, 8));
}]>;
+// Negative integer absolute.
+def z_inegabs : PatFrag<(ops node:$src), (ineg (z_iabs node:$src))>;
+
// Integer absolute, matching the canonical form generated by DAGCombiner.
def z_iabs32 : PatFrag<(ops node:$src),
(xor (add node:$src, (sra node:$src, (i32 31))),
OpenPOWER on IntegriCloud