[all-commits] [llvm/llvm-project] f8f41c: [SPARC] Lower SELECT_CC to MOVr on 64-bit target w...

Koakuma via All-commits all-commits at lists.llvm.org
Wed Dec 7 12:35:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8f41c3fcd77829b8a4f10190699adb8b6451f56
      https://github.com/llvm/llvm-project/commit/f8f41c3fcd77829b8a4f10190699adb8b6451f56
  Author: Koakuma <koachan at protonmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp
    M llvm/lib/Target/Sparc/Sparc.h
    M llvm/lib/Target/Sparc/SparcISelLowering.cpp
    M llvm/lib/Target/Sparc/SparcISelLowering.h
    M llvm/lib/Target/Sparc/SparcInstr64Bit.td
    M llvm/lib/Target/Sparc/SparcInstrAliases.td
    M llvm/lib/Target/Sparc/SparcInstrFormats.td
    M llvm/lib/Target/Sparc/SparcInstrInfo.cpp
    M llvm/lib/Target/Sparc/SparcInstrInfo.td
    M llvm/test/CodeGen/SPARC/64bit.ll
    M llvm/test/CodeGen/SPARC/64cond.ll
    M llvm/test/CodeGen/SPARC/smulo-128-legalisation-lowering.ll
    M llvm/test/CodeGen/SPARC/umulo-128-legalisation-lowering.ll
    M llvm/test/MC/Sparc/sparc64-ctrl-instructions.s

  Log Message:
  -----------
  [SPARC] Lower SELECT_CC to MOVr on 64-bit target whenever possible

On 64-bit target, when doing i64 SELECT_CC where one of the comparison operands
is a constant zero, try to fold the compare and MOVcc into a MOVr instruction.

For all integers, EQ and NE comparison are available, additionally for signed
integers, GT, GE, LT, and LE is also available.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D138922




More information about the All-commits mailing list