reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
  304
  305
  306
  307
  308
  309
  310
  311
  312
  313
  314
  315
  316
  317
  318
  319
  320
  321
  322
  323
  324
  325
  326
  327
  328
  329
; RUN: opt %loadPolly -analyze -polly-scops < %s | FileCheck %s
;
; void consequences(int *A, int bool_cond, int lhs, int rhs) {
;
;   BC: *A = 0;
;     if (bool_cond)
;   S_BC:     *A = 0;
;   M_BC: *A = 0;
;
;   NEG_BC: *A = 0;
;     if (!bool_cond)
;   S_NEG_BC: *A = 0;
;   M_NEG_BC: *A = 0;
;
;   SLT: *A = 0;
;     if (lhs < rhs)
;   S_SLT:    *A = 0;
;   M_SLT: *A = 0;
;
;   SLE: *A = 0;
;     if (lhs <= rhs)
;   S_SLE:    *A = 0;
;   M_SLE: *A = 0;
;
;   SGT: *A = 0;
;     if (lhs > rhs)
;   S_SGT:    *A = 0;
;   M_SGT: *A = 0;
;
;   SGE: *A = 0;
;     if (lhs >= rhs)
;   S_SGE:    *A = 0;
;   M_SGE: *A = 0;
;
;   EQ: *A = 0;
;     if (lhs == rhs)
;   S_EQ:    *A = 0;
;   M_EQ: *A = 0;
;
;   NEQ: *A = 0;
;     if (lhs != rhs)
;   S_NEQ:   *A = 0;
;   M_NEQ: *A = 0;
;
; }
; CHECK:      Statements {
; CHECK-NEXT:     Stmt_BC
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_BC[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_BC[] -> [0] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_BC[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_S_BC
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_BC[] : bool_cond < 0 or bool_cond > 0 };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_BC[] -> [1] : bool_cond < 0 or bool_cond > 0 };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_BC[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_M_BC
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_BC[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_BC[] -> [2] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_BC[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_NEG_BC
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_NEG_BC[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_NEG_BC[] -> [3] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_NEG_BC[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_S_NEG_BC
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_NEG_BC[] : bool_cond = 0 };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_NEG_BC[] -> [4] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_NEG_BC[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_M_NEG_BC
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_NEG_BC[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_NEG_BC[] -> [5] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_NEG_BC[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_SLT
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SLT[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SLT[] -> [6] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SLT[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_S_SLT
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SLT[] : rhs > lhs };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SLT[] -> [7] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SLT[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_M_SLT
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SLT[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SLT[] -> [8] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SLT[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_SLE
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SLE[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SLE[] -> [9] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SLE[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_S_SLE
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SLE[] : rhs >= lhs };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SLE[] -> [10] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SLE[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_M_SLE
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SLE[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SLE[] -> [11] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SLE[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_SGT
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SGT[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SGT[] -> [12] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SGT[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_S_SGT
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SGT[] : rhs < lhs };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SGT[] -> [13] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SGT[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_M_SGT
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SGT[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SGT[] -> [14] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SGT[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_SGE
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SGE[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SGE[] -> [15] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_SGE[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_S_SGE
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SGE[] : rhs <= lhs };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SGE[] -> [16] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_SGE[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_M_SGE
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SGE[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SGE[] -> [17] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_SGE[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_EQ
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_EQ[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_EQ[] -> [18] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_EQ[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_S_EQ
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_EQ[] : rhs = lhs };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_EQ[] -> [19] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_EQ[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_M_EQ
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_EQ[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_EQ[] -> [20] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_EQ[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_NEQ
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_NEQ[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_NEQ[] -> [21] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_NEQ[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_S_NEQ
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_NEQ[] : rhs > lhs or rhs < lhs };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_NEQ[] -> [22] : rhs > lhs or rhs < lhs };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_S_NEQ[] -> MemRef_A[0] };
; CHECK-NEXT:     Stmt_M_NEQ
; CHECK-NEXT:         Domain :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_NEQ[] };
; CHECK-NEXT:         Schedule :=
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_NEQ[] -> [23] };
; CHECK-NEXT:         MustWriteAccess :=    [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT:             [bool_cond, lhs, rhs] -> { Stmt_M_NEQ[] -> MemRef_A[0] };
; CHECK-NEXT: }
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

define void @consequences(i32* %A, i32 %bool_cond, i32 %lhs, i32 %rhs) {
entry:
  br label %BC

BC:                                               ; preds = %entry
  store i32 0, i32* %A, align 4
  %tobool = icmp eq i32 %bool_cond, 0
  br i1 %tobool, label %M_BC, label %S_BC

S_BC:                                             ; preds = %if.then
  store i32 0, i32* %A, align 4
  br label %M_BC

M_BC:                                           ; preds = %BC, %S_BC
  store i32 0, i32* %A, align 4
  br label %NEG_BC

NEG_BC:                                           ; preds = %if.end
  store i32 0, i32* %A, align 4
  %tobool1 = icmp eq i32 %bool_cond, 0
  br i1 %tobool1, label %S_NEG_BC, label %M_NEG_BC

S_NEG_BC:                                         ; preds = %if.then.2
  store i32 0, i32* %A, align 4
  br label %M_NEG_BC

M_NEG_BC:                                         ; preds = %NEG_BC, %S_NEG_BC
  store i32 0, i32* %A, align 4
  br label %SLT

SLT:                                              ; preds = %if.end.3
  store i32 0, i32* %A, align 4
  %cmp = icmp slt i32 %lhs, %rhs
  br i1 %cmp, label %S_SLT, label %M_SLT

S_SLT:                                            ; preds = %if.then.4
  store i32 0, i32* %A, align 4
  br label %M_SLT

M_SLT:                                         ; preds = %S_SLT, %SLT
  store i32 0, i32* %A, align 4
  br label %SLE

SLE:                                              ; preds = %if.end.5
  store i32 0, i32* %A, align 4
  %cmp6 = icmp sgt i32 %lhs, %rhs
  br i1 %cmp6, label %M_SLE, label %S_SLE

S_SLE:                                            ; preds = %if.then.7
  store i32 0, i32* %A, align 4
  br label %M_SLE

M_SLE:                                         ; preds = %SLE, %S_SLE
  store i32 0, i32* %A, align 4
  br label %SGT

SGT:                                              ; preds = %if.end.8
  store i32 0, i32* %A, align 4
  %cmp9 = icmp sgt i32 %lhs, %rhs
  br i1 %cmp9, label %S_SGT, label %M_SGT

S_SGT:                                            ; preds = %if.then.10
  store i32 0, i32* %A, align 4
  br label %M_SGT

M_SGT:                                        ; preds = %S_SGT, %SGT
  store i32 0, i32* %A, align 4
  br label %SGE

SGE:                                              ; preds = %if.end.11
  store i32 0, i32* %A, align 4
  %cmp12 = icmp slt i32 %lhs, %rhs
  br i1 %cmp12, label %M_SGE, label %S_SGE

S_SGE:                                            ; preds = %if.then.13
  store i32 0, i32* %A, align 4
  br label %M_SGE

M_SGE:                                        ; preds = %SGE, %S_SGE
  store i32 0, i32* %A, align 4
  br label %EQ

EQ:                                               ; preds = %if.end.14
  store i32 0, i32* %A, align 4
  %cmp15 = icmp eq i32 %lhs, %rhs
  br i1 %cmp15, label %S_EQ, label %M_EQ

S_EQ:                                             ; preds = %if.then.16
  store i32 0, i32* %A, align 4
  br label %M_EQ

M_EQ:                                        ; preds = %S_EQ, %EQ
  store i32 0, i32* %A, align 4
  br label %NEQ

NEQ:                                              ; preds = %if.end.17
  store i32 0, i32* %A, align 4
  %cmp18 = icmp eq i32 %lhs, %rhs
  br i1 %cmp18, label %M_NEQ, label %S_NEQ

S_NEQ:                                            ; preds = %if.then.19
  store i32 0, i32* %A, align 4
  br label %M_NEQ

M_NEQ:                                        ; preds = %NEQ, %S_NEQ
  store i32 0, i32* %A, align 4
  br label %exit

exit:
  ret void
}