OSDN Git Service

[CodeGen] Fix invalid shift in mul expansion
authorPawel Bylica <chfast@gmail.com>
Tue, 13 Sep 2016 21:55:41 +0000 (21:55 +0000)
committerPawel Bylica <chfast@gmail.com>
Tue, 13 Sep 2016 21:55:41 +0000 (21:55 +0000)
commitc3d0d3568aa6eec55676383581aca35eda8fbe90
treefafa91843cc5e487805b858b166e789475d8cd3f
parent33893419506150322836ecb439b9c23c986522eb
[CodeGen] Fix invalid shift in mul expansion

Summary: When expanding mul in type legalization make sure the type for shift amount can actually fit the value. This fixes PR30354 https://llvm.org/bugs/show_bug.cgi?id=30354.

Reviewers: hfinkel, majnemer, RKSimon

Subscribers: RKSimon, llvm-commits

Differential Revision: https://reviews.llvm.org/D24478

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281403 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
test/CodeGen/X86/mul-i1024.ll [new file with mode: 0644]
test/CodeGen/X86/mul-i512.ll [new file with mode: 0644]