[InstSimplify] Add logic 'or' fold to -1
authorMehrnoosh Heidarpour <mehrnoosh.heidarpour@huawei.com>
Fri, 3 Dec 2021 15:04:43 +0000 (10:04 -0500)
committerMehrnoosh Heidarpour <mehrnoosh.heidarpour@huawei.com>
Sat, 4 Dec 2021 20:04:18 +0000 (15:04 -0500)
commite94134052fda15bcac2d237304abbfeb866d6a27
tree01dad385f759c4d31c7c90054445ecc1c88a4c24
parente337dc8bfee0793fdeafd61da3ab658a0822a24c
[InstSimplify] Add logic 'or' fold to -1

Adding the following folding opportunity:
(~A | B) | (A ^ B) --> -1

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

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