mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	[X86] Simplify code. NFC.
Replaced some logic that checked if a build_vector node is doing a splat of a non-undef value with a call to method BuildVectorSDNode::getSplatValue(). No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -18447,22 +18447,12 @@ static SDValue LowerScalarVariableShift(SDValue Op, SelectionDAG &DAG,
 | 
				
			|||||||
    SDValue BaseShAmt;
 | 
					    SDValue BaseShAmt;
 | 
				
			||||||
    EVT EltVT = VT.getVectorElementType();
 | 
					    EVT EltVT = VT.getVectorElementType();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (Amt.getOpcode() == ISD::BUILD_VECTOR) {
 | 
					    if (BuildVectorSDNode *BV = dyn_cast<BuildVectorSDNode>(Amt)) {
 | 
				
			||||||
      unsigned NumElts = VT.getVectorNumElements();
 | 
					      // Check if this build_vector node is doing a splat.
 | 
				
			||||||
      unsigned i, j;
 | 
					      // If so, then set BaseShAmt equal to the splat value.
 | 
				
			||||||
      for (i = 0; i != NumElts; ++i) {
 | 
					      BaseShAmt = BV->getSplatValue();
 | 
				
			||||||
        if (Amt.getOperand(i).getOpcode() == ISD::UNDEF)
 | 
					      if (BaseShAmt && BaseShAmt.getOpcode() == ISD::UNDEF)
 | 
				
			||||||
          continue;
 | 
					        BaseShAmt = SDValue();
 | 
				
			||||||
        break;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      for (j = i; j != NumElts; ++j) {
 | 
					 | 
				
			||||||
        SDValue Arg = Amt.getOperand(j);
 | 
					 | 
				
			||||||
        if (Arg.getOpcode() == ISD::UNDEF) continue;
 | 
					 | 
				
			||||||
        if (Arg != Amt.getOperand(i))
 | 
					 | 
				
			||||||
          break;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      if (i != NumElts && j == NumElts)
 | 
					 | 
				
			||||||
        BaseShAmt = Amt.getOperand(i);
 | 
					 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      if (Amt.getOpcode() == ISD::EXTRACT_SUBVECTOR)
 | 
					      if (Amt.getOpcode() == ISD::EXTRACT_SUBVECTOR)
 | 
				
			||||||
        Amt = Amt.getOperand(0);
 | 
					        Amt = Amt.getOperand(0);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user