<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 - [X86][FastISel] with.overflow eflags clobber"
href="https://bugs.llvm.org/show_bug.cgi?id=49587">49587</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86][FastISel] with.overflow eflags clobber
</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>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>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nikita.ppv@gmail.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>
<tr>
<th>Blocks</th>
<td>48902
</td>
</tr></table>
<p>
<div>
<pre>define i32 @test(i64 %arg) nounwind {
entry:
%usubo = tail call { i64, i1 } @llvm.usub.with.overflow.i64(i64 %arg, i64 1)
%overflow = extractvalue { i64, i1 } %usubo, 1
br i1 %overflow, label %merge, label %no_overflow
no_overflow:
br label %merge
merge:
%phi = phi i32 [ 1, %no_overflow ], [ 0, %entry ]
ret i32 %phi
}
declare { i64, i1 } @llvm.usub.with.overflow.i64(i64, i64)
; RUN: llc -O0 < %s
test: # @test
# %bb.0: # %entry
subq $1, %rdi
setb %al
xorl %eax, %eax
movl %eax, -4(%rsp) # 4-byte Spill
jb .LBB0_2
# %bb.1: # %no_overflow
movl $1, %eax
movl %eax, -4(%rsp) # 4-byte Spill
jmp .LBB0_2
.LBB0_2: # %merge
movl -4(%rsp), %eax # 4-byte Reload
retq
xorl clobbers eflags from subq, used by jb.</pre>
</div>
</p>
<div id="referenced">
<hr style="border: 1px dashed #969696">
<b>Referenced Bugs:</b>
<ul>
<li>
[<a class="bz_bug_link
bz_status_NEW "
title="NEW - [meta] 12.0.0 Release Blockers"
href="https://bugs.llvm.org/show_bug.cgi?id=48902">Bug 48902</a>] [meta] 12.0.0 Release Blockers
</li>
</ul>
</div>
<br>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>