[DAG] DAGCombiner::foldSelectOfBinops - propagate the common flags to the merged...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 18 Jul 2021 17:38:48 +0000 (18:38 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 18 Jul 2021 17:38:59 +0000 (18:38 +0100)
commitfd7a54c709083f79d8d1062156b9e386a506b189
tree6b64a8b9aaf8d4071d0d3db0c95cd9238a56e10c
parent5643be96bc1fd6e8b00aa25b0bb274511d6b1100
[DAG] DAGCombiner::foldSelectOfBinops - propagate the common flags to the merged binop

As discussed on D106058 - we were failing to keep the common flags. This matches the behaviour in InstCombinerImpl::foldSelectOpOp.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/combine-shl.ll