Recommit r317510 "[InstCombine] Pull shifts through a select plus binop with constant"
authorCraig Topper <craig.topper@intel.com>
Tue, 7 Nov 2017 18:47:24 +0000 (18:47 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 7 Nov 2017 18:47:24 +0000 (18:47 +0000)
commit7dd4d324317583915212144899da9c9e872d1363
tree622c8da01316186b38af27fb0753f8ba2a02774c
parentf4bf4227b7edd25bf5333c95400cad17854a2ce2
Recommit r317510 "[InstCombine] Pull shifts through a select plus binop with constant"

The hexagon test should be fixed now.

Original commit message:

This pulls shifts through a select+binop with a constant where the select conditionally executes the binop. We already do this for just the binop, but not with the select.

This can allow us to get the select closer to other selects to enable removing one.

Differential Revision: https://reviews.llvm.org/D39222

llvm-svn: 317600
llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
llvm/test/Transforms/InstCombine/shift.ll