[PATCH] D48768: [X86] When have BMI2, prefer shifts to clear low/high bits, rather than variable mask.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 10:45:43 PDT 2018


reames added a comment.

In https://reviews.llvm.org/D48768#1152532, @craig.topper wrote:

> This specifically looks for (and (shl -1, X), Y) or (and (shr -1, X), Y).  If Y in either of those is a constant, I think we would have rewritten the LHS side of the shift already and removed the 'and' entirely.


That was indeed what I was missing.  Thanks for the clarification.


Repository:
  rL LLVM

https://reviews.llvm.org/D48768





More information about the llvm-commits mailing list