[PATCH] D103788: [InstCombine] Eliminate casts to optimize ctlz operation
Datta Nagraj via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 10 03:33:24 PDT 2021
datta.nagraj added a comment.
@lebedev.ri Sir, but if we don't take trunc into consideration, then how are we optimizing this?
Earlier it was 2 insts (zext - ctlz), and now its 3 insts(ctlz - add - zext). I agree that the ctlz , add are done on a lower datatype.
If we consider trunc as well, then we can convert 3 insts (zext - ctlz - trunc) to 2 insts (ctlz - add).
Shouldn't we do this opt only when the trunc is present?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103788/new/
https://reviews.llvm.org/D103788
More information about the llvm-commits
mailing list