[PATCH] D47348: [LoopIdiomRecognize] Only convert loops to ctlz if we can prove that the input is non-negative.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 25 10:40:53 PDT 2018
efriedma added inline comments.
================
Comment at: test/Transforms/LoopIdiom/ARM/ctlz.ll:16
; return i;
; }
;
----------------
Please update this comment.
================
Comment at: test/Transforms/LoopIdiom/ARM/ctlz.ll:54
%indvars.iv.next = add nuw i64 %indvars.iv, 1
%shr = ashr i32 %shr11, 1
%tobool = icmp eq i32 %shr, 0
----------------
Given that shr11 is known positive, it seems likely some other pass will convert it to an lshr. (If that doesn't happen now, it likely will some time in the future.)
https://reviews.llvm.org/D47348
More information about the llvm-commits
mailing list