[PATCH] D47624: [SimpleLoopUnswitch] Invalidate SCEV after making structural changes to a loop

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 3 21:20:27 PDT 2018


mkazantsev added inline comments.


================
Comment at: test/Transforms/SimpleLoopUnswitch/invalidate_scev.ll:1
+; RUN: opt -iv-users -simple-loop-unswitch -indvars -S < %s | FileCheck %s
+; PR37651
----------------
mkazantsev wrote:
> chandlerc wrote:
> > Can you instead just require SCEV before and verify it after unswitch? Would seem more focused.
> I tried to construct a simpler test, but it appears to not be so easy. The tricky bit is that we don't just need SCEV to be constructed, we also need some requests of explicit taken count calculation made (it is calculated lazily), so that some data gets into the cache first and then becomes invalid because of unswitching. I will try to write it as a C++ unit test on that.
Never mind, `print<scalar-evolution>` is enough to make the right queries.


https://reviews.llvm.org/D47624





More information about the llvm-commits mailing list