[llvm] r344459 - [WebAssembly][NFC] Fix signed/unsigned comparison warning

Thomas Lively via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 13 09:58:03 PDT 2018


Author: tlively
Date: Sat Oct 13 09:58:03 2018
New Revision: 344459

URL: http://llvm.org/viewvc/llvm-project?rev=344459&view=rev
Log:
[WebAssembly][NFC] Fix signed/unsigned comparison warning

Modified:
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td?rev=344459&r1=344458&r2=344459&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td Sat Oct 13 09:58:03 2018
@@ -30,7 +30,9 @@ defm "" : ARGUMENT<V128, v2f64>;
 
 // Constrained immediate argument types
 foreach SIZE = [8, 16] in
-def ImmI#SIZE : ImmLeaf<i32, "return (Imm & ((1UL << "#SIZE#") - 1)) == Imm;">;
+def ImmI#SIZE : ImmLeaf<i32,
+  "return ((uint64_t)Imm & ((1UL << "#SIZE#") - 1)) == (uint64_t)Imm;"
+>;
 foreach SIZE = [2, 4, 8, 16, 32] in
 def LaneIdx#SIZE : ImmLeaf<i32, "return 0 <= Imm && Imm < "#SIZE#";">;
 




More information about the llvm-commits mailing list