Jean-Daniel Dupas
2010-Sep-22 08:53 UTC
[LLVMdev] r114523 (convert the last 4 X86ISD...) breaks clang
Hello, After commit r114523, I start to get crash when compiling with clang (Release+Asserts) for i386: (I know I should fill a bug report instead of posting here, but I don't get much time right now). Trying to compile the following simple code, clang asserts. ---------- round.c -------- #include <math.h> float test() { return llround(1); } -------------------- [MacPro:~/Desktop] jddupas% clang -arch i386 -c round.c Assertion failed: (memvt.getStoreSize() == MMO->getSize() && "Size mismatch!"), function MemSDNode, file /Volumes/MacPro/Projects/OpenSource/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 5393. 0 clang 0x0000000100df5422 PrintStackTrace(void*) + 34 1 clang 0x0000000100df5999 SignalHandler(int) + 841 2 libSystem.B.dylib 0x00007fff8062d35a _sigtramp + 26 3 libSystem.B.dylib 0x0000000101612d10 _sigtramp + 2164152784 4 clang 0x0000000100018aa6 abort + 22 5 clang 0x0000000100018a68 __assert_rtn + 56 6 clang 0x000000010093a64e llvm::MemSDNode::MemSDNode(unsigned int, llvm::DebugLoc, llvm::SDVTList, llvm::SDValue const*, unsigned int, llvm::EVT, llvm::MachineMemOperand*) + 190 7 clang 0x0000000100933ec7 llvm::SelectionDAG::getMemIntrinsicNode(unsigned int, llvm::DebugLoc, llvm::SDVTList, llvm::SDValue const*, unsigned int, llvm::EVT, llvm::MachineMemOperand*) + 519 8 clang 0x0000000100722db4 llvm::X86TargetLowering::BuildFILD(llvm::SDValue, llvm::EVT, llvm::SDValue, llvm::SDValue, llvm::SelectionDAG&) const + 1380 9 clang 0x0000000100722759 llvm::X86TargetLowering::LowerSINT_TO_FP(llvm::SDValue, llvm::SelectionDAG&) const + 1017 10 clang 0x0000000100978b9b llvm::TargetLowering::LowerOperationWrapper(llvm::SDNode*, llvm::SmallVectorImpl<llvm::SDValue>&, llvm::SelectionDAG&) const + 27 11 clang 0x00000001008d63e4 llvm::DAGTypeLegalizer::CustomLowerNode(llvm::SDNode*, llvm::EVT, bool) + 164 12 clang 0x00000001008cd718 llvm::DAGTypeLegalizer::ExpandIntegerOperand(llvm::SDNode*, unsigned int) + 280 13 clang 0x00000001008d290f llvm::DAGTypeLegalizer::run() + 991 14 clang 0x00000001008d87b8 llvm::SelectionDAG::LegalizeTypes() + 40 15 clang 0x0000000100981f88 llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1192 16 clang 0x000000010098129f llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 367 17 clang 0x00000001009804a9 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 569 18 clang 0x0000000100a3f60d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 61 19 clang 0x0000000100d7e766 llvm::FPPassManager::runOnFunction(llvm::Function&) + 310 20 clang 0x0000000100d7ea3b llvm::FPPassManager::runOnModule(llvm::Module&) + 75 21 clang 0x0000000100d7eba9 llvm::MPPassManager::runOnModule(llvm::Module&) + 313 22 clang 0x0000000100d7f12c llvm::PassManagerImpl::run(llvm::Module&) + 172 23 clang 0x0000000100d7f6cd llvm::PassManager::run(llvm::Module&) + 13 24 clang 0x0000000100119d96 clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&, clang::TargetOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 4982 25 clang 0x00000001001f855e (anonymous namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 270 26 clang 0x000000010022a4de clang::ParseAST(clang::Sema&, bool) + 750 27 clang 0x00000001001f7df7 clang::CodeGenAction::ExecuteAction() + 823 28 clang 0x000000010003f9d9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 857 29 clang 0x00000001000209c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2724 30 clang 0x000000010001a131 cc1_main(char const**, char const**, char const*, void*) + 5313 31 clang 0x000000010001d2cd main + 765 32 clang 0x0000000100018c64 start + 52 33 clang 0x0000000000000021 start + 4294865905 Stack dump: 0. Program arguments: /Volumes/MacPro/Projects/OpenSource/llvm/release/Release+Asserts/bin/clang -cc1 -triple i386-apple-darwin10.0.0 -emit-obj -mrelax-all -disable-free -main-file-name round.c -pic-level 1 -mdisable-fp-elim -masm-verbose -target-cpu yonah -target-linker-version 97.14 -resource-dir /Volumes/MacPro/Projects/OpenSource/llvm/release/Release+Asserts/lib/clang/2.9 -ferror-limit 19 -fmessage-length 180 -stack-protector 1 -fblocks -fdiagnostics-show-option -fcolor-diagnostics -o round.o -x c round.c 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'round.c'. 4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@test' clang: error: clang frontend command failed due to signal 4 (use -v to see invocation) -- Jean-Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100922/aec45a60/attachment.html>
Chris Lattner
2010-Sep-22 16:49 UTC
[LLVMdev] r114523 (convert the last 4 X86ISD...) breaks clang
I will take a look in the next couple hours. Feel free to revert it in the meantime, thanks! -Chris On Sep 22, 2010, at 1:53 AM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote:> Hello, > > After commit r114523, I start to get crash when compiling with clang (Release+Asserts) for i386: > (I know I should fill a bug report instead of posting here, but I don't get much time right now). > > Trying to compile the following simple code, clang asserts. > > ---------- round.c -------- > #include <math.h> > float test() { return llround(1); } > -------------------- > > [MacPro:~/Desktop] jddupas% clang -arch i386 -c round.c > Assertion failed: (memvt.getStoreSize() == MMO->getSize() && "Size mismatch!"), function MemSDNode, file /Volumes/MacPro/Projects/OpenSource/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 5393. > 0 clang 0x0000000100df5422 PrintStackTrace(void*) + 34 > 1 clang 0x0000000100df5999 SignalHandler(int) + 841 > 2 libSystem.B.dylib 0x00007fff8062d35a _sigtramp + 26 > 3 libSystem.B.dylib 0x0000000101612d10 _sigtramp + 2164152784 > 4 clang 0x0000000100018aa6 abort + 22 > 5 clang 0x0000000100018a68 __assert_rtn + 56 > 6 clang 0x000000010093a64e llvm::MemSDNode::MemSDNode(unsigned int, llvm::DebugLoc, llvm::SDVTList, llvm::SDValue const*, unsigned int, llvm::EVT, llvm::MachineMemOperand*) + 190 > 7 clang 0x0000000100933ec7 llvm::SelectionDAG::getMemIntrinsicNode(unsigned int, llvm::DebugLoc, llvm::SDVTList, llvm::SDValue const*, unsigned int, llvm::EVT, llvm::MachineMemOperand*) + 519 > 8 clang 0x0000000100722db4 llvm::X86TargetLowering::BuildFILD(llvm::SDValue, llvm::EVT, llvm::SDValue, llvm::SDValue, llvm::SelectionDAG&) const + 1380 > 9 clang 0x0000000100722759 llvm::X86TargetLowering::LowerSINT_TO_FP(llvm::SDValue, llvm::SelectionDAG&) const + 1017 > 10 clang 0x0000000100978b9b llvm::TargetLowering::LowerOperationWrapper(llvm::SDNode*, llvm::SmallVectorImpl<llvm::SDValue>&, llvm::SelectionDAG&) const + 27 > 11 clang 0x00000001008d63e4 llvm::DAGTypeLegalizer::CustomLowerNode(llvm::SDNode*, llvm::EVT, bool) + 164 > 12 clang 0x00000001008cd718 llvm::DAGTypeLegalizer::ExpandIntegerOperand(llvm::SDNode*, unsigned int) + 280 > 13 clang 0x00000001008d290f llvm::DAGTypeLegalizer::run() + 991 > 14 clang 0x00000001008d87b8 llvm::SelectionDAG::LegalizeTypes() + 40 > 15 clang 0x0000000100981f88 llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1192 > 16 clang 0x000000010098129f llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 367 > 17 clang 0x00000001009804a9 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 569 > 18 clang 0x0000000100a3f60d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 61 > 19 clang 0x0000000100d7e766 llvm::FPPassManager::runOnFunction(llvm::Function&) + 310 > 20 clang 0x0000000100d7ea3b llvm::FPPassManager::runOnModule(llvm::Module&) + 75 > 21 clang 0x0000000100d7eba9 llvm::MPPassManager::runOnModule(llvm::Module&) + 313 > 22 clang 0x0000000100d7f12c llvm::PassManagerImpl::run(llvm::Module&) + 172 > 23 clang 0x0000000100d7f6cd llvm::PassManager::run(llvm::Module&) + 13 > 24 clang 0x0000000100119d96 clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&, clang::TargetOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 4982 > 25 clang 0x00000001001f855e (anonymous namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 270 > 26 clang 0x000000010022a4de clang::ParseAST(clang::Sema&, bool) + 750 > 27 clang 0x00000001001f7df7 clang::CodeGenAction::ExecuteAction() + 823 > 28 clang 0x000000010003f9d9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 857 > 29 clang 0x00000001000209c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2724 > 30 clang 0x000000010001a131 cc1_main(char const**, char const**, char const*, void*) + 5313 > 31 clang 0x000000010001d2cd main + 765 > 32 clang 0x0000000100018c64 start + 52 > 33 clang 0x0000000000000021 start + 4294865905 > Stack dump: > 0. Program arguments: /Volumes/MacPro/Projects/OpenSource/llvm/release/Release+Asserts/bin/clang -cc1 -triple i386-apple-darwin10.0.0 -emit-obj -mrelax-all -disable-free -main-file-name round.c -pic-level 1 -mdisable-fp-elim -masm-verbose -target-cpu yonah -target-linker-version 97.14 -resource-dir /Volumes/MacPro/Projects/OpenSource/llvm/release/Release+Asserts/lib/clang/2.9 -ferror-limit 19 -fmessage-length 180 -stack-protector 1 -fblocks -fdiagnostics-show-option -fcolor-diagnostics -o round.o -x c round.c > 1. <eof> parser at end of file > 2. Code generation > 3. Running pass 'Function Pass Manager' on module 'round.c'. > 4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@test' > clang: error: clang frontend command failed due to signal 4 (use -v to see invocation) > > -- Jean-Daniel > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100922/f1b30b1b/attachment.html>
Bob Wilson
2010-Sep-22 17:47 UTC
[LLVMdev] r114523 (convert the last 4 X86ISD...) breaks clang
I think this is the same thing I fixed in svn 114554 On Sep 22, 2010, at 9:49 AM, Chris Lattner wrote:> I will take a look in the next couple hours. Feel free to revert it in the meantime, thanks! > > -Chris > > On Sep 22, 2010, at 1:53 AM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote: > >> Hello, >> >> After commit r114523, I start to get crash when compiling with clang (Release+Asserts) for i386: >> (I know I should fill a bug report instead of posting here, but I don't get much time right now). >> >> Trying to compile the following simple code, clang asserts. >> >> ---------- round.c -------- >> #include <math.h> >> float test() { return llround(1); } >> -------------------- >> >> [MacPro:~/Desktop] jddupas% clang -arch i386 -c round.c >> Assertion failed: (memvt.getStoreSize() == MMO->getSize() && "Size mismatch!"), function MemSDNode, file /Volumes/MacPro/Projects/OpenSource/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 5393. >> 0 clang 0x0000000100df5422 PrintStackTrace(void*) + 34 >> 1 clang 0x0000000100df5999 SignalHandler(int) + 841 >> 2 libSystem.B.dylib 0x00007fff8062d35a _sigtramp + 26 >> 3 libSystem.B.dylib 0x0000000101612d10 _sigtramp + 2164152784 >> 4 clang 0x0000000100018aa6 abort + 22 >> 5 clang 0x0000000100018a68 __assert_rtn + 56 >> 6 clang 0x000000010093a64e llvm::MemSDNode::MemSDNode(unsigned int, llvm::DebugLoc, llvm::SDVTList, llvm::SDValue const*, unsigned int, llvm::EVT, llvm::MachineMemOperand*) + 190 >> 7 clang 0x0000000100933ec7 llvm::SelectionDAG::getMemIntrinsicNode(unsigned int, llvm::DebugLoc, llvm::SDVTList, llvm::SDValue const*, unsigned int, llvm::EVT, llvm::MachineMemOperand*) + 519 >> 8 clang 0x0000000100722db4 llvm::X86TargetLowering::BuildFILD(llvm::SDValue, llvm::EVT, llvm::SDValue, llvm::SDValue, llvm::SelectionDAG&) const + 1380 >> 9 clang 0x0000000100722759 llvm::X86TargetLowering::LowerSINT_TO_FP(llvm::SDValue, llvm::SelectionDAG&) const + 1017 >> 10 clang 0x0000000100978b9b llvm::TargetLowering::LowerOperationWrapper(llvm::SDNode*, llvm::SmallVectorImpl<llvm::SDValue>&, llvm::SelectionDAG&) const + 27 >> 11 clang 0x00000001008d63e4 llvm::DAGTypeLegalizer::CustomLowerNode(llvm::SDNode*, llvm::EVT, bool) + 164 >> 12 clang 0x00000001008cd718 llvm::DAGTypeLegalizer::ExpandIntegerOperand(llvm::SDNode*, unsigned int) + 280 >> 13 clang 0x00000001008d290f llvm::DAGTypeLegalizer::run() + 991 >> 14 clang 0x00000001008d87b8 llvm::SelectionDAG::LegalizeTypes() + 40 >> 15 clang 0x0000000100981f88 llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1192 >> 16 clang 0x000000010098129f llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 367 >> 17 clang 0x00000001009804a9 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 569 >> 18 clang 0x0000000100a3f60d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 61 >> 19 clang 0x0000000100d7e766 llvm::FPPassManager::runOnFunction(llvm::Function&) + 310 >> 20 clang 0x0000000100d7ea3b llvm::FPPassManager::runOnModule(llvm::Module&) + 75 >> 21 clang 0x0000000100d7eba9 llvm::MPPassManager::runOnModule(llvm::Module&) + 313 >> 22 clang 0x0000000100d7f12c llvm::PassManagerImpl::run(llvm::Module&) + 172 >> 23 clang 0x0000000100d7f6cd llvm::PassManager::run(llvm::Module&) + 13 >> 24 clang 0x0000000100119d96 clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&, clang::TargetOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 4982 >> 25 clang 0x00000001001f855e (anonymous namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 270 >> 26 clang 0x000000010022a4de clang::ParseAST(clang::Sema&, bool) + 750 >> 27 clang 0x00000001001f7df7 clang::CodeGenAction::ExecuteAction() + 823 >> 28 clang 0x000000010003f9d9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 857 >> 29 clang 0x00000001000209c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2724 >> 30 clang 0x000000010001a131 cc1_main(char const**, char const**, char const*, void*) + 5313 >> 31 clang 0x000000010001d2cd main + 765 >> 32 clang 0x0000000100018c64 start + 52 >> 33 clang 0x0000000000000021 start + 4294865905 >> Stack dump: >> 0. Program arguments: /Volumes/MacPro/Projects/OpenSource/llvm/release/Release+Asserts/bin/clang -cc1 -triple i386-apple-darwin10.0.0 -emit-obj -mrelax-all -disable-free -main-file-name round.c -pic-level 1 -mdisable-fp-elim -masm-verbose -target-cpu yonah -target-linker-version 97.14 -resource-dir /Volumes/MacPro/Projects/OpenSource/llvm/release/Release+Asserts/lib/clang/2.9 -ferror-limit 19 -fmessage-length 180 -stack-protector 1 -fblocks -fdiagnostics-show-option -fcolor-diagnostics -o round.o -x c round.c >> 1. <eof> parser at end of file >> 2. Code generation >> 3. Running pass 'Function Pass Manager' on module 'round.c'. >> 4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@test' >> clang: error: clang frontend command failed due to signal 4 (use -v to see invocation) >> >> -- Jean-Daniel >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100922/16c9a060/attachment.html>