[InstCombine] convert second std::min argument to same type as first
Ensure both arguments to std::min have the same type in all data models.
This commit is contained in:
		
							parent
							
								
									5737f6a527
								
							
						
					
					
						commit
						a7a1be11e6
					
				| 
						 | 
					@ -740,7 +740,7 @@ Value *LibCallSimplifier::optimizeStrLCpy(CallInst *CI, IRBuilderBase &B) {
 | 
				
			||||||
  else {
 | 
					  else {
 | 
				
			||||||
    // Set the length of the source for the function to return to its
 | 
					    // Set the length of the source for the function to return to its
 | 
				
			||||||
    // size, and cap NBytes at the same.
 | 
					    // size, and cap NBytes at the same.
 | 
				
			||||||
    SrcLen = std::min(SrcLen, Str.size());
 | 
					    SrcLen = std::min(SrcLen, uint64_t(Str.size()));
 | 
				
			||||||
    NBytes = std::min(NBytes - 1, SrcLen);
 | 
					    NBytes = std::min(NBytes - 1, SrcLen);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue