aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-11-23 16:46:55 -0500
committerSanjay Patel <spatel@rotateright.com>2021-11-23 16:50:23 -0500
commit892648b18a8cc3b8a08528112adfa74bdd432f8b (patch)
tree0f91ad5e07a35fef64966fb0234b4f670cd923e5 /lldb/packages/Python/lldbsuite/test/lldbpexpect.py
parentb1a68b170c44e8d5298800a080444c0b82366e51 (diff)
downloadllvm-892648b18a8cc3b8a08528112adfa74bdd432f8b.zip
llvm-892648b18a8cc3b8a08528112adfa74bdd432f8b.tar.gz
llvm-892648b18a8cc3b8a08528112adfa74bdd432f8b.tar.bz2
[InstSimplify] fold xor logic of 2 variables
(a & b) ^ (~a | b) --> ~a I was looking for a shortcut to reduce some of the complex logic folds that are currently up for review (D113216 and others in that stack), and I found this missing from instcombine/instsimplify. There is a trade-off in putting it into instsimplify: because we can't create new values here, we need a strict 'not' op (no undef elements). Otherwise, the fold is not valid: https://alive2.llvm.org/ce/z/k_AGGj If this was in instcombine instead, we could create the proper 'not'. But having the fold here benefits other passes like GVN that use instsimplify as an analysis. There is a related fold where 'and' and 'or' are swapped, and that is planned as a follow-up commit. Differential Revision: https://reviews.llvm.org/D114462
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbpexpect.py')
0 files changed, 0 insertions, 0 deletions