Commit fea0bde
committed
[InstCombine] Add convenience helper
This just encapsulates the common pattern:
```
if (takeLog2(..., /*DoFold=*/false)) {
Value * Log2 = takeLog2(..., /*DoFold=*/true);
...
}
```tryGetLog2; NFC1 parent b21edc4 commit fea0bde
File tree
2 files changed
+9
-13
lines changed- llvm
- include/llvm/Transforms/InstCombine
- lib/Transforms/InstCombine
2 files changed
+9
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
204 | 210 | | |
205 | 211 | | |
206 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
| 531 | + | |
535 | 532 | | |
536 | 533 | | |
537 | 534 | | |
538 | 535 | | |
539 | 536 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 537 | + | |
544 | 538 | | |
545 | 539 | | |
546 | 540 | | |
| |||
1506 | 1500 | | |
1507 | 1501 | | |
1508 | 1502 | | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
| 1503 | + | |
1513 | 1504 | | |
1514 | 1505 | | |
1515 | | - | |
1516 | 1506 | | |
1517 | 1507 | | |
1518 | 1508 | | |
| |||
0 commit comments