[PATCH] D152145: [InstSimplify] Fold all global variables with initializers

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 2 13:41:57 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:834
 
   APInt Size(IntTyBits, DL.getTypeAllocSize(GV.getValueType()));
   return std::make_pair(align(Size, GV.getAlign()), Zero);
----------------
Fix for the assertion failure should be pretty simple: We also need to bail out if the type is `!isSized()`. Previously this was guaranteed by having an initializer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152145



More information about the llvm-commits mailing list