|
| 1 | +// RUN: mlir-opt %s --normalize --mlir-use-nameloc-as-prefix 2>&1 | FileCheck %s |
| 2 | + |
| 3 | +// CHECK-LABEL: module { |
| 4 | +// CHECK: func.func @test(%[[ARG0:.*]]: memref<?xi32>, %[[ARG1:.*]]: i32) { |
| 5 | +// CHECK: %[[VAL_0:.*]] = arith.constant 1 : i32 |
| 6 | +// CHECK: %vl15390$e5677-funcArg1$ = arith.addi %[[ARG1:.*]], %[[VAL_0:.*]] : i32 |
| 7 | +// CHECK: cf.br ^bb1(%vl15390$e5677-funcArg1$, %vl15390$e5677-funcArg1$ : i32, i32) |
| 8 | +// CHECK: ^bb1(%[[VAL_1:.*]]: i32, %[[VAL_2:.*]]: i32): // 2 preds: ^bb0, ^bb1 |
| 9 | +// CHECK: %vl22288$20b04$ = arith.constant 0 : i32 |
| 10 | +// CHECK: %vl13736$20b04-blockArg0$ = arith.muli %[[VAL_1:.*]], %vl22288$20b04$ : i32 |
| 11 | +// CHECK: %vl22288$ded78$ = arith.constant -1 : i32 |
| 12 | +// CHECK: %op51214$vl13736-vl22288$ = arith.xori %vl13736$20b04-blockArg0$, %vl22288$ded78$ : i32 |
| 13 | +// CHECK: %op12693$op51214$ = arith.addi %[[VAL_1:.*]], %op51214$vl13736-vl22288$ : i32 |
| 14 | +// CHECK: %vl15894$blockArg1-ded78$ = arith.addi %[[VAL_2:.*]], %vl22288$ded78$ : i32 |
| 15 | +// CHECK: %op15672$op12693-vl15894$ = arith.addi %op12693$op51214$, %vl15894$blockArg1-ded78$ : i32 |
| 16 | +// CHECK: %op97825$op15672-vl13736$ = arith.muli %op15672$op12693-vl15894$, %vl13736$20b04-blockArg0$ : i32 |
| 17 | +// CHECK: %op51214$op97825-vl22288$ = arith.xori %op97825$op15672-vl13736$, %vl22288$ded78$ : i32 |
| 18 | +// CHECK: %op12343$op15672-op51214$ = arith.addi %op15672$op12693-vl15894$, %op51214$op97825-vl22288$ : i32 |
| 19 | +// CHECK: %op27844$op12343-vl22288$ = arith.addi %op12343$op15672-op51214$, %vl22288$20b04$ : i32 |
| 20 | +// CHECK: %op97825$op27844-op97825$ = arith.muli %op27844$op12343-vl22288$, %op97825$op15672-vl13736$ : i32 |
| 21 | +// CHECK: %op51214$op97825-vl22288$_0 = arith.xori %op97825$op27844-op97825$, %vl22288$ded78$ : i32 |
| 22 | +// CHECK: %op12343$op27844-op51214$ = arith.addi %op27844$op12343-vl22288$, %op51214$op97825-vl22288$_0 : i32 |
| 23 | +// CHECK: %op27844$op12343-vl22288$_1 = arith.addi %op12343$op27844-op51214$, %vl22288$20b04$ : i32 |
| 24 | +// CHECK: %op27844$op27844-vl22288$ = arith.addi %op27844$op12343-vl22288$_1, %vl22288$20b04$ : i32 |
| 25 | +// CHECK: %op97825$op27844-op97825$_3 = arith.muli %op27844$op12343-vl22288$_1, %op97825$op27844-op97825$ : i32 |
| 26 | +// CHECK: %op97825$op27844-op97825$_4 = arith.muli %op27844$op27844-vl22288$_2, %op97825$op27844-op97825$_3 : i32 |
| 27 | +// CHECK: %op51214$op97825-vl22288$_5 = arith.xori %op97825$op27844-op97825$_4, %vl22288$ded78$ : i32 |
| 28 | +// CHECK: %op12343$op27844-op51214$_6 = arith.addi %op27844$op27844-vl22288$_2, %op51214$op97825-vl22288$_5 : i32 |
| 29 | +// CHECK: %op27844$op12343-vl22288$_7 = arith.addi %op12343$op27844-op51214$_6, %vl22288$20b04$ : i32 |
| 30 | +// CHECK: %op97825$op27844-op97825$_8 = arith.muli %op27844$op12343-vl22288$_7, %op97825$op27844-op97825$_4 : i32 |
| 31 | +// CHECK: %op51214$op97825-vl22288$_9 = arith.xori %op97825$op27844-op97825$_8, %vl22288$ded78$ : i32 |
| 32 | +// CHECK: %op12343$op27844-op51214$_10 = arith.addi %op27844$op12343-vl22288$_7, %op51214$op97825-vl22288$_9 : i32 |
| 33 | +// CHECK: %op27844$op12343-vl22288$_11 = arith.addi %op12343$op27844-op51214$_10, %vl22288$20b04$ : i32 |
| 34 | +// CHECK: %op97825$op27844-op97825$_12 = arith.muli %op27844$op12343-vl22288$_11, %op97825$op27844-op97825$_8 : i32 |
| 35 | +// CHECK: %op51214$op97825-vl22288$_13 = arith.xori %op97825$op27844-op97825$_12, %vl22288$ded78$ : i32 |
| 36 | +// CHECK: %op12343$op27844-op51214$_14 = arith.addi %op27844$op12343-vl22288$_11, %op51214$op97825-vl22288$_13 : i32 |
| 37 | +// CHECK: %op27844$op12343-vl22288$_15 = arith.addi %op12343$op27844-op51214$_14, %vl22288$20b04$ : i32 |
| 38 | +// CHECK: %op97825$op27844-op97825$_16 = arith.muli %op27844$op12343-vl22288$_15, %op97825$op27844-op97825$_12 : i32 |
| 39 | +// CHECK: %op51214$op97825-vl22288$_17 = arith.xori %op97825$op27844-op97825$_16, %vl22288$ded78$ : i32 |
| 40 | +// CHECK: %op12343$op27844-op51214$_18 = arith.addi %op27844$op12343-vl22288$_15, %op51214$op97825-vl22288$_17 : i32 |
| 41 | +// CHECK: %op27844$op12343-vl22288$_19 = arith.addi %op12343$op27844-op51214$_18, %vl22288$20b04$ : i32 |
| 42 | +// CHECK: %op97825$op27844-op97825$_20 = arith.muli %op27844$op12343-vl22288$_19, %op97825$op27844-op97825$_16 : i32 |
| 43 | +// CHECK: %op51214$op97825-vl22288$_21 = arith.xori %op97825$op27844-op97825$_20, %vl22288$ded78$ : i32 |
| 44 | +// CHECK: %op12343$op27844-op51214$_22 = arith.addi %op27844$op12343-vl22288$_19, %op51214$op97825-vl22288$_21 : i32 |
| 45 | +// CHECK: %[[VAL_3:.*]] = arith.constant -9 : i32 |
| 46 | +// CHECK: %vl15894$51850-blockArg1$ = arith.addi %[[VAL_2:.*]], %[[VAL_3:.*]] : i32 |
| 47 | +// CHECK: %op15672$op12343-vl15894$ = arith.addi %op12343$op27844-op51214$_22, %vl15894$51850-blockArg1$ : i32 |
| 48 | +// CHECK: %op97825$op15672-op97825$ = arith.muli %op15672$op12343-vl15894$, %op97825$op27844-op97825$_20 : i32 |
| 49 | +// CHECK: %op51214$op97825-vl22288$_23 = arith.xori %op97825$op15672-op97825$, %vl22288$ded78$ : i32 |
| 50 | +// CHECK: %op12343$op15672-op51214$_24 = arith.addi %op15672$op12343-vl15894$, %op51214$op97825-vl22288$_23 : i32 |
| 51 | +// CHECK: %op27844$op12343-vl22288$_25 = arith.addi %op12343$op15672-op51214$_24, %vl22288$20b04$ : i32 |
| 52 | +// CHECK: %op97825$op27844-op97825$_26 = arith.muli %op27844$op12343-vl22288$_25, %op97825$op15672-op97825$ : i32 |
| 53 | +// CHECK: %op51214$op97825-vl22288$_27 = arith.xori %op97825$op27844-op97825$_26, %vl22288$ded78$ : i32 |
| 54 | +// CHECK: %op12343$op27844-op51214$_28 = arith.addi %op27844$op12343-vl22288$_25, %op51214$op97825-vl22288$_27 : i32 |
| 55 | +// CHECK: %op27844$op12343-vl22288$_29 = arith.addi %op12343$op27844-op51214$_28, %vl22288$20b04$ : i32 |
| 56 | +// CHECK: %op97825$op27844-op97825$_30 = arith.muli %op27844$op12343-vl22288$_29, %op97825$op27844-op97825$_26 : i32 |
| 57 | +// CHECK: %op51214$op97825-vl22288$_31 = arith.xori %op97825$op27844-op97825$_30, %vl22288$ded78$ : i32 |
| 58 | +// CHECK: %op12343$op27844-op51214$_32 = arith.addi %op27844$op12343-vl22288$_29, %op51214$op97825-vl22288$_31 : i32 |
| 59 | +// CHECK: %op27844$op12343-vl22288$_33 = arith.addi %op12343$op27844-op51214$_32, %vl22288$20b04$ : i32 |
| 60 | +// CHECK: %op97825$op27844-op97825$_34 = arith.muli %op27844$op12343-vl22288$_33, %op97825$op27844-op97825$_30 : i32 |
| 61 | +// CHECK: %op51214$op97825-vl22288$_35 = arith.xori %op97825$op27844-op97825$_34, %vl22288$ded78$ : i32 |
| 62 | +// CHECK: %op12343$op27844-op51214$_36 = arith.addi %op27844$op12343-vl22288$_33, %op51214$op97825-vl22288$_35 : i32 |
| 63 | +// CHECK: %op27844$op12343-vl22288$_37 = arith.addi %op12343$op27844-op51214$_36, %vl22288$20b04$ : i32 |
| 64 | +// CHECK: %op97825$op27844-op97825$_38 = arith.muli %op27844$op12343-vl22288$_37, %op97825$op27844-op97825$_34 : i32 |
| 65 | +// CHECK: %op51214$op97825-vl22288$_39 = arith.xori %op97825$op27844-op97825$_38, %vl22288$ded78$ : i32 |
| 66 | +// CHECK: %op12343$op27844-op51214$_40 = arith.addi %op27844$op12343-vl22288$_37, %op51214$op97825-vl22288$_39 : i32 |
| 67 | +// CHECK: %[[VAL_4:.*]] = arith.constant -14 : i32 |
| 68 | +// CHECK: %vl15894$7b7de-blockArg1$ = arith.addi %[[VAL_2:.*]], %[[VAL_4:.*]] : i32 |
| 69 | +// CHECK: %op15672$op12343-vl15894$_41 = arith.addi %op12343$op27844-op51214$_40, %vl15894$7b7de-blockArg1$ : i32 |
| 70 | +// CHECK: %op97825$op15672-op97825$_42 = arith.muli %op15672$op12343-vl15894$_41, %op97825$op27844-op97825$_38 : i32 |
| 71 | +// CHECK: %op51214$op97825-vl22288$_43 = arith.xori %op97825$op15672-op97825$_42, %vl22288$ded78$ : i32 |
| 72 | +// CHECK: %op12343$op15672-op51214$_44 = arith.addi %op15672$op12343-vl15894$_41, %op51214$op97825-vl22288$_43 : i32 |
| 73 | +// CHECK: %op27844$op12343-vl22288$_45 = arith.addi %op12343$op15672-op51214$_44, %vl22288$20b04$ : i32 |
| 74 | +// CHECK: %op97825$op27844-op97825$_46 = arith.muli %op27844$op12343-vl22288$_45, %op97825$op15672-op97825$_42 : i32 |
| 75 | +// CHECK: %op51214$op97825-vl22288$_47 = arith.xori %op97825$op27844-op97825$_46, %vl22288$ded78$ : i32 |
| 76 | +// CHECK: %op12343$op27844-op51214$_48 = arith.addi %op27844$op12343-vl22288$_45, %op51214$op97825-vl22288$_47 : i32 |
| 77 | +// CHECK: %op27844$op12343-vl22288$_49 = arith.addi %op12343$op27844-op51214$_48, %vl22288$20b04$ : i32 |
| 78 | +// CHECK: %op97825$op27844-op97825$_50 = arith.muli %op27844$op12343-vl22288$_49, %op97825$op27844-op97825$_46 : i32 |
| 79 | +// CHECK: %op51214$op97825-vl22288$_51 = arith.xori %op97825$op27844-op97825$_50, %vl22288$ded78$ : i32 |
| 80 | +// CHECK: %op12343$op27844-op51214$_52 = arith.addi %op27844$op12343-vl22288$_49, %op51214$op97825-vl22288$_51 : i32 |
| 81 | +// CHECK: %op27844$op12343-vl22288$_53 = arith.addi %op12343$op27844-op51214$_52, %vl22288$20b04$ : i32 |
| 82 | +// CHECK: %op97825$op27844-op97825$_54 = arith.muli %op27844$op12343-vl22288$_53, %op97825$op27844-op97825$_50 : i32 |
| 83 | +// CHECK: %op51214$op97825-vl22288$_55 = arith.xori %op97825$op27844-op97825$_54, %vl22288$ded78$ : i32 |
| 84 | +// CHECK: %op12343$op27844-op51214$_56 = arith.addi %op27844$op12343-vl22288$_53, %op51214$op97825-vl22288$_55 : i32 |
| 85 | +// CHECK: %op27844$op12343-vl22288$_57 = arith.addi %op12343$op27844-op51214$_56, %vl22288$20b04$ : i32 |
| 86 | +// CHECK: %op97825$op27844-op97825$_58 = arith.muli %op27844$op12343-vl22288$_57, %op97825$op27844-op97825$_54 : i32 |
| 87 | +// CHECK: %op51214$op97825-vl22288$_59 = arith.xori %op97825$op27844-op97825$_58, %vl22288$ded78$ : i32 |
| 88 | +// CHECK: %op12343$op27844-op51214$_60 = arith.addi %op27844$op12343-vl22288$_57, %op51214$op97825-vl22288$_59 : i32 |
| 89 | +// CHECK: %op27844$op12343-vl22288$_61 = arith.addi %op12343$op27844-op51214$_60, %vl22288$20b04$ : i32 |
| 90 | +// CHECK: %op97825$op27844-op97825$_62 = arith.muli %op27844$op12343-vl22288$_61, %op97825$op27844-op97825$_58 : i32 |
| 91 | +// CHECK: %op51214$op97825-vl22288$_63 = arith.xori %op97825$op27844-op97825$_62, %vl22288$ded78$ : i32 |
| 92 | +// CHECK: %op12343$op27844-op51214$_64 = arith.addi %op27844$op12343-vl22288$_61, %op51214$op97825-vl22288$_63 : i32 |
| 93 | +// CHECK: %op27844$op12343-vl22288$_65 = arith.addi %op12343$op27844-op51214$_64, %vl22288$20b04$ : i32 |
| 94 | +// CHECK: %op27844$op27844-vl22288$_66 = arith.addi %op27844$op12343-vl22288$_65, %vl22288$20b04$ : i32 |
| 95 | +// CHECK: %[[VAL_5:.*]] = arith.constant -21 : i32 |
| 96 | +// CHECK: %vl15894$1e72e-blockArg1$ = arith.addi %[[VAL_2:.*]], %[[VAL_5:.*]] : i32 |
| 97 | +// CHECK: %op15672$op27844-vl15894$ = arith.addi %op27844$op27844-vl22288$_66, %vl15894$1e72e-blockArg1$ : i32 |
| 98 | +// CHECK: %vl48856$e527e$ = arith.constant 0 : index |
| 99 | +// CHECK: memref.store %op15672$op27844-vl15894$, %[[ARG0:.*]][%vl48856$e527e$] : memref<?xi32> |
| 100 | +// CHECK: cf.br ^bb1(%op15672$op27844-vl15894$, %vl15894$1e72e-blockArg1$ : i32, i32) |
| 101 | +// CHECK: } |
| 102 | +// CHECK: } |
| 103 | +func.func @test(%arg0: memref<?xi32>, %arg1: i32) { |
| 104 | + %c1 = arith.constant 1 : i32 |
| 105 | + %a = arith.addi %arg1, %c1 : i32 |
| 106 | + cf.br ^bb1(%a, %a : i32, i32) |
| 107 | + |
| 108 | + ^bb1(%tmp: i32, %tmp2: i32): |
| 109 | + %c0 = arith.constant 0 : i32 |
| 110 | + %tmp3 = arith.muli %tmp, %c0 : i32 |
| 111 | + %cneg1 = arith.constant -1 : i32 |
| 112 | + %tmp4 = arith.xori %tmp3, %cneg1 : i32 |
| 113 | + %tmp5 = arith.addi %tmp, %tmp4 : i32 |
| 114 | + %tmp6 = arith.addi %tmp2, %cneg1 : i32 |
| 115 | + %tmp7 = arith.addi %tmp5, %tmp6 : i32 |
| 116 | + %tmp8 = arith.muli %tmp7, %tmp3 : i32 |
| 117 | + %tmp9 = arith.xori %tmp8, %cneg1 : i32 |
| 118 | + %tmp10 = arith.addi %tmp7, %tmp9 : i32 |
| 119 | + %tmp11 = arith.addi %tmp10, %c0 : i32 |
| 120 | + %tmp12 = arith.muli %tmp11, %tmp8 : i32 |
| 121 | + %tmp13 = arith.xori %tmp12, %cneg1 : i32 |
| 122 | + %tmp14 = arith.addi %tmp11, %tmp13 : i32 |
| 123 | + %tmp15 = arith.addi %tmp14, %c0 : i32 |
| 124 | + %tmp16 = arith.muli %tmp15, %tmp12 : i32 |
| 125 | + %tmp17 = arith.addi %tmp15, %c0 : i32 |
| 126 | + %tmp18 = arith.addi %tmp17, %c0 : i32 |
| 127 | + %tmp19 = arith.muli %tmp18, %tmp16 : i32 |
| 128 | + %tmp20 = arith.xori %tmp19, %cneg1 : i32 |
| 129 | + %tmp21 = arith.addi %tmp18, %tmp20 : i32 |
| 130 | + %tmp22 = arith.addi %tmp21, %c0 : i32 |
| 131 | + %tmp23 = arith.muli %tmp22, %tmp19 : i32 |
| 132 | + %tmp24 = arith.xori %tmp23, %cneg1 : i32 |
| 133 | + %tmp25 = arith.addi %tmp22, %tmp24 : i32 |
| 134 | + %tmp26 = arith.addi %tmp25, %c0 : i32 |
| 135 | + %tmp27 = arith.muli %tmp26, %tmp23 : i32 |
| 136 | + %tmp28 = arith.xori %tmp27, %cneg1 : i32 |
| 137 | + %tmp29 = arith.addi %tmp26, %tmp28 : i32 |
| 138 | + %tmp30 = arith.addi %tmp29, %c0 : i32 |
| 139 | + %tmp31 = arith.muli %tmp30, %tmp27 : i32 |
| 140 | + %tmp32 = arith.xori %tmp31, %cneg1 : i32 |
| 141 | + %tmp33 = arith.addi %tmp30, %tmp32 : i32 |
| 142 | + %tmp34 = arith.addi %tmp33, %c0 : i32 |
| 143 | + %tmp35 = arith.muli %tmp34, %tmp31 : i32 |
| 144 | + %tmp36 = arith.xori %tmp35, %cneg1 : i32 |
| 145 | + %tmp37 = arith.addi %tmp34, %tmp36 : i32 |
| 146 | + %cneg9 = arith.constant -9 : i32 |
| 147 | + %tmp38 = arith.addi %tmp2, %cneg9 : i32 |
| 148 | + %tmp39 = arith.addi %tmp37, %tmp38 : i32 |
| 149 | + %tmp40 = arith.muli %tmp39, %tmp35 : i32 |
| 150 | + %tmp41 = arith.xori %tmp40, %cneg1 : i32 |
| 151 | + %tmp42 = arith.addi %tmp39, %tmp41 : i32 |
| 152 | + %tmp43 = arith.addi %tmp42, %c0 : i32 |
| 153 | + %tmp44 = arith.muli %tmp43, %tmp40 : i32 |
| 154 | + %tmp45 = arith.xori %tmp44, %cneg1 : i32 |
| 155 | + %tmp46 = arith.addi %tmp43, %tmp45 : i32 |
| 156 | + %tmp47 = arith.addi %tmp46, %c0 : i32 |
| 157 | + %tmp48 = arith.muli %tmp47, %tmp44 : i32 |
| 158 | + %tmp49 = arith.xori %tmp48, %cneg1 : i32 |
| 159 | + %tmp50 = arith.addi %tmp47, %tmp49 : i32 |
| 160 | + %tmp51 = arith.addi %tmp50, %c0 : i32 |
| 161 | + %tmp52 = arith.muli %tmp51, %tmp48 : i32 |
| 162 | + %tmp53 = arith.xori %tmp52, %cneg1 : i32 |
| 163 | + %tmp54 = arith.addi %tmp51, %tmp53 : i32 |
| 164 | + %tmp55 = arith.addi %tmp54, %c0 : i32 |
| 165 | + %tmp56 = arith.muli %tmp55, %tmp52 : i32 |
| 166 | + %tmp57 = arith.xori %tmp56, %cneg1 : i32 |
| 167 | + %tmp58 = arith.addi %tmp55, %tmp57 : i32 |
| 168 | + %cneg14 = arith.constant -14 : i32 |
| 169 | + %tmp59 = arith.addi %tmp2, %cneg14 : i32 |
| 170 | + %tmp60 = arith.addi %tmp58, %tmp59 : i32 |
| 171 | + %tmp61 = arith.muli %tmp60, %tmp56 : i32 |
| 172 | + %tmp62 = arith.xori %tmp61, %cneg1 : i32 |
| 173 | + %tmp63 = arith.addi %tmp60, %tmp62 : i32 |
| 174 | + %tmp64 = arith.addi %tmp63, %c0 : i32 |
| 175 | + %tmp65 = arith.muli %tmp64, %tmp61 : i32 |
| 176 | + %tmp66 = arith.xori %tmp65, %cneg1 : i32 |
| 177 | + %tmp67 = arith.addi %tmp64, %tmp66 : i32 |
| 178 | + %tmp68 = arith.addi %tmp67, %c0 : i32 |
| 179 | + %tmp69 = arith.muli %tmp68, %tmp65 : i32 |
| 180 | + %tmp70 = arith.xori %tmp69, %cneg1 : i32 |
| 181 | + %tmp71 = arith.addi %tmp68, %tmp70 : i32 |
| 182 | + %tmp72 = arith.addi %tmp71, %c0 : i32 |
| 183 | + %tmp73 = arith.muli %tmp72, %tmp69 : i32 |
| 184 | + %tmp74 = arith.xori %tmp73, %cneg1 : i32 |
| 185 | + %tmp75 = arith.addi %tmp72, %tmp74 : i32 |
| 186 | + %tmp76 = arith.addi %tmp75, %c0 : i32 |
| 187 | + %tmp77 = arith.muli %tmp76, %tmp73 : i32 |
| 188 | + %tmp78 = arith.xori %tmp77, %cneg1 : i32 |
| 189 | + %tmp79 = arith.addi %tmp76, %tmp78 : i32 |
| 190 | + %tmp80 = arith.addi %tmp79, %c0 : i32 |
| 191 | + %tmp81 = arith.muli %tmp80, %tmp77 : i32 |
| 192 | + %tmp82 = arith.xori %tmp81, %cneg1 : i32 |
| 193 | + %tmp83 = arith.addi %tmp80, %tmp82 : i32 |
| 194 | + %tmp84 = arith.addi %tmp83, %c0 : i32 |
| 195 | + %tmp85 = arith.addi %tmp84, %c0 : i32 |
| 196 | + %cneg21 = arith.constant -21 : i32 |
| 197 | + %tmp86 = arith.addi %tmp2, %cneg21 : i32 |
| 198 | + %tmp87 = arith.addi %tmp85, %tmp86 : i32 |
| 199 | + %c0_idx = arith.constant 0 : index |
| 200 | + memref.store %tmp87, %arg0[%c0_idx] : memref<?xi32> |
| 201 | + cf.br ^bb1(%tmp87, %tmp86 : i32, i32) |
| 202 | +} |
0 commit comments