[llvm] 97c8fba - Fix signed integer overflow bug that's causing test failures with UBSan.
Richard Smith via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 17:21:10 PST 2020
Author: Richard Smith
Date: 2020-11-23T17:20:58-08:00
New Revision: 97c8fba7e490db57d24a31c68ad12d7f840256d6
URL: https://github.com/llvm/llvm-project/commit/97c8fba7e490db57d24a31c68ad12d7f840256d6
DIFF: https://github.com/llvm/llvm-project/commit/97c8fba7e490db57d24a31c68ad12d7f840256d6.diff
LOG: Fix signed integer overflow bug that's causing test failures with UBSan.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index f7102dccf6ee..01293deb647d 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) {
More information about the llvm-commits
mailing list