[DAG] Use SelectionDAG::FoldConstantArithmetic directly to match constant operands
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 14 May 2022 13:19:12 +0000 (14:19 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 14 May 2022 13:19:12 +0000 (14:19 +0100)
commit8d4d4988e43e8a164637c436437809c787a2b59f
tree94d41491d9ee538f64246bceb7a904116265b64c
parentffacaa0beccbe318090be600f8d2d2c33c33cbd6
[DAG] Use SelectionDAG::FoldConstantArithmetic directly to match constant operands

SelectionDAG::FoldConstantArithmetic determines if operands are foldable constants, so we don't need to bother with isConstantOrConstantVector / Opaque tests before calling it directly.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp