[llvm-bugs] [Bug 28291] New: LLVM trunk crash with knl target (Assertion `C1->getType() == C2->getType())

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 24 04:17:58 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28291

            Bug ID: 28291
           Summary: LLVM trunk crash with knl target (Assertion
                    `C1->getType() == C2->getType())
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: anton.mitrokhin at phystech.edu
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16632
  --> https://llvm.org/bugs/attachment.cgi?id=16632&action=edit
Reproducer

Clang ICE with -O2 and -O3 on knl target

> clang++ -std=c++11 -O3 -march=knl -o out.o -c crash.cpp
> clang++ -std=c++11 -O2 -march=knl -o out.o -c crash.cpp


Output:
clang-3.9: /export/users/amitrokh/llvm/llvm-trunk/lib/IR/Constants.cpp:1740:
static llvm::Constant* llvm::ConstantExpr::get(unsigned int, llvm::Constant*,
llvm::Constant*, unsigned int, llvm::Type*): Assertion `C1->getType() ==
C2->getType() && "Operand types in binary constant expression should match"'
failed.
#0 0x0000000001110535 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x1110535)
#1 0x000000000110e1e6 llvm::sys::RunSignalHandlers()
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x110e1e6)
#2 0x000000000110e411 SignalHandler(int)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x110e411)
#3 0x00007fa709e78100 __restore_rt (/lib64/libpthread.so.0+0xf100)
#4 0x00007fa708a705f7 __GI_raise (/lib64/libc.so.6+0x355f7)
#5 0x00007fa708a71ce8 __GI_abort (/lib64/libc.so.6+0x36ce8)
#6 0x00007fa708a69566 __assert_fail_base (/lib64/libc.so.6+0x2e566)
#7 0x00007fa708a69612 (/lib64/libc.so.6+0x2e612)
#8 0x0000000000d23474 llvm::ConstantExpr::get(unsigned int, llvm::Constant*,
llvm::Constant*, unsigned int, llvm::Type*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xd23474)
#9 0x0000000000954da3 llvm::ConstantFoldBinaryOpOperands(unsigned int,
llvm::Constant*, llvm::Constant*, llvm::DataLayout const&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x954da3)
#10 0x000000000095be17 llvm::ConstantFoldInstOperands(llvm::Instruction*,
llvm::ArrayRef<llvm::Constant*>, llvm::DataLayout const&,
llvm::TargetLibraryInfo const*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x95be17)
#11 0x000000000095d095 llvm::ConstantFoldInstruction(llvm::Instruction*,
llvm::DataLayout const&, llvm::TargetLibraryInfo const*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x95d095)
#12 0x0000000000e3f280 llvm::InstCombiner::run()
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xe3f280)
#13 0x0000000000e4016b combineInstructionsOverFunction(llvm::Function&,
llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&,
llvm::TargetLibraryInfo&, llvm::DominatorTree&, bool, llvm::LoopInfo*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xe4016b)
#14 0x0000000000e40572
llvm::InstructionCombiningPass::runOnFunction(llvm::Function&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xe40572)
#15 0x0000000000d8d633 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xd8d633)
#16 0x0000000000d8d9eb llvm::FPPassManager::runOnModule(llvm::Module&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xd8d9eb)
#17 0x0000000000d8dcff llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xd8dcff)
#18 0x0000000001266b38 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x1266b38)
#19 0x000000000187b026
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x187b026)
#20 0x0000000001c95e3b clang::ParseAST(clang::Sema&, bool, bool)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x1c95e3b)
#21 0x000000000187b3db clang::CodeGenAction::ExecuteAction()
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x187b3db)
#22 0x0000000001592766 clang::FrontendAction::Execute()
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x1592766)
#23 0x000000000156c71e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x156c71e)
#24 0x00000000016271cc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x16271cc)
#25 0x0000000000706718 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x706718)
#26 0x00000000006d9f7f main
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x6d9f7f)
#27 0x00007fa708a5cb15 __libc_start_main (/lib64/libc.so.6+0x21b15)
#28 0x00000000007027b5 _start
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x7027b5)
Stack dump:
0.      Program arguments: /export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
crash.cpp -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu knl -momit-leaf-frame-pointer -dwarf-column-info
-debugger-tuning=gdb -coverage-file
/export/users/amitrokh/forCreduce/untracked/clang_optypes_match/out.o
-resource-dir /export/users/amitrokh/llvm/bin-trunk/bin/../lib/clang/3.9.0
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward
-internal-isystem /usr/local/include -internal-isystem
/export/users/amitrokh/llvm/bin-trunk/bin/../lib/clang/3.9.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/export/users/amitrokh/forCreduce/untracked/clang_optypes_match -ferror-limit
19 -fmessage-length 237 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o out.o -x c++ crash.cpp
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 'crash.cpp'.
4.      Running pass 'Combine redundant instructions' on function '@_Z3fn1v'
clang-3.9: error: unable to execute command: Aborted (core dumped)
clang-3.9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.9.0 (trunk 273570)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /export/users/amitrokh/llvm/bin-trunk/bin
clang-3.9: 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-3.9: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.9: note: diagnostic msg: /tmp/crash-7f5c74.cpp
clang-3.9: note: diagnostic msg: /tmp/crash-7f5c74.sh
clang-3.9: note: diagnostic msg:

********************



> clang -v
clang version 3.9.0 (trunk 273570)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /export/users/amitrokh/llvm/bin-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

-- 
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/20160624/7381363a/attachment-0001.html>


More information about the llvm-bugs mailing list