Open Quuxplusone opened 6 years ago
Attached fastscape_RB+PQ+GPU.cpp
(14687 bytes, text/x-c++src): Soure code that caused problem
(In reply to Richard from comment #0)
> But I get the following output, which requests that I report the issue here:
>
> [...]
>
> clang-3.8: error: unable to execute command: Aborted (core dumped)
> clang-3.8: error: clang frontend command failed due to signal (use -v to see
> invocation)
> clang version 3.8.0 (ibmgithub:/CORAL-LLVM-Compilers/clang.git
> fc73231cc1447f6163740eb12b6f3fd5c69c6a1a)
> (ibmgithub:/CORAL-LLVM-Compilers/llvm.git
> 47cc905855d51360bcc523d2d290395073d87560)
> Target: powerpc64le-unknown-linux-gnu
> Thread model: posix
> InstalledDir:
> /sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/
> clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin
> clang-3.8: 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.8: note: diagnostic msg: Error generating preprocessed source(s).
Yeah, and IBM really shouldn't be doing this: That's not upstream Clang :-(
With (upstream) trunk I get the following error which doesn't look good either,
but is completely different:
fatal error: error in backend: Cannot select: 0x61d3a38: f64 = fpow 0x61cc230,
ConstantFP:f64<8.000000e-01>
0x61cc230: f64,ch = load<LD8[%135]> 0x61ef118, 0x61d1500, undef:i64
0x61d1500: i64 = add 0x61ccb88, 0x61d3c40
0x61ccb88: i64,ch = load<LD8[%60]> 0x61ef118, 0x5f622b0, undef:i64
0x5f622b0: i64,ch = CopyFromReg 0x48693c8, Register:i64 %5
0x61d3898: i64 = Register %5
0x61d0f50: i64 = undef
0x61d3c40: i64 = shl 0x61cc848, Constant:i32<3>
0x61cc848: i64,ch = load<LD4[%43](dereferenceable), sext from i32> 0x61ef118, FrameIndex:i64<25>, undef:i64
0x5fb7838: i64 = FrameIndex<25>
0x61d0f50: i64 = undef
0x61ecb48: i32 = Constant<3>
0x61d0f50: i64 = undef
0x61ecef0: f64 = ConstantFP<8.000000e-01>
In function: __omp_outlined__12
Trying to debug with -v --save-temps:
error: Invalid cast (Producer: 'LLVM7.0.0svn' Reader: 'LLVM 7.0.0svn')
(In reply to Jonas Hahnfeld from comment #1)
> With (upstream) trunk I get the following error which doesn't look good
> either, but is completely different:
> [...]
Stack trace with debug build + assertions:
clang-7.0: <<<>>>/clang/src/trunk/lib/IR/Instructions.cpp:294: void
llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef<llvm::Value
*>, ArrayRef<llvm::OperandBundleDef>, const llvm::Twine &): Assertion
`(Args.size() == FTy->getNumParams() || (FTy->isVarArg() && Args.size() > FTy-
>getNumParams())) && "Calling a function with bad signature!"' failed.
#0 0x00002b148e2eef09 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
<<<>>>/clang/src/trunk/lib/Support/Unix/Signals.inc:398:11
#1 0x00002b148e2ef129 PrintStackTraceSignalHandler(void*)
<<<>>>/clang/src/trunk/lib/Support/Unix/Signals.inc:462:1
#2 0x00002b148e2ebef7 llvm::sys::RunSignalHandlers()
<<<>>>/clang/src/trunk/lib/Support/Signals.cpp:0:5
#3 0x00002b148e2ef4b0 SignalHandler(int)
<<<>>>/clang/src/trunk/lib/Support/Unix/Signals.inc:252:1
#4 0x00002b148e96d5e0 __restore_rt (/lib64/libpthread.so.0+0xf5e0)
#5 0x00002b14909f61f7 __GI_raise (/lib64/libc.so.6+0x351f7)
#6 0x00002b14909f78e8 __GI_abort (/lib64/libc.so.6+0x368e8)
#7 0x00002b14909ef266 __assert_fail_base (/lib64/libc.so.6+0x2e266)
#8 0x00002b14909ef312 (/lib64/libc.so.6+0x2e312)
#9 0x00002b148cca3f54 llvm::CallInst::init(llvm::FunctionType*, llvm::Value*,
llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&)
<<<>>>/clang/src/trunk/lib/IR/Instructions.cpp:296:17
#10 0x00002b148f48741d llvm::CallInst::CallInst(llvm::FunctionType*,
llvm::Value*, llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&,
llvm::Instruction*) <<<>>>/clang/src/trunk/include/llvm/IR/Instructions.h:1956:1
#11 0x00002b148f4870bc llvm::CallInst::Create(llvm::FunctionType*,
llvm::Value*, llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&,
llvm::Instruction*) <<<>>>/clang/src/trunk/include/llvm/IR/Instructions.h:1443:5
#12 0x00002b148f4ebafd llvm::CallInst::Create(llvm::Value*,
llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&,
llvm::Instruction*) <<<>>>/clang/src/trunk/include/llvm/IR/Instructions.h:1415:5
#13 0x00002b148f4c497d llvm::IRBuilder<llvm::ConstantFolder,
clang::CodeGen::CGBuilderInserter>::CreateCall(llvm::Value*,
llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&,
llvm::MDNode*) <<<>>>/clang/src/trunk/include/llvm/IR/IRBuilder.h:1682:20
#14 0x00002b148f4b4f4d
clang::CodeGen::CodeGenFunction::EmitRuntimeCall(llvm::Value*,
llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGCall.cpp:3636:19
#15 0x00002b148f4b4e25
clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(llvm::Value*,
llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGCall.cpp:3597:19
#16 0x00002b148f71be81
clang::CodeGen::CGOpenMPRuntime::emitCall(clang::CodeGen::CodeGenFunction&,
llvm::Value*, llvm::ArrayRef<llvm::Value*>, clang::SourceLocation) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:8067:11
#17 0x00002b148f71bfd7
clang::CodeGen::CGOpenMPRuntime::emitOutlinedFunctionCall(clang::CodeGen::CodeGenFunction&,
clang::SourceLocation, llvm::Value*, llvm::ArrayRef<llvm::Value*>) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:8079:1
#18 0x00002b148f76627e
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(clang::CodeGen::CodeGenFunction&,
clang::SourceLocation, llvm::Value*, llvm::ArrayRef<llvm::Value*>) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:2418:20
#19 0x00002b148f75f6c0
clang::CodeGen::CGOpenMPRuntimeNVPTX::createDataSharingWrapper(llvm::Function*,
clang::OMPExecutableDirective const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:2511:3
#20 0x00002b148f75ec49
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelOutlinedFunction(clang::OMPExecutableDirective
const&, clang::VarDecl const*, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:883:9
#21 0x00002b148f7a8274
emitCommonOMPParallelDirective(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&, llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&, clang::OMPExecutableDirective const&,
llvm::SmallVectorImpl<llvm::Value*>&)> const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:1224:8
#22 0x00002b148f7bbf24
emitInnerParallelForWhenCombined(clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:2126:1
#23 0x00002b148f7dd322 void llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&,
clang::CodeGen::CodeGenFunction::JumpDest)>::callback_fn<void
(clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&,
clang::CodeGen::CodeGenFunction::JumpDest)>(long,
clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&,
clang::CodeGen::CodeGenFunction::JumpDest)
<<<>>>/clang/src/trunk/include/llvm/ADT/STLExtras.h:98:5
#24 0x00002b148f7dd217 llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&,
clang::CodeGen::CodeGenFunction::JumpDest)>::operator()(clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)
const <<<>>>/clang/src/trunk/include/llvm/ADT/STLExtras.h:115:5
#25 0x00002b148f7c2a2c
clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)>
const&, clang::Expr*)::$_58::operator()(clang::CodeGen::CodeGenFunction&) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:3338:26
#26 0x00002b148f7c29c5 void llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&)>::callback_fn<clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)>
const&, clang::Expr*)::$_58>(long, clang::CodeGen::CodeGenFunction&)
<<<>>>/clang/src/trunk/include/llvm/ADT/STLExtras.h:98:5
#27 0x00002b148f7cbac7 llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&)>::operator()(clang::CodeGen::CodeGenFunction&)
const <<<>>>/clang/src/trunk/include/llvm/ADT/STLExtras.h:115:5
#28 0x00002b148f7a9184
clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(clang::Stmt const&, bool,
clang::Expr const*, clang::Expr const*, llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&)> const&, llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&)> const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:1352:3
#29 0x00002b148f7b36f0
clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)>
const&, clang::Expr*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:3335:9
#30 0x00002b148f7bbe7d
clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&)::$_28::operator()(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:2133:3
#31 0x00002b148f7bbe05 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&)::$_28>(long, clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.h:74:5
#32 0x00002b148f6ee7d9
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:741:5
#33 0x00002b148f71d2c8 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1167:3
#34 0x00002b148f71711d
clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&,
clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&, bool)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:5724:25
#35 0x00002b148f7ac847
clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&) <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:2135:26
#36 0x00002b148f77f76d clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:297:5
#37 0x00002b148f78c61c
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:389:42
#38 0x00002b148f78ba1e
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:380:10
#39 0x00002b148f77fa4c
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:353:33
#40 0x00002b148f77ee4e clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:53:7
#41 0x00002b148f7c5696 emitTargetTeamsRegion(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&, clang::OMPTargetTeamsDirective
const&)::$_108::operator()(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:4046:9
#42 0x00002b148f7c5595 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<emitTargetTeamsRegion(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&, clang::OMPTargetTeamsDirective
const&)::$_108>(long, clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.h:74:5
#43 0x00002b148f6ee7d9
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:741:5
#44 0x00002b148f71d2c8 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1167:3
#45 0x00002b148f7a0ad5
clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt
const&) <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:581:18
#46 0x00002b148f6f4b21
emitParallelOrTeamsOutlinedFunction(clang::CodeGen::CodeGenModule&,
clang::OMPExecutableDirective const&, clang::CapturedStmt const*,
clang::VarDecl const*, clang::OpenMPDirectiveKind, llvm::StringRef,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1334:14
#47 0x00002b148f6f4c14
clang::CodeGen::CGOpenMPRuntime::emitTeamsOutlinedFunction(clang::OMPExecutableDirective
const&, clang::VarDecl const*, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1349:3
#48 0x00002b148f75f7ae
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(clang::OMPExecutableDirective
const&, clang::VarDecl const*, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:894:16
#49 0x00002b148f7b5ac0
emitCommonOMPTeamsDirective(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:3998:8
#50 0x00002b148f7c54c3 emitTargetTeamsRegion(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&, clang::OMPTargetTeamsDirective const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:4049:3
#51 0x00002b148f7c5428
clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective
const&)::$_69::operator()(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:4059:3
#52 0x00002b148f7c53f5 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective const&)::$_69>(long,
clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.h:74:5
#53 0x00002b148f6ee7b6
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:739:3
#54 0x00002b148f71d2c8 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1167:3
#55 0x00002b148f7a0ad5
clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt
const&) <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:581:18
#56 0x00002b148f717c21
clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:5897:3
#57 0x00002b148f75b00a
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitGenericKernel(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:328:7
#58 0x00002b148f75e7aa
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTargetOutlinedFunction(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:828:5
#59 0x00002b148f7b5e0f
clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:4065:3
#60 0x00002b148f71878d
clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions(clang::Stmt
const*, llvm::StringRef)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:7329:7
#61 0x00002b148f718b89
clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions(clang::Stmt
const*, llvm::StringRef)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:0:5
#62 0x00002b148f718c54
clang::CodeGen::CGOpenMPRuntime::emitTargetFunctions(clang::GlobalDecl)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:7399:3
#63 0x00002b148f718f0d
clang::CodeGen::CGOpenMPRuntime::emitTargetGlobal(clang::GlobalDecl)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:7432:5
#64 0x00002b148f84bbbb
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CodeGenModule.cpp:1884:9
#65 0x00002b148f8517e2
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CodeGenModule.cpp:4208:38
#66 0x00002b148fa6bc02 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/ModuleBuilder.cpp:159:73
#67 0x00002b148f80c649
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CodeGenAction.cpp:168:12
#68 0x00002b149384161e clang::ParseAST(clang::Sema&, bool, bool)
<<<>>>/clang/src/trunk/tools/clang/lib/Parse/ParseAST.cpp:151:18
#69 0x00002b14901f53e1 clang::ASTFrontendAction::ExecuteAction()
<<<>>>/clang/src/trunk/tools/clang/lib/Frontend/FrontendAction.cpp:1007:1
#70 0x00002b148f806909 clang::CodeGenAction::ExecuteAction()
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:1
#71 0x00002b14901f4970 clang::FrontendAction::Execute()
<<<>>>/clang/src/trunk/tools/clang/lib/Frontend/FrontendAction.cpp:908:7
#72 0x00002b149011437f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
<<<>>>/clang/src/trunk/tools/clang/lib/Frontend/CompilerInstance.cpp:992:7
#73 0x00002b14902c4712
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
<<<>>>/clang/src/trunk/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:8
#74 0x000000000022c6c7 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) <<<>>>/clang/src/trunk/tools/clang/tools/driver/cc1_main.cpp:221:11
#75 0x000000000021b3d9 ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef)
<<<>>>/clang/src/trunk/tools/clang/tools/driver/driver.cpp:309:5
#76 0x000000000021947f main
<<<>>>/clang/src/trunk/tools/clang/tools/driver/driver.cpp:389:5
#77 0x00002b14909e2c05 __libc_start_main (/lib64/libc.so.6+0x21c05)
#78 0x0000000000218029 _start (<<<>>>/clang/install/debug/bin/clang-
7.0+0x218029)
The code still does not compile because we missing full support for some math
functions:
fatal error: error in backend: Cannot select: t48: f64 = fpow t46,
ConstantFP:f64<8.000000e-01>
t46: f64,ch = load<(load 8 from %ir.arrayidx23)> t38, t45, undef:i64
t45: i64 = add t41, t44
t41: i64,ch = load<(load 8 from %ir.8)> t38, t40, undef:i64
t40: i64,ch = CopyFromReg t0, Register:i64 %4
t39: i64 = Register %4
t3: i64 = undef
t44: i64 = shl t92, Constant:i32<3>
t92: i64,ch = load<(dereferenceable load 4 from %ir.c), sext from i32> t38, FrameIndex:i64<26>, undef:i64
t1: i64 = FrameIndex<26>
t3: i64 = undef
t96: i32 = Constant<3>
t3: i64 = undef
t47: f64 = ConstantFP<8.000000e-01>
In function: __omp_outlined__12
The patch that resolves this is here:
https://reviews.llvm.org/D47849
but it is not approved yet.
If you would like version of Clang which has the patch applied please go to:
Clone the Clang, LLVM and OpenMP repos AND checkout the patched-upstream branches on all the three. Build like you normally would.
Thanks,
--Doru
fastscape_RB+PQ+GPU.cpp
(14687 bytes, text/x-c++src)