@@ -102,26 +102,34 @@ gpu.module @test_distribution {
102
102
gpu.func @non_splat_constant () {
103
103
// CHECK-DAG: %[[CST:.*]] = arith.constant dense<[0, 16]> : vector<2xindex>
104
104
// CHECK-DAG: %[[SG_ID:.*]] = gpu.subgroup_id : index
105
+ // CHECK-DAG: %[[C8:.*]] = arith.constant 8 : index
106
+ // CHECK-DAG: %[[C1:.*]] = arith.constant 1 : index
107
+ // CHECK-DAG: %[[C1_0:.*]] = arith.constant 1 : index
105
108
// CHECK-DAG: %[[AFF1:.*]] = affine.apply #map4()[%[[SG_ID]]]
106
109
// CHECK-DAG: %[[AFF2:.*]] = affine.apply #map5()[%[[SG_ID]]]
107
110
// CHECK-DAG: %[[C2:.*]] = arith.constant 2 : index
108
111
// CHECK-DAG: %[[MUL:.*]] = index.mul %[[AFF1]], %[[C2]]
112
+ // CHECK-DAG: %[[C1_1:.*]] = arith.constant 1 : index
109
113
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
110
- // CHECK-DAG: %[[C0_0:.*]] = arith.constant 0 : index
111
- // CHECK-DAG: %[[ADD1:.*]] = arith.addi %[[MUL]], %[[C0]] : index
112
- // CHECK-DAG: %[[ADD2:.*]] = arith.addi %[[AFF2]], %[[C0_0]] : index
114
+ // CHECK-DAG: %[[C0_2:.*]] = arith.constant 0 : index
113
115
// CHECK-DAG: %[[C32:.*]] = arith.constant 32 : index
114
- // CHECK-DAG: %[[REM:.*]] = index.remu %[[ADD1]], %[[C32]]
115
- // CHECK-DAG: %[[C1:.*]] = arith.constant 1 : index
116
+ // CHECK-DAG: %[[REM:.*]] = index.remu %[[MUL]], %[[C32]]
117
+ // CHECK-DAG: %[[C1_3:.*]] = arith.constant 1 : index
118
+ // CHECK-DAG: %[[REM2:.*]] = index.remu %[[AFF2]], %[[C1_3]]
116
119
// CHECK-DAG: %[[C16:.*]] = arith.constant 16 : index
117
- // CHECK-DAG: %[[C16_0:.*]] = arith.constant 16 : index
118
- // CHECK-DAG: %[[ADD3:.*]] = arith.addi %[[MUL]], %[[C16]] : index
119
- // CHECK-DAG: %[[REM2:.*]] = index.remu %[[ADD3]], %[[C32]]
120
- // CHECK-DAG: %[[MUL2:.*]] = arith.muli %[[REM]], %[[C16_0]] : index
121
- // CHECK-DAG: %[[SPLAT:.*]] = vector.splat %[[MUL2]] : vector<2xindex>
122
- // CHECK-DAG: %[[MUL3:.*]] = arith.muli %[[REM2]], %[[C16_0]] : index
123
- // CHECK-DAG: %[[SPLAT2:.*]] = vector.splat %[[MUL3]] : vector<2xindex>
124
- // CHECK-DAG: %[[ADD4:.*]] = arith.addi %[[CST]], %[[SPLAT2]] : vector<2xindex>
120
+ // CHECK-DAG: %[[C0_4:.*]] = arith.constant 0 : index
121
+ // CHECK-DAG: %[[ADD:.*]] = arith.addi %[[MUL]], %[[C16]] : index
122
+ // CHECK-DAG: %[[C32_5:.*]] = arith.constant 32 : index
123
+ // CHECK-DAG: %[[REM3:.*]] = index.remu %[[ADD]], %[[C32_5]]
124
+ // CHECK-DAG: %[[C1_6:.*]] = arith.constant 1 : index
125
+ // CHECK-DAG: %[[REM4:.*]] = index.remu %[[AFF2]], %[[C1_6]]
126
+ // CHECK-DAG: %[[C16_7:.*]] = arith.constant 16 : index
127
+ // CHECK-DAG: %[[MUL2:.*]] = arith.muli %[[REM]], %[[C16_7]] : index
128
+ // CHECK-DAG: %[[BCAST:.*]] = vector.broadcast %[[MUL2]] : index to vector<2xindex>
129
+ // CHECK-DAG: %[[ADD2:.*]] = arith.addi %[[CST]], %[[BCAST]] : vector<2xindex>
130
+ // CHECK-DAG: %[[MUL3:.*]] = arith.muli %[[REM3]], %[[C16_7]] : index
131
+ // CHECK-DAG: %[[BCAST2:.*]] = vector.broadcast %[[MUL3]] : index to vector<2xindex>
132
+ // CHECK-DAG: %[[ADD3:.*]] = arith.addi %[[CST]], %[[BCAST2]] : vector<2xindex>
125
133
%cst_2 = arith.constant {layout_result_0 = #xegpu.layout <sg_layout = [8 , 1 ], sg_data = [2 , 1 ]>} dense <[[0 ], [16 ], [32 ], [48 ], [64 ], [80 ], [96 ], [112 ], [128 ], [144 ], [160 ], [176 ], [192 ], [208 ], [224 ], [240 ], [256 ], [272 ], [288 ], [304 ], [320 ], [336 ], [352 ], [368 ], [384 ], [400 ], [416 ], [432 ], [448 ], [464 ], [480 ], [496 ]]> : vector <32 x1 xindex >
126
134
gpu.return
127
135
}
0 commit comments