[Bug 84232] PHINode containing itself causes segfault in LLVM when compiling Blender OpenCL kernel with R600 backend

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Oct 9 01:22:48 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=84232

--- Comment #6 from Vitaliy Filippov <vitalif at yourcmc.ru> ---
Hm, I've tried to reproduce your testcase and got another bug:

int main()
{
  int i;
  for (i = 0; i < 100; i++)
  {
    if (!(i%10))
    {
      i = i%50;
      if (i%2 == 0)
        break;
    }
  }
  return i;
}

clang-3.5 -S -emit-llvm test.c
llc-3.5 -march=r600 -mcpu=oland test.ll 

>>>>

Program received signal SIGSEGV, Segmentation fault.
llvm::BasicBlock::getTerminator (this=0x471f08) at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/IR/BasicBlock.cpp:126
126       return dyn_cast<TerminatorInst>(&InstList.back());
(gdb) bt
#0  llvm::BasicBlock::getTerminator (this=0x471f08) at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/IR/BasicBlock.cpp:126
#1  0x00007ffff7442c9a in (anonymous
namespace)::SIAnnotateControlFlow::handleLoopCondition
(this=this at entry=0x44c960, Cond=0x471eb0, Broken=Broken at entry=
    0x486a50) at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/Target/R600/SIAnnotateControlFlow.cpp:271
#2  0x00007ffff7443d6c in handleLoop (Term=0x486af8, this=0x44c960)
    at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/Target/R600/SIAnnotateControlFlow.cpp:288
#3  (anonymous namespace)::SIAnnotateControlFlow::runOnFunction (this=0x44c960,
F=...)
    at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/Target/R600/SIAnnotateControlFlow.cpp:325
#4  0x00007ffff662a3d7 in llvm::FPPassManager::runOnFunction (this=0x43e930,
F=...)
    at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/IR/LegacyPassManager.cpp:1545
#5  0x00007ffff662a45b in llvm::FPPassManager::runOnModule (this=0x43e930,
M=...)
    at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/IR/LegacyPassManager.cpp:1565
#6  0x00007ffff662ce19 in runOnModule (M=..., this=0x431140) at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/IR/LegacyPassManager.cpp:1623
#7  llvm::legacy::PassManagerImpl::run (this=0x430e50, M=...) at
/var/home/vitali/setup/llvm/llvm-toolchain-3.5-3.5/lib/IR/LegacyPassManager.cpp:1730
#8  0x0000000000411a11 in ?? ()
#9  0x000000000040cd98 in main ()

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141009/3adf3ebf/attachment.html>


More information about the dri-devel mailing list