Commit f2a5cd0
committed
[AMDGPU][SDAG] Add ISD::PTRADD DAG combines
This patch focuses on generic DAG combines, plus an AMDGPU-target-specific one
that is closely connected.
The generic DAG combine is based on a part of PR #105669 by @rgwott, which was
adapted from work by @jrtc27, @arichardson, @davidchisnall in the CHERI/Morello
LLVM tree. I added some parts and removed several disjuncts from the
reassociation condition:
- `isNullConstant(X)`, since there are address spaces where 0 is a perfectly
normal value that shouldn't be treated specially,
- `(YIsConstant && ZOneUse)` and `(N0OneUse && ZOneUse && !ZIsConstant)`, since
they cause regressions in AMDGPU.
For SWDEV-516125.1 parent 3e1e368 commit f2a5cd0
File tree
4 files changed
+201
-135
lines changed- llvm
- lib
- CodeGen/SelectionDAG
- Target/AMDGPU
- test/CodeGen/AMDGPU
4 files changed
+201
-135
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| 424 | + | |
424 | 425 | | |
425 | 426 | | |
426 | 427 | | |
| |||
1140 | 1141 | | |
1141 | 1142 | | |
1142 | 1143 | | |
1143 | | - | |
| 1144 | + | |
1144 | 1145 | | |
1145 | 1146 | | |
1146 | 1147 | | |
| |||
1860 | 1861 | | |
1861 | 1862 | | |
1862 | 1863 | | |
| 1864 | + | |
1863 | 1865 | | |
1864 | 1866 | | |
1865 | 1867 | | |
| |||
2630 | 2632 | | |
2631 | 2633 | | |
2632 | 2634 | | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
2633 | 2722 | | |
2634 | 2723 | | |
2635 | 2724 | | |
| |||
15061 | 15150 | | |
15062 | 15151 | | |
15063 | 15152 | | |
| 15153 | + | |
15064 | 15154 | | |
15065 | 15155 | | |
15066 | 15156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
| 948 | + | |
948 | 949 | | |
949 | 950 | | |
950 | 951 | | |
| |||
15095 | 15096 | | |
15096 | 15097 | | |
15097 | 15098 | | |
| 15099 | + | |
| 15100 | + | |
| 15101 | + | |
| 15102 | + | |
| 15103 | + | |
| 15104 | + | |
| 15105 | + | |
| 15106 | + | |
| 15107 | + | |
| 15108 | + | |
| 15109 | + | |
| 15110 | + | |
| 15111 | + | |
| 15112 | + | |
| 15113 | + | |
| 15114 | + | |
| 15115 | + | |
| 15116 | + | |
| 15117 | + | |
| 15118 | + | |
| 15119 | + | |
| 15120 | + | |
| 15121 | + | |
| 15122 | + | |
| 15123 | + | |
| 15124 | + | |
| 15125 | + | |
| 15126 | + | |
| 15127 | + | |
| 15128 | + | |
| 15129 | + | |
| 15130 | + | |
| 15131 | + | |
| 15132 | + | |
| 15133 | + | |
| 15134 | + | |
| 15135 | + | |
| 15136 | + | |
| 15137 | + | |
| 15138 | + | |
| 15139 | + | |
| 15140 | + | |
| 15141 | + | |
| 15142 | + | |
| 15143 | + | |
| 15144 | + | |
15098 | 15145 | | |
15099 | 15146 | | |
15100 | 15147 | | |
| |||
15633 | 15680 | | |
15634 | 15681 | | |
15635 | 15682 | | |
| 15683 | + | |
| 15684 | + | |
15636 | 15685 | | |
15637 | 15686 | | |
15638 | 15687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
0 commit comments