[NFC][DAGCombine] Change the value of NegatibleCost to make it align with the semantics
authorQingShan Zhang <qshanz@cn.ibm.com>
Wed, 15 Apr 2020 02:17:36 +0000 (02:17 +0000)
committerQingShan Zhang <qshanz@cn.ibm.com>
Wed, 15 Apr 2020 02:20:58 +0000 (02:20 +0000)
commitc9f9c79c5a4868f8bb7526c104aa18fd1dc42002
tree00083b86be1f6c0c2e4f506e3c3a4433677d6d7d
parentcc149172dab22e404e74b3dba9abee1e9416af8e
[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
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp