[PATCH] D30446: [IndVars] Do not branch on poison
Andrew Trick via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 10:49:12 PDT 2017
atrick added a comment.
Ok. I thought the problem was caused by converting the loop test to a post-increment compare. Is that a problem?
The problem you've been talking about is caused by FindLoopCounter. This is mostly about setting up a specific pattern of loop for count-down-to-zero codegen. I wanted to make sure we don't create additional IVs in the process. A side effect is that we can reduce the number of IVs for some loops as a "nice" simplification. That doesn't seem worth doing if we need to erase flags. Why doesn't FindLoopCounter just check isIVNeverPoison?
At any rate, FindLoopCounter is making the wrong choice here. I don't understand why it's picking an "AlmostDead" IV over an IV that starts at non-zero.
https://reviews.llvm.org/D30446
More information about the llvm-commits
mailing list