[PATCH] D49151: [SimplifyIndVar] Avoid generating truncate instructions with non-hoisted Load operand.

Sebastian Pop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 11:51:39 PDT 2018


sebpop added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1597
+    if (widenWithVariantLoadUse(DU))
+      return nullptr;
+
----------------
sebpop wrote:
> ... and call it from here.
> 
>   if (analysisFails())
>     return nullptr;
>   codeGenWiden();
> 
this should be:

  if (analysisSucceeds()) {
     codeGenWiden();
     return nullptr;
  }


https://reviews.llvm.org/D49151





More information about the llvm-commits mailing list