[PATCH] D52146: [InstCombine] foldICmpWithLowBitMaskedVal(): handle ~(-1 << y) mask

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 11:02:51 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D52146#1236849, @lebedev.ri wrote:

> In https://reviews.llvm.org/D52146#1236832, @spatel wrote:
>
> > Is this a generalization of https://reviews.llvm.org/D52001 (and if so, can we remove that code as a special-case of the more general pattern)?
>
>
> No, i don't think so, why?
>
> Like i wrote in the description:
>
> > Two folds are happening here:
> > 
> > 1. https://rise4fun.com/Alive/oaFX
> > 2. And then `foldICmpWithHighBitMask()` (https://reviews.llvm.org/D52001) fires on newly formed IR: https://rise4fun.com/Alive/wsP4
>
> I.e. this fold actually allows https://reviews.llvm.org/D52001 to happen.


Sorry, I misread what was happening in this patch series. Things look logically correct, but we should clarify for the record - what is the higher-level motivation for these folds? Particularly, for the cases with non-canonical pattern matching - do we have some important application that will benefit or data for how often those patterns occur across a range of benchmarks?


Repository:
  rL LLVM

https://reviews.llvm.org/D52146





More information about the llvm-commits mailing list