diff options
author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2021-10-22 12:07:42 -0700 |
---|---|---|
committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2021-10-29 10:58:09 -0700 |
commit | a905c54b766ed44f498594b53354d40bae38c07a (patch) | |
tree | aa6f079688972f04260dbccfc1e416084b84527b /llvm/lib/Support/Path.cpp | |
parent | d0ca0595b9bdb66ed28a8e33283d0244575b4ebb (diff) | |
download | llvm-a905c54b766ed44f498594b53354d40bae38c07a.zip llvm-a905c54b766ed44f498594b53354d40bae38c07a.tar.gz llvm-a905c54b766ed44f498594b53354d40bae38c07a.tar.bz2 |
[InstCombine] Fold `(~(a | b) & c) | ~(a | c)` into `~((b & c) | a)`
```
----------------------------------------
define i4 @src(i4 %a, i4 %b, i4 %c) {
%or1 = or i4 %b, %a
%not1 = xor i4 %or1, -1
%or2 = or i4 %a, %c
%not2 = xor i4 %or2, -1
%and = and i4 %not2, %b
%or3 = or i4 %and, %not1
ret i4 %or3
}
define i4 @tgt(i4 %a, i4 %b, i4 %c) {
%and = and i4 %c, %b
%or = or i4 %and, %a
%or3 = xor i4 %or, -1
ret i4 %or3
}
Transformation seems to be correct!
```
Differential Revision: https://reviews.llvm.org/D112338
Diffstat (limited to 'llvm/lib/Support/Path.cpp')
0 files changed, 0 insertions, 0 deletions