[llvm] [HEXAGON] [MachinePipeliner] Fix the DAG in case of dependent phis. (PR #135925)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 05:06:45 PDT 2025


================
@@ -5,11 +5,13 @@
 ; 2, so the computation for the number of Phis needs to be adjusted when
 ; the incoming prolog block is from prolog 0 or prolog 1.
 ; Note: the pipeliner no longer generates a 3 stage pipeline for this test.
+; Note: the pipeliner has been generating a 4-stage pipelined loop.
 
 ; CHECK: loop0
 ; CHECK: [[REG0:r([0-9]+)]] = add(r{{[0-8]+}},#8)
+; CHECK: r{{[0-9]+}} = [[REG0]]
 ; CHECK: endloop0
-; CHECK: [[REG0]] = add(r{{[0-9]+}},#8)
+; CHECK: r{{[0-9]+}} = add(r{{[0-9]+}},#8)
----------------
kasuga-fj wrote:

If ensuring that this test is pipelined (i.e., the pipeliner can find a valid schedule) is sufficient, you can use other outputs such as debug messages or pass remarks instead of the generated code. However, judging from the filename and the CHECK directives, I believe the purpose of this test is to verify that the expander works correctly for a given schedule, particularly that the PHIs are generated properly in the epilogue blocks. If you want to check this as well, I think executing the generated code is the most reliable method. Using [update_mir_test_checks.py](https://github.com/llvm/llvm-project/blob/b359422eebbc61f0e0fb03c27ec1a93c818701ee/llvm/utils/update_mir_test_checks.py) would be another way (in this case, we need to check whether the generated assembly is correct every time the generated code changes).

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


More information about the llvm-commits mailing list