Commit c6f0b74
committed
[LAA] Use SCEVUse to add extra NUW flags to pointer bounds.
Use SCEVUse to add a NUW flag to the upper bound of an accessed pointer.
We must already have proved that the pointers do not wrap, as otherwise
we could not use them for runtime check computations.
By adding the use-specific NUW flag, we can detect cases where SCEV can
prove that the compared pointers must overlap, so the runtime checks
will always be false. In that case, there is no point in vectorizing
with runtime checks.
Note that this depends c2895cd27fbf200d1da056bc66d77eeb62690bf0, which
could be submitted separately if desired; without the current change, I
don't think it triggers in practice though.1 parent eed10c9 commit c6f0b74
File tree
12 files changed
+132
-239
lines changed- llvm
- include/llvm/Analysis
- lib/Analysis
- test/Analysis/LoopAccessAnalysis
12 files changed
+132
-239
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
| 466 | + | |
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
480 | 481 | | |
481 | 482 | | |
| 483 | + | |
482 | 484 | | |
483 | 485 | | |
484 | 486 | | |
| |||
535 | 537 | | |
536 | 538 | | |
537 | 539 | | |
| 540 | + | |
| 541 | + | |
538 | 542 | | |
539 | 543 | | |
540 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
| 211 | + | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| |||
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
245 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
| |||
377 | 382 | | |
378 | 383 | | |
379 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
380 | 390 | | |
381 | 391 | | |
382 | 392 | | |
| |||
631 | 641 | | |
632 | 642 | | |
633 | 643 | | |
634 | | - | |
635 | | - | |
| 644 | + | |
636 | 645 | | |
637 | 646 | | |
638 | 647 | | |
| |||
1268 | 1277 | | |
1269 | 1278 | | |
1270 | 1279 | | |
| 1280 | + | |
1271 | 1281 | | |
1272 | 1282 | | |
1273 | 1283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11950 | 11950 | | |
11951 | 11951 | | |
11952 | 11952 | | |
| 11953 | + | |
| 11954 | + | |
11953 | 11955 | | |
11954 | 11956 | | |
11955 | 11957 | | |
| |||
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
| |||
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
112 | | - | |
113 | | - | |
| 108 | + | |
114 | 109 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 110 | | |
120 | 111 | | |
121 | 112 | | |
| |||
0 commit comments