@@ -473,8 +473,9 @@ gpu.module @test_distribution {
473473 // CHECK-DAG: %[[IDY:.*]] = index.remu %{{.*}}, %[[C32:.*]]
474474 // CHECK-DAG: %[[IDX:.*]] = index.remu %{{.*}}, %[[C1:.*]]
475475 // CHECK-DAG: %[[STRIDECOL:.*]] = arith.muli %[[IDY]], %[[C16:.*]] : index
476+ // CHECK-DAG: %[[ADD:.*]] = arith.addi %[[C0:.*]], %[[STRIDECOL]] : index
476477 // CHECK-DAG: %[[STRIDEROW:.*]] = arith.muli %[[IDX]], %[[C0:.*]] : index
477- // CHECK-DAG: %[[ADDSTRIDES:.*]] = arith.addi %[[STRIDECOL ]], %[[STRIDEROW]] : index
478+ // CHECK-DAG: %[[ADDSTRIDES:.*]] = arith.addi %[[ADD ]], %[[STRIDEROW]] : index
478479 // CHECK-DAG: %[[BCAST:.*]] = vector.broadcast %[[ADDSTRIDES]] : index to vector<1x1xindex>
479480 // CHECK-DAG: arith.addi %[[CST]], %[[BCAST]] : vector<1x1xindex>
480481 %cst = arith.constant {layout_result_0 = #xegpu.layout <sg_layout = [32 , 1 ], sg_data = [1 , 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 >
@@ -494,9 +495,10 @@ gpu.module @test_distribution {
494495 // CHECK-DAG: %[[C8_2:.*]] = arith.constant 8 : index
495496 // CHECK-DAG: %[[REMU_X:.*]] = index.remu %[[MULX]], %[[C8:.*]]
496497 // CHECK-DAG: %[[MUL5:.*]] = arith.muli %[[REMU_Y]], %[[C8:.*]] : index
498+ // CHECK-DAG: %[[ADD:.*]] = arith.addi %[[C0:.*]], %[[MUL5]] : index
497499 // CHECK-DAG: %[[MUL6:.*]] = arith.muli %[[REMU_X]], %[[C16:.*]] : index
498- // CHECK-DAG: %[[ADDIDX :.*]] = arith.addi %[[MUL5 ]], %[[MUL6]] : index
499- // CHECK-DAG: %[[BCAST:.*]] = vector.broadcast %[[ADDIDX ]] : index to vector<2x2xindex>
500+ // CHECK-DAG: %[[ADDSTRIDES :.*]] = arith.addi %[[ADD ]], %[[MUL6]] : index
501+ // CHECK-DAG: %[[BCAST:.*]] = vector.broadcast %[[ADDSTRIDES ]] : index to vector<2x2xindex>
500502 // CHECK-DAG: %[[ADDCST:.*]] = arith.addi %[[BASECST]], %[[BCAST]] : vector<2x2xindex>
501503 %cst_8x8 = arith.constant {layout_result_0 = #xegpu.layout <sg_layout = [4 , 4 ], sg_data = [2 , 2 ]>} dense <[
502504 [0 , 16 , 32 , 48 , 64 , 80 , 96 , 112 ],
@@ -517,7 +519,8 @@ gpu.module @test_distribution {
517519 // CHECK-DAG: %[[SGID:.*]] = gpu.subgroup_id : index
518520 // CHECK-DAG: %[[REMU:.*]] = index.remu %[[SGID]], %[[C32:.*]]
519521 // CHECK-DAG: %[[MUL:.*]] = arith.muli %[[REMU]], %[[C16:.*]] : index
520- // CHECK-DAG: %[[BCAST:.*]] = vector.broadcast %[[MUL]] : index to vector<1xindex>
522+ // CHECK-DAG: %[[ADDSTRIDES:.*]] = arith.addi %[[C0:.*]], %[[MUL]] : index
523+ // CHECK-DAG: %[[BCAST:.*]] = vector.broadcast %[[ADDSTRIDES]] : index to vector<1xindex>
521524 // CHECK-DAG: %[[ADD:.*]] = arith.addi %[[CST]], %[[BCAST]] : vector<1xindex>
522525 %cst = arith.constant {layout_result_0 = #xegpu.layout <sg_layout = [32 ], sg_data = [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 xindex >
523526 // CHECK: arith.constant dense<{{\[}}[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]{{\]}}> : vector<1x16xindex>
0 commit comments