HomePhabricator

[InstSimplify] fold xor logic of 2 variables, part 2

Authored by spatel on Nov 23 2021, 2:19 PM.

Description

[InstSimplify] fold xor logic of 2 variables, part 2

(~a & b) ^ (a | b) --> a

This is the swapped and/or (Demorgan?) sibling fold for
the fold added with D114462 ( 892648b18a8c ).

This case is easier to specify because we are returning
a root value, not a 'not':
https://alive2.llvm.org/ce/z/SRzj4f

Details

Committed
spatelNov 24 2021, 5:15 AM
Parents
rG823fc8aa0681: [InstSimplify] add tests for xor logic; NFC
Branches
Unknown
Tags
Unknown