[PATCH] D38415: [SimplifyIndVar] Replace IVUsers with loop invariant if possible

Hongbin Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 30 21:29:02 PDT 2017


etherzhhb added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyIndVar.cpp:552
 
-  if (!C)
+  if (!SE->isLoopInvariant(S, L))
     return false;
----------------
We may only want to do the replace if S is invariant of the IV's Loop, which may be different from "L" which is the innermost loop that contains the IV user


https://reviews.llvm.org/D38415





More information about the llvm-commits mailing list