[llvm-bugs] [Bug 32625] New: Register Tiling of two not handled correctly

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 11 09:24:00 PDT 2017


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-dev at googlegroups.com
          Reporter: khaldi.dounia at gmail.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170411/731d857e/attachment-0001.html>


More information about the llvm-bugs mailing list