[LLVMbugs] [Bug 4297] New: llc: Assertion `castIsValid(getOpcode(), S, Ty) && " Illegal PtrToInt"' failed.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Jun 2 05:03:56 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4297
Summary: llc: Assertion `castIsValid(getOpcode(), S, Ty) &&
"Illegal PtrToInt"' failed.
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: fvbommel at wxs.nl
CC: llvmbugs at cs.uiuc.edu
I'm getting an assertion failure from llc that doesn't seem to be caused by any
instruction in my code (it complains about ptrtoint, which isn't in there).
This is the assertion:
$ llc bugpoint-reduced-simplified.bc
llc: Instructions.cpp:2463: llvm::PtrToIntInst::PtrToIntInst(llvm::Value*,
const llvm::Type*, const std::string&, llvm::Instruction*): Assertion
`castIsValid(getOpcode(), S, Ty) && "Illegal PtrToInt"' failed.
0 llc 0x0000000000d63cdf
1 llc 0x0000000000d640e9
2 libpthread.so.0 0x00007f5bba7700f0
3 libc.so.6 0x00007f5bb986c015 gsignal + 53
4 libc.so.6 0x00007f5bb986db83 abort + 387
5 libc.so.6 0x00007f5bb9864d89 __assert_fail + 233
6 llc 0x0000000000ce38e8
7 llc 0x0000000000be83ce
8 llc 0x0000000000beb728
9 llc 0x0000000000cfd109
llvm::FPPassManager::runOnFunction(llvm::Function&) + 489
10 llc 0x0000000000cfdb26
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 166
11 llc 0x0000000000cfdd6b
llvm::FunctionPassManager::run(llvm::Function&) + 75
12 llc 0x0000000000516c09 main + 4649
13 libc.so.6 0x00007f5bb9857466 __libc_start_main + 230
14 llc 0x0000000000514df9
Stack dump:
0. Program arguments: llc bugpoint-reduced-simplified.bc
1. Running pass 'Optimize for code generation' on function '@_Dmain'
Aborted
And this is the code:
$ llvm-dis <bugpoint-reduced-simplified.bc
; ModuleID = '<stdin>'
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"
%"byte[]" = type { i64, i8* }
%"char[][]" = type { i64, %"byte[]"* }
@.str = external constant [7 x i8] ; <[7 x i8]*> [#uses=1]
define fastcc i32 @_Dmain(%"char[][]" %unnamed) {
entry:
%tmp = getelementptr [7 x i8]* @.str, i32 0, i32 0 ; <i8*>
[#uses=1]
br i1 undef, label %foreachbody, label %foreachend
foreachbody: ; preds = %entry
%tmp4 = getelementptr i8* %tmp, i32 undef ; <i8*>
[#uses=1]
%tmp5 = load i8* %tmp4 ; <i8> [#uses=0]
unreachable
foreachend: ; preds = %entry
ret i32 0
}
(I'm using r72443, if that matters)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list