<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 - Passing float2 as varargs broken (regression)"
href="https://bugs.llvm.org/show_bug.cgi?id=40491">40491</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Passing float2 as varargs broken (regression)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</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>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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pekka.jaaskelainen@tuni.fi
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>It seems 8.0 broke passing float2s (__ext_vector_type__(2)) as varargs. See the
reproducer in pocl github: <a href="https://github.com/pocl/pocl/issues/689">https://github.com/pocl/pocl/issues/689</a>
It looks like the difference in IR boils down to passing the promoted <2 x
double> as a value instead of a pointer, like was done by 7.0 while not
modifying the callee side:
The diff 7.0 vs. 8.0.
-define dso_local i32 @main() #0 {
+define dso_local i32 @main() #3 {
entry:
%retval = alloca i32, align 4
%x = alloca <2 x float>, align 8
- %coerce = alloca <2 x float>, align 8
store i32 0, i32* %retval, align 4
%0 = load <2 x float>, <2 x float>* %x, align 8
%1 = insertelement <2 x float> %0, float 9.000000e+00, i64 0
@@ -80,19 +79,18 @@
%3 = insertelement <2 x float> %2, float 1.200000e+01, i64 1
store <2 x float> %3, <2 x float>* %x, align 8
%4 = load <2 x float>, <2 x float>* %x, align 8
- store <2 x float> %4, <2 x float>* %coerce, align 8
- %5 = bitcast <2 x float>* %coerce to double*
- %6 = load double, double* %5, align 8
- call void (i8*, ...) @print_float2(i8* getelementptr inbounds ([15 x i8],
[15 x i8]* @.str, i32 0, i32 0), double %6)
+ %conv = fpext <2 x float> %4 to <2 x double>
+ call void (i8*, ...) @print_float2(i8* getelementptr inbounds ([15 x i8],
[15 x i8]* @.str, i32 0, i32 0), <2 x double> %conv)
ret i32 0
}
Commit b30dcee6c976abb67f (r324098) seems remotely related. I did not yet have
the time to look into the generated ISA, but perhaps this rings someone's bell?</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>