[llvm-bugs] [Bug 51798] New: ICE for SKX: assertion `hasVectorValue(Def, Instance.Part)' failed at llvm/lib/Transforms/Vectorize/VPlan.cpp:236

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 8 12:00:39 PDT 2021


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

            Bug ID: 51798
           Summary: ICE for SKX: assertion `hasVectorValue(Def,
                    Instance.Part)' failed at
                    llvm/lib/Transforms/Vectorize/VPlan.cpp:236
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: Vsevolod.Livinskij at frtk.ru
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Reproducer:
int b, e;
extern char c;
short *h;
void i(bool j, short k[][2]) {
  int l;
  for (int d = 0; d < 3; d++)
    if (j)
#pragma clang loop interleave(enable)
      for (int f = e; f; f += 3)
        for (bool g = h[f]; g < 1; g = 1) {
          b = 5 ? k[f][g] : 0;
          int a = k[f][0];
          l = a ? a : 5;
          c = l;
        }
}

Error:
>$ clang++ -O3 -march=skx -c func.cpp
clang++: /testing/llvm/llvm_src/llvm/lib/Transforms/Vectorize/VPlan.cpp:236:
llvm::Value* llvm::VPTransformState::get(llvm::VPValue*, const
llvm::VPIteration&): Assertion `hasVectorValue(Def, Instance.Part)' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments: clang++ -O3 -march=skx -c func.cpp
1.  <eof> parser at end of file
2.  Optimizer
 #0 0x000055b7be248bf4 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x000055b7be2469f4 llvm::sys::CleanupOnSignal(unsigned long)
(/testing/llvm/bin/bin/clang-14+0x243d9f4)
 #2 0x000055b7be18e1a8 CrashRecoverySignalHandler(int)
CrashRecoveryContext.cpp:0:0
 #3 0x00007fdd7bc063c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #4 0x00007fdd7b6b918b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4618b)
 #5 0x00007fdd7b698859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x25859)
 #6 0x00007fdd7b698729 (/lib/x86_64-linux-gnu/libc.so.6+0x25729)
 #7 0x00007fdd7b6a9f36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
 #8 0x000055b7be4de557 llvm::VPTransformState::get(llvm::VPValue*,
llvm::VPIteration const&) (/testing/llvm/bin/bin/clang-14+0x26d5557)
 #9 0x000055b7be44779e
llvm::InnerLoopVectorizer::scalarizeInstruction(llvm::Instruction*,
llvm::VPValue*, llvm::VPUser&, llvm::VPIteration const&, bool,
llvm::VPTransformState&) (.part.0) LoopVectorize.cpp:0:0
#10 0x000055b7be447e0a
llvm::VPReplicateRecipe::execute(llvm::VPTransformState&)
(/testing/llvm/bin/bin/clang-14+0x263ee0a)
#11 0x000055b7be4de947 llvm::VPBasicBlock::execute(llvm::VPTransformState*)
(/testing/llvm/bin/bin/clang-14+0x26d5947)
#12 0x000055b7be4d4a81 llvm::VPRegionBlock::execute(llvm::VPTransformState*)
(/testing/llvm/bin/bin/clang-14+0x26cba81)
#13 0x000055b7be4dcd9d llvm::VPlan::execute(llvm::VPTransformState*)
(/testing/llvm/bin/bin/clang-14+0x26d3d9d)
#14 0x000055b7be45b155
llvm::LoopVectorizationPlanner::executePlan(llvm::InnerLoopVectorizer&,
llvm::DominatorTree*) (/testing/llvm/bin/bin/clang-14+0x2652155)
#15 0x000055b7be479341 llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(/testing/llvm/bin/bin/clang-14+0x2670341)
#16 0x000055b7be479c40 llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&, llvm::ProfileSummaryInfo*)
(/testing/llvm/bin/bin/clang-14+0x2670c40)
#17 0x000055b7be47a419 llvm::LoopVectorizePass::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/testing/llvm/bin/bin/clang-14+0x2671419)
#18 0x000055b7bf7a9b36 llvm::detail::PassModel<llvm::Function,
llvm::LoopVectorizePass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/testing/llvm/bin/bin/clang-14+0x39a0b36)
#19 0x000055b7bda517e6 llvm::PassManager<llvm::Function,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/testing/llvm/bin/bin/clang-14+0x1c487e6)
#20 0x000055b7be56bb56 llvm::detail::PassModel<llvm::Function,
llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >,
llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>
>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&)
(/testing/llvm/bin/bin/clang-14+0x2762b56)
#21 0x000055b7bda50309 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/testing/llvm/bin/bin/clang-14+0x1c47309)
#22 0x000055b7be56c776 llvm::detail::PassModel<llvm::Module,
llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/testing/llvm/bin/bin/clang-14+0x2763776)
#23 0x000055b7bda4dd1f llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(/testing/llvm/bin/bin/clang-14+0x1c44d1f)
#24 0x000055b7be57ce76 (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >) BackendUtil.cpp:0:0
#25 0x000055b7be582135 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> >)
(/testing/llvm/bin/bin/clang-14+0x2779135)
#26 0x000055b7bf3c0c6f
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/testing/llvm/bin/bin/clang-14+0x35b7c6f)
#27 0x000055b7c0518a79 clang::ParseAST(clang::Sema&, bool, bool)
(/testing/llvm/bin/bin/clang-14+0x470fa79)
#28 0x000055b7bf3bf7a8 clang::CodeGenAction::ExecuteAction()
(/testing/llvm/bin/bin/clang-14+0x35b67a8)
#29 0x000055b7bec7e659 clang::FrontendAction::Execute()
(/testing/llvm/bin/bin/clang-14+0x2e75659)
#30 0x000055b7bec0fade
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/testing/llvm/bin/bin/clang-14+0x2e06ade)
#31 0x000055b7bed5e620
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/testing/llvm/bin/bin/clang-14+0x2f55620)
#32 0x000055b7bcd361b7 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/testing/llvm/bin/bin/clang-14+0xf2d1b7)
#33 0x000055b7bcd32658 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
driver.cpp:0:0
#34 0x000055b7bea99329 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#35 0x000055b7be18e32c
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/testing/llvm/bin/bin/clang-14+0x238532c)
#36 0x000055b7bea99a3d
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.0) Job.cpp:0:0
#37 0x000055b7bea6bc8b
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/testing/llvm/bin/bin/clang-14+0x2c62c8b)
#38 0x000055b7bea6c799
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/testing/llvm/bin/bin/clang-14+0x2c63799)
#39 0x000055b7bea77899
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/testing/llvm/bin/bin/clang-14+0x2c6e899)
#40 0x000055b7bccaca86 main (/testing/llvm/bin/bin/clang-14+0xea3a86)
#41 0x00007fdd7b69a0b3 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#42 0x000055b7bcd321ce _start (/testing/llvm/bin/bin/clang-14+0xf291ce)
clang-14: error: clang frontend command failed with exit code 134 (use -v to
see invocation)
clang version 14.0.0 (https://github.com/llvm/llvm-project.git
dfc46f02681447370a1ccbe340034e970bc7e572)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /testing/llvm/bin/bin

LLVM version:
clang version 14.0.0 (https://github.com/llvm/llvm-project.git
dfc46f02681447370a1ccbe340034e970bc7e572)

-- 
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/20210908/b278487a/attachment.html>


More information about the llvm-bugs mailing list