[all-commits] [llvm/llvm-project] a91b0d: [PowerPC] hoist xxspltiw instruction out of the lo...

zhijian lin via All-commits all-commits at lists.llvm.org
Thu Jun 5 06:42:14 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a91b0d27806226d52db90a4fe83bb73a95f412f4
      https://github.com/llvm/llvm-project/commit/a91b0d27806226d52db90a4fe83bb73a95f412f4
  Author: zhijian lin <zhijian at ca.ibm.com>
  Date:   2025-06-05 (Thu, 05 Jun 2025)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
    M llvm/test/CodeGen/PowerPC/vsx-fma-m-early.ll

  Log Message:
  -----------
  [PowerPC] hoist xxspltiw instruction out of the loop with FMA mutation pass. (#111696)

Summary: 
   
The patch fixes the issue [[PowerPC] missing VSX FMA Mutation optimize
in some case for option -schedule-ppc-vsx-fma-mutation-early
#111906](https://github.com/llvm/llvm-project/issues/111906)
   
In certain cases, the Register Coalescer pass—which eliminates COPY
instructions—can interfere with the PowerPC VSX FMA Mutation pass.
Specifically, it can prevent the mutation of a COPY adjacent to an
XSMADDADP into a single XSMADDMDP instruction. As a result, the xxspltiw
instruction is not hoisted out of the loop as expected, leading to
missed optimization opportunities.

To address this, the patch ensures that the `VSX FMA Mutation` pass runs
before the `Register Coalescer` pass when the
-schedule-ppc-vsx-fma-mutation-early option is enabled.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list