[PATCH] D14590: [SimplifyLibCalls] Constant folding for fls, flsl, flsll
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 18:27:50 PST 2016
davide abandoned this revision.
davide added a comment.
SimplifyLibCalls needs to know how to translate the pair `(DataLayout, C99 type)` -> `LLVM IR Type` in order to make this transformation. Until then, there's no reliable way to know how big a `long` is and that could cause a wrong constant folding of `fls()`. I haven't audited all the transformations here, but I wouldn't be surprised if other functions are incorrectly transformed assuming sizes of primitive types.
More information about the llvm-commits