[all-commits] [llvm/llvm-project] c9f9c7: [NFC][DAGCombine] Change the value of NegatibleCos...

QingShan Zhang via All-commits all-commits at lists.llvm.org
Tue Apr 14 19:23:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c9f9c79c5a4868f8bb7526c104aa18fd1dc42002
      https://github.com/llvm/llvm-project/commit/c9f9c79c5a4868f8bb7526c104aa18fd1dc42002
  Author: QingShan Zhang <qshanz at cn.ibm.com>
  Date:   2020-04-15 (Wed, 15 Apr 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

  Log Message:
  -----------
  [NFC][DAGCombine] Change the value of NegatibleCost to make it align with the semantics

This is a minor NFC change to make the code more clear. We have the NegatibleCost that
has cheaper, neutral, and expensive. Typically, the smaller one means the less cost.
It is inverse for current implementation, which makes following code not easy to read.
If (CostX > CostY) negate(X)

Reviewed By: RKSimon

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




More information about the All-commits mailing list