Bug ID: 38517
           Summary: opt hangs in LoadStoreVectorizer
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs

Created attachment 20672
reproducer with nested load

  opt -load-store-vectorizer -o tmp.opt.ll tmp.ll
with the attached reproducer, the LoadStoreVectorizer hangs in an endless loop.

The originating src program consists of a nested load, where the inner load's
result is used for indexing the outer load.

A somewhat shallow analysis by me indicates that the areConsecutivePointers()
function do some SCEV magic to find that the pointers for these loads are
consecutive, but it doesn't seem to me that they are. Then when vectorization
has been performed, the IR references has a loop, and when the reorder()
function is applied to it, it follows that loop endlessly.

This is the original c-program for reference:

 #include <stdint.h>

 uint32_t a = 0;
 uint32_t b[1][3] = { { 0, 0, 0 } };
 const uint16_t c = 1;

 int main() { 
   b[(2u & b[a % 1][2u % 3]) % 1][c % 3]; 

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to