[X86] Apply clang-format to detectUSatPattern. NFCI.
Cleanup from D42544 llvm-svn: 323439
This commit is contained in:
		
							parent
							
								
									16610b0a57
								
							
						
					
					
						commit
						09c56b799f
					
				| 
						 | 
					@ -34294,7 +34294,7 @@ static bool isSATValidOnAVX512Subtarget(EVT SrcVT, EVT DstVT,
 | 
				
			||||||
  return false;
 | 
					  return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Detect a pattern of truncation with saturation:
 | 
					/// Detect a pattern of truncation with unsigned saturation:
 | 
				
			||||||
/// (truncate (umin (x, unsigned_max_of_dest_type)) to dest_type).
 | 
					/// (truncate (umin (x, unsigned_max_of_dest_type)) to dest_type).
 | 
				
			||||||
/// Return the source value to be truncated or SDValue() if the pattern was not
 | 
					/// Return the source value to be truncated or SDValue() if the pattern was not
 | 
				
			||||||
/// matched.
 | 
					/// matched.
 | 
				
			||||||
| 
						 | 
					@ -34302,16 +34302,15 @@ static SDValue detectUSatPattern(SDValue In, EVT VT) {
 | 
				
			||||||
  if (In.getOpcode() != ISD::UMIN)
 | 
					  if (In.getOpcode() != ISD::UMIN)
 | 
				
			||||||
    return SDValue();
 | 
					    return SDValue();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  //Saturation with truncation. We truncate from InVT to VT.
 | 
					  // Saturation with truncation. We truncate from InVT to VT.
 | 
				
			||||||
  assert(In.getScalarValueSizeInBits() > VT.getScalarSizeInBits() &&
 | 
					  assert(In.getScalarValueSizeInBits() > VT.getScalarSizeInBits() &&
 | 
				
			||||||
    "Unexpected types for truncate operation");
 | 
					         "Unexpected types for truncate operation");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  APInt C;
 | 
					  APInt C;
 | 
				
			||||||
  if (ISD::isConstantSplatVector(In.getOperand(1).getNode(), C)) {
 | 
					  if (ISD::isConstantSplatVector(In.getOperand(1).getNode(), C)) {
 | 
				
			||||||
    // C should be equal to UINT32_MAX / UINT16_MAX / UINT8_MAX according
 | 
					    // C should be equal to UINT32_MAX / UINT16_MAX / UINT8_MAX according
 | 
				
			||||||
    // the element size of the destination type.
 | 
					    // the element size of the destination type.
 | 
				
			||||||
    return C.isMask(VT.getScalarSizeInBits()) ? In.getOperand(0) :
 | 
					    return C.isMask(VT.getScalarSizeInBits()) ? In.getOperand(0) : SDValue();
 | 
				
			||||||
      SDValue();
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return SDValue();
 | 
					  return SDValue();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue