[llvm] [AMDGPULowerBufferFatPointers] Simplify and fix GEP offset emission (PR #95115)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 07:48:03 PDT 2024


================
@@ -119,7 +124,8 @@ define ptr addrspace(7) @zero_gep_goes_first(ptr addrspace(7) %v0, i32 %arg) {
 ; CHECK-SAME: ({ ptr addrspace(8), i32 } [[V0:%.*]], i32 [[ARG:%.*]]) #[[ATTR0]] {
 ; CHECK-NEXT:    [[V0_RSRC:%.*]] = extractvalue { ptr addrspace(8), i32 } [[V0]], 0
 ; CHECK-NEXT:    [[V0_OFF:%.*]] = extractvalue { ptr addrspace(8), i32 } [[V0]], 1
-; CHECK-NEXT:    [[V2:%.*]] = add i32 [[V0_OFF]], [[ARG]]
+; CHECK-NEXT:    [[V1:%.*]] = add i32 [[V0_OFF]], 0
----------------
arsenm wrote:

InstSimplify. Can also use the IRBuilder that tries to simplify everything 

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


More information about the llvm-commits mailing list