HomePhabricator

[InstCombine] sub(xor(x, y), or(x, y)) -> neg(and(x, y))

Description

[InstCombine] sub(xor(x, y), or(x, y)) -> neg(and(x, y))

Summary:

Name: sub(xor(x, y), or(x, y)) -> neg(and(x, y))
%or = or i32 %y, %x
%xor = xor i32 %x, %y
%sub = sub i32 %xor, %or
  =>
%sub1 = and i32 %x, %y
%sub = sub i32 0, %sub1

Optimization: sub(xor(x, y), or(x, y)) -> neg(and(x, y))
Done: 1
Optimization is correct!

https://rise4fun.com/Alive/8OI

Reviewers: lebedev.ri

Reviewed By: lebedev.ri

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67188

Details

Committed
xbolva00Wed, Sep 4, 11:03 AM
Reviewer
lebedev.ri
Differential Revision
D67188: [InstCombine] sub(xor(x, y), or(x, y)) -> neg(and(x, y))
Parents
rL370944: Add myself
Branches
Unknown
Tags
Unknown