[InstSimplify] add logic fold for 'or' with 'xor'+'and'
authorSanjay Patel <spatel@rotateright.com>
Tue, 7 Dec 2021 15:43:45 +0000 (10:43 -0500)
committerSanjay Patel <spatel@rotateright.com>
Tue, 7 Dec 2021 16:08:26 +0000 (11:08 -0500)
commit8a69b0447898786ea352819df9c5164ed799af55
treeb0e1578f27c72649495292bbc37065db6f769d54
parent4b48cdd4dd47ca008f2efd74f3f56214fc36497a
[InstSimplify] add logic fold for 'or' with 'xor'+'and'

This replaces the 'or' from 4b30076f16fc with an 'and'.
We have to guard against propagating undef elements from
vector 'not' values:
https://alive2.llvm.org/ce/z/irMwRc
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/AndOrXor.ll
llvm/test/Transforms/InstSimplify/or.ll