[SDAG] enable binop identity constant folds for multiplies
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 25 Mar 2022 11:06:41 +0000 (11:06 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 25 Mar 2022 11:07:04 +0000 (11:07 +0000)
commite209190c2d96a8bde115c7155f099d344c456b5b
tree3a024df1bf39f3616b39d04f4ad12705a4464842
parent8639bc1e5d18d3ad45b228f8ff0cfdafe10137f0
[SDAG] enable binop identity constant folds for multiplies

Add mul to the list of ops that we canonicalize with a select to expose an identity merge

Differential Revision: https://reviews.llvm.org/D122071
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/midpoint-int-vec-128.ll
llvm/test/CodeGen/X86/midpoint-int-vec-256.ll
llvm/test/CodeGen/X86/midpoint-int-vec-512.ll
llvm/test/CodeGen/X86/vector-bo-select.ll