diff options
| author | Alan Zhao <ayzhao@google.com> | 2025-11-03 09:32:42 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-03 09:32:42 -0800 |
| commit | c4763e2b9038fbd1154f0276a8b9542b8c115111 (patch) | |
| tree | dd035079ba186a220eca1fdea48ca6b492ab292f /llvm/lib/TextAPI/BinaryReader/DylibReader.cpp | |
| parent | 513334faec2594bbeb3ac00f0092bed20b23abd3 (diff) | |
| download | llvm-c4763e2b9038fbd1154f0276a8b9542b8c115111.zip llvm-c4763e2b9038fbd1154f0276a8b9542b8c115111.tar.gz llvm-c4763e2b9038fbd1154f0276a8b9542b8c115111.tar.bz2 | |
[profcheck][InstCombine] Preserve branch weights in logical identities (#165810)
For the simplification
```
(C && A) || (!C && B) --> sel C, A, B
```
(and related), if `C` (or (`!C`)) is the condition in the select
instruction representing the logical and, we can preserve that logical
and's branch weights when emitting the new instruction. Otherwise, the
profile data is unknown.
If `C` is the condition of both logical ands, then we just take the
branch weights of the first logical and (though in practice they should
be equal.)
Furthermore, `select-safe-transforms.ii` now passes under the profcheck
configuration, so we remove it from the failing tests.
Tracking issue: #147390
Diffstat (limited to 'llvm/lib/TextAPI/BinaryReader/DylibReader.cpp')
0 files changed, 0 insertions, 0 deletions
