[llvm] 8591640 - [InstCombine] add DeMorgan folds for logical ops in select form

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 20 07:57:11 PDT 2021


https://reviews.llvm.org/rG240acb0cff3f

On Sun, Jun 20, 2021 at 9:30 AM Sanjay Patel <spatel at rotateright.com> wrote:

> Thanks! Constant expressions strike again...working on a reduction now.
>
> On Sun, Jun 20, 2021 at 5:49 AM Florian Hahn <florian_hahn at apple.com>
> wrote:
>
>>
>>
>> On Jun 14, 2021, at 17:55, Sanjay Patel via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>>
>> Author: Sanjay Patel
>> Date: 2021-06-14T12:54:35-04:00
>> New Revision: 8591640379ac9175a8a8493126ecf0b44e3bb4af
>>
>> URL:
>> https://github.com/llvm/llvm-project/commit/8591640379ac9175a8a8493126ecf0b44e3bb4af
>> DIFF:
>> https://github.com/llvm/llvm-project/commit/8591640379ac9175a8a8493126ecf0b44e3bb4af.diff
>>
>> LOG: [InstCombine] add DeMorgan folds for logical ops in select form
>>
>> We canonicalized to these select patterns (poison-safe logic)
>> with D101191, so we need to reduce 'not' ops when possible
>> as we would with 'and'/'or' instructions.
>>
>> This is shown in a secondary example in:
>> https://llvm.org/PR50389
>>
>> https://alive2.llvm.org/ce/z/BvsESh
>>
>>
>> It looks like this is causing an infinite loop in InstCombine:
>> https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35399
>>
>> Cheers,
>> Florian
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210620/08d241e7/attachment.html>


More information about the llvm-commits mailing list