Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[polly] Assertion `C1->getType() == C2->getType() && "Operand types in binary constant expression should match #59288

Open
tpgxyz opened this issue Dec 1, 2022 · 2 comments
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] polly

Comments

@tpgxyz
Copy link

tpgxyz commented Dec 1, 2022

Hi,

i'm trying to compile kernel-6.0.10 with LLVM toolchain 15.0.6 with polly enabled on AArch64:

clang: /builddir/build/BUILD/llvm-project-15.0.6.src/llvm/lib/IR/Constants.cpp:2272: 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.
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: clang -Wp,-MMD,fs/afs/.vlclient.o.d -nostdinc -I./arch/arm64/include -I./arch/arm64/include/generated -I./include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -DKASAN_SHADOW_SCALE_SHIFT= -Qunused-arguments -fmacro-prefix-map=./= -O3 -mllvm -polly -mllvm -polly-ast-use-context -mllvm -polly-invariant-load-hoisting -mllvm -polly-run-inliner -mllvm -polly-vectorizer=stripmine -mllvm -polly-run-dce -DMODULE -DKBUILD_BASENAME=\"vlclient\" -DKBUILD_MODNAME=\"kafs\" -D__KBUILD_MODNAME=kmod_kafs -c -o fs/afs/vlclient.o fs/afs/vlclient.c
1.	<eof> parser at end of file
2.	Optimizer
 #0 0x0000ffff950a8d7c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib64/libLLVM-15.so+0x3e78d7c)
 #1 0x0000ffff950a787c llvm::sys::RunSignalHandlers() (/lib64/libLLVM-15.so+0x3e7787c)
 #2 0x0000ffff94f91b1c (/lib64/libLLVM-15.so+0x3d61b1c)
 #3 0x0000ffff94f917a0 (/lib64/libLLVM-15.so+0x3d617a0)
 #4 0x0000ffff9d99d7bc (linux-vdso.so.1+0x7bc)
 #5 0x0000ffff90ea07c0 (/lib64/libc.so.6+0x807c0)
 #6 0x0000ffff90e5a76c raise (/lib64/libc.so.6+0x3a76c)
 #7 0x0000ffff90e474bc abort (/lib64/libc.so.6+0x274bc)
 #8 0x0000ffff90e541e4 (/lib64/libc.so.6+0x341e4)
 #9 0x0000ffff90e5424c (/lib64/libc.so.6+0x3424c)
#10 0x0000ffff951d9574 llvm::ConstantExpr::get(unsigned int, llvm::Constant*, llvm::Constant*, unsigned int, llvm::Type*) (/lib64/libLLVM-15.so+0x3fa9574)
#11 0x0000ffff98d1a3d8 polly::IslNodeBuilder::preloadInvariantLoad(polly::MemoryAccess const&, isl_set*) (/lib64/libLLVM-15.so+0x7aea3d8)
#12 0x0000ffff98d1978c polly::IslNodeBuilder::preloadInvariantEquivClass(polly::InvariantEquivClassTy&) (/lib64/libLLVM-15.so+0x7ae978c)
#13 0x0000ffff98d1bc34 polly::IslNodeBuilder::preloadInvariantLoads() (/lib64/libLLVM-15.so+0x7aebc34)
#14 0x0000ffff98c5bb8c (/lib64/libLLVM-15.so+0x7a2bb8c)
#15 0x0000ffff98c5ab80 polly::CodeGenerationPass::run(polly::Scop&, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>&, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&) (/lib64/libLLVM-15.so+0x7a2ab80)
#16 0x0000ffff98cd1c68 llvm::PassManager<polly::Scop, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&>::run(polly::Scop&, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>&, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&) (/lib64/libLLVM-15.so+0x7aa1c68)
#17 0x0000ffff98c4feec (/lib64/libLLVM-15.so+0x7a1feec)
#18 0x0000ffff953421c8 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/lib64/libLLVM-15.so+0x41121c8)
#19 0x0000ffff953484e8 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/lib64/libLLVM-15.so+0x41184e8)
#20 0x0000ffff9533ea84 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/lib64/libLLVM-15.so+0x410ea84)
#21 0x0000ffff9c18fe0c (/lib64/libclang-cpp.so.15+0x27cfe0c)
#22 0x0000ffff9c189d70 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/lib64/libclang-cpp.so.15+0x27c9d70)
#23 0x0000ffff9c527de4 (/lib64/libclang-cpp.so.15+0x2b67de4)
#24 0x0000ffff9af0b594 clang::ParseAST(clang::Sema&, bool, bool) (/lib64/libclang-cpp.so.15+0x154b594)
#25 0x0000ffff9ced8728 clang::FrontendAction::Execute() (/lib64/libclang-cpp.so.15+0x3518728)
#26 0x0000ffff9ce59e1c clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-cpp.so.15+0x3499e1c)
#27 0x0000ffff9cf4cae4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib64/libclang-cpp.so.15+0x358cae4)
#28 0x0000aaaaabd2652c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-15+0x2652c)
#29 0x0000aaaaabd233b0 (/usr/bin/clang-15+0x233b0)
#30 0x0000ffff9cac7b44 (/lib64/libclang-cpp.so.15+0x3107b44)
#31 0x0000ffff94f91ec4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/lib64/libLLVM-15.so+0x3d61ec4)
#32 0x0000ffff9cac79d0 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/lib64/libclang-cpp.so.15+0x31079d0)
#33 0x0000ffff9ca821e4 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/lib64/libclang-cpp.so.15+0x30c21e4)
#34 0x0000ffff9ca8266c clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/lib64/libclang-cpp.so.15+0x30c266c)
#35 0x0000ffff9cac39f8 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/lib64/libclang-cpp.so.15+0x31039f8)
#36 0x0000aaaaabd2248c clang_main(int, char**) (/usr/bin/clang-15+0x2248c)
#37 0x0000ffff90e47780 (/lib64/libc.so.6+0x27780)
#38 0x0000ffff90e47858 __libc_start_main (/lib64/libc.so.6+0x27858)
#39 0x0000aaaaabd1fbb0 _start (/usr/bin/clang-15+0x1fbb0)
clang-15: error: clang frontend command failed with exit code 134 (use -v to see invocation)
OpenMandriva 15.0.6-1 clang version 15.0.6 (/builddir/build/BUILD/llvm-project-15.0.6.src/clang 5c0c868bedd3d7dcd2980bcb0315419f284dcf4b)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-15: note: diagnostic msg: 
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-15: note: diagnostic msg: /tmp/vlclient-e5b093.c
clang-15: note: diagnostic msg: /tmp/vlclient-e5b093.sh
clang-15: note: diagnostic msg: 
********************
make[2]: *** [scripts/Makefile.build:249: fs/afs/vlclient.o] Error 1

More build logs can be found here https://abf.openmandriva.org/build_lists/267618

@EugeneZelenko EugeneZelenko added polly crash Prefer [crash-on-valid] or [crash-on-invalid] and removed new issue labels Dec 1, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Dec 1, 2022

@llvm/issue-subscribers-polly

@Meinersbur
Copy link
Member

@tpgxyz Could you upload the reproducer (/tmp/vlclient-e5b093.c and /tmp/vlclient-e5b093.sh)?

@nikic nikic changed the title Assertion `C1->getType() == C2->getType() && "Operand types in binary constant expression should match [polly] Assertion `C1->getType() == C2->getType() && "Operand types in binary constant expression should match Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] polly
Projects
None yet
Development

No branches or pull requests

4 participants