<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 - Assertion `N1.getValueType() == N2.getValueType() && N1.getValueType() == VT && "Binary operator types must match!"' failed with -O1 -march=skx"
href="https://bugs.llvm.org/show_bug.cgi?id=32316">32316</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `N1.getValueType() == N2.getValueType() && N1.getValueType() == VT && "Binary operator types must match!"' failed with -O1 -march=skx
</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>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>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Vsevolod.Livinskij@frtk.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18115" name="attach_18115" title="Reproducer.">attachment 18115</a> <a href="attachment.cgi?id=18115&action=edit" title="Reproducer.">[details]</a></span>
Reproducer.
Clang fails with assertion with -O3 -march=skx option.
Reproducer:
unsigned char a, b, c, d;
void foo() {
d = (!b > c) + (a != 0);
}
Error:
<span class="quote">>$ clang++ -w -O3 -march=skx -c repr.cpp</span >
llvm-trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3975: llvm::SDValue
llvm::SelectionDAG::getNode(unsigned int, const llvm::SDLoc&, llvm::EVT,
llvm::SDValue, llvm::SDValue, const llvm::SDNodeFlags*): Assertion
`N1.getValueType() == N2.getValueType() && N1.getValueType() == VT && "Binary
operator types must match!"' failed.
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module
'func_reduced_clang_skx_opt.cpp'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_Z3foov'
LLVM version:
clang version 5.0.0 (trunk 297835)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/vsevolod/workspace/llvm/bin-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64</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>