Fix shl folding in DAG combiner.
authorPawel Bylica <chfast@gmail.com>
Mon, 22 Jun 2015 15:58:11 +0000 (15:58 +0000)
committerPawel Bylica <chfast@gmail.com>
Mon, 22 Jun 2015 15:58:11 +0000 (15:58 +0000)
commit39befc6ca87809f13cf33bb6aec5ddc36c560d92
tree0ed5f37678659b44d9914634c2d6915c7d5859f6
parent0ed63077a22dc1e766fcd5ce429f146310c33038
Fix shl folding in DAG combiner.

Summary: The code responsible for shl folding in the DAGCombiner was assuming incorrectly that all constants are less than 64 bits. This patch simply changes the way values are compared.

Test Plan: A regression test included.

Reviewers: andreadb

Reviewed By: andreadb

Subscribers: andreadb, test, llvm-commits

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

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