https://llvm.org/bugs/show_bug.cgi?id=28871
Bug ID: 28871 Summary: Scalar dependence on induction variable when lower bound is not synthesizable Product: Polly Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Optimizer Assignee: polly-...@googlegroups.com Reporter: l...@meinersbur.de CC: llvm-bugs@lists.llvm.org Classification: Unclassified This inner loops is not detected as parallel (-mllvm -polly-process-unprofitable -mllvm -polly-parallel): for (int j = 1; j <= lastrow - firstrow + 1; j++) { int e = rowstr[j + 1]; int b = rowstr[j]; for (int k = b; k < e; k++) { colidx[k] = colidx[k] - firstcol + 1; } } AST output: Stmt_for_body(); if (p_1_loaded_from_rowstr >= p_0_loaded_from_rowstr + 1) Stmt_for_body7_lr_ph(); #pragma minimal dependence distance: 1 for (int c0 = 0; c0 < -p_0_loaded_from_rowstr + p_1_loaded_from_rowstr; c0 += 1) Stmt_for_body7(c0); Whereas this one is: for (int j = 1; j <= lastrow - firstrow + 1; j++) { int e = rowstr[j + 1]; int b = rowstr[j]; for (int k = 0; k < e-b; k++) { colidx[k+b] = colidx[k+b] - firstcol + 1; } } AST output: Stmt_for_body(); if (p_1_loaded_from_rowstr >= p_0_loaded_from_rowstr + 1) Stmt_for_body8_lr_ph(); #pragma simd #pragma known-parallel for (int c0 = 0; c0 < -p_0_loaded_from_rowstr + p_1_loaded_from_rowstr; c0 += 1) Stmt_for_body8(c0); This is cause by the lower bound ('b') appearing in the lower bound of the SCEV for the induction variable. It is not considered synthesizable albeit load-hoisted. Thus causing scalar dependences created for its PHINode. -- 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