HomePhabricator

[DAGCombiner] Handle correctly non-splat power of 2 -1 divisor (PR37119)

Authored by RKSimon on Jun 30 2018, 5:22 AM.

Description

[DAGCombiner] Handle correctly non-splat power of 2 -1 divisor (PR37119)

The combine added in commit 329525 overlooked the case where one, but not all, of the divisor elements is -1, -1 is the only power of two value for which the sdiv expansion recipe breaks.

Thanks to @zvi for the original patch.

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

llvm-svn: 336048