[llvm-branch-commits] [llvm-branch] r91576 - in /llvm/branches/Apple/Zoidberg: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/CellSPU/and_ops.ll

Evan Cheng evan.cheng at apple.com
Wed Dec 16 16:53:46 PST 2009


Author: evancheng
Date: Wed Dec 16 18:53:46 2009
New Revision: 91576

URL: http://llvm.org/viewvc/llvm-project?rev=91576&view=rev
Log:
Merge 91574.

Modified:
    llvm/branches/Apple/Zoidberg/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    llvm/branches/Apple/Zoidberg/test/CodeGen/CellSPU/and_ops.ll

Modified: llvm/branches/Apple/Zoidberg/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=91576&r1=91575&r2=91576&view=diff

==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/branches/Apple/Zoidberg/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Dec 16 18:53:46 2009
@@ -3200,19 +3200,6 @@
                        X, DAG.getConstant(Mask, VT));
   }
 
-  // Fold (zext (and x, cst)) -> (and (zext x), cst)
-  if (N0.getOpcode() == ISD::AND &&
-      N0.getOperand(1).getOpcode() == ISD::Constant &&
-      N0.getOperand(0).getOpcode() != ISD::TRUNCATE &&
-      N0.getOperand(0).hasOneUse()) {
-    APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
-    Mask.zext(VT.getSizeInBits());
-    return DAG.getNode(ISD::AND, N->getDebugLoc(), VT,
-                       DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT,
-                                   N0.getOperand(0)),
-                       DAG.getConstant(Mask, VT));
-  }
-
   // fold (zext (load x)) -> (zext (truncate (zextload x)))
   if (ISD::isNON_EXTLoad(N0.getNode()) &&
       ((!LegalOperations && !cast<LoadSDNode>(N0)->isVolatile()) ||

Modified: llvm/branches/Apple/Zoidberg/test/CodeGen/CellSPU/and_ops.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/test/CodeGen/CellSPU/and_ops.ll?rev=91576&r1=91575&r2=91576&view=diff

==============================================================================
--- llvm/branches/Apple/Zoidberg/test/CodeGen/CellSPU/and_ops.ll (original)
+++ llvm/branches/Apple/Zoidberg/test/CodeGen/CellSPU/and_ops.ll Wed Dec 16 18:53:46 2009
@@ -1,9 +1,9 @@
 ; RUN: llc < %s -march=cellspu > %t1.s
-; RUN: grep and    %t1.s | count 230
+; RUN: grep and    %t1.s | count 234
 ; RUN: grep andc   %t1.s | count 85
-; RUN: grep andi   %t1.s | count 39
-; RUN: grep andhi  %t1.s | count 28
-; RUN: grep andbi  %t1.s | count 2
+; RUN: grep andi   %t1.s | count 37
+; RUN: grep andhi  %t1.s | count 30
+; RUN: grep andbi  %t1.s | count 4
 
 target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
 target triple = "spu"





More information about the llvm-branch-commits mailing list