[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:
Martin Sebor 2022-08-16 17:10:10 -06:00
parent 5737f6a527
commit a7a1be11e6
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }