<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 --- - AsmPrinter crashes with assertion"
href="http://llvm.org/bugs/show_bug.cgi?id=15318">15318</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>AsmPrinter crashes with assertion
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>liujiangning1@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>For this small test case, we have assertion failure in AsmPrinter.
$ cat bb.ll
define internal i1 @f(float %s) {
entry:
%c = fcmp ogt float %s, 0x41EFFFFFE0000000
ret i1 %c
}
$ llc bb.ll
llc: /home/jialiu01/llvm/llvm/lib/Support/APInt.cpp:920: llvm::APInt
llvm::APInt::trunc(unsigned int) const: Assertion `width < BitWidth && "Invalid
APInt Truncate request"' failed.
0 llc 0x08ce0b0a llvm::sys::PrintStackTrace(_IO_FILE*) + 50
1 llc 0x08ce0d5d
2 llc 0x08ce0764
3 0xb7783400 __kernel_sigreturn + 0
4 0xb7783424 __kernel_vsyscall + 16
5 libc.so.6 0xb74c8cff gsignal + 79
6 libc.so.6 0xb74cc325 abort + 373
7 libc.so.6 0xb74c1896 __assert_fail + 246
8 llc 0x08c9208f llvm::APInt::trunc(unsigned int) const + 71
9 llc 0x08c8cde6
10 llc 0x08c8d439 llvm::APFloat::toString(llvm::SmallVectorImpl<char>&,
unsigned int, unsigned int) const + 1107
11 llc 0x08562b6b
12 llc 0x0856317f
13 llc 0x085633e5 llvm::AsmPrinter::EmitGlobalConstant(llvm::Constant
const*, unsigned int) + 99
14 llc 0x08560184 llvm::AsmPrinter::EmitConstantPool() + 1710
15 llc 0x0855cd61 llvm::AsmPrinter::EmitFunctionHeader() + 41
16 llc 0x083c8184
17 llc 0x08823115
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 87
18 llc 0x08bf24a6 llvm::FPPassManager::runOnFunction(llvm::Function&) +
306
19 llc 0x08bf2649 llvm::FPPassManager::runOnModule(llvm::Module&) + 97
20 llc 0x08bf2956 llvm::MPPassManager::runOnModule(llvm::Module&) + 498
21 llc 0x08bf2f12 llvm::PassManagerImpl::run(llvm::Module&) + 234
22 llc 0x08bf3103 llvm::PassManager::run(llvm::Module&) + 39
23 llc 0x083b528f
24 llc 0x083b41d9 main + 253
25 libc.so.6 0xb74b4113 __libc_start_main + 243
26 llc 0x083b3af1
Stack dump:
0. Program arguments: llc bb.ll
1. Running pass 'Function Pass Manager' on module 'bb.ll'.
2. Running pass 'X86 Assembly / Object Emitter' on function '@f'
Aborted</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>