diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-10-10 18:27:30 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-10-10 18:27:30 +0000 |
commit | 47aac5104302121ba64975cd4b51e27ef621131e (patch) | |
tree | 37be4c78d09a7862fabe6d81c8053c6884f40c24 /llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | |
parent | 0de5720737f1d4a9399577cad470fc55b6059c52 (diff) | |
download | bcm5719-llvm-47aac5104302121ba64975cd4b51e27ef621131e.tar.gz bcm5719-llvm-47aac5104302121ba64975cd4b51e27ef621131e.zip |
Revert r141365. It was causing MultiSource/Benchmarks/MiBench/consumer-lame to
hang, and possibly SPEC/CINT2006/464_h264ref.
llvm-svn: 141560
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp index 5ee009c04c5..ce877b0d04e 100644 --- a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -47,11 +47,6 @@ CheckVMLxHazard("check-vmlx-hazard", cl::Hidden, cl::desc("Check fp vmla / vmls hazard at isel time"), cl::init(true)); -static cl::opt<bool> -DisableARMIntABS("disable-arm-int-abs", cl::Hidden, - cl::desc("Enable / disable ARM integer abs transform"), - cl::init(false)); - //===--------------------------------------------------------------------===// /// ARMDAGToDAGISel - ARM specific code to select ARM machine /// instructions for SelectionDAG operations. @@ -257,9 +252,6 @@ private: ARMCC::CondCodes CCVal, SDValue CCR, SDValue InFlag); - // Select special operations if node forms integer ABS pattern - SDNode *SelectABSOp(SDNode *N); - SDNode *SelectConcatVector(SDNode *N); SDNode *SelectAtomic64(SDNode *Node, unsigned Opc); @@ -2303,56 +2295,6 @@ SDNode *ARMDAGToDAGISel::SelectCMOVOp(SDNode *N) { return CurDAG->SelectNodeTo(N, Opc, VT, Ops, 5); } -/// Target-specific DAG combining for ISD::XOR. -/// Target-independent combining lowers SELECT_CC nodes of the form -/// select_cc setg[ge] X, 0, X, -X -/// select_cc setgt X, -1, X, -X -/// select_cc setl[te] X, 0, -X, X -/// select_cc setlt X, 1, -X, X -/// which represent Integer ABS into: -/// Y = sra (X, size(X)-1); xor (add (X, Y), Y) -/// ARM instruction selection detects the latter and matches it to -/// ARM::ABS or ARM::t2ABS machine node. -SDNode *ARMDAGToDAGISel::SelectABSOp(SDNode *N){ - SDValue XORSrc0 = N->getOperand(0); - SDValue XORSrc1 = N->getOperand(1); - DebugLoc DL = N->getDebugLoc(); - EVT VT = N->getValueType(0); - - if (DisableARMIntABS) - return NULL; - - if (Subtarget->isThumb1Only()) - return NULL; - - if (XORSrc0.getOpcode() != ISD::ADD || - XORSrc1.getOpcode() != ISD::SRA) - return NULL; - - SDValue ADDSrc0 = XORSrc0.getOperand(0); - SDValue ADDSrc1 = XORSrc0.getOperand(1); - SDValue SRASrc0 = XORSrc1.getOperand(0); - SDValue SRASrc1 = XORSrc1.getOperand(1); - ConstantSDNode *SRAConstant = dyn_cast<ConstantSDNode>(SRASrc1); - EVT XType = SRASrc0.getValueType(); - unsigned Size = XType.getSizeInBits() - 1; - - if (ADDSrc1 == XORSrc1 && - ADDSrc0 == SRASrc0 && - XType.isInteger() && - SRAConstant != NULL && - Size == SRAConstant->getZExtValue()) { - - unsigned Opcode = ARM::ABS; - if (Subtarget->isThumb2()) - Opcode = ARM::t2ABS; - - return CurDAG->SelectNodeTo(N, Opcode, VT, ADDSrc0); - } - - return NULL; -} - SDNode *ARMDAGToDAGISel::SelectConcatVector(SDNode *N) { // The only time a CONCAT_VECTORS operation can have legal types is when // two 64-bit vectors are concatenated to a 128-bit vector. @@ -2389,14 +2331,6 @@ SDNode *ARMDAGToDAGISel::Select(SDNode *N) { switch (N->getOpcode()) { default: break; - case ISD::XOR: { - // Select special operations if XOR node forms integer ABS pattern - SDNode *ResNode = SelectABSOp(N); - if (ResNode) - return ResNode; - // Other cases are autogenerated. - break; - } case ISD::Constant: { unsigned Val = cast<ConstantSDNode>(N)->getZExtValue(); bool UseCP = true; |