<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - -verify-machineinstrs fails for intrinsics + va_start"
href="https://llvm.org/bugs/show_bug.cgi?id=28339">28339</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-verify-machineinstrs fails for intrinsics + va_start
</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>david.majnemer@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, matze@braunis.de, qcolombet@apple.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>consider:
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"
define i8* @test(i64 %a, i8* %b, ...) {
entry:
%bar = alloca i8
call void @llvm.va_start(i8* %bar)
call void @llvm.eh.unwind.init()
%foo = alloca i32
call void @llvm.eh.return.i64(i64 %a, i8* %b)
unreachable
}
declare void @llvm.eh.return.i64(i64, i8*)
declare void @llvm.eh.unwind.init()
declare void @llvm.va_start(i8*)
run with:
llc t.ll -o - -verify-machineinstrs -O0 -print-after-all
we get:
# After Prologue/Epilogue Insertion & Frame Finalization
# Machine code for function test: Properties: <Post SSA, tracking liveness,
AllVRegsAllocated>
[...]
Function Live Ins: %RDI, %RSI, %RDX, %RCX, %R8, %R9, %AL, %XMM0, %XMM1, %XMM2,
%XMM3, %XMM4, %XMM5, %XMM6, %XMM7
BB#0: derived from LLVM BB %entry
Live Ins: %RDI %RSI %RDX %RCX %R8 %R9 %AL %XMM0 %XMM1 %XMM2 %XMM3 %XMM4
%XMM5 %XMM6 %XMM7 %R15 %R14 %R13 %R12 %RBX %RAX %RBP
[...]
PUSH64r %RAX<kill>, %RSP<imp-def>, %RSP<imp-use>; flags: FrameSetup
[...]
TEST8rr %AL, %AL<kill>, %EFLAGS<imp-def>
[...]
*** Bad machine code: Using an undefined physical register ***
- function: test
- basic block: BB#0 entry (0x542e358)
- instruction: TEST8rr
- operand 0: %AL
*** Bad machine code: Using an undefined physical register ***
- function: test
- basic block: BB#0 entry (0x542e358)
- instruction: TEST8rr
- operand 1: %AL<kill>
LLVM ERROR: Found 2 machine code errors.
*** Bad machine code: Using an undefined physical register ***
- function: test
- basic block: BB#0 entry (0x542e358)
- instruction: TEST8rr
- operand 0: %AL
*** Bad machine code: Using an undefined physical register ***
- function: test
- basic block: BB#0 entry (0x542e358)
- instruction: TEST8rr
- operand 1: %AL<kill>
LLVM ERROR: Found 2 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>