diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-13 09:10:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-13 09:10:56 +0000 |
commit | 915eeb488786379250808d47668c43e010efe566 (patch) | |
tree | 7ca78048960929fd07ee81a7f764785aeaabf334 /test | |
parent | d3027738856d57ee22930deca0c7977fdc13e633 (diff) | |
download | llvm-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.ll | 12 |
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 +} |