diff options
| author | Juneyoung Lee <aqjune@gmail.com> | 2020-09-10 02:55:06 +0900 |
|---|---|---|
| committer | Juneyoung Lee <aqjune@gmail.com> | 2020-09-10 08:07:38 +0900 |
| commit | a6183d0f028cb73eccc82a7cce9534708a149762 (patch) | |
| tree | 14ba1231bb124c5cf3010ca7e7e139eb95a8b599 /llvm/lib/Bitcode/Reader/BitReader.cpp | |
| parent | 09d492902f178f60b3ab986360eadde9b5c8d359 (diff) | |
| download | llvm-a6183d0f028cb73eccc82a7cce9534708a149762.zip llvm-a6183d0f028cb73eccc82a7cce9534708a149762.tar.gz llvm-a6183d0f028cb73eccc82a7cce9534708a149762.tar.bz2 | |
[ValueTracking] isKnownNonZero, computeKnownBits for freeze
This implements support for isKnownNonZero, computeKnownBits when freeze is involved.
```
br (x != 0), BB1, BB2
BB1:
y = freeze x
```
In the above program, we can say that y is non-zero. The reason is as follows:
(1) If x was poison, `br (x != 0)` raised UB
(2) If x was fully undef, the branch again raised UB
(3) If x was non-zero partially undef, say `undef | 1`, `freeze x` will return a nondeterministic value which is also non-zero.
(4) If x was just a concrete value, it is trivial
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D75808
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitReader.cpp')
0 files changed, 0 insertions, 0 deletions
