[PATCH] D37227: [SCEV] Ensure ScalarEvolution::createAddRecFromPHIWithCastsImpl is working with an add expression.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 13:32:58 PDT 2017
reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:4387
+
const SCEV *BEValue = getSCEV(BEValueV);
----------------
I think you've misdiagnosed the bug here. getSCEV is supposed to always return a SCEV for a value when requested. It may return SCEVUnknown, but that's still a valid SCEV. As such, the check for AddRec just below this should prevent the xor flowing through. I suspect you're actual issue is that getSCEV has return nullptr.
p.s. I suggest chatting with Max or Sanjoy to confirm everything I just said. I'm not SCEV expert.
https://reviews.llvm.org/D37227
More information about the llvm-commits
mailing list