File: test-builtin-distinct-attrs.mlir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (77 lines) | stat: -rw-r--r-- 3,585 bytes parent folder | download | duplicates (12)
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
// RUN: mlir-opt %s -test-distinct-attrs | FileCheck %s

// CHECK: #[[DIST0:.*]] = distinct[0]<42 : i32>
// CHECK: #[[DIST1:.*]] = distinct[1]<42 : i32>
#distinct = distinct[0]<42 : i32>
// CHECK: #[[DIST2:.*]] = distinct[2]<42 : i32>
// CHECK: #[[DIST3:.*]] = distinct[3]<42 : i32>
#distinct1 = distinct[1]<42 : i32>
// CHECK: #[[DIST4:.*]] = distinct[4]<43 : i32>
// CHECK: #[[DIST5:.*]] = distinct[5]<43 : i32>
#distinct2 = distinct[2]<43 : i32>
// CHECK: #[[DIST6:.*]] = distinct[6]<@foo_1>
// CHECK: #[[DIST7:.*]] = distinct[7]<@foo_1>
#distinct3 = distinct[3]<@foo_1>

// Copies made for foo_2
// CHECK: #[[DIST8:.*]] = distinct[8]<42 : i32>
// CHECK: #[[DIST9:.*]] = distinct[9]<42 : i32>
// CHECK: #[[DIST10:.*]] = distinct[10]<43 : i32>
// CHECK: #[[DIST11:.*]] = distinct[11]<@foo_1>

// Copies made for foo_3
// CHECK: #[[DIST12:.*]] = distinct[12]<42 : i32>
// CHECK: #[[DIST13:.*]] = distinct[13]<42 : i32>
// CHECK: #[[DIST14:.*]] = distinct[14]<43 : i32>
// CHECK: #[[DIST15:.*]] = distinct[15]<@foo_1>

// Copies made for foo_4
// CHECK: #[[DIST16:.*]] = distinct[16]<42 : i32>
// CHECK: #[[DIST17:.*]] = distinct[17]<42 : i32>
// CHECK: #[[DIST18:.*]] = distinct[18]<43 : i32>
// CHECK: #[[DIST19:.*]] = distinct[19]<@foo_1>

// CHECK: @foo_1
func.func @foo_1() {
  // CHECK: "test.op"() {distinct.input = #[[DIST0]], distinct.output = #[[DIST1]]}
  "test.op"() {distinct.input = #distinct} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST2]], distinct.output = #[[DIST3]]}
  "test.op"() {distinct.input = #distinct1} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST4]], distinct.output = #[[DIST5]]}
  "test.op"() {distinct.input = #distinct2} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST6]], distinct.output = #[[DIST7]]}
  "test.op"() {distinct.input = #distinct3} : () -> ()
}

func.func @foo_2() {
  // CHECK: "test.op"() {distinct.input = #[[DIST0]], distinct.output = #[[DIST8]]}
  "test.op"() {distinct.input = #distinct} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST2]], distinct.output = #[[DIST9]]}
  "test.op"() {distinct.input = #distinct1} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST4]], distinct.output = #[[DIST10]]}
  "test.op"() {distinct.input = #distinct2} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST6]], distinct.output = #[[DIST11]]}
  "test.op"() {distinct.input = #distinct3} : () -> ()
}

func.func @foo_3() {
  // CHECK: "test.op"() {distinct.input = #[[DIST0]], distinct.output = #[[DIST12]]}
  "test.op"() {distinct.input = #distinct} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST2]], distinct.output = #[[DIST13]]}
  "test.op"() {distinct.input = #distinct1} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST4]], distinct.output = #[[DIST14]]}
  "test.op"() {distinct.input = #distinct2} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST6]], distinct.output = #[[DIST15]]}
  "test.op"() {distinct.input = #distinct3} : () -> ()
}

func.func @foo_4() {
  // CHECK: "test.op"() {distinct.input = #[[DIST0]], distinct.output = #[[DIST16]]}
  "test.op"() {distinct.input = #distinct} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST2]], distinct.output = #[[DIST17]]}
  "test.op"() {distinct.input = #distinct1} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST4]], distinct.output = #[[DIST18]]}
  "test.op"() {distinct.input = #distinct2} : () -> ()
  // CHECK: "test.op"() {distinct.input = #[[DIST6]], distinct.output = #[[DIST19]]}
  "test.op"() {distinct.input = #distinct3} : () -> ()
}