summaryrefslogtreecommitdiff
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-12 10:28:10 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-12 10:28:10 +0000
commitac168b8bc8773a083a10902f64e4ae57a925aee4 (patch)
treef01bc6788d39669344e52a5304fbe7859ebc8702 /include/llvm/Target
parente03a56d62fc623e2f72d623b816f91b293d5904b (diff)
downloadllvm-ac168b8bc8773a083a10902f64e4ae57a925aee4.tar.gz
llvm-ac168b8bc8773a083a10902f64e4ae57a925aee4.tar.bz2
llvm-ac168b8bc8773a083a10902f64e4ae57a925aee4.tar.xz
[SystemZ] Use CLC and IPM to implement memcmp
For now this is restricted to fixed-length comparisons with a length in the range [1, 256], as for memcpy() and MVC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetSelectionDAGInfo.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetSelectionDAGInfo.h b/include/llvm/Target/TargetSelectionDAGInfo.h
index fe2fba42dc..35da1d7a73 100644
--- a/include/llvm/Target/TargetSelectionDAGInfo.h
+++ b/include/llvm/Target/TargetSelectionDAGInfo.h
@@ -94,6 +94,20 @@ public:
MachinePointerInfo DstPtrInfo) const {
return SDValue();
}
+
+ /// EmitTargetCodeForMemcmp - Emit target-specific code that performs a
+ /// memcmp, in cases where that is faster than a libcall. The first
+ /// returned SDValue is the result of the memcmp and the second is
+ /// the chain. Both SDValues can be null if a normal libcall should
+ /// be used.
+ virtual std::pair<SDValue, SDValue>
+ EmitTargetCodeForMemcmp(SelectionDAG &DAG, SDLoc dl,
+ SDValue Chain,
+ SDValue Op1, SDValue Op2,
+ SDValue Op3, MachinePointerInfo Op1PtrInfo,
+ MachinePointerInfo Op2PtrInfo) const {
+ return std::make_pair(SDValue(), SDValue());
+ }
};
} // end llvm namespace