[PATCH] D65417: [SCCP] Update condition to avoid overflow.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 14:05:06 PDT 2019


lebedev.ri added inline comments.


================
Comment at: lib/Analysis/ConstantFolding.cpp:550-552
   // If we're not accessing anything in this constant, the result is undefined.
   if (Offset >= InitializerSize)
     return UndefValue::get(IntType);
----------------
Is `Offset==0` == 0'th byte of the constant?
If so, perhaps this check could simply be done first?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65417





More information about the llvm-commits mailing list