diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-12 10:28:10 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-12 10:28:10 +0000 |
commit | ac168b8bc8773a083a10902f64e4ae57a925aee4 (patch) | |
tree | f01bc6788d39669344e52a5304fbe7859ebc8702 /include/llvm/Target | |
parent | e03a56d62fc623e2f72d623b816f91b293d5904b (diff) | |
download | external_llvm-ac168b8bc8773a083a10902f64e4ae57a925aee4.zip external_llvm-ac168b8bc8773a083a10902f64e4ae57a925aee4.tar.gz external_llvm-ac168b8bc8773a083a10902f64e4ae57a925aee4.tar.bz2 |
[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.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetSelectionDAGInfo.h b/include/llvm/Target/TargetSelectionDAGInfo.h index fe2fba4..35da1d7 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 |