<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - LoopVectorization crash"
href="https://bugs.llvm.org/show_bug.cgi?id=48564">48564</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LoopVectorization crash
</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>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>serguei.katkov@azul.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Loop Vectorizer crashes with assert for the following simple test:
========================================================
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"
define void @test() #0 {
bb:
br label %bb2
bb1: ; preds = %bb2
%tmp = phi i32 [ %tmp6, %bb2 ]
unreachable
bb2: ; preds = %bb2, %bb
%tmp3 = phi i32 [ %tmp8, %bb2 ], [ undef, %bb ]
%tmp4 = phi i32 [ %tmp7, %bb2 ], [ undef, %bb ]
%tmp5 = phi i32 [ %tmp6, %bb2 ], [ undef, %bb ]
%tmp6 = add i32 %tmp5, %tmp4
%tmp7 = udiv i32 219220132, %tmp3
%tmp8 = add nsw i32 %tmp3, -1
%tmp9 = icmp slt i32 %tmp3, 2
br i1 %tmp9, label %bb1, label %bb2, !prof !2
}
attributes #0 = {
"target-features"="+sse2,-tsxldtrk,+cx16,+sahf,-tbm,-avx512ifma,-sha,-gfni,-fma4,-vpclmulqdq,+prfchw,+bmi2,-cldemote,+fsgsbase,-ptwrite,-amx-tile,-uintr,+popcnt,-widekl,+aes,-avx512bitalg,-movdiri,-xsaves,-avx512er,-avxvnni,-avx512vnni,-amx-bf16,-avx512vpopcntdq,-pconfig,-clwb,-avx512f,-xsavec,-clzero,-pku,+mmx,-lwp,-rdpid,-xop,+rdseed,-waitpkg,-kl,-movdir64b,-sse4a,-avx512bw,-clflushopt,+xsave,-avx512vbmi2,+64bit,-avx512vl,-serialize,-hreset,+invpcid,-avx512cd,+avx,-vaes,-avx512bf16,+cx8,+fma,+rtm,+bmi,-enqcmd,+rdrnd,-mwaitx,+sse4.1,+sse4.2,+avx2,+fxsr,-wbnoinvd,+sse,+lzcnt,+pclmul,-prefetchwt1,+f16c,+ssse3,-sgx,-shstk,+cmov,-avx512vbmi,-amx-int8,+movbe,-avx512vp2intersect,+xsaveopt,-avx512dq,+adx,-avx512pf"
}
!2 = !{!"branch_weights", i32 1, i32 1}
========================================================
$ opt -S -o /dev/null -passes=loop-vectorize ./test.ll
opt:
/localhome/skatkov/work/llvm/src/llvm/lib/Transforms/Vectorize/VPlan.h:193:
void llvm::VectorizerValueMap::setVectorValue(llvm::Value*, unsigned int,
llvm::Value*): Assertion `!hasVectorValue(Key, Part) && "Vector value already
set for part"' failed.</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>