[LLVMbugs] [Bug 19975] New: loop vectorizer miscompile
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jun 7 23:40:56 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19975
Bug ID: 19975
Summary: loop vectorizer miscompile
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: nicholas at mxc.ca
CC: aschwaighofer at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
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'.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140608/2eee7177/attachment.html>
More information about the llvm-bugs
mailing list