<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 - [ppc64] After r340469, Assertion failed: (!TLI.isOperationLegalOrCustom(N->getOpcode(), WideVecVT) && "Target supports vector op, but scalar requires expansion?"), function WidenVectorResult, file LegalizeVectorTypes.cpp, line 2452"
href="https://bugs.llvm.org/show_bug.cgi?id=42010">42010</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ppc64] After r340469, Assertion failed: (!TLI.isOperationLegalOrCustom(N->getOpcode(), WideVecVT) && "Target supports vector op, but scalar requires expansion?"), function WidenVectorResult, file LegalizeVectorTypes.cpp, line 2452
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>dimitry@andric.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>As reported in <a href="https://bugs.freebsd.org/238082">https://bugs.freebsd.org/238082</a>, compiling the graphics/mesa-dri
port for PowerPC64 results in:
Assertion failed: (!TLI.isOperationLegalOrCustom(N->getOpcode(), WideVecVT) &&
"Target supports vector op, but scalar requires expansion?"), function
WidenVectorResult, file lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp, line
2452.
Bisection shows this is a regression caused by
<a href="https://reviews.llvm.org/rL340469">https://reviews.llvm.org/rL340469</a> ("[SelectionDAG] unroll unsupported vector FP
ops earlier to avoid libcalls on undef elements (<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - backend widens v2f32 vectors only to do more work in software operations later for `sin`, `cos` etc."
href="show_bug.cgi?id=38527">bug 38527</a>)").
Minimized test case:
// clang -cc1 -triple powerpc64-- -S -relaxed-aliasing -target-cpu ppc64 -O2
-vectorize-loops nir_constant_expressions-min.c
typedef struct {
double a[4];
} b;
int c, e;
b *d;
float truncf(float);
void f() {
for (unsigned g = 0; g < c; g++) {
double a = truncf(d[1].a[g]);
e = 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>