[SDAG] enable binop identity constant folds for shifts
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 21 Mar 2022 13:02:30 +0000 (13:02 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 21 Mar 2022 13:02:50 +0000 (13:02 +0000)
commit35a7be6ccb614a0b5d30c7f92aa2539bb0cf0dda
tree00c1394072caa89422c27d9f58d5357dd10f93dd
parent73e1888e530afefd4a9a774ef9c29bf24baca3d4
[SDAG] enable binop identity constant folds for shifts

Add shl/srl/sra to the list of ops that we canonicalize with a select to expose an identity merge

Differential Revision: https://reviews.llvm.org/D122070
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/vector-bo-select.ll