[llvm-bugs] [Bug 42706] New: Assertion `HeaderDefBlock && "no definition in header of carrying loop"' failed in SyncDependenceAnalysis

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 22 01:47:24 PDT 2019


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

            Bug ID: 42706
           Summary: Assertion `HeaderDefBlock && "no definition in header
                    of carrying loop"' failed in SyncDependenceAnalysis
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: jay.foad at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22266
  --> https://bugs.llvm.org/attachment.cgi?id=22266&action=edit
test case

With the attached test case I get:

$ ~/llvm-debug/bin/opt -S -use-gpu-divergence-analysis -divergence stripped.ll
opt:
/home/jayfoad2/git/llvm-project/llvm/lib/Analysis/SyncDependenceAnalysis.cpp:312:
std::unique_ptr<ConstBlockSet>
llvm::DivergencePropagator::computeJoinPoints(const llvm::BasicBlock &,
SuccessorIterable, const llvm::Loop *, const llvm::BasicBlock *)
[SuccessorIterable = llvm::iterator_range<llvm::SuccIterator<const
llvm::Instruction, const llvm::BasicBlock> >]: Assertion `HeaderDefBlock && "no
definition in header of carrying loop"' failed.
Stack dump:
0.      Program arguments: /home/jayfoad2/llvm-debug/bin/opt -S
-use-gpu-divergence-analysis -divergence stripped.ll 
1.      Running pass 'Function Pass Manager' on module 'stripped.ll'.
2.      Running pass 'Legacy Divergence Analysis' on function
'@llpc.shader.CS.main'
 #0 0x0000000005fa0889 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jayfoad2/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:533:11
 #1 0x0000000005fa0a39 PrintStackTraceSignalHandler(void*)
/home/jayfoad2/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:594:1
 #2 0x0000000005f9f276 llvm::sys::RunSignalHandlers()
/home/jayfoad2/git/llvm-project/llvm/lib/Support/Signals.cpp:67:5
 #3 0x0000000005fa112b SignalHandler(int)
/home/jayfoad2/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:385:1
 #4 0x00007fca691cc890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x00007fca67e92e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #6 0x00007fca67e94801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #7 0x00007fca67e8439a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #8 0x00007fca67e84412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #9 0x0000000004e3db75 std::unique_ptr<llvm::SmallPtrSet<llvm::BasicBlock
const*, 4u>, std::default_delete<llvm::SmallPtrSet<llvm::BasicBlock const*, 4u>
> >
llvm::DivergencePropagator::computeJoinPoints<llvm::iterator_range<llvm::SuccIterator<llvm::Instruction
const, llvm::BasicBlock const> > >(llvm::BasicBlock const&,
llvm::iterator_range<llvm::SuccIterator<llvm::Instruction const,
llvm::BasicBlock const> >, llvm::Loop const*, llvm::BasicBlock const*)
/home/jayfoad2/git/llvm-project/llvm/lib/Analysis/SyncDependenceAnalysis.cpp:0:7
#10 0x0000000004e3c5e4
llvm::SyncDependenceAnalysis::join_blocks(llvm::Instruction const&)
/home/jayfoad2/git/llvm-project/llvm/lib/Analysis/SyncDependenceAnalysis.cpp:381:32
#11 0x0000000004c1abf3
llvm::DivergenceAnalysis::propagateBranchDivergence(llvm::Instruction const&)
/home/jayfoad2/git/llvm-project/llvm/lib/Analysis/DivergenceAnalysis.cpp:311:36
#12 0x0000000004c1b106 llvm::DivergenceAnalysis::compute()
/home/jayfoad2/git/llvm-project/llvm/lib/Analysis/DivergenceAnalysis.cpp:386:9
#13 0x0000000004c1b54b
llvm::GPUDivergenceAnalysis::GPUDivergenceAnalysis(llvm::Function&,
llvm::DominatorTree const&, llvm::PostDominatorTree const&, llvm::LoopInfo
const&, llvm::TargetTransformInfo const&)
/home/jayfoad2/git/llvm-project/llvm/lib/Analysis/DivergenceAnalysis.cpp:446:1
#14 0x0000000004c162c5
std::enable_if<!(std::is_array<llvm::GPUDivergenceAnalysis>::value),
std::unique_ptr<llvm::GPUDivergenceAnalysis,
std::default_delete<llvm::GPUDivergenceAnalysis> > >::type
llvm::make_unique<llvm::GPUDivergenceAnalysis, llvm::Function&,
llvm::DominatorTree&, llvm::PostDominatorTree&, llvm::LoopInfo&,
llvm::TargetTransformInfo&>(llvm::Function&, llvm::DominatorTree&,
llvm::PostDominatorTree&, llvm::LoopInfo&, llvm::TargetTransformInfo&)
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1406:10
#15 0x0000000004c14b15
llvm::LegacyDivergenceAnalysis::runOnFunction(llvm::Function&)
/home/jayfoad2/git/llvm-project/llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp:331:13
#16 0x00000000055c114c llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/jayfoad2/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:23
#17 0x00000000055c15a2 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/jayfoad2/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
#18 0x00000000055c1d34 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/jayfoad2/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:23
#19 0x00000000055c1848 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/jayfoad2/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863:16
#20 0x00000000055c22c1 llvm::legacy::PassManager::run(llvm::Module&)
/home/jayfoad2/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1894:3
#21 0x0000000003209671 main
/home/jayfoad2/git/llvm-project/llvm/tools/opt/opt.cpp:893:3
#22 0x00007fca67e75b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#23 0x00000000031c502a _start (/home/jayfoad2/llvm-debug/bin/opt+0x31c502a)
Aborted (core dumped)

-- 
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/20190722/cbee13b7/attachment-0001.html>


More information about the llvm-bugs mailing list