[all-commits] [llvm/llvm-project] c138fc: [AArch64] Don't merge branch conditions that both ...

Kunal Pathak via All-commits all-commits at lists.llvm.org
Thu Jul 9 05:43:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c138fc9acfdd34ad674c772dc2433402dc3823fe
      https://github.com/llvm/llvm-project/commit/c138fc9acfdd34ad674c772dc2433402dc3823fe
  Author: Kunal Pathak <kupathak at meta.com>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    A llvm/test/CodeGen/AArch64/br-cond-merging-loaded-operands.ll
    M llvm/test/CodeGen/AArch64/ragreedy-csr.ll

  Log Message:
  -----------
  [AArch64] Don't merge branch conditions that both compare memory loads (#206504)

`shouldKeepJumpConditionsTogether` decides whether to fold two integer
branch conditions into a CMP/CCMP chain by pricing the RHS
dependency-chain latency. That ignores register pressure: when both
conditions compare loaded values, merging pins all the loaded operands
live at once to feed the chain instead of consuming them at each split
compare-and-branch. On a load-store target that extends their live
ranges across the region the branch dominates.

Decline to merge when both sides are integer compares of loaded values,
mirroring the machine CCMP pass (which won't speculate loads).

Reference:
https://github.com/llvm/llvm-project/pull/201486#issuecomment-4812845942



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