[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Aug 25 10:55:09 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.164 -> 1.165
---
Log message:
simplify the code a bit using isOperationLegal
---
Diffs of the changes: (+3 -4)
SelectionDAG.cpp | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.164 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.165
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.164 Thu Aug 25 00:03:06 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Aug 25 12:54:58 2005
@@ -897,13 +897,12 @@
// 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)),
More information about the llvm-commits
mailing list