[PATCH] D64422: [SCEV] teach SCEV symbolical execution about overflow intrinsics folding.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 10:23:42 PDT 2019


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM.  As Nikita points out, this solves many of the same cases as my patch, but it comes at it differently.  I think both are useful.



================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:7675
 static bool CanConstantFold(const Instruction *I) {
   if (isa<BinaryOperator>(I) || isa<CmpInst>(I) ||
       isa<SelectInst>(I) || isa<CastInst>(I) || isa<GetElementPtrInst>(I) ||
----------------
It looks like this list is generally more limited than it needs to be.  A nice follow up patch would be to look at merging this with the actual constant folding logic somehow and arranging it so they have to stay in sink.  (Optional, follow up)


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

https://reviews.llvm.org/D64422





More information about the llvm-commits mailing list