HomePhabricator

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

Authored by xbolva00 on Wed, Sep 4, 11:03 AM.

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

llvm-svn: 370945

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
rG673e5476a817: [OpenMP] Change initialization of __kmp_global
Branches
Unknown
Tags
Unknown