-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I added the following tests to the test folder. Each one contains (what I believe are) the expected results from the compiler, followed by a single method implementing the computation.
1.Matrix multiply (matrix_multiply.c)
2.Matrix/vector multiply (matrix_vector_multiply.c)
3.Forward (triangular) solve (forward_solve.c)
4.COO format sparse matrix vector multiply (coo_spmv.c)
5.CSR format spmv (csr_spmv.c)
Here are the issues I found -- discrepancies between my expectations and the compiler's results. They're really just lists of statements missing from the compiler's output, since that was the only sort of issue encountered. These tests were performed at d7ec3d9.
returnstatement in the firstifstatement, everything after the first statement of the second (nested) loop including thereturnstatement after the loops conclude.returnstatement in the firstif, everything after first statement of the first loop (similar to the previous issue)- every statement after the start of the second
forloop (which is not nested in the first) - the statement in the loop and the final return statement -- only the iterator variable initialization is counted
- same as previous, except there are two iterator variables with both initializations printed
Given my limited knowledge of the compiler code I don't know what is causing these issues yet. It does seem that the compiler ignores return statements entirely. From a separate test, I know it is not simply ignoring statements that occur inside an if -- however, when it does pick up a statement inside an if, the if condition is not noted in the iteration domain or execution schedule. Additionally, chunks of (sequential) statements with no clear reason for being left out were missing in almost every test.