[llvm-branch-commits] [llvm] [AMDGPU][SDAG] Add ISD::PTRADD DAG combines (PR #142739)

Rodolfo Wottrich via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 23 06:51:05 PDT 2025


================
@@ -119,23 +119,17 @@ define void @msubpt1(i32 %index, i32 %elem) {
 ; CHECK-CPA-O0:       // %bb.0: // %entry
 ; CHECK-CPA-O0-NEXT:    // implicit-def: $x8
 ; CHECK-CPA-O0-NEXT:    mov w8, w0
-; CHECK-CPA-O0-NEXT:    sxtw x9, w8
-; CHECK-CPA-O0-NEXT:    mov x8, xzr
-; CHECK-CPA-O0-NEXT:    subs x8, x8, x9
-; CHECK-CPA-O0-NEXT:    lsl x8, x8, #1
-; CHECK-CPA-O0-NEXT:    subs x10, x8, x9
+; CHECK-CPA-O0-NEXT:    sxtw x8, w8
----------------
rgwott wrote:

It looks good, although I am not a human compiler =D
To me the giveaway is that some more complex chains of addpts are simplified, and some subpts are substituted by adppts, which is something I have seen during development.
I think it's fine, go ahead.

https://github.com/llvm/llvm-project/pull/142739


More information about the llvm-branch-commits mailing list