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

            Bug ID: 32625
           Summary: Register Tiling of two not handled correctly
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Optimizer
          Assignee: polly-...@googlegroups.com
          Reporter: khaldi.dou...@gmail.com
                CC: llvm-bugs@lists.llvm.org

In the following code:
void MVM(float *__restrict A, float *__restrict B, float *__restrict C, int M,
int K){
    for(int i=0;i<M;i+=1){
      for (int k = 0; k<K; k++){
        C[i]+=A[i+k*M]*B[k];
      }
    }
  }

When I choose to register tile Loop k by 2. I get this
for (int c1 = 0; c1 < floord(K + 1, 2); c1 += 1) {

And then __builtin_assume(K % 2 == 0); does not replace the above by for (int
c1 = 0; c1 < K/ 2); c1 += 1)  and thus does not remove the conditionals in the
register tiling output.

Apparently this is related to the fact that division by two is translated to a
 shift, which is not handled correctly yet. This needs a fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to