[LLVMbugs] [Bug 15318] New: AsmPrinter crashes with assertion

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 20 23:53:26 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15318

            Bug ID: 15318
           Summary: AsmPrinter crashes with assertion
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: liujiangning1 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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

-- 
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/20130221/04b61ac9/attachment.html>


More information about the llvm-bugs mailing list