[PATCH] D14590: [SimplifyLibCalls] Constant folding for fls, flsl, flsll
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 21:40:14 PST 2016
efriedma added inline comments.
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1558
+ return B.getInt32(CI->getType()->getBitWidth() -
+ CI->getValue().countLeadingZeros());
+ }
----------------
Maybe we should just unconditionally lower fls() to llvm.ctlz()?
https://reviews.llvm.org/D14590
More information about the llvm-commits
mailing list