[llvm-bugs] [Bug 49358] New: LLVMDumpModule emits invalid LLVM IR, preventing diagnosis and reporting of other bugs
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 25 20:59:36 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49358
Bug ID: 49358
Summary: LLVMDumpModule emits invalid LLVM IR, preventing
diagnosis and reporting of other bugs
Product: new-bugs
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: release blocker
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: andrew at ziglang.org
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210226/9645009b/attachment-0001.html>
More information about the llvm-bugs
mailing list