[InstSimplify] Fold A|B | (A^B) --> A|B
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 15 Nov 2021 20:24:44 +0000 (12:24 -0800)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 15 Nov 2021 21:49:20 +0000 (13:49 -0800)
commit193c40e9667ca2b173232b393fc72ea9e4944aa3
tree5fd3d2954b899dc32dc47e4b404838e789f5e8c2
parent1c3ef9ef4a4dc84f36e9282b9cd1c7313a3d4a08
[InstSimplify] Fold A|B | (A^B) --> A|B

This patch adds the following fold opportunity:
A|B | (A^B) --> A|B

that is reported here : https://bugs.llvm.org/show_bug.cgi?id=52479

https://alive2.llvm.org/ce/z/33-My-

Test cases with base results are added in D113860

(authored by MehrHeidar, committed by rampitec).

Differential Revision:  https://reviews.llvm.org/D113861
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/or.ll