<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 - Cannot select llvm.canonicalize.f64"
href="https://bugs.llvm.org/show_bug.cgi?id=33303">33303</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Cannot select llvm.canonicalize.f64
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>4.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>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>simonas+llvm.org@kazlauskas.me
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind readnone uwtable
define double @max(double, double) unnamed_addr #0 {
start:
%2 = fcmp olt double %0, %1
%3 = fcmp uno double %0, 0.000000e+00
%or.cond.i.i = or i1 %3, %2
%4 = select i1 %or.cond.i.i, double %1, double %0
%5 = tail call double @llvm.canonicalize.f64(double %4) #2
ret double %5
}
; Function Attrs: nounwind readnone
declare double @llvm.canonicalize.f64(double) #1
attributes #0 = { nounwind readnone uwtable }
attributes #1 = { nounwind readnone }
attributes #2 = { nounwind }
Will fail during instruction selection with (when compiled with `llc test.ll`)
LLVM ERROR: Cannot select: 0x2258ce8: f64 = fcanonicalize 0x2258c80
0x2258c80: f64 = X86ISD::FOR 0x2258a10, 0x2258bb0
0x2258a10: f64 = X86ISD::FANDN 0x2258ef0, 0x2258c18
0x2258ef0: f64 = X86ISD::FSETCC 0x22588d8, 0x22588d8, Constant:i8<3>
0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
0x2258870: f64 = Register %vreg0
0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
0x2258870: f64 = Register %vreg0
0x2258a78: i8 = Constant<3>
0x2258c18: f64 = X86ISD::FMAX 0x22589a8, 0x22588d8
0x22589a8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg1
0x2258940: f64 = Register %vreg1
0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
0x2258870: f64 = Register %vreg0
0x2258bb0: f64 = X86ISD::FAND 0x2258ef0, 0x22589a8
0x2258ef0: f64 = X86ISD::FSETCC 0x22588d8, 0x22588d8, Constant:i8<3>
0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
0x2258870: f64 = Register %vreg0
0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
0x2258870: f64 = Register %vreg0
0x2258a78: i8 = Constant<3>
0x22589a8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg1
0x2258940: f64 = Register %vreg1
In function: max
Happens with x86, arm, powerpc, mips, etc backends.</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>