<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 - Implicit control flow map broken assertion for readnone function"
href="https://bugs.llvm.org/show_bug.cgi?id=34937">34937</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Implicit control flow map broken assertion for readnone function
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mpfergu@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>D37460 / r315440 seems to have caused a regression. Before this change, the
following program compiled with `opt -gvn minimal64.ll -S` but after, it causes
an assertion failure in the compiler. I've verified that this failure is still
present on trunk as of r315579.
GVN.cpp:1073: bool llvm::GVN::PerformLoadPRE(llvm::LoadInst*,
llvm::GVN::AvailValInBlkVect&, llvm::GVN::UnavailBlkVect&): Assertion
`It->second->getParent() == TmpBB && "Implicit control flow map broken?"'
failed.
Here is a carefully minimized test case (from a failure compiling with our
frontend):
; ModuleID = 'simpler.ll'
source_filename = "bugpoint-output-5fd3360.bc"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%ArrayImpl = type { i64, i64 addrspace(100)*, [1 x i64], [1 x i64], [1 x i64],
i64, i64, double addrspace(100)*, double addrspace(100)*, i8, i64 }
; Function Attrs: readnone
declare %ArrayImpl* @getaddr_ArrayImpl(%ArrayImpl addrspace(100)*) #0
; Function Attrs: readnone
declare i64* @getaddr_i64(i64 addrspace(100)*) #0
define hidden void @wrapon_fn173() {
entry:
%0 = call %ArrayImpl* @getaddr_ArrayImpl(%ArrayImpl addrspace(100)* undef)
br label %loop
loop:
%1 = call %ArrayImpl* @getaddr_ArrayImpl(%ArrayImpl addrspace(100)* undef)
%2 = load i64 addrspace(100)*, i64 addrspace(100)** null, align 8
%3 = call i64* @getaddr_i64(i64 addrspace(100)* %2)
br label %loop
}
attributes #0 = { readnone }
To reproduce, put the above into minimal64.ll and run `opt -gvn minimal64.ll
-S`.
Note that if the "readnone" attribute is removed from the getaddr functions,
the test will pass.
I'd greatly appreciate any attention you can give to this matter.
Thanks!</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>