[llvm-bugs] [Bug 42592] New: ICE: "Expected VPlan CFG to terminate with branch in NativePath" with -O3 -march=skx -mllvm -enable-vplan-native-path
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 11 12:55:53 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42592
Bug ID: 42592
Summary: ICE: "Expected VPlan CFG to terminate with branch in
NativePath" with -O3 -march=skx -mllvm
-enable-vplan-native-path
Product: new-bugs
Version: trunk
Hardware: PC
OS: Windows NT
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
Clang fails with ICE with -O3 -march=skx -mllvm -enable-vplan-native-path
options. This happens every time it tries to vectorize something, so it
prevents further testing.
Reproducer:
extern unsigned int a[100], b[100], c[100] [100];
void foo () {
for (int i = 0; i < 100; ++i)
for (int j = 0; j < 100; ++j)
a[i] += b[i] + c[i][j];
}
Error:
>$ clang -c -O3 -march=skx -mllvm -enable-vplan-native-path small.c
clang-8: /llvm/llvm-8.0/lib/Transforms/Vectorize/VPlan.cpp:426: void
llvm::VPlan::execute(llvm::VPTransformState*): Assertion
`(!EnableVPlanNativePath || isa<BranchInst>(LastBB->getTerminator())) &&
"Expected VPlan CFG to terminate with branch in NativePath"' failed.
Stack dump:
0. Program arguments: /llvm/bin-8.0/bin/clang-8 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name repr.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu skx
-dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer
-coverage-notes-file
/yarpgen/testing/result/clang/compfail/S_1031252889/repr.gcno -resource-dir
/llvm/bin-8.0/lib/clang/8.0.0 -internal-isystem /usr/local/include
-internal-isystem /llvm/bin-8.0/lib/clang/8.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-fdebug-compilation-dir /yarpgen/testing/result/clang/compfail/S_1031252889
-ferror-limit 19 -fmessage-length 190 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-mllvm -enable-vplan-native-path -o repr.o -x c repr.c -faddrsig
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'repr.c'.
4. Running pass 'Loop Vectorization' on function '@foo'
#0 0x0000000001c8dd1a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x1c8dd1a)
#1 0x0000000001c8bcd4 llvm::sys::RunSignalHandlers()
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x1c8bcd4)
#2 0x0000000001c8be02 SignalHandler(int)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x1c8be02)
#3 0x00007f0d42a975d0 __restore_rt (/lib64/libpthread.so.0+0xf5d0)
#4 0x00007f0d41686207 __GI_raise (/lib64/libc.so.6+0x36207)
#5 0x00007f0d416878f8 __GI_abort (/lib64/libc.so.6+0x378f8)
#6 0x00007f0d4167f026 __assert_fail_base (/lib64/libc.so.6+0x2f026)
#7 0x00007f0d4167f0d2 (/lib64/libc.so.6+0x2f0d2)
#8 0x0000000001e0869c llvm::VPlan::execute(llvm::VPTransformState*)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x1e0869c)
#9 0x0000000001dcab01
llvm::LoopVectorizationPlanner::executePlan(llvm::InnerLoopVectorizer&,
llvm::DominatorTree*) (/localdisk2/llvm/bin-8.0/bin/clang-8+0x1dcab01)
#10 0x0000000001dd294c llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x1dd294c)
#11 0x0000000001dd3a59 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/bin-8.0/bin/clang-8+0x1dd3a59)
#12 0x0000000001dd3c50 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x1dd3c50)
#13 0x00000000017444e8 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x17444e8)
#14 0x0000000001744599 llvm::FPPassManager::runOnModule(llvm::Module&)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x1744599)
#15 0x000000000174394f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x174394f)
#16 0x0000000001e6837f clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/llvm/bin-8.0/bin/clang-8+0x1e6837f)
#17 0x000000000275ae78
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x275ae78)
#18 0x0000000002f81649 clang::ParseAST(clang::Sema&, bool, bool)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x2f81649)
#19 0x0000000002759ef8 clang::CodeGenAction::ExecuteAction()
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x2759ef8)
#20 0x00000000022b89e6 clang::FrontendAction::Execute()
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x22b89e6)
#21 0x0000000002280466
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x2280466)
#22 0x0000000002352011
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/localdisk2/llvm/bin-8.0/bin/clang-8+0x2352011)
#23 0x0000000000aae828 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/localdisk2/llvm/bin-8.0/bin/clang-8+0xaae828)
#24 0x0000000000a34cf2 main (/localdisk2/llvm/bin-8.0/bin/clang-8+0xa34cf2)
#25 0x00007f0d416723d5 __libc_start_main (/lib64/libc.so.6+0x223d5)
#26 0x0000000000aaa6d5 _start (/localdisk2/llvm/bin-8.0/bin/clang-8+0xaaa6d5)
LLVM version:
clang version 9.0.0 (trunk 365807)
--
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/20190711/cc0c2fa1/attachment-0001.html>
More information about the llvm-bugs
mailing list