[llvm] r288532 - [WebAssembly] Fix a compiler warning. NFC.
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 12:13:05 PST 2016
Author: djg
Date: Fri Dec 2 14:13:05 2016
New Revision: 288532
URL: http://llvm.org/viewvc/llvm-project?rev=288532&view=rev
Log:
[WebAssembly] Fix a compiler warning. NFC.
Fix a warning about a comparison between signed and unsigned integer
expressions.
Modified:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp?rev=288532&r1=288531&r2=288532&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp Fri Dec 2 14:13:05 2016
@@ -194,7 +194,7 @@ void WebAssemblyFrameLowering::emitProlo
if (HasBP) {
unsigned BitmaskReg = MRI.createVirtualRegister(PtrRC);
unsigned Alignment = MFI.getMaxAlignment();
- assert((1 << countTrailingZeros(Alignment)) == Alignment &&
+ assert((1u << countTrailingZeros(Alignment)) == Alignment &&
"Alignment must be a power of 2");
BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::CONST_I32), BitmaskReg)
.addImm((int)~(Alignment - 1));
More information about the llvm-commits
mailing list