[PATCH] D45806: DAGcombiner: Handle correctly non-splat power of 2 -1 divisor

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 19 01:29:03 PDT 2018


zvi created this revision.
zvi added reviewers: RKSimon, craig.topper, hfinkel.

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.

Fixes pr37119


Repository:
  rL LLVM

https://reviews.llvm.org/D45806

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/X86/combine-sdiv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45806.143056.patch
Type: text/x-patch
Size: 6207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180419/1c93ec47/attachment.bin>


More information about the llvm-commits mailing list