<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 - Folding i64 scalar masking breaks isel"
href="https://bugs.llvm.org/show_bug.cgi?id=37879">37879</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Folding i64 scalar masking breaks isel
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>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>mikhail.dvoretckii@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The following LLVM IR fails to compile with any optimizations on:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: norecurse nounwind readonly uwtable
define double @foo(i32** nocapture readonly) #0 {
%2 = load i64, i64* undef, align 8
%3 = and i64 %2, 1
%4 = icmp eq i64 %3, 0
%5 = sitofp i64 %2 to double
%6 = select i1 %4, double 1.000000e+00, double %5
ret double %6
}
attributes #0 = { "target-features"="+avx512bw" }
The "and 1/icmp 0" expression for scalar masking is folded by the code
introduced in D45203. This code has checks to ensure that the scalar_to_vector
DAG node is not connected to an i16 input, but doesn't have the equivalent
check against i64 inputs.</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>