[PATCH] D142084: [RFC][X86][MemFold] Upgrade the mechanism of auto-generated Memory Folding Table

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 19 21:09:35 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/utils/TableGen/X86FoldTablesEmitter.cpp:386
+    Result.IsAligned = (S & TB_ALIGN_MASK) != 0;
+    Result.Alignment = 1 << (((S & TB_ALIGN_MASK) >> TB_ALIGN_SHIFT) - 1);
+    Table[RegInstr] = Result;
----------------
Is it possible for S & TB_ALIGN_MASK to be 0? That would cause 1<< -1 which would match the ubsan error


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142084/new/

https://reviews.llvm.org/D142084



More information about the llvm-commits mailing list