<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - crash in LegalizeTypes"
href="http://llvm.org/bugs/show_bug.cgi?id=17219">17219</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>crash in LegalizeTypes
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nlewycky@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Testcase from "suer" on #llvm:
@glob = global i8 1
@blob = global <2 x i1> <i1 1, i1 0>
@str = internal constant [19 x i8] c"Hello, world! (%d)\00"
declare i32 @printf(i8*, i8)
define i32 @main()
{
%blobld = load <2 x i1>* @blob
%vec = select <2 x i1> %blobld, <2 x i2> <i2 1, i2 2>, <2 x i2> <i2 3, i2 0>
%simp = bitcast <2 x i2> %vec to i4
%byte = zext i4 %simp to i8
store i8 %byte, i8* @glob
%ld = load i8* @glob
call i32 @printf( i8* getelementptr ([19 x i8]* @str, i32 0,i32 0), i8 %ld)
ret i32 0
}
Crash:
nlewycky@ducttape:~$ llvm/Debug+Asserts/bin/llc suer.ll
llc:
/usr/local/google/home/nlewycky/llvm/include/llvm/CodeGen/ValueTypes.h:730:
llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a
SimpleValueType!"' failed.
#5 0x00000000010cbdfd in (anonymous namespace)::VectorLegalizer::LegalizeOp (
this=0x7fffffffcd10, Op=...) at LegalizeVectorOps.cpp:168
168 switch (TLI.getTruncStoreAction(ValVT, StVT.getSimpleVT())) {
(gdb) p ValVT
$1 = {SimpleTy = llvm::MVT::v2i64}
(gdb) p StVT
$2 = {V = {SimpleTy = llvm::MVT::INVALID_SIMPLE_VALUE_TYPE},
LLVMTy = 0x2704110}
(gdb) p StVT.LLVMTy->dump()
<2 x i2>$3 = void</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>