<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 - LLVMDumpModule emits invalid LLVM IR, preventing diagnosis and reporting of other bugs"
href="https://bugs.llvm.org/show_bug.cgi?id=49358">49358</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLVMDumpModule emits invalid LLVM IR, preventing diagnosis and reporting of other bugs
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andrew@ziglang.org
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Version: llvmorg-12.0.0-rc2 (4918a3d138b907a571f496661b5367e090e1e8bb)
I'm in the process of trying to report a different bug, however, LLVMDumpModule
is producing invalid LLVM IR, preventing me from running other tools such as
llc in order to create a reproducing test case.
For example, functions with sret are printed this way:
define internal fastcc void @std.heap.CAllocator.alloc({ %"[]u8", i16 }*
nonnull sret %0, %std.builtin.StackTrace* nonnull %1, %std.mem.Allocator*
nonnull align 8 %2, i64 %3, i29 %4, i29 %5, i64 %6) unnamed_addr #1 !dbg !12261
{
Causing the following error:
[nix-shell:~/dev/zig]$ ~/local/llvm12-debug/bin/llc zig1.ll -filetype=obj
/home/andy/local/llvm12-debug/bin/llc: error:
/home/andy/local/llvm12-debug/bin/llc: zig1.ll:49402:87: error: expected '('
define internal fastcc void @std.heap.CAllocator.alloc({ %"[]u8", i16 }*
nonnull sret %0, %std.builtin.StackTrace* nonnull %1, %std.mem.Allocator*
nonnull align 8 %2, i64 %3, i29 %4, i29 %5, i64 %6) unnamed_addr #1 !dbg !12261
{
According to the LangRef.html for LLVM 12, the syntax for sret has changed.
However, LLVMDumpModule is still printing code that adheres to LLVM 11.
After this is fixed, I will have at least one, probably more, regressions to
file.</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>