Changes

Summary

  1. [InstCombine] Add optimization to prevent poison from being propagated. (details)
  2. [lld-macho][nfc] Expand the compact unwind symbol reloc test (details)
Commit 1a5f4cbe1bd62e6624cbb77dad0d363addd1b324 by aqjune
[InstCombine] Add optimization to prevent poison from being propagated.

In D104569, Freeze was inserted just before br to solve the `branching on undef` miscompilation problem.
But value analysis was being disturbed by added freeze.

```
v = load ptr
cond = freeze(icmp (and v, const), const')
br cond, ...
```
The case in which value analysis disturbed is as above.
By changing freeze to add immediately after load, value analysis will be successful again.

```
v = load ptr
freeze(icmp (and v, const), const')
=>
v = load ptr
v' = freeze v
icmp (and v', const), const'
```
In this patch, I propose the above optimization.
With this patch, the poison will not spread as the freeze is performed early.

Reviewed By: nikic, lebedev.ri

Differential Revision: https://reviews.llvm.org/D105392
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
The file was modifiedllvm/test/Transforms/InstCombine/freeze.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Commit d5c0b9c84886aea65d7148f403b08799bec9186e by jezng
[lld-macho][nfc] Expand the compact unwind symbol reloc test

Add a bit more detail to the comments, and check that the final binary
does indeed have a `__unwind_info` section (D105557 previosly regressed
this).

Also rename the test to emphasize that we are testing relocations
compact unwind, not relocations in general.
The file was addedlld/test/MachO/compact-unwind-sym-relocs.s
The file was removedlld/test/MachO/relocs-syms-not-in-got.s