]> granicus.if.org Git - llvm/commitdiff
[WebAssembly] Fix a compiler warning. NFC.
authorDan Gohman <dan433584@gmail.com>
Fri, 2 Dec 2016 20:13:05 +0000 (20:13 +0000)
committerDan Gohman <dan433584@gmail.com>
Fri, 2 Dec 2016 20:13:05 +0000 (20:13 +0000)
Fix a warning about a comparison between signed and unsigned integer
expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288532 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp

index 25b203abcd613e837a9cc719af7276c5b19e5043..a6a2c0bf06ae29c3749353720414aff4e0abe763 100644 (file)
@@ -194,7 +194,7 @@ void WebAssemblyFrameLowering::emitPrologue(MachineFunction &MF,
   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));