[CODEGEN] Fixed bug in alignment inference that prevented vectorization
in some cases
This commit is contained in:
		
				
					committed by
					
						
						Philippe Tillet
					
				
			
			
				
	
			
			
			
						parent
						
							ca5b7c5df4
						
					
				
				
					commit
					da6008128e
				
			@@ -287,10 +287,8 @@ std::vector<unsigned> align::populate_max_contiguous_binop(ir::binary_operator*
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    if(x->is_int_add_sub()){
 | 
					    if(x->is_int_add_sub()){
 | 
				
			||||||
      unsigned lvalue = 1, rvalue = 1;
 | 
					      unsigned lvalue = 1, rvalue = 1;
 | 
				
			||||||
      if(lhs_cst_info[d].num_cst > 0)
 | 
					      lvalue = gcd(rhs_max_contiguous[d], lhs_starting_multiple[d]);
 | 
				
			||||||
        lvalue = gcd(rhs_max_contiguous[d], lhs_cst_info[d].num_cst);
 | 
					      rvalue = gcd(lhs_max_contiguous[d], rhs_starting_multiple[d]);
 | 
				
			||||||
      if(rhs_cst_info[d].num_cst > 0)
 | 
					 | 
				
			||||||
        rvalue = gcd(lhs_max_contiguous[d], rhs_cst_info[d].num_cst);
 | 
					 | 
				
			||||||
      value = std::max(lvalue, rvalue);
 | 
					      value = std::max(lvalue, rvalue);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    result.push_back(value);
 | 
					    result.push_back(value);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user