Fix shift legalization and lowering for big constants.
authorPawel Bylica <chfast@gmail.com>
Thu, 9 Jul 2015 08:01:36 +0000 (08:01 +0000)
committerPawel Bylica <chfast@gmail.com>
Thu, 9 Jul 2015 08:01:36 +0000 (08:01 +0000)
commit71386b0e04902e6b68148f17872b80051c38d5c2
tree8d297f250318c7e6319ca9ff438b5a75d4946cbe
parent43afab3bdb46bc4d3b5568540428920311821891
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@241790 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]