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

            Bug ID: 51642
           Summary: clang-13 regression: -fsave-optimization-record is
                    generating empty files
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Loop Optimizer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

echo "
#define N 1536
float A[N][N];
float B[N][N];
float C[N][N];

void init_array()
{
    int i, j;
    for (i = 0; i < N; i++) {
        for (j = 0; j < N; j++) {
            A[i][j] = (1+(i*j)%1024)/2.0;
            B[i][j] = (1+(i*j)%1024)/2.0;
        }
    }
}

int main()
{
    int i, j, k;
    double t_start, t_end;
    init_array();
    for (i = 0; i < N; i++) {
        for (j = 0; j < N; j++) {
            C[i][j] = 0;
            for (k = 0; k < N; k++)
                C[i][j] = C[i][j] + A[i][k] * B[k][j];
        }
    }
    return 0;
}
" > foo.c
With clang-12:
$ clang-12 -S -fsave-optimization-record -emit-llvm foo.c -o matmul.s
$ ls -al matmul.opt.yaml
-rw-r--r-- 1 sylvestre sylvestre 535 27 août  09:53 matmul.opt.yaml

With clang-13:
$ clang-13 -S -fsave-optimization-record -emit-llvm foo.c -o matmul.s
$ ls -al matmul.opt.yaml
-rw-r--r-- 1 sylvestre sylvestre 0 27 août  09:54 matmul.opt.yaml

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to