diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-16 11:21:54 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-16 11:21:54 +0000 |
commit | e1b2af731e2a45344a7c502232f66c55cd746da0 (patch) | |
tree | bb6a3377594da6a0b30e8179e071137324d5cf69 /include | |
parent | 6a079fef4fad3e6c2e07c9e1d0776e20a0b05b1e (diff) | |
download | external_llvm-e1b2af731e2a45344a7c502232f66c55cd746da0.zip external_llvm-e1b2af731e2a45344a7c502232f66c55cd746da0.tar.gz external_llvm-e1b2af731e2a45344a7c502232f66c55cd746da0.tar.bz2 |
[SystemZ] Use CLST to implement strcmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetLibraryInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/TargetSelectionDAGInfo.h | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h index d0245ba..a033d07 100644 --- a/include/llvm/Target/TargetLibraryInfo.h +++ b/include/llvm/Target/TargetLibraryInfo.h @@ -699,7 +699,7 @@ public: case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl: case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l: case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l: - case LibFunc::memcmp: + case LibFunc::memcmp: case LibFunc::strcmp: return true; } return false; diff --git a/include/llvm/Target/TargetSelectionDAGInfo.h b/include/llvm/Target/TargetSelectionDAGInfo.h index 35da1d7..2d0989c 100644 --- a/include/llvm/Target/TargetSelectionDAGInfo.h +++ b/include/llvm/Target/TargetSelectionDAGInfo.h @@ -108,6 +108,20 @@ public: MachinePointerInfo Op2PtrInfo) const { return std::make_pair(SDValue(), SDValue()); } + + /// EmitTargetCodeForStrcmp - Emit target-specific code that performs a + /// strcmp, in cases where that is faster than a libcall. The first + /// returned SDValue is the result of the strcmp and the second is + /// the chain. Both SDValues can be null if a normal libcall should + /// be used. + virtual std::pair<SDValue, SDValue> + EmitTargetCodeForStrcmp(SelectionDAG &DAG, SDLoc dl, + SDValue Chain, + SDValue Op1, SDValue Op2, + MachinePointerInfo Op1PtrInfo, + MachinePointerInfo Op2PtrInfo) const { + return std::make_pair(SDValue(), SDValue()); + } }; } // end llvm namespace |