[PATCH] D24818: Using branch probability to guide critical edge splitting.

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 13:50:22 PDT 2016


davidxl added inline comments.

================
Comment at: test/CodeGen/X86/phys_subreg_coalesce-2.ll:18
@@ -17,2 +17,3 @@
 ; CHECK-NOT: mov
+; CHECK: jbe
 forbody:		; preds = %forbody, %forcond.preheader
----------------
danielcdh wrote:
> davidxl wrote:
> > danielcdh wrote:
> > > davidxl wrote:
> > > > What is this change about?
> > > This patch will sink the mov to critical path, which appears after loop body. So the updates in the test changes to check that there is not "mov" in the loop body, i.e. between "forbody" and "jbe"
> > should you check there is no move between forcond.preheader and for.body.preheader instead?
> The purpose of the original test is to test if all moves are hoisted from loop body to loop header. With this patch, one of the hoisted move is sinked to critical edge (still outside loop body), but there are still moves in the preheader thus it will be hard to check specific move has been sinked (as they could be assigned any register).
> 
> We have other tests to cover test cases where instructions should be sinked to critical edge, thus maybe in this patch, we just maintain the original check without adding new check for the machine sink?
Ok. Perhaps just a comment that there is no mov in loop body.


https://reviews.llvm.org/D24818





More information about the llvm-commits mailing list