llvm-project/polly/test
Roman Gareev e0d466342b Restore the initial ordering of dimensions before applying the pattern matching
Dimensions of band nodes can be implicitly permuted by the algorithm applied
during the schedule generation.

For example, in case of the following matrix-matrix multiplication,

for (i = 0; i < 1024; i++)
  for (k = 0; k < 1024; k++)
    for (j = 0; j < 1024; j++)
      C[i][j] += A[i][k] * B[k][j];

it can produce the following schedule tree

domain: "{ Stmt_for_body6[i0, i1, i2] : 0 <= i0 <= 1023 and 0 <= i1 <= 1023 and
                                        0 <= i2 <= 1023 }"
child:
  schedule: "[{ Stmt_for_body6[i0, i1, i2] -> [(i0)] },
              { Stmt_for_body6[i0, i1, i2] -> [(i1)] },
              { Stmt_for_body6[i0, i1, i2] -> [(i2)] }]"
  permutable: 1
  coincident: [ 1, 1, 0 ]

The current implementation of the pattern matching optimizations relies on the
initial ordering of dimensions. Otherwise, it can produce the miscompilation
(e.g., [1]).

This patch helps to restore the initial ordering of dimensions by recreating
the band node when the corresponding conditions are satisfied.

Refs.:

[1] - https://bugs.llvm.org/show_bug.cgi?id=32500

Reviewed-by: Michael Kruse <llvm@meinersbur.de>

Differential Revision: https://reviews.llvm.org/D31741

llvm-svn: 299662
2017-04-06 17:09:54 +00:00
..
CodeGen/OpenMP Update to ISL 0.17. 2016-05-04 14:41:36 +00:00
DeLICM [DeLICM] Add -polly-delicm-overapproximate-writes option. 2017-03-09 11:23:22 +00:00
DeadCodeElimination [Polly] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-15 06:12:29 +00:00
DependenceInfo [Polly] [DependenceInfo] change WAR, WAW generation to correct semantics 2017-04-04 13:08:23 +00:00
FlattenSchedule Add -polly-flatten-schedule pass. 2016-09-08 15:02:36 +00:00
GPGPU [tests] Make sure tests do not end in 'unreachable' 2017-03-07 15:17:23 +00:00
Isl Remove llvm.lifetime.start/end in original region. 2017-04-05 20:09:59 +00:00
PruneUnprofitable [PruneUnprofitable] Add -polly-prune-unprofitable pass. 2017-03-17 13:09:52 +00:00
ScheduleOptimizer Restore the initial ordering of dimensions before applying the pattern matching 2017-04-06 17:09:54 +00:00
ScopDetect [ScopDetection] Only allow SCoP-wide available base pointers. 2017-03-08 15:14:46 +00:00
ScopDetectionDiagnostics [ScopDetection] Require LoadInst base pointers to be hoisted. 2017-03-07 20:28:43 +00:00
ScopInfo [test] Fix two testcases. NFC. 2017-04-03 12:37:10 +00:00
Simplify [Simplify] Add -polly-simplify pass. 2017-03-10 16:05:24 +00:00
Unit Introduce unittests. 2016-08-25 12:36:15 +00:00
UnitIsl Build and run isl_test as part of check-polly 2016-10-04 19:48:40 +00:00
CMakeLists.txt [Cmake] Optionally use a system isl version. 2017-02-27 17:54:25 +00:00
README
create_ll.sh Small change to create_ll.sh [NFC] 2015-03-08 15:36:27 +00:00
lit.cfg Make the lit configuration Python 3 compatible 2015-07-24 20:33:22 +00:00
lit.site.cfg.in [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
polly.ll tests: Drop -polly-detect-unprofitable and -polly-no-early-exit 2015-10-06 15:36:44 +00:00
update_check.py Add -polly-flatten-schedule pass. 2016-09-08 15:02:36 +00:00

README

place tests here