[DAG] Update foldSelectWithIdentityConstant to use llvm::isNeutralConstant
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 30 Sep 2022 16:45:05 +0000 (17:45 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 30 Sep 2022 16:46:52 +0000 (17:46 +0100)
commit61dc5014acf1fc6723caf2d50c6f84b435f8f02f
tree21f3d44086b29a4bf82bd6e89e25838b6acbe80d
parent94e4928bd365c6c7400029a8882a039ed8f6e169
[DAG] Update foldSelectWithIdentityConstant to use llvm::isNeutralConstant

D133866 added the llvm::isNeutralConstant helper to track neutral/passthrough constants

This patch updates foldSelectWithIdentityConstant to use the helper instead of maintaining its own opcode handling

Differential Revision: https://reviews.llvm.org/D134966
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp