[PATCH] D30446: [IndVars] Do not branch on poison

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 30 14:59:10 PDT 2017


sanjoy added a comment.

Hi Andy,

I'd like to revive this patch.  I tried what you suggested -- I taught LFTR to bail out of the transform if it would have to drop no-wrap flags.  With that change, the following tests fail:

  LLVM :: Transforms/IndVarSimplify/2011-10-27-lftrnull.ll
  LLVM :: Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
  LLVM :: Transforms/IndVarSimplify/PR31181.ll
  LLVM :: Transforms/IndVarSimplify/lftr-udiv-tripcount.ll
  LLVM :: Transforms/IndVarSimplify/lftr-zext.ll
  LLVM :: Transforms/IndVarSimplify/lftr_simple.ll
  LLVM :: Transforms/IndVarSimplify/widen-nsw.ll

If that seems reasonable (i.e. pessimizing the cases tested in the tests above seem okay), I'll go ahead and change `makeValueNonPoisonOnBackEdge` to not drop no-wrap flags.

I'd also appreciate it someone takes a look at the dependencies of this patch.


https://reviews.llvm.org/D30446





More information about the llvm-commits mailing list