Issue |
97949
|
Summary |
fatal error: error in backend: Cannot select: 0x7e333b0: v2f64 =...
|
Labels |
new issue
|
Assignees |
|
Reporter |
leonhostetler
|
This crash was produced on Frontier (HPE Cray EX supercomputer) with Clang 17.0.0 and ROCm 5.7.0. The crash occurs when compiling with -O3 -Ofast, but not with -O3 alone. I have also tested with Clang 15.0.0 and ROCm 5.3.0 where the issue does not occur. The reproducer scripts are attached. I'm sorry I was not able to get `creduce` to work on this system, so the reproducer has not been reduced.
[momentum_twist-8a33a0.zip](https://github.com/user-attachments/files/16119432/momentum_twist-8a33a0.zip)
```
hipcc -c -I/opt/cray/pe/perftools/22.12.0/include -DCRAYPAT -g -gpubnames -g -pg -ggdb -O3 -Ofast --offload-arch=gfx90a -fno-omit
-frame-pointer -mno-omit-leaf-frame-pointer -fno-optimize-sibling-calls -std=c99 -fopenmp -Wall -Wno-unused-variable -Wno-unused-bu
t-set-variable -Wno-unknown-pragmas -Wno-unused-function -DOMP -DGAUSS_SMEAR_KS_TWOLINK -DQMP -DNERSC_TIME -DCGTIME -DFFTIME -DFLTIM
E -DGFTIME -DREMAP -DPRTIME -DIOTIME -DGS_TIME -DCG_OK -DREMAP_STDIO_APPEND -DFIX_NODE_GEOM -DFIX_IONODE_GEOM -DFEWSUMS -DKS_M
ULTICG=HYBRID -DKS_MULTIFF=FNMAT -DCL_CG=BICG -DMILC_CODE_VERSION=\""cd0d-dirty"\" -DC_GLOBAL_INLINE -DMILC_PRECISION=2
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/lustre/orion/phy157/proj-shared/phy157_hisq/leonhost/omnitrace2/build/usqcd/i
nclude -I/lustre/orion/phy157/proj-shared/phy157_hisq/leonhost/omnitrace2/build/usqcd/include -I. -DHAVE_QMP -DQMP_MPI -DHAVE_QIO -
DHAVE_QUDA -DUSE_CG_GPU -DUSE_GF_GPU -DUSE_FL_GPU -DUSE_FF_GPU -DUSE_GSMEAR_QUDA -DUSE_GAUGEFIX_OVR_GPU -DSET_QUDA_SUMMARIZE -DHALF
_MIXED -DFN -DHAVE_KS -DHISQ_REUNIT_ALLOW_SVD -DHISQ_REUNIT_SVD_REL_ERROR=1e-8 -DHISQ_REUNIT_SVD_ABS_ERROR=1e-8 -DKalkreuter_Ritz
-I/lustre/orion/phy157/proj-shared/phy157_hisq/leonhost/omnitrace2/build/usqcd/include -I/lustre/orion/phy157/proj-shared/phy157_
hisq/leonhost/omnitrace2/build/usqcd/tests ../generic/momentum_twist.c
fatal error: error in backend: Cannot select: 0x7e333b0: v2f64 = or 0x7e31710, 0x7e32f50, ../generic/momentum_twist.c:43:8
0x7e31710: v2f64 = X86ISD::UNPCKL 0x7dca850, 0x7e317f0, ../generic/momentum_twist.c:43:8
0x7dca850: v2f64 = scalar_to_vector 0x7e31390, ../generic/momentum_twist.c:43:8
0x7e31390: f64 = freeze 0x7dcb260, ../generic/momentum_twist.c:43:8
0x7dcb260: f64,ch = load<(load (s64) from %ir.0, !tbaa !126)> 0x7dca770, 0x7dca380, undef:i64, ../generic/momentum_twist.c:4
3:8
0x7dca380: i64,ch = CopyFromReg 0x7d14ff0, Register:i64 %14
0x7dca310: i64 = Register %14
0x7dca8c0: i64 = undef
0x7e317f0: v2f64 = scalar_to_vector 0x7e31400, ../generic/momentum_twist.c:43:8
0x7e31400: f64 = freeze 0x7baab10, ../generic/momentum_twist.c:43:8
0x7baab10: f64,ch = load<(load (s64) from %ir.10, !tbaa !126)> 0x7baa330, 0x7dcaf50, undef:i64, ../generic/momentum_twist.c:
43:8
0x7dcaf50: i64 = add nuw 0x7dca380, Constant:i64<8>, ../generic/momentum_twist.c:43:8
0x7dca380: i64,ch = CopyFromReg 0x7d14ff0, Register:i64 %14
0x7dca310: i64 = Register %14
0x7dcaee0: i64 = Constant<8>
0x7dca8c0: i64 = undef
0x7e32f50: v2f64 = X86ISD::UNPCKL 0x7e33260, 0x7e31630, ../generic/momentum_twist.c:43:8
0x7e33260: v2f64 = scalar_to_vector 0x7e31470, ../generic/momentum_twist.c:43:8
0x7e31470: f64 = freeze 0x7e310f0, ../generic/momentum_twist.c:43:8
0x7e310f0: f64,ch = load<(load (s64) from %ir.12, !tbaa !126)> 0x7baa9c0, 0x7dcb0a0, undef:i64, ../generic/momentum_twist.c:
43:8
0x7dcb0a0: i64 = add nuw 0x7dca380, Constant:i64<16>, ../generic/momentum_twist.c:43:8
0x7dca380: i64,ch = CopyFromReg 0x7d14ff0, Register:i64 %14
0x7dca310: i64 = Register %14
0x7dcb030: i64 = Constant<16>
0x7dca8c0: i64 = undef
0x7e31630: v2f64 = scalar_to_vector 0x7e314e0, ../generic/momentum_twist.c:43:8
0x7e314e0: f64 = freeze 0x7e31780, ../generic/momentum_twist.c:43:8
0x7e31780: f64,ch = load<(load (s64) from %ir.14, !tbaa !126)> 0x7e30fa0, 0x7dcb1f0, undef:i64, ../generic/momentum_twist.c:
43:8
0x7dcb1f0: i64 = add nuw 0x7dca380, Constant:i64<24>, ../generic/momentum_twist.c:43:8
0x7dca380: i64,ch = CopyFromReg 0x7d14ff0, Register:i64 %14
0x7dca310: i64 = Register %14
0x7dcb180: i64 = Constant<24>
0x7dca8c0: i64 = undef
In function: momentum_twist_site
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and
associated run script.
Stack dump:
0. Program arguments: /opt/rocm-5.7.0/llvm/bin/clang++ -isystem /opt/rocm-5.7.0/include -c -I/opt/cray/pe/perftools/22.12.0/inc
lude -DCRAYPAT -g -gpubnames -g -pg -ggdb -O3 -Ofast -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-optimize-sibling-call
s -std=c99 -fopenmp -Wall -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unknown-pragmas -Wno-unused-function -DOMP -DGAUSS_
SMEAR_KS_TWOLINK -DQMP -DNERSC_TIME -DCGTIME -DFFTIME -DFLTIME -DGFTIME -DREMAP -DPRTIME -DIOTIME -DGS_TIME -DCG_OK -DREMAP_STDIO_AP
PEND -DFIX_NODE_GEOM -DFIX_IONODE_GEOM -DFEWSUMS -DKS_MULTICG=HYBRID -DKS_MULTIFF=FNMAT -DCL_CG=BICG -DMILC_CODE_VERSION=\"cd0d-dirt
y\" -DC_GLOBAL_INLINE -DMILC_PRECISION=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/lustre/orion/phy157/proj-shared/phy157_hisq
/leonhost/omnitrace2/build/usqcd/include -I/lustre/orion/phy157/proj-shared/phy157_hisq/leonhost/omnitrace2/build/usqcd/include -I.
-DHAVE_QMP -DQMP_MPI -DHAVE_QIO -DHAVE_QUDA -DUSE_CG_GPU -DUSE_GF_GPU -DUSE_FL_GPU -DUSE_FF_GPU -DUSE_GSMEAR_QUDA -DUSE_GAUGEFIX_OVR
_GPU -DSET_QUDA_SUMMARIZE -DHALF_MIXED -DFN -DHAVE_KS -DHISQ_REUNIT_ALLOW_SVD -DHISQ_REUNIT_SVD_REL_ERROR=1e-8 -DHISQ_REUNIT_SVD_ABS
_ERROR=1e-8 -DKalkreuter_Ritz -I/lustre/orion/phy157/proj-shared/phy157_hisq/leonhost/omnitrace2/build/usqcd/include -I/lustre/orion
/phy157/proj-shared/phy157_hisq/leonhost/omnitrace2/build/usqcd/tests -x c ../generic/momentum_twist.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '../generic/momentum_twist.c'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@momentum_twist_site'
#0 0x000000000218f267 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/rocm-5.7.0/llvm/bin/clang+++0x218f267)
#1 0x000000000218d0c4 llvm::sys::CleanupOnSignal(unsigned long) (/opt/rocm-5.7.0/llvm/bin/clang+++0x218d0c4)
#2 0x00000000020f0c43 llvm::CrashRecoveryContext::HandleExit(int) (/opt/rocm-5.7.0/llvm/bin/clang+++0x20f0c43)
#3 0x000000000218455e llvm::sys::Process::Exit(int, bool) (/opt/rocm-5.7.0/llvm/bin/clang+++0x218455e)
#4 0x0000000000b48d96 (/opt/rocm-5.7.0/llvm/bin/clang+++0xb48d96)
#5 0x00000000020f909c llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/rocm-5.7.0/llvm/bin/clang+++0x20f909c)
#6 0x0000000002ff3899 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/rocm-5.7.0/llvm/bin/clang+++0x2ff3899)
#7 0x0000000002ff73c1 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/opt/rocm-5.7.0/
llvm/bin/clang+++0x2ff73c1)
#8 0x000000000108409f (anonymous namespace)::X86DAGToDAGISel::Select(llvm::SDNode*) X86ISelDAGToDAG.cpp:0:0
#9 0x0000000002ff1fbc llvm::SelectionDAGISel::DoInstructionSelection() (/opt/rocm-5.7.0/llvm/bin/clang+++0x2ff1fbc)
#10 0x0000000002ffb9f6 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/rocm-5.7.0/llvm/bin/clang+++0x2ffb9f6)
#11 0x0000000002ffecbd llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/rocm-5.7.0/llvm/bin/clang+++0x2ffec
bd)
#12 0x0000000003000903 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.984) SelectionDAGISel.cpp:0:0
#13 0x000000000108bf40 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) X86ISelDAGToDAG.cpp:0:0
#14 0x00000000016d6612 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.72) MachineFunctionPass.cpp:0:0
#15 0x0000000001bcb1c9 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/rocm-5.7.0/llvm/bin/clang+++0x1bcb1c9)
#16 0x0000000001bcb461 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/rocm-5.7.0/llvm/bin/clang+++0x1bcb461)
#17 0x0000000001bcbe97 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/rocm-5.7.0/llvm/bin/clang+++0x1bcbe97)
#18 0x00000000023bcf82 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::Intrusiv
eRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/opt/roc
m-5.7.0/llvm/bin/clang+++0x23bcf82)
#19 0x0000000003127297 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/rocm-5.7.0/llvm/bin/clang+++0x3127297
)
#20 0x0000000003f43109 clang::ParseAST(clang::Sema&, bool, bool) (/opt/rocm-5.7.0/llvm/bin/clang+++0x3f43109)
#21 0x0000000003127d8d clang::CodeGenAction::ExecuteAction() (/opt/rocm-5.7.0/llvm/bin/clang+++0x3127d8d)
#22 0x0000000002ad3941 clang::FrontendAction::Execute() (/opt/rocm-5.7.0/llvm/bin/clang+++0x2ad3941)
#23 0x0000000002a681aa clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/rocm-5.7.0/llvm/bin/clang+++0x2a681aa)
#24 0x0000000002ba1fe3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/rocm-5.7.0/llvm/bin/clang+++0x2ba1fe3)
#25 0x0000000000b4a734 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/rocm-5.7.0/llvm/bin/clang+++0xb4a734)
#26 0x0000000000b456c6 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#27 0x00000000028d77c9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional
<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long)
Job.cpp:0:0
#28 0x00000000020f0b45 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/rocm-5.7.0/llvm/bin/clang+++0x20f0b4
5)
#29 0x00000000028da276 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string
<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/opt/rocm-5.7.0/llvm/bin/clang+++0x28da276)
#30 0x000000000289e233 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, boo
l) const (/opt/rocm-5.7.0/llvm/bin/clang+++0x289e233)
#31 0x000000000289eaf2 std::_Function_handler<void (), clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::
SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const::'lambda'()>::_M_invoke(std::_Any_data const&) Compilat
ion.cpp:0:0
#32 0x00000000028a4b14 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, c
lang::driver::Command const*>>&, bool) const (/opt/rocm-5.7.0/llvm/bin/clang+++0x28a4b14)
#33 0x00000000028ab12f clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, c
lang::driver::Command const*>>&) (/opt/rocm-5.7.0/llvm/bin/clang+++0x28ab12f)
#34 0x0000000000b485ac clang_main(int, char**, llvm::ToolContext const&) (/opt/rocm-5.7.0/llvm/bin/clang+++0xb485ac)
#35 0x0000000000aa6e71 main (/opt/rocm-5.7.0/llvm/bin/clang+++0xaa6e71)
#36 0x00007fe9aa63624d __libc_start_main (/lib64/libc.so.6+0x3524d)
#37 0x0000000000b406aa _start /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:122:0
clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
AMD clang version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.7.0 23352 d1e13c532a947d0cbfc94759c00dcf152294aa13
)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm-5.7.0/llvm/bin
clang++: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/momentum_twist-eb299f.c
clang++: note: diagnostic msg: /tmp/momentum_twist-eb299f.sh
clang++: note: diagnostic msg:
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs