[InstSimplify] Fold A|B | (A^B) --> A|B
authorMehrnoosh Heidarpour <mehrnoosh.heidarpour@huawei.com>
Mon, 15 Nov 2021 23:54:07 +0000 (18:54 -0500)
committerMuhammad Asif Manzoor <muhammad.asif.manzoor1@huawei.com>
Mon, 15 Nov 2021 23:55:04 +0000 (18:55 -0500)
commit62c51a72f9e7540fb58bba7e116a4b411ab18bef
tree2188c9d813303edd54f57197fb4703e139c79d7d
parent4c3d916c4bd2a392101c74dd270bd1e6a4fec15b
[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

Reviewed By: rampitec

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