<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 - [m32][knl] error in backend in "DAG->DAG" after "Unroll loops""
href="https://bugs.llvm.org/show_bug.cgi?id=34698">34698</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[m32][knl] error in backend in "DAG->DAG" after "Unroll loops"
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ilia.taraban@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>This test fails at compilation with "fatal error: error in backend: Cannot
select:" after "Unroll loops on loop" on m32 ,O2, knl:
================= nice.c ==============
void foo (int a[], double b[], int n)
{
int i;
for (i = 0; i < n; i++)
if (b[i] > 0)
a[i] = 1;
}
============================================
<span class="quote">>>> clang -v</span >
clang version 6.0.0 (trunk 313740)
Target: x86_64-unknown-linux-gnu
Thread model: posix
...
<span class="quote">>>> clang -m32 -c -O1 -march=knl nice.c</span >
<span class="quote">>>> clang -m32 -c -O2 -march=knl nice.c</span >
fatal error: error in backend: Cannot select: 0x1f63c40: v16i1 =
insert_subvector 0x1f62f40, 0x1f63830, Constant:i32<0>
0x1f62f40: v16i1 = BUILD_VECTOR TargetConstant:i8<0>, TargetConstant:i8<0>,
TargetConstant:i8<0>, TargetConstant:i8<0>, TargetConstant:i8<0>,
TargetConstant:i8<0>, TargetConstant:i8<0>, T
argetConstant:i8<0>, TargetConstant:i8<0>, TargetConstant:i8<0>,
TargetConstant:i8<0>, TargetConstant:i8<0>, TargetConstant:i8<0>,
TargetConstant:i8<0>, TargetConstant:i8<0>, TargetConstant
:i8<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f62e08: i8 = TargetConstant<0>
0x1f63830: v8i1 = X86ISD::CMPM 0x1f6fa38, 0x1f6a390, Constant:i8<1>
0x1f6fa38: v8f64 = bitcast 0x1f633b8
0x1f633b8: v16i32 = BUILD_VECTOR Constant:i32<0>, Constant:i32<0>,
Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>,
Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>,
Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>,
Constant:i32<0>, Constant:i32<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6f690: i32 = Constant<0>
0x1f6a390: v8f64,ch =
load<LD64[%88](align=4)(tbaa=<0x1e47d08>)(alias.scope=<0x1f38d70>)> 0x1f637c8,
0x1f6a328, undef:i32
0x1f6a328: i32 = add 0x1f6ef40, Constant:i32<448>
0x1f6ef40: i32 = add 0x1f6f5c0, 0x1f63010
0x1f6f5c0: i32,ch = CopyFromReg 0x1e8bbb0, Register:i32 %vreg23
0x1f6f2e8: i32 = Register %vreg23
0x1f63010: i32 = shl 0x1f6f898, Constant:i8<1>
0x1f6f898: i32,ch = CopyFromReg 0x1e8bbb0, Register:i32 %vreg5
0x1f6f0e0: i32 = Register %vreg5
0x1f6f830: i8 = Constant<1>
0x1f6a2c0: i32 = Constant<448>
0x1f6f1b0: i32 = undef
0x1f6f830: i8 = Constant<1>
0x1f6f690: i32 = Constant<0>
In function: foo
clang version 6.0.0 (trunk 311833) (llvm/trunk 313740)
Target: i386-unknown-linux-gnu
Thread model: posix
InstalledDir: .../build_release/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-6.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/nice-238b57.c
clang-6.0: note: diagnostic msg: /tmp/nice-238b57.sh
clang-6.0: note: diagnostic msg:
********************
<span class="quote">>>> clang -m32 -c -O2 -march=knl nice.c -mllvm -opt-bisect-limit=60</span >
...
BISECT: running pass (59) Combine redundant instructions on function (foo)
BISECT: running pass (60) Unroll loops on loop
BISECT: NOT running pass (61) Unroll loops on loop
BISECT: NOT running pass (62) Combine redundant instructions on function (foo)
...
<span class="quote">>>> clang -m32 -c -O2 -march=knl nice.c -mllvm -opt-bisect-limit=61</span >
...
BISECT: running pass (60) Unroll loops on loop
BISECT: running pass (61) Unroll loops on loop
BISECT: NOT running pass (62) Combine redundant instructions on function (foo)
BISECT: NOT running pass (63) Loop Invariant Code Motion on loop
...
fatal error: error in backend: ...
...
This test starts failing after r306792:
------------------------------------------------------------------------
r306792 | djasper | 2017-06-30 08:32:21 +0200 (Fri, 30 Jun 2017) | 4 lines
Changed paths:
M /llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
M
/llvm/trunk/test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll
M /llvm/trunk/test/Transforms/LoopVectorize/AArch64/reduction-small-size.ll
M /llvm/trunk/test/Transforms/LoopVectorize/ARM/gcc-examples.ll
M /llvm/trunk/test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll
M /llvm/trunk/test/Transforms/LoopVectorize/X86/gcc-examples.ll
M /llvm/trunk/test/Transforms/LoopVectorize/X86/masked_load_store.ll
M /llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath.ll
M /llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath_with_hotness.ll
M /llvm/trunk/test/Transforms/LoopVectorize/X86/reduction-crash.ll
M
/llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks-loopid-dbg.ll
M /llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks.ll
Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by
default."
This still breaks PPC tests we have. I'll forward reproduction
instructions to dehao.
------------------------------------------------------------------------
Maybe this error is connected with <a href="https://bugs.llvm.org//show_bug.cgi?id=34653">https://bugs.llvm.org//show_bug.cgi?id=34653</a>
and <a href="https://bugs.llvm.org//show_bug.cgi?id=34657">https://bugs.llvm.org//show_bug.cgi?id=34657</a></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>