[InstSimplify] (~A & B) | ~(A | B) --> ~A with logical and
authorDavid Green <david.green@arm.com>
Mon, 7 Nov 2022 10:03:18 +0000 (10:03 +0000)
committerDavid Green <david.green@arm.com>
Mon, 7 Nov 2022 10:03:18 +0000 (10:03 +0000)
commitb46427b9a2fa2587e9087ab7e2bbb2c5abbb30e3
tree5a4d9ee8a8df210d846c072ad5ddb64d0f83d5ad
parentc8be35293c82f216e975c56f62ddf9199a22f2e2
[InstSimplify] (~A & B) | ~(A | B) --> ~A with logical and

According to https://alive2.llvm.org/ce/z/opsdrb, it is valid to convert
(~A & B) | ~(A | B) --> ~A even if the And is a Logical And. This came
up from the vector masking of predicated blocks.

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