Commit ed6e432
committed
[InstCombine] Fold
In the context of `(icmp eq (and x, y), 0)` we can replace `add`/`xor`
with `or`:
https://alive2.llvm.org/ce/z/R7CQp3(select (icmp eq (and x, y), 0), (add/xor x, y), F)
1 parent 9423bd0 commit ed6e432
File tree
2 files changed
+30
-8
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine
2 files changed
+30
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4395 | 4395 | | |
4396 | 4396 | | |
4397 | 4397 | | |
| 4398 | + | |
| 4399 | + | |
| 4400 | + | |
| 4401 | + | |
| 4402 | + | |
| 4403 | + | |
| 4404 | + | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
| 4409 | + | |
| 4410 | + | |
| 4411 | + | |
| 4412 | + | |
| 4413 | + | |
| 4414 | + | |
| 4415 | + | |
| 4416 | + | |
| 4417 | + | |
| 4418 | + | |
| 4419 | + | |
| 4420 | + | |
| 4421 | + | |
| 4422 | + | |
| 4423 | + | |
4398 | 4424 | | |
4399 | 4425 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3787 | 3787 | | |
3788 | 3788 | | |
3789 | 3789 | | |
3790 | | - | |
3791 | | - | |
3792 | | - | |
3793 | | - | |
3794 | | - | |
3795 | | - | |
| 3790 | + | |
| 3791 | + | |
3796 | 3792 | | |
3797 | 3793 | | |
3798 | 3794 | | |
| |||
4428 | 4424 | | |
4429 | 4425 | | |
4430 | 4426 | | |
4431 | | - | |
| 4427 | + | |
4432 | 4428 | | |
4433 | 4429 | | |
4434 | 4430 | | |
| |||
4461 | 4457 | | |
4462 | 4458 | | |
4463 | 4459 | | |
4464 | | - | |
| 4460 | + | |
4465 | 4461 | | |
4466 | 4462 | | |
4467 | 4463 | | |
| |||
0 commit comments