summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZISelLowering.h
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2015-05-05 19:31:09 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2015-05-05 19:31:09 +0000
commitc1708b2618ee455738e2d66076bc1e1734392917 (patch)
tree39ee67f5e4a6c2dab2d11a1fbc6112e2e50b4d44 /llvm/lib/Target/SystemZ/SystemZISelLowering.h
parent5211f9ff4d8f0bb87ace370155d2d4b59e278e39 (diff)
downloadbcm5719-llvm-c1708b2618ee455738e2d66076bc1e1734392917.tar.gz
bcm5719-llvm-c1708b2618ee455738e2d66076bc1e1734392917.zip
[SystemZ] Add vector intrinsics
This adds intrinsics to allow access to all of the z13 vector instructions. Note that instructions whose semantics can be described by standard LLVM IR do not get any intrinsics. For each instructions whose semantics *cannot* (fully) be described, we define an LLVM IR target-specific intrinsic that directly maps to this instruction. For instructions that also set the condition code, the LLVM IR intrinsic returns the post-instruction CC value as a second result. Instruction selection will attempt to detect code that compares that CC value against constants and use the condition code directly instead. Based on a patch by Richard Sandiford. llvm-svn: 236527
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZISelLowering.h')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelLowering.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.h b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
index 7a3b6fa85ae..4a55e632100 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.h
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
@@ -201,6 +201,11 @@ enum {
// Pack vector operands 0 and 1 into a single vector with half-sized elements.
PACK,
+ // Likewise, but saturate the result and set CC. PACKS_CC does signed
+ // saturation and PACKLS_CC does unsigned saturation.
+ PACKS_CC,
+ PACKLS_CC,
+
// Unpack the first half of vector operand 0 into double-sized elements.
// UNPACK_HIGH sign-extends and UNPACKL_HIGH zero-extends.
UNPACK_HIGH,
@@ -228,6 +233,11 @@ enum {
VICMPH,
VICMPHL,
+ // Likewise, but also set the condition codes on the result.
+ VICMPES,
+ VICMPHS,
+ VICMPHLS,
+
// Compare floating-point vector operands 0 and 1 to preoduce the usual 0/-1
// vector result. VFCMPE is for "ordered and equal", VFCMPH for "ordered and
// greater than" and VFCMPHE for "ordered and greater than or equal to".
@@ -235,6 +245,14 @@ enum {
VFCMPH,
VFCMPHE,
+ // Likewise, but also set the condition codes on the result.
+ VFCMPES,
+ VFCMPHS,
+ VFCMPHES,
+
+ // Test floating-point data class for vectors.
+ VFTCI,
+
// Extend the even f32 elements of vector operand 0 to produce a vector
// of f64 elements.
VEXTEND,
@@ -243,6 +261,20 @@ enum {
// even elements of the result.
VROUND,
+ // AND the two vector operands together and set CC based on the result.
+ VTM,
+
+ // String operations that set CC as a side-effect.
+ VFAE_CC,
+ VFAEZ_CC,
+ VFEE_CC,
+ VFEEZ_CC,
+ VFENE_CC,
+ VFENEZ_CC,
+ VISTR_CC,
+ VSTRC_CC,
+ VSTRCZ_CC,
+
// Wrappers around the inner loop of an 8- or 16-bit ATOMIC_SWAP or
// ATOMIC_LOAD_<op>.
//
@@ -438,6 +470,7 @@ private:
SDValue lowerSTACKRESTORE(SDValue Op, SelectionDAG &DAG) const;
SDValue lowerPREFETCH(SDValue Op, SelectionDAG &DAG) const;
SDValue lowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const;
+ SDValue lowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const;
SDValue lowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const;
SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const;
SDValue lowerSCALAR_TO_VECTOR(SDValue Op, SelectionDAG &DAG) const;
OpenPOWER on IntegriCloud