78 lines · plain
1// RUN: mlir-opt %s -test-distinct-attrs | FileCheck %s2 3// CHECK: #[[DIST0:.*]] = distinct[0]<42 : i32>4// CHECK: #[[DIST1:.*]] = distinct[1]<42 : i32>5#distinct = distinct[0]<42 : i32>6// CHECK: #[[DIST2:.*]] = distinct[2]<42 : i32>7// CHECK: #[[DIST3:.*]] = distinct[3]<42 : i32>8#distinct1 = distinct[1]<42 : i32>9// CHECK: #[[DIST4:.*]] = distinct[4]<43 : i32>10// CHECK: #[[DIST5:.*]] = distinct[5]<43 : i32>11#distinct2 = distinct[2]<43 : i32>12// CHECK: #[[DIST6:.*]] = distinct[6]<@foo_1>13// CHECK: #[[DIST7:.*]] = distinct[7]<@foo_1>14#distinct3 = distinct[3]<@foo_1>15 16// Copies made for foo_217// CHECK: #[[DIST8:.*]] = distinct[8]<42 : i32>18// CHECK: #[[DIST9:.*]] = distinct[9]<42 : i32>19// CHECK: #[[DIST10:.*]] = distinct[10]<43 : i32>20// CHECK: #[[DIST11:.*]] = distinct[11]<@foo_1>21 22// Copies made for foo_323// CHECK: #[[DIST12:.*]] = distinct[12]<42 : i32>24// CHECK: #[[DIST13:.*]] = distinct[13]<42 : i32>25// CHECK: #[[DIST14:.*]] = distinct[14]<43 : i32>26// CHECK: #[[DIST15:.*]] = distinct[15]<@foo_1>27 28// Copies made for foo_429// CHECK: #[[DIST16:.*]] = distinct[16]<42 : i32>30// CHECK: #[[DIST17:.*]] = distinct[17]<42 : i32>31// CHECK: #[[DIST18:.*]] = distinct[18]<43 : i32>32// CHECK: #[[DIST19:.*]] = distinct[19]<@foo_1>33 34// CHECK: @foo_135func.func @foo_1() {36 // CHECK: "test.op"() {distinct.input = #[[DIST0]], distinct.output = #[[DIST1]]}37 "test.op"() {distinct.input = #distinct} : () -> ()38 // CHECK: "test.op"() {distinct.input = #[[DIST2]], distinct.output = #[[DIST3]]}39 "test.op"() {distinct.input = #distinct1} : () -> ()40 // CHECK: "test.op"() {distinct.input = #[[DIST4]], distinct.output = #[[DIST5]]}41 "test.op"() {distinct.input = #distinct2} : () -> ()42 // CHECK: "test.op"() {distinct.input = #[[DIST6]], distinct.output = #[[DIST7]]}43 "test.op"() {distinct.input = #distinct3} : () -> ()44}45 46func.func @foo_2() {47 // CHECK: "test.op"() {distinct.input = #[[DIST0]], distinct.output = #[[DIST8]]}48 "test.op"() {distinct.input = #distinct} : () -> ()49 // CHECK: "test.op"() {distinct.input = #[[DIST2]], distinct.output = #[[DIST9]]}50 "test.op"() {distinct.input = #distinct1} : () -> ()51 // CHECK: "test.op"() {distinct.input = #[[DIST4]], distinct.output = #[[DIST10]]}52 "test.op"() {distinct.input = #distinct2} : () -> ()53 // CHECK: "test.op"() {distinct.input = #[[DIST6]], distinct.output = #[[DIST11]]}54 "test.op"() {distinct.input = #distinct3} : () -> ()55}56 57func.func @foo_3() {58 // CHECK: "test.op"() {distinct.input = #[[DIST0]], distinct.output = #[[DIST12]]}59 "test.op"() {distinct.input = #distinct} : () -> ()60 // CHECK: "test.op"() {distinct.input = #[[DIST2]], distinct.output = #[[DIST13]]}61 "test.op"() {distinct.input = #distinct1} : () -> ()62 // CHECK: "test.op"() {distinct.input = #[[DIST4]], distinct.output = #[[DIST14]]}63 "test.op"() {distinct.input = #distinct2} : () -> ()64 // CHECK: "test.op"() {distinct.input = #[[DIST6]], distinct.output = #[[DIST15]]}65 "test.op"() {distinct.input = #distinct3} : () -> ()66}67 68func.func @foo_4() {69 // CHECK: "test.op"() {distinct.input = #[[DIST0]], distinct.output = #[[DIST16]]}70 "test.op"() {distinct.input = #distinct} : () -> ()71 // CHECK: "test.op"() {distinct.input = #[[DIST2]], distinct.output = #[[DIST17]]}72 "test.op"() {distinct.input = #distinct1} : () -> ()73 // CHECK: "test.op"() {distinct.input = #[[DIST4]], distinct.output = #[[DIST18]]}74 "test.op"() {distinct.input = #distinct2} : () -> ()75 // CHECK: "test.op"() {distinct.input = #[[DIST6]], distinct.output = #[[DIST19]]}76 "test.op"() {distinct.input = #distinct3} : () -> ()77}78