[llvm] Add a pass "SinkGEPConstOffset" (PR #140657)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 07:17:41 PDT 2025


================
@@ -0,0 +1,155 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -mtriple=amdgcn-amd-amdhsa \
+; RUN: -passes="default<O3>,sink-gep-const-offset" -S | \
+; RUN: FileCheck %s --check-prefix=CHECK-O3
+; RUN: opt < %s -mtriple=amdgcn-amd-amdhsa \
+; RUN: -passes=sink-gep-const-offset -S | FileCheck %s --check-prefix=CHECK-SINK
----------------
jmmartinez wrote:

Do you have a motivating example where using this pass reduces the register pressure (when used together with `-O3`) ?

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


More information about the llvm-commits mailing list