Commit 4b88628
committed
[SDAG] Introduce inbounds flag for pointer arithmetic
This patch introduces an inbounds SDNodeFlag, to show that a pointer
addition SDNode implements an inbounds getelementptr operation (i.e.,
the pointer operand is in bounds wrt. the allocated object it is based
on, and the arithmetic does not change that). The flag is set in the DAG
construction when lowering inbounds GEPs.
Inbounds information is useful in the ISel when selecting memory
instructions that perform address computations whose intermediate steps
must be in the same memory region as the final result. A follow-up patch
will start using it for AMDGPU's flat memory instructions, where the
immediate offset must not affect the memory aperture of the address.
A similar patch for gMIR and GlobalISel will follow.
For SWDEV-516125.1 parent 1070abb commit 4b88628
File tree
4 files changed
+14
-3
lines changed- llvm
- include/llvm/CodeGen
- lib/CodeGen/SelectionDAG
- test/CodeGen/X86
4 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
418 | 421 | | |
419 | 422 | | |
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
423 | | - | |
| 426 | + | |
424 | 427 | | |
425 | 428 | | |
426 | 429 | | |
| |||
455 | 458 | | |
456 | 459 | | |
457 | 460 | | |
| 461 | + | |
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
| |||
472 | 476 | | |
473 | 477 | | |
474 | 478 | | |
| 479 | + | |
475 | 480 | | |
476 | 481 | | |
477 | 482 | | |
| |||
481 | 486 | | |
482 | 487 | | |
483 | 488 | | |
484 | | - | |
| 489 | + | |
485 | 490 | | |
486 | 491 | | |
487 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4283 | 4283 | | |
4284 | 4284 | | |
4285 | 4285 | | |
| 4286 | + | |
4286 | 4287 | | |
4287 | 4288 | | |
4288 | 4289 | | |
| |||
4326 | 4327 | | |
4327 | 4328 | | |
4328 | 4329 | | |
| 4330 | + | |
4329 | 4331 | | |
4330 | 4332 | | |
4331 | 4333 | | |
| |||
4388 | 4390 | | |
4389 | 4391 | | |
4390 | 4392 | | |
| 4393 | + | |
4391 | 4394 | | |
4392 | 4395 | | |
4393 | 4396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
666 | 669 | | |
667 | 670 | | |
668 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments