Commit fef6613
authored
ValueTracking: simplify udiv/urem recurrences (llvm#108973)
A urem recurrence has the property that the result can never exceed the
start value. A udiv recurrence has the property that the result can
never exceed either the start value or the numerator, whichever is
greater. Implement a simplification based on these properties.1 parent abe0cd4 commit fef6613
File tree
2 files changed
+21
-15
lines changed- llvm
- lib/Analysis
- test/Analysis/ValueTracking
2 files changed
+21
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | 1429 | | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
1433 | 1435 | | |
1434 | 1436 | | |
1435 | | - | |
| 1437 | + | |
| 1438 | + | |
1436 | 1439 | | |
1437 | 1440 | | |
| 1441 | + | |
1438 | 1442 | | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
1439 | 1446 | | |
1440 | 1447 | | |
1441 | 1448 | | |
| |||
1453 | 1460 | | |
1454 | 1461 | | |
1455 | 1462 | | |
1456 | | - | |
1457 | | - | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1458 | 1467 | | |
1459 | 1468 | | |
1460 | 1469 | | |
| |||
1542 | 1551 | | |
1543 | 1552 | | |
1544 | 1553 | | |
| 1554 | + | |
1545 | 1555 | | |
1546 | 1556 | | |
1547 | 1557 | | |
| |||
9039 | 9049 | | |
9040 | 9050 | | |
9041 | 9051 | | |
9042 | | - | |
| 9052 | + | |
9043 | 9053 | | |
9044 | 9054 | | |
9045 | 9055 | | |
9046 | 9056 | | |
9047 | 9057 | | |
| 9058 | + | |
| 9059 | + | |
9048 | 9060 | | |
9049 | 9061 | | |
9050 | 9062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | 89 | | |
92 | 90 | | |
93 | | - | |
94 | | - | |
| 91 | + | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
| |||
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | | - | |
136 | | - | |
137 | 132 | | |
138 | 133 | | |
139 | | - | |
140 | | - | |
| 134 | + | |
141 | 135 | | |
142 | 136 | | |
143 | 137 | | |
| |||
0 commit comments