<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 - opt crashes with "opt -O1 -attributor-enable=cgscc": Assertion `Header.isValid()' failed."
href="https://bugs.llvm.org/show_bug.cgi?id=49606">49606</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt crashes with "opt -O1 -attributor-enable=cgscc": Assertion `Header.isValid()' failed.
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Interprocedural Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zequanwu@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>reduced.ll:
source_filename = "reduced.ll"
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%0 = type { i32, %1, %2* }
%1 = type { i32 }
%2 = type opaque
define hidden %0* @f1(i64 %0, i64 %1) {
%3 = call { %0*, i64 } @f3(i64 %0)
ret %0* undef
}
define linkonce_odr hidden { %0*, i64 } @f3(i64 %0) align 2 {
%2 = call i32 @f4()
%3 = zext i32 %2 to i64
call void @f5(i64 %3, i64 %0)
ret { %0*, i64 } undef
}
define linkonce_odr hidden i32 @f4() align 2 {
ret i32 16
}
define internal void @f5(i64 %0, i64 %1) {
br label %3
3: ; preds = %6, %2
call void @f6(i64 %0)
%4 = icmp sgt i64 %1, %0
br i1 %4, label %5, label %6
5: ; preds = %3
ret void
6: ; preds = %3
call void @f5(i64 %0, i64 %1)
br label %3
}
define internal void @f6(i64 %0) {
%2 = icmp sgt i64 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1
call void @llvm.trap()
ret void
4: ; preds = %1
ret void
}
; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #0
attributes #0 = { cold noreturn nounwind }
The crash shows up on release build with assertion, but not on debug build.</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>