forked from OSchip/llvm-project
				
			
							parent
							
								
									616e8a5c0b
								
							
						
					
					
						commit
						47a299dcc9
					
				| 
						 | 
					@ -749,16 +749,21 @@ SingleBlockLoopVectorizer::createEmptyLoop(LoopVectorizationLegality *Legal) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/// This function returns the identity element (or neutral element) for
 | 
				
			||||||
 | 
					/// the operation K.
 | 
				
			||||||
static unsigned
 | 
					static unsigned
 | 
				
			||||||
getReductionIdentity(LoopVectorizationLegality::ReductionKind K) {
 | 
					getReductionIdentity(LoopVectorizationLegality::ReductionKind K) {
 | 
				
			||||||
  switch (K) {
 | 
					  switch (K) {
 | 
				
			||||||
  case LoopVectorizationLegality::IntegerXor:
 | 
					  case LoopVectorizationLegality::IntegerXor:
 | 
				
			||||||
  case LoopVectorizationLegality::IntegerAdd:
 | 
					  case LoopVectorizationLegality::IntegerAdd:
 | 
				
			||||||
  case LoopVectorizationLegality::IntegerOr:
 | 
					  case LoopVectorizationLegality::IntegerOr:
 | 
				
			||||||
 | 
					    // Adding, Xoring, Oring zero to a number does not change it.
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
  case LoopVectorizationLegality::IntegerMult:
 | 
					  case LoopVectorizationLegality::IntegerMult:
 | 
				
			||||||
 | 
					    // Multiplying a number by 1 does not change it.
 | 
				
			||||||
    return 1;
 | 
					    return 1;
 | 
				
			||||||
  case LoopVectorizationLegality::IntegerAnd:
 | 
					  case LoopVectorizationLegality::IntegerAnd:
 | 
				
			||||||
 | 
					    // AND-ing a number with an all-1 value does not change it.
 | 
				
			||||||
    return -1;
 | 
					    return -1;
 | 
				
			||||||
  default:
 | 
					  default:
 | 
				
			||||||
    llvm_unreachable("Unknown reduction kind");
 | 
					    llvm_unreachable("Unknown reduction kind");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue