[all-commits] [llvm/llvm-project] 3c44c4: [DAGCombine] Remove the getNegatibleCost to avoid ...
QingShan Zhang via All-commits
all-commits at lists.llvm.org
Sun May 10 19:50:30 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3c44c441db0f8d7e210806b5b221cd9ed66f2d7b
https://github.com/llvm/llvm-project/commit/3c44c441db0f8d7e210806b5b221cd9ed66f2d7b
Author: QingShan Zhang <qshanz at cn.ibm.com>
Date: 2020-05-11 (Mon, 11 May 2020)
Changed paths:
M llvm/include/llvm/CodeGen/TargetLowering.h
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/lib/Target/X86/X86ISelLowering.h
M llvm/test/CodeGen/X86/neg_fp.ll
Log Message:
-----------
[DAGCombine] Remove the getNegatibleCost to avoid the out of sync with getNegatedExpression
We have the getNegatibleCost/getNegatedExpression to evaluate the cost and negate the expression.
However, during negating the expression, the cost might change as we are changing the DAG,
and then, hit the assertion if we negated the wrong expression as the cost is not trustful anymore.
This patch is target to remove the getNegatibleCost to avoid the out of sync with getNegatedExpression,
and check the cost during negating the expression. It also reduce the duplicated code between
getNegatibleCost and getNegatedExpression. And fix the crash for the test in D76638
Reviewed By: RKSimon, spatel
Differential Revision: https://reviews.llvm.org/D77319
More information about the All-commits
mailing list