HomePhabricator

[InstCombine] fold not+or+neg

Authored by spatel on Fri, Apr 2, 8:57 AM.

Description

[InstCombine] fold not+or+neg

~((-X) | Y) --> (X - 1) & (~Y)

We generally prefer 'add' over 'sub', this reduces the
dependency chain, and this looks better for codegen on
x86, ARM, and AArch64 targets.

https://llvm.org/PR45755

https://alive2.llvm.org/ce/z/cxZDSp

Details

Committed
spatelFri, Apr 2, 10:16 AM
Parents
rG664313215453: [InstCombine] add tests for not+or+neg; NFC
Branches
Unknown
Tags
Unknown

Event Timeline

This comment was removed by MaskRay.