[LLVMbugs] [Bug 14544] New: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed in Loop Vectorization

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Dec 8 03:17:58 PST 2012


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

             Bug #: 14544
           Summary: Assertion `isa<X>(Val) && "cast<Ty>() argument of
                    incompatible type!"' failed in Loop Vectorization
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: antoine.balestrat at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Hi ! The following testcase makes LLVM/Clang 3.2 as of r169674 fail during Loop
Vectorization pass.

$ cat invalidargument.c
void f(void)
{
    int i, *p = 1;

    for(i = 1; i < 17; ++i)
        *p *= !i;
}

$ clong -w -O1 -mllvm -vectorize-loops invalidargument.c
clang: /home/merkil/git/clang/llvm/include/llvm/Support/Casting.h:208: typename
cast_retty<X, Y>::ret_type llvm::cast(const Y &) [X = llvm::BinaryOperator, Y =
llvm::Value *]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible
type!"' failed.
0  clang           0x0000000001ad26bf
1  clang           0x0000000001ad2ba3
2  libpthread.so.0 0x00007f1f6ab1e910
3  libc.so.6       0x00007f1f69d87ff5 gsignal + 53
4  libc.so.6       0x00007f1f69d89307 abort + 327
5  libc.so.6       0x00007f1f69d811b2
6  libc.so.6       0x00007f1f69d81262
7  clang           0x000000000123f2b0
8  clang           0x0000000001238acc
9  clang           0x00000000018e7c1d
llvm::LPPassManager::runOnFunction(llvm::Function&) + 829
10 clang           0x0000000001a7505c
llvm::FPPassManager::runOnFunction(llvm::Function&) + 444
11 clang           0x0000000001867796
12 clang           0x0000000001a755ce
llvm::MPPassManager::runOnModule(llvm::Module&) + 494
13 clang           0x0000000001a75bd8 llvm::PassManagerImpl::run(llvm::Module&)
+ 456
14 clang           0x0000000001a75d7a llvm::PassManager::run(llvm::Module&) +
10
15 clang           0x00000000007aa0a0
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5904
16 clang           0x00000000007a7bda
17 clang           0x00000000008dc0d5 clang::ParseAST(clang::Sema&, bool, bool)
+ 549
18 clang           0x00000000007a6c2c clang::CodeGenAction::ExecuteAction() +
204
19 clang           0x0000000000645b8a clang::FrontendAction::Execute() + 106
20 clang           0x0000000000626f7d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 989
21 clang           0x000000000060cf50
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3936
22 clang           0x0000000000603fc6 cc1_main(char const**, char const**, char
const*, void*) + 694
23 clang           0x0000000000609016 main + 3558
24 libc.so.6       0x00007f1f69d74985 __libc_start_main + 245
25 clang           0x0000000000603c4d
Stack dump:
0.    Program arguments: /home/merkil/git/clang/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
invalidargument.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.23.1 -momit-leaf-frame-pointer -resource-dir
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.3
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-w -fdebug-compilation-dir /home/merkil/bugs -ferror-limit 19 -fmessage-length
0 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -mllvm
-vectorize-loops -o /tmp/invalidargument-n3UzGq.o -x c invalidargument.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module 'invalidargument.c'.
4.    Running pass 'Loop Pass Manager' on function '@f'
5.    Running pass 'Loop Vectorization' on basic block '%for.body'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 169674)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.

-- 
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