[llvm] [CodeGen][Tablegen] Fix uninitialized var and shift overflow. (PR #84896)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 01:02:58 PDT 2024


================
@@ -935,7 +935,7 @@ void DecoderEmitter::emitTable(formatted_raw_ostream &OS, DecoderTable &Table,
       unsigned Shift = 0;
       do {
         OS << ", " << (unsigned)*I;
-        Value += (*I & 0x7f) << Shift;
+        Value += ((uint64_t)(*I & 0x7f)) << Shift;
----------------
mahesh-attarde wrote:

ok

https://github.com/llvm/llvm-project/pull/84896


More information about the llvm-commits mailing list