[all-commits] [llvm/llvm-project] 4b2898: [X86] Simplify the interface to getCondNoFromDesc.

Craig Topper via All-commits all-commits at lists.llvm.org
Sun Mar 20 23:03:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b28980772402cab998e2c42e4876d6decb48583
      https://github.com/llvm/llvm-project/commit/4b28980772402cab998e2c42e4876d6decb48583
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-03-20 (Sun, 20 Mar 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    M llvm/lib/Target/X86/X86InstrInfo.h

  Log Message:
  -----------
  [X86] Simplify the interface to getCondNoFromDesc.

Instead of taking a SkipDefs parameter, rename to getCondSrcNoFromDesc
and have it return the source operand number. Make getCondFromMI
responsible for adding the number of Defs for MI instructions.

While there remove some unneeded casts to unsigned and check for
negative numbers instead of explicitly -1. Less than 0 is easier
for a compiler to codegen.

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




More information about the All-commits mailing list