<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 - [ConstantFold] llvm generate invalid assemble for type conversion between __fp16 and char"
href="https://bugs.llvm.org/show_bug.cgi?id=48665">48665</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ConstantFold] llvm generate invalid assemble for type conversion between __fp16 and char
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zhongyunde@tom.com
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, pengfei.wang@intel.com, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24352" name="attach_24352" title="clang test_x86.cpp -S -O2 -o test.s">attachment 24352</a> <a href="attachment.cgi?id=24352&action=edit" title="clang test_x86.cpp -S -O2 -o test.s">[details]</a></span>
clang test_x86.cpp -S -O2 -o test.s
base on the case test_x86.cpp attached and llvm10, compile on the x86 machine
with commands similar as: clang test_x86.cpp -S -O2 -o test.s
#define half __fp16
void host_expect(char * arrDst)
{
half arrSrc[8] = {(half)0xecee, (half)0xf330, (half)0x698a, (half)0x2583,
(half)0xb45d, (half)0xfc66, (half)0x3587, (half)0x2607};
for(int i = 0; i < 8; i++)
{
arrDst[i] = arrSrc[i];
}
}
we'll get an empty define of the function host_expect, which is unexpected.
.globl _Z11host_expectPc # -- Begin function _Z11host_expectPc
.p2align 4, 0x90
.type _Z11host_expectPc,@function
_Z11host_expectPc: # @_Z11host_expectPc
.cfi_startproc
# %bb.0: # %entry
retq
.Lfunc_end0:
.size _Z11host_expectPc, .Lfunc_end0-_Z11host_expectPc
.cfi_endproc
# -- End function
.ident "clang version 10.0.0</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>