[PATCH] D45439: [IRCE] Use NUW flag for indvar

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 00:54:55 PDT 2018


samparker added a comment.

Hi Max,

Thanks, the reason why I don't understand why nuw isn't used is because the range data !{i32 0, i32 2147483647} is used for %len.a and the loop is only entered if %len.a != 0. The loop then exits when %idx < 2, so surely we should be able to discern that nuw is applicable? isKnownNonNegativeInLoop is also not helping in this case, but it would seem there's enough information here. Could it be that SCEV not be using the range metadata in conjunction with the entry and exit conditions?

thanks,
sam


https://reviews.llvm.org/D45439





More information about the llvm-commits mailing list