[all-commits] [llvm/llvm-project] a37384: [AArch64][GlobalISel] Emit TBNZ with G_BRCOND wher...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Wed Feb 5 15:24:01 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a3738414072900ace9cbbe209d0195a3443d1d54
      https://github.com/llvm/llvm-project/commit/a3738414072900ace9cbbe209d0195a3443d1d54
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2020-02-05 (Wed, 05 Feb 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
    A llvm/test/CodeGen/AArch64/GlobalISel/tbnz-slt.mir

  Log Message:
  -----------
  [AArch64][GlobalISel] Emit TBNZ with G_BRCOND where the condition is SLT

When we have a G_ICMP which checks SLT, and the comparison is against 0, we
can emit a TBNZ instead of a CBZ.

This lets us fold in things into the branch, which can provide some code size
savings.

This is similar to the case in `AArch64TargetLowering::LowerBR_CC`.

https://reviews.llvm.org/D74090




More information about the All-commits mailing list