aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2005-12-21 23:05:39 +0000
committerEvan Cheng <evan.cheng@apple.com>2005-12-21 23:05:39 +0000
commit3a03ebb37747c2b3fd9b4f8b44f1124f53727894 (patch)
tree16ad33996c5e9c33c1e4693f1cafc4c4c6b0e196 /lib/CodeGen
parent793ca4caa43b8259f9a9e41ed80e59006c5a69fc (diff)
* Fix a GlobalAddress lowering bug.
* Teach DAG combiner about X86ISD::SETCC by adding a TargetLowering hook. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp5
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp5
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index ddd8549a09..87c6cf0f90 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -455,7 +455,10 @@ static bool MaskedValueIsZero(const SDOperand &Op, uint64_t Mask,
// Bit counting instructions can not set the high bits of the result
// register. The max number of bits sets depends on the input.
return (Mask & (MVT::getSizeInBits(Op.getValueType())*2-1)) == 0;
- default: break;
+ default:
+ if (Op.getOpcode() >= ISD::BUILTIN_OP_END)
+ return TLI.isMaskedValueZeroForTargetNode(Op, Mask);
+ break;
}
return false;
}
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 8e9524ef1e..e46826e2fa 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -125,3 +125,8 @@ void TargetLowering::computeRegisterProperties() {
const char *TargetLowering::getTargetNodeName(unsigned Opcode) const {
return NULL;
}
+
+bool isMaskedValueZeroForTargetNode(const SDOperand &Op,
+ uint64_t Mask) const {
+ return false;
+}