[all-commits] [llvm/llvm-project] 66462a: [AArch64][CMPBR] Fix splitting of CBB/CBH instruct...

David Tellenbach via All-commits all-commits at lists.llvm.org
Tue Sep 8 15:42:25 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 66462afa7e4a33f0d720877f2228589d5b43de81
      https://github.com/llvm/llvm-project/commit/66462afa7e4a33f0d720877f2228589d5b43de81
  Author: David Tellenbach <dtellenbach at apple.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/test/CodeGen/AArch64/cmpbr-early-ifcvt.mir

  Log Message:
  -----------
  [AArch64][CMPBR] Fix splitting of CBB/CBH instructions into ext + cmp (#221112)

We falsely split CBB/CBH instructions by explicitly extending the
second register operand instead of the first one, leading to the
following, wrong codegen:

    cbh $wn, $wm, cc, trgt  =>  sxth $wt, $wm
                                cmp  $wn, $wt, cc, sxth

Correct is

    cbh $wn, $wm, cc, trgt  =>  sxth $wt, $wn
                                cmp  $wt, $wm, cc, sxth

since cmp with extended register extends it's second, not its first
operand.



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