From: Richard Smith Date: Tue, 24 Nov 2020 01:20:19 +0000 (-0800) Subject: Fix signed integer overflow bug that's causing test failures with UBSan. X-Git-Tag: llvmorg-13-init~5303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97c8fba7e490db57d24a31c68ad12d7f840256d6;p=platform%2Fupstream%2Fllvm.git Fix signed integer overflow bug that's causing test failures with UBSan. --- diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index f7102dc..01293de 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -2012,7 +2012,7 @@ static unsigned mapToSinitPriority(int P) { if (P < 64512) return 2047 + (P - 1124) * 33878; - return 2147482625 + (P - 64512); + return 2147482625u + (P - 64512); } static std::string convertToSinitPriority(int Priority) {