[PATCH] D47348: [LoopIdiomRecognize] Only convert loops to ctlz if we can prove that the input is non-negative.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 25 13:29:15 PDT 2018
craig.topper updated this revision to Diff 148654.
craig.topper added a comment.
Mention in infinite loop in comments. Update C code in comments in ARM test. Change ashr to lshr in tests when its directly after the abs pattern. InstCombine is able to convert those. The ashr inside the loop dont' get changed because value tracking doesn't understand the recurrence I guess.
I've left FIXME comments to handle lshr loops in the future. But I don't have a motivating example of those yet.
https://reviews.llvm.org/D47348
Files:
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
test/Transforms/LoopIdiom/ARM/ctlz.ll
test/Transforms/LoopIdiom/X86/ctlz.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47348.148654.patch
Type: text/x-patch
Size: 11741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180525/29b35156/attachment-0001.bin>
More information about the llvm-commits
mailing list