[PATCH] D148623: [MachineCSE] Extend the scope of multi block processing.

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 10:56:00 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/test/CodeGen/X86/ins_subreg_coalesce-3.ll:63
+; CHECK-NEXT:  .LBB0_11: # %bb4897
 ; CHECK-NEXT:    retq
 entry:
----------------
skatkov wrote:
> goldstein.w.n wrote:
> > Seems to cause a regression here?
> Indeed. The reason of regression is a difference in behavior of BranchFolding pass.
> This problem I've tried to resolve in https://reviews.llvm.org/D148514 but as we saw I need to do more work there.
> Briefly, before this change BranchFolding was able to handle this case in tail merging, due to the same tail
>   test
>   jcc
> in several basic blocks. 
> With this change some intermittent test instruction has been eliminated and BrachFolding/TailMerging has smaller tail now and cannot handle it.
> 
> Taking into account that this test is also contains several identical branches (should be eliminated in middle end), the name of the test says that this test is not about BranchFolding or this branch at all and I plan to do something with BranchFolding optimization, I guess we can accept this regression.
Given that is causes a regression here, I think D148514 should proceed this patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148623/new/

https://reviews.llvm.org/D148623



More information about the llvm-commits mailing list