Commit 8b8c59c
authored
[Loads] Check if Ptr can be freed between Assume and CtxI. (#161255)
When using information from dereferenceable assumptions, we need to make
sure that the memory is not freed between the assume and the specified
context instruction. Instead of just checking canBeFreed, check if there
any calls that may free between the assume and the context instruction.
Note that this also adjusts the context instruction to be the terminator
in the loop predecessor, if there is one and it is a branch (to avoid
things like invoke).
PR: llvm/llvm-project#1612551 parent fb17bc7 commit 8b8c59c
File tree
3 files changed
+43
-46
lines changed- llvm
- lib/Analysis
- test/Transforms/LoopVectorize
3 files changed
+43
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 40 | + | |
46 | 41 | | |
47 | 42 | | |
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
| 46 | + | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
| |||
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
394 | 398 | | |
395 | 399 | | |
396 | 400 | | |
| |||
399 | 403 | | |
400 | 404 | | |
401 | 405 | | |
402 | | - | |
| 406 | + | |
403 | 407 | | |
404 | | - | |
| 408 | + | |
405 | 409 | | |
406 | 410 | | |
407 | 411 | | |
| |||
Lines changed: 5 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
1185 | | - | |
| 1185 | + | |
| 1186 | + | |
1186 | 1187 | | |
1187 | 1188 | | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
1210 | 1192 | | |
1211 | 1193 | | |
1212 | 1194 | | |
| |||
Lines changed: 24 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
511 | | - | |
512 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
513 | 515 | | |
514 | | - | |
| 516 | + | |
515 | 517 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
523 | 534 | | |
524 | | - | |
| 535 | + | |
525 | 536 | | |
526 | 537 | | |
527 | 538 | | |
| |||
0 commit comments