<html>
<head>
<base href="http://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 --- - opt fails with blockaddress of entry block"
href="http://llvm.org/bugs/show_bug.cgi?id=17250">17250</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt fails with blockaddress of entry block
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>marceloabsousa@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11203" name="attach_11203" title="Bytecode file">attachment 11203</a> <a href="attachment.cgi?id=11203&action=edit" title="Bytecode file">[details]</a></span>
Bytecode file
With:
LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):
LLVM version 3.4svn
DEBUG build.
Built Sep 14 2013 (21:22:42).
Default target: x86_64-unknown-linux-gnu
Host CPU: corei7-avx
clang version 3.4 (trunk 190758)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Running the optimizer with instnamer and lowerswitch violates the blockaddress
of entry block assertion. This file is part of the Linux kernel
(lib/locking-selftest.c). I'm able to run llvm-dis on it for inspection. I
suspect the problem is in the IR generation. Here's the failure log file. The
.bc goes in attach.
opt -instnamer < locking-selftest.c.bc > locking-selftest.o.bc
blockaddress may not be used with the entry block!
label %bb
Broken module found, compilation aborted!
/home/msousa/llvm/build/bin/opt -instnamer -lowerswitch < lib/show_mem.c.bc >
lib/show_mem.o.bc
/home/msousa/llvm/build/bin/opt -instnamer -lowerswitch < lib/proportions.c.bc
<span class="quote">> lib/proportions.o.bc</span >
0 opt 0x00000000018a5a15 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1 opt 0x00000000018a5c9c
/home/msousa/llvm/build/bin/opt -instnamer -lowerswitch < lib/rwsem.c.bc >
lib/rwsem.o.bc
2 opt 0x00000000018a56e0
3 libpthread.so.0 0x00002aaaab311030
4 libc.so.6 0x00002aaaabf06475 gsignal + 53
5 libc.so.6 0x00002aaaabf096f0 abort + 384
6 opt 0x000000000179be27
7 opt 0x000000000179bb0b
8 opt 0x000000000177d7cd
llvm::FPPassManager::runOnFunction(llvm::Function&) + 385
9 opt 0x000000000177d9be
llvm::FPPassManager::runOnModule(llvm::Module&) + 84
10 opt 0x000000000177dd1b
llvm::MPPassManager::runOnModule(llvm::Module&) + 559
11 opt 0x000000000177e269 llvm::PassManagerImpl::run(llvm::Module&)
+ 249
12 opt 0x000000000177e47b llvm::PassManager::run(llvm::Module&) +
39
13 opt 0x000000000094a50f main + 5564
14 libc.so.6 0x00002aaaabef2ead __libc_start_main + 253
15 opt 0x000000000093cd99
Stack dump:
0. Program arguments: opt -instnamer -lowerswitch
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'Module Verifier' on function
'@ww_test_object_lock_unbalanced'
Aborted
make: *** [lib/locking-selftest.o.bc] Error 134</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>