[LLVMbugs] [Bug 14902] New: Code generation for hexagon target aborts for trivial example

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 10 11:54:30 PST 2013


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

             Bug #: 14902
           Summary: Code generation for hexagon target aborts for trivial
                    example
           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: ahk.qqq at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9856
  --> http://llvm.org/bugs/attachment.cgi?id=9856
Preprocessed source

int f(int a, int b) {
        if (a > b)
            return a + b;
        else
            return a - b;
}

compiled with

  clang -target hexagon -S t.c

leads to the message

No offset range is defined for this opcode. Please define it in the above
switch statement!
UNREACHABLE executed at HexagonInstrInfo.cpp:2444!
0  clang           0x0000000002d24a6a llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1  clang           0x0000000002d24ce9
2  clang           0x0000000002d24740
3  libpthread.so.0 0x000000338700efe0
4  libc.so.6       0x0000003386435935 gsignal + 53
5  libc.so.6       0x00000033864370e8 abort + 328
6  clang           0x0000000002d0bdd7
7  clang           0x0000000001fc8e08
llvm::HexagonInstrInfo::isValidOffset(int, int) const + 830
8  clang           0x0000000001f9f816
9  clang           0x0000000002691e1d
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 95
10 clang           0x0000000002caea3d
llvm::FPPassManager::runOnFunction(llvm::Function&) + 385
11 clang           0x0000000002caec2e
llvm::FPPassManager::runOnModule(llvm::Module&) + 84
12 clang           0x0000000002caef8b
llvm::MPPassManager::runOnModule(llvm::Module&) + 559
13 clang           0x0000000002caf58d llvm::PassManagerImpl::run(llvm::Module&)
+ 249
14 clang           0x0000000002caf79f llvm::PassManager::run(llvm::Module&) +
39
15 clang           0x0000000000e59aa3
16 clang           0x0000000000e59b7a
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 136
17 clang           0x0000000000e54d4c
18 clang           0x0000000001016a68 clang::ParseAST(clang::Sema&, bool, bool)
+ 786
19 clang           0x0000000000c36f68 clang::ASTFrontendAction::ExecuteAction()
+ 298
20 clang           0x0000000000e53d67 clang::CodeGenAction::ExecuteAction() +
1273
21 clang           0x0000000000c36b83 clang::FrontendAction::Execute() + 197
22 clang           0x0000000000c0d553
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 719
23 clang           0x0000000000bddc8a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1060
24 clang           0x0000000000bce02f cc1_main(char const**, char const**, char
const*, void*) + 678
25 clang           0x0000000000bd85ff main + 508
26 libc.so.6       0x0000003386421735 __libc_start_main + 245
27 clang           0x0000000000bcd7f9
Stack dump:
0.    Program arguments:
/home/ahk/Work/Projects/Compiler/LLVM/INSTALLDIR/bin/clang -cc1 -triple hexagon
-S -disable-free -main-file-name t.c -mrelocation-model static
-mdisable-fp-elim -fmath-errno -mconstructor-aliases -target-cpu hexagonv4
-fno-signed-char -mqdsp6-compat -Wreturn-type -fshort-enums -mllvm
-machine-sink-split=0 -target-linker-version 2.22.52.0.1
-momit-leaf-frame-pointer -coverage-file /home/ahk/Tmp/t.s -resource-dir
/home/ahk/Work/Projects/Compiler/LLVM/INSTALLDIR/bin/../lib/clang/3.3
-fmodule-cache-path /var/tmp/clang-module-cache -fno-dwarf-directory-asm
-fdebug-compilation-dir /home/ahk/Tmp -ferror-limit 19 -fmessage-length 153
-mstackrealign -fshort-enums -fno-use-cxa-atexit -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o t.s -x c t.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 't.c'.
4.    Running pass 'Hexagon Expand Predicate Spill Code' on function '@f'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 172093)
Target: hexagon
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.
clang: note: diagnostic msg:

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