<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [Polly] The generation of the code for index expressions of copy statements in case of the base pointer computed within the SCoP"
   href="https://llvm.org/bugs/show_bug.cgi?id=31494">31494</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Polly] The generation of the code for index expressions of copy statements in case of the base pointer computed within the SCoP
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Polly
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Optimizer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>polly-dev@googlegroups.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gareevroman@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17791" name="attach_17791" title="A test case.">attachment 17791</a> <a href="attachment.cgi?id=17791&action=edit" title="A test case.">[details]</a></span>
A test case.

The attached test case causes an assertion failure due to the generation of the
code for index expressions of copy statements in case of the base pointer
computed within the SCoP.

opt -polly-invariant-load-hoisting -polly-process-unprofitable  -polly-opt-isl
-polly-pattern-matching-based-opts=true -polly-codegen < test.ll

WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

opt:
/home/roman/Documents/polly/llvm/tools/polly/lib/CodeGen/IslNodeBuilder.cpp:762:
isl_id_to_ast_expr* IslNodeBuilder::createNewAccesses(polly::ScopStmt*,
isl_ast_node*): Assertion `!MA->getLatestScopArrayInfo()->getBasePtrOriginSAI()
&& "Generating new index expressions to indirect arrays not working"' failed.
#0 0x00007fcd48d169b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libLLVMSupport.so.40+0xef9b8)
#1 0x00007fcd48d14a1e llvm::sys::RunSignalHandlers()
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libLLVMSupport.so.40+0xeda1e)
#2 0x00007fcd48d14b94 SignalHandler(int)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libLLVMSupport.so.40+0xedb94)
#3 0x00007fcd47c632f0 (/lib/x86_64-linux-gnu/libc.so.6+0x352f0)
#4 0x00007fcd47c63267 gsignal
/build/buildd/glibc-2.21/signal/../sysdeps/unix/sysv/linux/raise.c:55:0
#5 0x00007fcd47c64eca abort /build/buildd/glibc-2.21/stdlib/abort.c:91:0
#6 0x00007fcd47c5c03d __assert_fail_base
/build/buildd/glibc-2.21/assert/assert.c:92:0
#7 0x00007fcd47c5c0f2 (/lib/x86_64-linux-gnu/libc.so.6+0x2e0f2)
#8 0x00007fcd4aa4eca8 IslNodeBuilder::createNewAccesses(polly::ScopStmt*,
isl_ast_node*)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libPolly.so+0xccca8)
#9 0x00007fcd4aa52923 IslNodeBuilder::createUser(isl_ast_node*)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libPolly.so+0xd0923)
#10 0x00007fcd4aa55037 IslNodeBuilder::createForSequential(isl_ast_node*, bool)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libPolly.so+0xd3037)
#11 0x00007fcd4aa55037 IslNodeBuilder::createForSequential(isl_ast_node*, bool)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libPolly.so+0xd3037)
#12 0x00007fcd4aa4f0b8 IslNodeBuilder::createBlock(isl_ast_node*)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libPolly.so+0xcd0b8)
#13 0x00007fcd4aa55037 IslNodeBuilder::createForSequential(isl_ast_node*, bool)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libPolly.so+0xd3037)
#14 0x00007fcd4aa55154 IslNodeBuilder::createMark(isl_ast_node*)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libPolly.so+0xd3154)
#15 0x00007fcd4aa59167 (anonymous
namespace)::CodeGeneration::runOnScop(polly::Scop&)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libPolly.so+0xd7167)
#16 0x00007fcd4a54389d llvm::RGPassManager::runOnFunction(llvm::Function&)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libLLVMAnalysis.so.40+0x1fa89d)
#17 0x00007fcd49f56443 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libLLVMCore.so.40+0x17a443)
#18 0x00007fcd49f564fc llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libLLVMCore.so.40+0x17a4fc)
#19 0x00007fcd49f56d8a llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/roman/Documents/polly/build/llvm_d/bin/../lib/libLLVMCore.so.40+0x17ad8a)
#20 0x000000000041b807 main
(/home/roman/Documents/polly/build/llvm_d/bin/opt+0x41b807)
#21 0x00007fcd47c4ea40 __libc_start_main
/build/buildd/glibc-2.21/csu/libc-start.c:323:0
#22 0x000000000041bf89 _start
(/home/roman/Documents/polly/build/llvm_d/bin/opt+0x41bf89)
Stack dump:
0. Program arguments: /home/roman/Documents/polly/build/llvm_d/bin/opt
-polly-invariant-load-hoisting -polly-process-unprofitable -polly-opt-isl
-polly-pattern-matching-based-opts=true -polly-codegen
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'Region Pass Manager' on function
'@_Z4gemmRN5boost7numeric5ublas6matrixIdNS1_15basic_row_majorImlEENS1_15unbounded_arrayIdSaIdEEEEES9_S9_dd'
3. Running pass 'Polly - Create LLVM-IR from SCoPs' on basic block
'%for.cond3.preheader'
Aborted (core dumped)

Additional information about the assert can be found in r282893.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>