Remove -always-fold-and-in-test.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 4 Mar 2008 00:40:35 +0000 (00:40 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 4 Mar 2008 00:40:35 +0000 (00:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47871 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrInfo.td

index aa45ab8e9201f0f4b8d4a67799cf836b6e26c424..363f2bbc78fa57fef6cb1b78c918e1a8bc26c30d 100644 (file)
@@ -44,13 +44,6 @@ using namespace llvm;
 STATISTIC(NumFPKill   , "Number of FP_REG_KILL instructions added");
 STATISTIC(NumLoadMoved, "Number of loads moved below TokenFactor");
 
-namespace {
-  static cl::opt<bool>
-  AlwaysFoldAndInTest("always-fold-and-in-test",
-                cl::desc("Always fold and operation in test"),
-                cl::init(false), cl::Hidden);
-}
-
 //===----------------------------------------------------------------------===//
 //                      Pattern Matcher Implementation
 //===----------------------------------------------------------------------===//
@@ -433,7 +426,7 @@ void X86DAGToDAGISel::PreprocessForRMW(SelectionDAG &DAG) {
           RModW = true;
           std::swap(N10, N11);
         }
-        RModW = RModW && N10.Val->isOperand(Chain.Val) && N10.hasOneUse() &&
+        RModW = RModW && N10.Val->isOperandOf(Chain.Val) && N10.hasOneUse() &&
           (N10.getOperand(1) == N2) &&
           (N10.Val->getValueType(0) == N1.getValueType());
         if (RModW)
@@ -452,7 +445,7 @@ void X86DAGToDAGISel::PreprocessForRMW(SelectionDAG &DAG) {
       case X86ISD::SHRD: {
         SDOperand N10 = N1.getOperand(0);
         if (ISD::isNON_EXTLoad(N10.Val))
-          RModW = N10.Val->isOperand(Chain.Val) && N10.hasOneUse() &&
+          RModW = N10.Val->isOperandOf(Chain.Val) && N10.hasOneUse() &&
             (N10.getOperand(1) == N2) &&
             (N10.Val->getValueType(0) == N1.getValueType());
         if (RModW)
index 75fbaedacf584d356c7672a47c3e15f9efb52740..e2e2fb809785a8258a11a53463b5c3fbc2a2da55 100644 (file)
@@ -255,7 +255,7 @@ def extloadi32i16  : PatFrag<(ops node:$ptr), (i32 (extloadi16 node:$ptr))>;
 
 // An 'and' node with a single use.
 def and_su : PatFrag<(ops node:$lhs, node:$rhs), (and node:$lhs, node:$rhs), [{
-  return AlwaysFoldAndInTest || N->hasOneUse();
+  return N->hasOneUse();
 }]>;
 
 //===----------------------------------------------------------------------===//