[all-commits] [llvm/llvm-project] b9fd1e: [AArch64][SVE2p1] Remove redundant PTESTs when pre...

Kerry McLaughlin via All-commits all-commits at lists.llvm.org
Thu Sep 11 05:53:43 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9fd1e6fce8c5ea80cb0db9b73fbdfdc371409c6
      https://github.com/llvm/llvm-project/commit/b9fd1e6fce8c5ea80cb0db9b73fbdfdc371409c6
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2025-09-11 (Thu, 11 Sep 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/lib/Target/AArch64/AArch64RegisterInfo.td
    M llvm/lib/Target/AArch64/SVEInstrFormats.td
    M llvm/test/CodeGen/AArch64/sve-cmp-folds.ll
    M llvm/test/CodeGen/AArch64/sve-ptest-removal-whilelo.mir

  Log Message:
  -----------
  [AArch64][SVE2p1] Remove redundant PTESTs when predicate is a WHILEcc_x2 (#156478)

The optimisation in canRemovePTestInstr tries to remove ptest instructions when
the predicate is the result of a WHILEcc. This patch extends the support to
WHILEcc (predicate pair) by:
  - Including the WHILEcc_x2 intrinsics in isPredicateCCSettingOp, allowing
    performFirstTrueTestVectorCombine to create the PTEST.
  - Setting the isWhile flag for the predicate pair instructions in tablegen.
  - Looking through copies in canRemovePTestInstr to test isWhileOpcode.



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