diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-08-31 15:37:04 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-08-31 15:37:04 +0000 |
commit | 93c53e5583427ee567293a9a21c6c76fccf218ca (patch) | |
tree | ed41e573c426126de3387e10ea231ba0bcd4eb34 /lib/Target/CellSPU | |
parent | 9440e35b9875757e5556a01f585aa6b2dd9a0c48 (diff) | |
download | external_llvm-93c53e5583427ee567293a9a21c6c76fccf218ca.zip external_llvm-93c53e5583427ee567293a9a21c6c76fccf218ca.tar.gz external_llvm-93c53e5583427ee567293a9a21c6c76fccf218ca.tar.bz2 |
fix a bunch of 80-col violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU')
-rw-r--r-- | lib/Target/CellSPU/SPUISelLowering.cpp | 42 | ||||
-rw-r--r-- | lib/Target/CellSPU/SPUOperands.td | 6 |
2 files changed, 33 insertions, 15 deletions
diff --git a/lib/Target/CellSPU/SPUISelLowering.cpp b/lib/Target/CellSPU/SPUISelLowering.cpp index 72fad2c..b272b4b 100644 --- a/lib/Target/CellSPU/SPUISelLowering.cpp +++ b/lib/Target/CellSPU/SPUISelLowering.cpp @@ -414,7 +414,8 @@ SPUTargetLowering::getTargetNodeName(unsigned Opcode) const node_names[(unsigned) SPUISD::CNTB] = "SPUISD::CNTB"; node_names[(unsigned) SPUISD::PROMOTE_SCALAR] = "SPUISD::PROMOTE_SCALAR"; node_names[(unsigned) SPUISD::EXTRACT_ELT0] = "SPUISD::EXTRACT_ELT0"; - node_names[(unsigned) SPUISD::EXTRACT_ELT0_CHAINED] = "SPUISD::EXTRACT_ELT0_CHAINED"; + node_names[(unsigned) SPUISD::EXTRACT_ELT0_CHAINED] + = "SPUISD::EXTRACT_ELT0_CHAINED"; node_names[(unsigned) SPUISD::EXTRACT_I1_ZEXT] = "SPUISD::EXTRACT_I1_ZEXT"; node_names[(unsigned) SPUISD::EXTRACT_I1_SEXT] = "SPUISD::EXTRACT_I1_SEXT"; node_names[(unsigned) SPUISD::EXTRACT_I8_ZEXT] = "SPUISD::EXTRACT_I8_ZEXT"; @@ -509,7 +510,8 @@ AlignedLoad(SDValue Op, SelectionDAG &DAG, const SPUSubtarget *ST, if (basePtr.getOpcode() == ISD::ADD) { SDValue Op1 = basePtr.getNode()->getOperand(1); - if (Op1.getOpcode() == ISD::Constant || Op1.getOpcode() == ISD::TargetConstant) { + if (Op1.getOpcode() == ISD::Constant + || Op1.getOpcode() == ISD::TargetConstant) { const ConstantSDNode *CN = cast<ConstantSDNode>(basePtr.getOperand(1)); alignOffs = (int) CN->getValue(); @@ -561,7 +563,8 @@ AlignedLoad(SDValue Op, SelectionDAG &DAG, const SPUSubtarget *ST, // Unaligned load or we're using the "large memory" model, which means that // we have to be very pessimistic: if (isMemoryOperand(basePtr) || isIndirectOperand(basePtr)) { - basePtr = DAG.getNode(SPUISD::IndirectAddr, PtrVT, basePtr, DAG.getConstant(0, PtrVT)); + basePtr = DAG.getNode(SPUISD::IndirectAddr, PtrVT, basePtr, + DAG.getConstant(0, PtrVT)); } // Add the offset @@ -801,7 +804,8 @@ LowerConstantPool(SDValue Op, SelectionDAG &DAG, const SPUSubtarget *ST) { } assert(0 && - "LowerConstantPool: Relocation model other than static not supported."); + "LowerConstantPool: Relocation model other than static" + " not supported."); return SDValue(); } @@ -936,7 +940,8 @@ LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG, int &VarArgsFrameIndex) MVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); // Add DAG nodes to load the arguments or copy them out of registers. - for (unsigned ArgNo = 0, e = Op.getNode()->getNumValues()-1; ArgNo != e; ++ArgNo) { + for (unsigned ArgNo = 0, e = Op.getNode()->getNumValues() - 1; + ArgNo != e; ++ArgNo) { SDValue ArgVal; bool needsLoad = false; MVT ObjectVT = Op.getValue(ArgNo).getValueType(); @@ -1556,7 +1561,8 @@ static bool isConstantSplat(const uint64_t Bits128[2], if (MinSplatBits < 16) { // If the top 8-bits are different than the lower 8-bits, ignoring // undefs, we have an i16 splat. - if ((Bits16 & (uint16_t(~Undef16) >> 8)) == ((Bits16 >> 8) & ~Undef16)) { + if ((Bits16 & (uint16_t(~Undef16) >> 8)) + == ((Bits16 >> 8) & ~Undef16)) { // Otherwise, we have an 8-bit splat. SplatBits = uint8_t(Bits16) | uint8_t(Bits16 >> 8); SplatUndef = uint8_t(Undef16) & uint8_t(Undef16 >> 8); @@ -1820,7 +1826,8 @@ static SDValue LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) { // Use shuffle mask in SHUFB synthetic instruction: return DAG.getNode(SPUISD::SHUFB, V1.getValueType(), V2, V1, ShufMaskOp); } else { - // Convert the SHUFFLE_VECTOR mask's input element units to the actual bytes. + // Convert the SHUFFLE_VECTOR mask's input element units to the + // actual bytes. unsigned BytesPerElement = EltVT.getSizeInBits()/8; SmallVector<SDValue, 16> ResultMask; @@ -2007,9 +2014,11 @@ static SDValue LowerVectorMUL(SDValue Op, SelectionDAG &DAG) { SDValue HHProd_1 = DAG.getNode(SPUISD::MPY, MVT::v8i16, DAG.getNode(ISD::BIT_CONVERT, MVT::v8i16, - DAG.getNode(SPUISD::VEC_SRA, MVT::v4i32, rAH, c8)), + DAG.getNode(SPUISD::VEC_SRA, + MVT::v4i32, rAH, c8)), DAG.getNode(ISD::BIT_CONVERT, MVT::v8i16, - DAG.getNode(SPUISD::VEC_SRA, MVT::v4i32, rBH, c8))); + DAG.getNode(SPUISD::VEC_SRA, + MVT::v4i32, rBH, c8))); SDValue HHProd = DAG.getNode(SPUISD::SELB, MVT::v8i16, @@ -2210,7 +2219,9 @@ static SDValue LowerI8Math(SDValue Op, SelectionDAG &DAG, unsigned Opc) N0 = (N0.getOpcode() != ISD::Constant ? DAG.getNode(ISD::ZERO_EXTEND, MVT::i16, N0) : DAG.getConstant(cast<ConstantSDNode>(N0)->getValue(), MVT::i16)); - N1Opc = N1.getValueType().bitsLT(MVT::i16) ? ISD::ZERO_EXTEND : ISD::TRUNCATE; + N1Opc = N1.getValueType().bitsLT(MVT::i16) + ? ISD::ZERO_EXTEND + : ISD::TRUNCATE; N1 = (N1.getOpcode() != ISD::Constant ? DAG.getNode(N1Opc, MVT::i16, N1) : DAG.getConstant(cast<ConstantSDNode>(N1)->getValue(), MVT::i16)); @@ -2228,7 +2239,9 @@ static SDValue LowerI8Math(SDValue Op, SelectionDAG &DAG, unsigned Opc) N0 = (N0.getOpcode() != ISD::Constant ? DAG.getNode(ISD::ZERO_EXTEND, MVT::i16, N0) : DAG.getConstant(cast<ConstantSDNode>(N0)->getValue(), MVT::i16)); - N1Opc = N1.getValueType().bitsLT(MVT::i16) ? ISD::ZERO_EXTEND : ISD::TRUNCATE; + N1Opc = N1.getValueType().bitsLT(MVT::i16) + ? ISD::ZERO_EXTEND + : ISD::TRUNCATE; N1 = (N1.getOpcode() != ISD::Constant ? DAG.getNode(N1Opc, MVT::i16, N1) : DAG.getConstant(cast<ConstantSDNode>(N1)->getValue(), MVT::i16)); @@ -2241,7 +2254,9 @@ static SDValue LowerI8Math(SDValue Op, SelectionDAG &DAG, unsigned Opc) N0 = (N0.getOpcode() != ISD::Constant ? DAG.getNode(ISD::SIGN_EXTEND, MVT::i16, N0) : DAG.getConstant(cast<ConstantSDNode>(N0)->getValue(), MVT::i16)); - N1Opc = N1.getValueType().bitsLT(MVT::i16) ? ISD::SIGN_EXTEND : ISD::TRUNCATE; + N1Opc = N1.getValueType().bitsLT(MVT::i16) + ? ISD::SIGN_EXTEND + : ISD::TRUNCATE; N1 = (N1.getOpcode() != ISD::Constant ? DAG.getNode(N1Opc, MVT::i16, N1) : DAG.getConstant(cast<ConstantSDNode>(N1)->getValue(), MVT::i16)); @@ -3022,7 +3037,8 @@ SPUTargetLowering::LowerAsmOperandForConstraint(SDValue Op, /// isLegalAddressImmediate - Return true if the integer value can be used /// as the offset of the target addressing mode. -bool SPUTargetLowering::isLegalAddressImmediate(int64_t V, const Type *Ty) const { +bool SPUTargetLowering::isLegalAddressImmediate(int64_t V, + const Type *Ty) const { // SPU's addresses are 256K: return (V > -(1 << 18) && V < (1 << 18) - 1); } diff --git a/lib/Target/CellSPU/SPUOperands.td b/lib/Target/CellSPU/SPUOperands.td index afe815c..6f20894 100644 --- a/lib/Target/CellSPU/SPUOperands.td +++ b/lib/Target/CellSPU/SPUOperands.td @@ -24,7 +24,8 @@ def LO16_vec : SDNodeXForm<scalar_to_vector, [{ && "LO16_vec got something other than a BUILD_VECTOR"); // Get first constant operand... - for (unsigned i = 0, e = N->getNumOperands(); OpVal.getNode() == 0 && i != e; ++i) { + for (unsigned i = 0, e = N->getNumOperands(); + OpVal.getNode() == 0 && i != e; ++i) { if (N->getOperand(i).getOpcode() == ISD::UNDEF) continue; if (OpVal.getNode() == 0) OpVal = N->getOperand(i); @@ -49,7 +50,8 @@ def HI16_vec : SDNodeXForm<scalar_to_vector, [{ && "HI16_vec got something other than a BUILD_VECTOR"); // Get first constant operand... - for (unsigned i = 0, e = N->getNumOperands(); OpVal.getNode() == 0 && i != e; ++i) { + for (unsigned i = 0, e = N->getNumOperands(); + OpVal.getNode() == 0 && i != e; ++i) { if (N->getOperand(i).getOpcode() == ISD::UNDEF) continue; if (OpVal.getNode() == 0) OpVal = N->getOperand(i); |