[PATCH] D101210: [InstCombine] ctpop(X) + ctpop(Y) => ctpop(X | Y) if X and Y have no common bits (PR48999)
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 24 09:00:37 PDT 2021
xbolva00 added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/ctpop.ll:208
+; CHECK-NEXT: [[TMP2:%.*]] = call i32 @llvm.ctpop.i32(i32 [[TMP1]]), !range [[RNG1]]
+; CHECK-NEXT: ret i32 [[TMP2]]
;
----------------
nikic wrote:
> nikic wrote:
> > We could optimize ctpop(rot(X)) -> ctpop(X).
> Though I'm not sure that was actually the case you wanted to test. As you still have the `%a` argument, maybe this was just a typo :)
Yeah, typo, but ctpop(rot(X)) -> ctpop(X) is good idea.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101210/new/
https://reviews.llvm.org/D101210
More information about the llvm-commits
mailing list