summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-13 09:10:56 +0000
committerChris Lattner <sabre@nondot.org>2011-02-13 09:10:56 +0000
commit915eeb488786379250808d47668c43e010efe566 (patch)
tree7ca78048960929fd07ee81a7f764785aeaabf334 /test
parentd3027738856d57ee22930deca0c7977fdc13e633 (diff)
downloadllvm-915eeb488786379250808d47668c43e010efe566.tar.gz
llvm-915eeb488786379250808d47668c43e010efe566.tar.bz2
llvm-915eeb488786379250808d47668c43e010efe566.tar.xz
when legalizing extremely wide shifts, make sure that
the shift amounts are in a suitably wide type so that we don't generate out of range constant shift amounts. This fixes PR9028. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/crash.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/crash.ll b/test/CodeGen/X86/crash.ll
index 9327776496..2d8e63e313 100644
--- a/test/CodeGen/X86/crash.ll
+++ b/test/CodeGen/X86/crash.ll
@@ -187,3 +187,15 @@ for.inc44: ; preds = %for.body
%add46 = add i32 %l_74.0, 1
br label %for.body
}
+
+; PR9028
+define void @f(i64 %A) nounwind {
+entry:
+ %0 = zext i64 %A to i160
+ %1 = shl i160 %0, 64
+ %2 = zext i160 %1 to i576
+ %3 = zext i96 undef to i576
+ %4 = or i576 %3, %2
+ store i576 %4, i576* undef, align 8
+ ret void
+}