[PATCH] D52148: [InstCombine] foldICmpWithLowBitMaskedVal(): handle uncanonical ((-1 << y) >> y) mask

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 10:21:33 PDT 2018


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

Copying from https://reviews.llvm.org/D52147:
As discussed in https://reviews.llvm.org/D52146, this is a close call. We don't have evidence to suggest that the non-canonical pattern occurs often in real code, but it was spotted somewhere in the wild, and it's nice that we can fold this pattern regardless of extra uses. OTOH, instcombine keeps growing bigger and slower. But given past policy in these situations, we don't block tiny patches like this just because the fold is unlikely, so LGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D52148





More information about the llvm-commits mailing list