[llvm-bugs] [Bug 48139] New: [VPlan] Unreachable instruction executed during VPlan execution

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 10 09:22:46 PST 2020


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

            Bug ID: 48139
           Summary: [VPlan] Unreachable instruction executed during VPlan
                    execution
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: mauri_mustonen at hotmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 24144
  --> https://bugs.llvm.org/attachment.cgi?id=24144&action=edit
Test IR

Execute following command on the attached IR:
opt test.ll --debug --loop-vectorize --enable-vplan-native-path

During the execution of the vectorization plan unreachable statement is
executed and following stack trace is given:

This instruction is handled by a different recipe.
UNREACHABLE executed at
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4519!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: /home/kazooie/local/llvm/master/bin/opt test.ll
--debug --loop-vectorize --enable-vplan-native-path 
1.      Running pass 'Function Pass Manager' on module 'test.ll'.
2.      Running pass 'Loop Vectorization' on function
'@_pocl_kernel_mm2_kernel1'
 #0 0x00007f69d94c31d4 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Support/Unix/Signals.inc:563:22
 #1 0x00007f69d94c328b PrintStackTraceSignalHandler(void*)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Support/Unix/Signals.inc:630:1
 #2 0x00007f69d94c0f9b llvm::sys::RunSignalHandlers()
/home/kazooie/extra/programming/llvm-project/llvm/lib/Support/Signals.cpp:71:20
 #3 0x00007f69d94c2b64 SignalHandler(int)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Support/Unix/Signals.inc:405:1
 #4 0x00007f69de0d60f0 __restore_rt (/usr/lib/libpthread.so.0+0x140f0)
 #5 0x00007f69d8d6b615 raise (/usr/lib/libc.so.6+0x3d615)
 #6 0x00007f69d8d54862 abort (/usr/lib/libc.so.6+0x26862)
 #7 0x00007f69d9371be1 bindingsErrorHandler(void*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, bool)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Support/ErrorHandling.cpp:222:55
 #8 0x00007f69db4332f9
llvm::InnerLoopVectorizer::widenInstruction(llvm::Instruction&, llvm::VPUser&,
llvm::VPTransformState&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4540:24
 #9 0x00007f69db4454cd llvm::VPWidenRecipe::execute(llvm::VPTransformState&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7999:1
#10 0x00007f69db52cd55 llvm::VPBasicBlock::execute(llvm::VPTransformState*)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.cpp:310:31
#11 0x00007f69db52d219 llvm::VPRegionBlock::execute(llvm::VPTransformState*)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.cpp:373:21
#12 0x00007f69db52e5a5 llvm::VPlan::execute(llvm::VPTransformState*)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.cpp:580:46
#13 0x00007f69db440533
llvm::LoopVectorizationPlanner::executePlan(llvm::InnerLoopVectorizer&,
llvm::DominatorTree*)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7083:24
#14 0x00007f69db446b37 processLoopInVPlanNativePath(llvm::Loop*,
llvm::PredicatedScalarEvolution&, llvm::LoopInfo*, llvm::DominatorTree*,
llvm::LoopVectorizationLegality*, llvm::TargetTransformInfo*,
llvm::TargetLibraryInfo*, llvm::DemandedBits*, llvm::AssumptionCache*,
llvm::OptimizationRemarkEmitter*, llvm::BlockFrequencyInfo*,
llvm::ProfileSummaryInfo*, llvm::LoopVectorizeHints&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8285:29
#15 0x00007f69db447c43 llvm::LoopVectorizePass::processLoop(llvm::Loop*)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8361:40
#16 0x00007f69db44933b 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*)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8653:27
#17 0x00007f69db4254ba (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1762:42
#18 0x00007f69d99f85e2 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1519:20
#19 0x00007f69d99f88a5 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1565:13
#20 0x00007f69d99f8d0b (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1634:20
#21 0x00007f69d99f3d1a llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:615:13
#22 0x00007f69d99f95b9 llvm::legacy::PassManager::run(llvm::Module&)
/home/kazooie/extra/programming/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1762:1
#23 0x000055a196547476 main
/home/kazooie/extra/programming/llvm-project/llvm/tools/opt/opt.cpp:973:15
#24 0x00007f69d8d56152 __libc_start_main (/usr/lib/libc.so.6+0x28152)
#25 0x000055a19650b7ae _start (/home/kazooie/local/llvm/master/bin/opt+0x227ae)
[1]    278416 abort (core dumped)  ~/local/llvm/master/bin/opt test.ll --debug
--loop-vectorize 

I confirmed that this code is vectorized without any problems on LLVM 10 and
this bug exist with LLVM 11 release and latest trunk build.

-- 
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/20201110/38991371/attachment.html>


More information about the llvm-bugs mailing list