Reapply r240291: Fix shl folding in DAG combiner.
authorPawel Bylica <chfast@gmail.com>
Thu, 2 Jul 2015 11:44:54 +0000 (11:44 +0000)
committerPawel Bylica <chfast@gmail.com>
Thu, 2 Jul 2015 11:44:54 +0000 (11:44 +0000)
commit074d71dea694f330cb6dc7b1c1392f65d57f154e
treeca2764aae74f1a7e8cf350008c2ef24948cfa6a0
parent8992bae9908119a221eacede1f58b5d1d0190afc
Reapply r240291: Fix shl folding in DAG combiner.

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.

It has been reverted previously because of some problems with comparing APInt with raw uint64_t. That has been fixed/changed with r241204.

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