diff options
author | Jyotsna Verma <jverma@codeaurora.org> | 2013-02-05 19:20:45 +0000 |
---|---|---|
committer | Jyotsna Verma <jverma@codeaurora.org> | 2013-02-05 19:20:45 +0000 |
commit | 1d3d2c57f55e04197efe15b293c783fe879c2551 (patch) | |
tree | 8d38dc5411bd63c1f74584fb6d065d2e114f7e2f /lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | |
parent | faf601ee936a440027447fa11ef400cf53bc1acf (diff) |
Hexagon: Use TFR_cond with cmpb.[eq,gt,gtu] to handle
zext( set[ne,eq,gt,ugt] (...) ) type of dag patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/HexagonISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp index 381032b8e9..6443cb2784 100644 --- a/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp +++ b/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp @@ -97,7 +97,14 @@ public: SDNode *SelectAdd(SDNode *N); bool isConstExtProfitable(SDNode *N) const; - // Include the pieces autogenerated from the target description. +// XformU7ToU7M1Imm - Return a target constant decremented by 1, in range +// [1..128], used in cmpb.gtu instructions. +inline SDValue XformU7ToU7M1Imm(signed Imm) { + assert((Imm >= 1 && Imm <= 128) && "Constant out of range for cmpb op"); + return CurDAG->getTargetConstant(Imm - 1, MVT::i8); +} + +// Include the pieces autogenerated from the target description. #include "HexagonGenDAGISel.inc" }; } // end anonymous namespace |