[llvm] Greedy: Make eviction broken hint cost use CopyCost units (PR #160084)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 14:54:10 PDT 2025


================
@@ -9,8 +9,8 @@ define <vscale x 1 x i8> @test_vloxseg2_nxv1i8_triscv.vector.tuple_nxv1i8_2t_nxv
 ; CHECK-LABEL: test_vloxseg2_nxv1i8_triscv.vector.tuple_nxv1i8_2t_nxv1i8:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    vsetvli zero, a1, e8, mf8, ta, ma
-; CHECK-NEXT:    vloxseg2ei8.v v9, (a0), v8
-; CHECK-NEXT:    vmv1r.v v8, v10
+; CHECK-NEXT:    vmv1r.v v9, v8
+; CHECK-NEXT:    vloxseg2ei8.v v7, (a0), v9
----------------
preames wrote:

I realized something afterward when thinking about this diff.  I think we're missing a sub-register check or a split heuristic somewhere because in this case, we wouldn't be copying the tuple register class.  Only the second register in the tuple is actually returned, so the cost of the hint should be on that sub-register instead.  

This is non-blocking observation for this review.  The codegen difference seems small, and unimportant, it's just the realization that it might be the hint of something more interesting that I wanted to note.  

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


More information about the llvm-commits mailing list