[llvm] [AMDGPU] Add IR-level pass to rewrite away address space 7 (PR #77952)
Krzysztof Drewniak via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 07:54:44 PST 2024
================
@@ -352,3 +352,107 @@ loop.exit:
exit:
ret float %sum
}
+
+;; Test that the optimization works correctly for phi nodes that repeat the same
----------------
krzysz00 wrote:
I'd characterize switching
```llvm
%phi.rsrc = phi [ %v.rsrc, %l1 ], [ %v.rsrc, %l2 ], ...
%phi.off = phi [ %v1.off, %l1 ], [ %v2.off, %l2 ], ...
```
(the natural lowering of `phi`)
to
```llvm
%phi.rsrc = %v.rsrc
%phi.off = [ %v1.off, %l1 ], [ %v2.off, %l2 ]
```
as an optimization.
https://github.com/llvm/llvm-project/pull/77952
More information about the llvm-commits
mailing list