<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 - PEI clobbers live EFLAGS when using "probe-stack"="inline-asm""
href="https://bugs.llvm.org/show_bug.cgi?id=50165">50165</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>PEI clobbers live EFLAGS when using "probe-stack"="inline-asm"
</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>tomasz.miasko@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></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24813" name="attach_24813" title="positdiv32 LLVM IR">attachment 24813</a> <a href="attachment.cgi?id=24813&action=edit" title="positdiv32 LLVM IR">[details]</a></span>
positdiv32 LLVM IR
When building attached llvm IR the eflags used by
liveins: $edi, $eflags, $esi
renamable $r15b = SETCCr 8, implicit $eflags
are clobbered after prologue insertion:
$rsp = frame-setup SUB64ri8 $rsp(tied-def 0), 8, implicit-def dead $eflags
renamable $r15b = SETCCr 8, implicit $eflags
Before Prologue/Epilogue Insertion & Frame Finalization (prologepilog)
bb.4.bb16.i:
; predecessors: %bb.2
successors: %bb.8(0x40000000), %bb.5(0x40000000); %bb.8(50.00%),
%bb.5(50.00%)
liveins: $edi, $eflags, $esi
renamable $r15b = SETCCr 8, implicit $eflags
TEST32rr renamable $esi, renamable $esi, implicit-def $eflags
renamable $r14b = SETCCr 8, implicit $eflags
renamable $edx = COPY renamable $edi, implicit-def $rdx
renamable $edx = NEG32r renamable $edx(tied-def 0), implicit-def $eflags,
implicit killed $rdx, implicit-def $rdx
renamable $edx = CMOV32rr renamable $edx(tied-def 0), killed renamable $edi,
12, implicit $eflags, implicit killed $rdx, implicit-def $rdx
renamable $eax = COPY renamable $esi, implicit-def $rax
renamable $eax = NEG32r renamable $eax(tied-def 0), implicit-def $eflags,
implicit killed $rax, implicit-def $rax
renamable $eax = CMOV32rr renamable $eax(tied-def 0), killed renamable $esi,
12, implicit $eflags, implicit killed $rax, implicit-def $rax
renamable $ecx = LEA64_32r $noreg, 4, renamable $rdx, 0, $noreg, implicit-def
$rcx
TEST32ri renamable $edx, 1073741824, implicit-def $eflags, implicit killed
$rdx
JCC_1 %bb.8, 4, implicit $eflags
JMP_1 %bb.5
After Prologue/Epilogue Insertion & Frame Finalization (prologepilog):
bb.4.bb16.i:
; predecessors: %bb.2
successors: %bb.8(0x40000000), %bb.5(0x40000000); %bb.8(50.00%),
%bb.5(50.00%)
liveins: $edi, $eflags, $esi, $rbp, $r15, $r14, $rbx
frame-setup PUSH64r killed $rbp, implicit-def $rsp, implicit $rsp
frame-setup PUSH64r killed $r15, implicit-def $rsp, implicit $rsp
frame-setup PUSH64r killed $r14, implicit-def $rsp, implicit $rsp
frame-setup PUSH64r killed $rbx, implicit-def $rsp, implicit $rsp
$rsp = frame-setup SUB64ri8 $rsp(tied-def 0), 8, implicit-def dead $eflags
renamable $r15b = SETCCr 8, implicit $eflags
TEST32rr renamable $esi, renamable $esi, implicit-def $eflags
renamable $r14b = SETCCr 8, implicit $eflags
renamable $edx = COPY renamable $edi, implicit-def $rdx
renamable $edx = NEG32r renamable $edx(tied-def 0), implicit-def $eflags,
implicit killed $rdx, implicit-def $rdx
renamable $edx = CMOV32rr renamable $edx(tied-def 0), killed renamable $edi,
12, implicit $eflags, implicit killed $rdx, implicit-def $rdx
renamable $eax = COPY renamable $esi, implicit-def $rax
renamable $eax = NEG32r renamable $eax(tied-def 0), implicit-def $eflags,
implicit killed $rax, implicit-def $rax
renamable $eax = CMOV32rr renamable $eax(tied-def 0), killed renamable $esi,
12, implicit $eflags, implicit killed $rax, implicit-def $rax
renamable $ecx = LEA64_32r $noreg, 4, renamable $rdx, 0, $noreg, implicit-def
$rcx
TEST32ri renamable $edx, 1073741824, implicit-def $eflags, implicit killed
$rdx
JCC_1 %bb.8, 4, implicit $eflags
JMP_1 %bb.5
Originally reported in <a href="https://github.com/rust-lang/rust/issues/84667">https://github.com/rust-lang/rust/issues/84667</a></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>