<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 - [FastISel] Incorrect trivial kill for extractvalue"
href="https://bugs.llvm.org/show_bug.cgi?id=49467">49467</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[FastISel] Incorrect trivial kill for extractvalue
</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>Common Code Generator Code
</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>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>declare { i8*, i64 } @get()
declare void @use(i8*, i64)
define void @test(i64* %p) {
%struct = call { i8*, i64 } @get()
%struct.1 = extractvalue { i8*, i64 } %struct, 1
store i64 %struct.1, i64* %p, align 8
%struct.2 = extractvalue { i8*, i64 } %struct, 1
call void @use(i8* undef, i64 %struct.2)
ret void
}
llc -O0 -verify-machineinstr
# After Instruction Selection
# Machine code for function test: IsSSA, TracksLiveness
Function Live Ins: $rdi in %0
bb.0 (%ir-block.0):
liveins: $rdi
%0:gr64 = COPY $rdi
%1:gr64 = COPY killed %0:gr64
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags,
implicit-def $ssp, implicit $rsp, implicit $ssp
CALL64pcrel32 target-flags(x86-plt) @get, <regmask $bh $bl $bp $bph $bpl $bx
$ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b
$r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w
$r12wh and 3 more...>, implicit $rsp, implicit $ssp, implicit-def $rax,
implicit-def $rdx
ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def
$ssp, implicit $rsp, implicit $ssp
%7:gr64 = COPY $rax
%8:gr64 = COPY $rdx
MOV64mr %1:gr64, 1, $noreg, 0, $noreg, killed %8:gr64 :: (store 8 into %ir.p)
%2:gr64 = IMPLICIT_DEF
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags,
implicit-def $ssp, implicit $rsp, implicit $ssp
$rdi = COPY %2:gr64
$rsi = COPY %8:gr64
CALL64pcrel32 target-flags(x86-plt) @use, <regmask $bh $bl $bp $bph $bpl $bx
$ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b
$r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w
$r12wh and 3 more...>, implicit $rsp, implicit $ssp, implicit $rdi, implicit
$rsi
ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def
$ssp, implicit $rsp, implicit $ssp
RETQ
# End machine code for function test.
*** Bad machine code: Using a killed virtual register ***
- function: test
- basic block: %bb.0 (0x55d0628ed128)
- instruction: $rsi = COPY %8:gr64
- operand 1: %8:gr64
LLVM ERROR: Found 1 machine code errors.</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>