[llvm] [CodeGen][Tablegen] Fix uninitialized var and shift overflow. (PR #84896)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 00:54:24 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;
----------------
KanRobert wrote:
+1
https://github.com/llvm/llvm-project/pull/84896
More information about the llvm-commits
mailing list