aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-25 17:54:58 +0000
committerChris Lattner <sabre@nondot.org>2005-08-25 17:54:58 +0000
commit9d338cf3a3888c18cb031e6bf7633992c0c0b8a0 (patch)
tree141d7f7efe9951a314fd7d40e017f50fda3f3f1f /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent8784a23075f8544f78f8b46cfd10457c1109d433 (diff)
simplify the code a bit using isOperationLegal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 72352f10fd..9793478dba 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -897,13 +897,12 @@ SDOperand SelectionDAG::SimplifySelectCC(SDOperand N1, SDOperand N2,
// Check to see if this is the equivalent of setcc X, 0
if (N4C && N4C->isNullValue() && N3C && (N3C->getValue() == 1ULL)) {
MVT::ValueType XType = N1.getValueType();
- if (TLI.getOperationAction(ISD::SETCC, TLI.getSetCCResultTy()) ==
- TargetLowering::Legal) {
+ if (TLI.isOperationLegal(ISD::SETCC, TLI.getSetCCResultTy()))
return getSetCC(TLI.getSetCCResultTy(), N1, N2, CC);
- }
+
// seteq X, 0 -> srl (ctlz X, log2(size(X)))
if (N2C && N2C->isNullValue() && CC == ISD::SETEQ &&
- TLI.getOperationAction(ISD::CTLZ, XType) == TargetLowering::Legal) {
+ TLI.isOperationLegal(ISD::CTLZ, XType)) {
SDOperand Ctlz = getNode(ISD::CTLZ, XType, N1);
return getNode(ISD::SRL, XType, Ctlz,
getConstant(Log2_32(MVT::getSizeInBits(XType)),