OSDN Git Service

[DAGCombine] Fix divrem combine not to assume div/rem type is simple.
authorMichael Kuperstein <michael.kuperstein@gmail.com>
Fri, 4 Mar 2016 21:23:29 +0000 (21:23 +0000)
committerMichael Kuperstein <michael.kuperstein@gmail.com>
Fri, 4 Mar 2016 21:23:29 +0000 (21:23 +0000)
commit2005a3f20e058d7e18ea968cf06d4d91b136f61d
treecc60da4277f3ee0a1a08e866fa1cdc30eb7ba380
parent9bafe9607a4f9a3d2834bda6599013528d0b4aa9
[DAGCombine] Fix divrem combine not to assume div/rem type is simple.

The divrem combine assumed the type of the div/rem is simple, which isn't
necessarily true. This probably worked fine until r250825, since it only
saw legal types, but now breaks when it runs as a pre-type-legalization
combine.

This fixes PR26835.

Differential Revision: http://reviews.llvm.org/D17878

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262746 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/pr26835.ll [new file with mode: 0644]