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)
commit06407c032038c6c3c3776fcb9ad8b06729e0c1d8
tree19df6c28ae0b6543ea14c919a2d9cdec1151eb8f
parent7be075335dca4f9b2a325a39b9a5a363ea7c6327
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

llvm-svn: 240291
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/fold-vector-shl-crash.ll [new file with mode: 0644]