Reapply fixed r241790: Fix shift legalization and lowering for big constants.
authorPawel Bylica <chfast@gmail.com>
Thu, 9 Jul 2015 14:58:04 +0000 (14:58 +0000)
committerPawel Bylica <chfast@gmail.com>
Thu, 9 Jul 2015 14:58:04 +0000 (14:58 +0000)
commitdbbfabaf0188e826f43ebe363ca5b345e82bd32b
tree59c6d499eae33f3505e53182720c6264dbd801c8
parent56240eaf733a5df404738f317c19b2d9b79da133
Reapply fixed r241790: Fix shift legalization and lowering for big constants.

Summary: If shift amount is a constant value > 64 bit it is handled incorrectly during type legalization and X86 lowering. This patch the type of shift amount argument in function DAGTypeLegalizer::ExpandShiftByConstant from unsigned to APInt.

Reviewers: nadav, majnemer, sanjoy, RKSimon

Subscribers: RKSimon, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241806 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/legalize-shl-vec.ll [new file with mode: 0644]