<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 --- - loop vectorizer miscompile"
href="http://llvm.org/bugs/show_bug.cgi?id=19975">19975</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>loop vectorizer miscompile
</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>Loop Optimizer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicholas@mxc.ca
</td>
</tr>
<tr>
<th>CC</th>
<td>aschwaighofer@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Testcase:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@fmt = constant [4 x i8] c"%d\0A\00"
declare i32 @printf(i8*, ...)
define i32 @main() {
entry:
br label %while.body
while.body: ; preds = %if.end3, %entry
%i.0 = phi i32 [ 0, %entry ], [ %inc, %if.end3 ]
%count.0 = phi i32 [ 1, %entry ], [ %add.count.0, %if.end3 ]
%cmp = icmp ult i32 %i.0, 5
%add = zext i1 %cmp to i32
%add.count.0 = add i32 %count.0, %add
%cmp1 = icmp eq i32 %i.0, -1
br i1 %cmp1, label %while.end, label %if.end3
if.end3: ; preds = %while.body
%inc = add i32 %i.0, 1
br label %while.body
while.end: ; preds = %while.body
%0 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @fmt,
i64 0, i64 0), i32 %add.count.0) #1
ret i32 %add.count.0
}
The output and exit code are '6'. Run with "opt -loop-vectorize" then the
output and exit code are '1'.</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>