[PATCH] D45731: [InstCombine] Adjusting bswap pattern matching to hold for And/Shift mixed case

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 17 16:44:21 PDT 2018


spatel added reviewers: efriedma, kparzysz, lebedev.ri.
spatel added a comment.

Thanks for coming back to this. I think this patch is fine as one more match of a potential IR variant, but...
Since the time we started the discussion in https://reviews.llvm.org/D41353, there was a proposal to improve matching for ctpop and ctlz in https://reviews.llvm.org/D45173. I'm curious what others think about the fact that we match bswap/bitreverse in regular instcombine. Would it be better to match all of those intrinsics in the same place? Do we distinguish these based on how often we expect them to occur?


Repository:
  rL LLVM

https://reviews.llvm.org/D45731





More information about the llvm-commits mailing list