diff options
| author | Sizov Nikita <s.nikita.v@gmail.com> | 2023-12-08 10:06:23 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-08 15:06:23 +0800 |
| commit | 827f8a7ef6ddcade0700311793510e3b3e0829f0 (patch) | |
| tree | 41fa1a241902490524770b91bff9c410aea596d3 /llvm/lib/Support/GraphWriter.cpp | |
| parent | 28a78e2a4a2c358900aaac1a1eb9efce17a7f5a5 (diff) | |
| download | llvm-827f8a7ef6ddcade0700311793510e3b3e0829f0.zip llvm-827f8a7ef6ddcade0700311793510e3b3e0829f0.tar.gz llvm-827f8a7ef6ddcade0700311793510e3b3e0829f0.tar.bz2 | |
Add opt with ctlz and shifts of power of 2 constants (#74175)
This patch does the following simplifications:
```
cttz(shl(C, X), 1) -> add(cttz(C, 1), X)
cttz(lshr exact(C, X), 1) -> sub(cttz(C, 1), X)
ctlz(lshr(C, X), 1) --> add(ctlz(C, 1), X)
ctlz(shl nuw (C, X), 1) --> sub(ctlz(C, 1), X)
```
Alive2: https://alive2.llvm.org/ce/z/9KHlKc
Closes #41333
Diffstat (limited to 'llvm/lib/Support/GraphWriter.cpp')
0 files changed, 0 insertions, 0 deletions
