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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 07:13:16 PDT 2018


lebedev.ri added a comment.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D52146





More information about the llvm-commits mailing list