Skip to content

Commit 13ce5f2

Browse files
authored
[OpenACC] Remove unnecessary uses of getResult, fix cast tests (#161526)
A previous review comment pointed out that operations with only a single result implicitly convert to `mlir::Value`. This patch removes the explicit use of `getResult` where it is unnecessary in OpenACC lowering. However, there ARE a few cases where it is necessary where the `mlir::ValueRange` implicit constructor from a single value is being used, so those are untouched. Additionally, while the previous patch was being committed (#161382), a second patch (#161431) changed the format of cir.casts, so this patch fixes the additional test lines for that as well.
1 parent 50c8e5d commit 13ce5f2

6 files changed

+34
-36
lines changed

clang/lib/CIR/CodeGen/CIRGenOpenACC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ mlir::Value CIRGenFunction::createOpenACCConstantInt(mlir::Location loc,
6262
auto constOp = builder.create<mlir::arith::ConstantOp>(
6363
loc, builder.getIntegerAttr(ty, value));
6464

65-
return constOp.getResult();
65+
return constOp;
6666
}
6767

6868
CIRGenFunction::OpenACCDataOperandInfo

clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class OpenACCClauseCIREmitter final
110110
auto constOp = builder.create<mlir::arith::ConstantOp>(
111111
loc, builder.getIntegerAttr(ty, value));
112112

113-
return constOp.getResult();
113+
return constOp;
114114
}
115115

116116
mlir::Value createConstantInt(SourceLocation loc, unsigned width,
@@ -230,13 +230,13 @@ class OpenACCClauseCIREmitter final
230230
std::is_same_v<AfterOpTy, mlir::acc::DetachOp>) {
231231
// Detach/Delete ops don't have the variable reference here, so they
232232
// take 1 fewer argument to their build function.
233-
afterOp = builder.create<AfterOpTy>(
234-
opInfo.beginLoc, beforeOp.getResult(), structured, implicit,
235-
opInfo.name, opInfo.bounds);
233+
afterOp =
234+
builder.create<AfterOpTy>(opInfo.beginLoc, beforeOp, structured,
235+
implicit, opInfo.name, opInfo.bounds);
236236
} else {
237237
afterOp = builder.create<AfterOpTy>(
238-
opInfo.beginLoc, beforeOp.getResult(), opInfo.varValue, structured,
239-
implicit, opInfo.name, opInfo.bounds);
238+
opInfo.beginLoc, beforeOp, opInfo.varValue, structured, implicit,
239+
opInfo.name, opInfo.bounds);
240240
}
241241
}
242242

@@ -1005,7 +1005,7 @@ class OpenACCClauseCIREmitter final
10051005
/*temporary=*/nullptr, OpenACCReductionOperator::Invalid,
10061006
Decl::castToDeclContext(cgf.curFuncDecl), opInfo.origType,
10071007
opInfo.bounds.size(), opInfo.boundTypes, opInfo.baseType,
1008-
privateOp.getResult());
1008+
privateOp);
10091009
// TODO: OpenACC: The dialect is going to change in the near future to
10101010
// have these be on a different operation, so when that changes, we
10111011
// probably need to change these here.
@@ -1053,7 +1053,7 @@ class OpenACCClauseCIREmitter final
10531053
OpenACCReductionOperator::Invalid,
10541054
Decl::castToDeclContext(cgf.curFuncDecl), opInfo.origType,
10551055
opInfo.bounds.size(), opInfo.boundTypes, opInfo.baseType,
1056-
firstPrivateOp.getResult());
1056+
firstPrivateOp);
10571057

10581058
// TODO: OpenACC: The dialect is going to change in the near future to
10591059
// have these be on a different operation, so when that changes, we
@@ -1101,7 +1101,7 @@ class OpenACCClauseCIREmitter final
11011101
/*temporary=*/nullptr, clause.getReductionOp(),
11021102
Decl::castToDeclContext(cgf.curFuncDecl), opInfo.origType,
11031103
opInfo.bounds.size(), opInfo.boundTypes, opInfo.baseType,
1104-
reductionOp.getResult());
1104+
reductionOp);
11051105

11061106
operation.addReduction(builder.getContext(), reductionOp, recipe);
11071107
}

clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,16 @@ OpenACCRecipeBuilderBase::createBoundsLoop(mlir::Value subscriptedValue,
240240

241241
if (auto arrayTy = dyn_cast<cir::ArrayType>(eltTy))
242242
return builder.getArrayElement(loc, loc, subVal, arrayTy.getElementType(),
243-
idxLoad.getResult(),
243+
idxLoad,
244244
/*shouldDecay=*/true);
245245

246246
assert(isa<cir::PointerType>(eltTy));
247247

248248
auto eltLoad = cir::LoadOp::create(builder, loc, {subVal});
249249

250250
return cir::PtrStrideOp::create(builder, loc, eltLoad.getType(), eltLoad,
251-
idxLoad.getResult())
252-
.getResult();
251+
idxLoad);
252+
253253
};
254254

255255
auto forStmtBuilder = [&]() {
@@ -271,12 +271,11 @@ OpenACCRecipeBuilderBase::createBoundsLoop(mlir::Value subscriptedValue,
271271
if (inverse) {
272272
cir::ConstantOp constOne = builder.getConstInt(loc, itrTy, 1);
273273

274-
auto sub =
275-
cir::BinOp::create(builder, loc, itrTy, cir::BinOpKind::Sub,
276-
ubConversion.getResult(0), constOne.getResult());
274+
auto sub = cir::BinOp::create(builder, loc, itrTy, cir::BinOpKind::Sub,
275+
ubConversion.getResult(0), constOne);
277276

278277
// Upperbound is exclusive, so subtract 1.
279-
builder.CIRBaseBuilderTy::createStore(loc, sub.getResult(), itr);
278+
builder.CIRBaseBuilderTy::createStore(loc, sub, itr);
280279
} else {
281280
// Lowerbound is inclusive, so we can include it.
282281
builder.CIRBaseBuilderTy::createStore(loc, lbConversion.getResult(0),
@@ -294,8 +293,8 @@ OpenACCRecipeBuilderBase::createBoundsLoop(mlir::Value subscriptedValue,
294293
auto loadCur = cir::LoadOp::create(builder, loc, {itr});
295294
// Use 'not equal' since we are just doing an increment/decrement.
296295
auto cmp = builder.createCompare(
297-
loc, inverse ? cir::CmpOpKind::ge : cir::CmpOpKind::lt,
298-
loadCur.getResult(), endItr.getResult(0));
296+
loc, inverse ? cir::CmpOpKind::ge : cir::CmpOpKind::lt, loadCur,
297+
endItr.getResult(0));
299298
builder.createCondition(cmp);
300299
},
301300
/*bodyBuilder=*/
@@ -309,11 +308,10 @@ OpenACCRecipeBuilderBase::createBoundsLoop(mlir::Value subscriptedValue,
309308
/*stepBuilder=*/
310309
[&](mlir::OpBuilder &b, mlir::Location loc) {
311310
auto load = cir::LoadOp::create(builder, loc, {itr});
312-
auto unary = cir::UnaryOp::create(builder, loc, load.getType(),
313-
inverse ? cir::UnaryOpKind::Dec
314-
: cir::UnaryOpKind::Inc,
315-
load.getResult());
316-
builder.CIRBaseBuilderTy::createStore(loc, unary.getResult(), itr);
311+
auto unary = cir::UnaryOp::create(
312+
builder, loc, load.getType(),
313+
inverse ? cir::UnaryOpKind::Dec : cir::UnaryOpKind::Inc, load);
314+
builder.CIRBaseBuilderTy::createStore(loc, unary, itr);
317315
builder.createYield(loc);
318316
});
319317
};

clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-CtorDtor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ void do_things(unsigned A, unsigned B) {
502502
// CHECK-NEXT: %[[UB2_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB2]] : index to !u64i
503503
//
504504
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
505-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!rec_CtorDtor> x 5>>), !cir.ptr<!cir.ptr<!rec_CtorDtor>>
505+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!rec_CtorDtor> x 5>> -> !cir.ptr<!cir.ptr<!rec_CtorDtor>>
506506
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!rec_CtorDtor>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!rec_CtorDtor>>
507507
//
508508
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index
@@ -721,7 +721,7 @@ void do_things(unsigned A, unsigned B) {
721721
// CHECK-NEXT: %[[UB3_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB3]] : index to !u64i
722722
//
723723
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
724-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!rec_CtorDtor>> x 5>>), !cir.ptr<!cir.ptr<!cir.ptr<!rec_CtorDtor>>>
724+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!rec_CtorDtor>> x 5>> -> !cir.ptr<!cir.ptr<!cir.ptr<!rec_CtorDtor>>>
725725
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!cir.ptr<!rec_CtorDtor>>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!cir.ptr<!rec_CtorDtor>>>
726726
//
727727
// CHECK-NEXT: %[[UB2:.*]] = acc.get_upperbound %[[BOUND2]] : (!acc.data_bounds_ty) -> index
@@ -882,7 +882,7 @@ void do_things(unsigned A, unsigned B) {
882882
// CHECK-NEXT: %[[UB2_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB2]] : index to !u64i
883883
//
884884
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
885-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!rec_CtorDtor>> x 5>>), !cir.ptr<!cir.ptr<!cir.ptr<!rec_CtorDtor>>>
885+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!rec_CtorDtor>> x 5>> -> !cir.ptr<!cir.ptr<!cir.ptr<!rec_CtorDtor>>>
886886
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!cir.ptr<!rec_CtorDtor>>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!cir.ptr<!rec_CtorDtor>>>
887887
//
888888
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index
@@ -1281,7 +1281,7 @@ void do_things(unsigned A, unsigned B) {
12811281
// CHECK-NEXT: %[[NUM_ELTS:.*]] = cir.binop(mul, %[[UB2_CAST]], %[[UB3_CAST]]) : !u64i
12821282
//
12831283
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
1284-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[ARR_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!rec_CtorDtor> x 5>>), !cir.ptr<!cir.ptr<!rec_CtorDtor>>
1284+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[ARR_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!rec_CtorDtor> x 5>> -> !cir.ptr<!cir.ptr<!rec_CtorDtor>>
12851285
// CHECK-NEXT: %[[STRIDE:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!rec_CtorDtor>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!rec_CtorDtor>>
12861286
//
12871287
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index

clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-NoOps.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ void do_things(unsigned A, unsigned B) {
330330
// CHECK-NEXT: %[[UB2_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB2]] : index to !u64i
331331
//
332332
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
333-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!rec_NoOps> x 5>>), !cir.ptr<!cir.ptr<!rec_NoOps>>
333+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!rec_NoOps> x 5>> -> !cir.ptr<!cir.ptr<!rec_NoOps>>
334334
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!rec_NoOps>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!rec_NoOps>>
335335
//
336336
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index
@@ -440,7 +440,7 @@ void do_things(unsigned A, unsigned B) {
440440
// CHECK-NEXT: %[[UB3_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB3]] : index to !u64i
441441
//
442442
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
443-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!rec_NoOps>> x 5>>), !cir.ptr<!cir.ptr<!cir.ptr<!rec_NoOps>>>
443+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!rec_NoOps>> x 5>> -> !cir.ptr<!cir.ptr<!cir.ptr<!rec_NoOps>>>
444444
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!cir.ptr<!rec_NoOps>>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!cir.ptr<!rec_NoOps>>>
445445
//
446446
// CHECK-NEXT: %[[UB2:.*]] = acc.get_upperbound %[[BOUND2]] : (!acc.data_bounds_ty) -> index
@@ -521,7 +521,7 @@ void do_things(unsigned A, unsigned B) {
521521
// CHECK-NEXT: %[[UB2_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB2]] : index to !u64i
522522
//
523523
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
524-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!rec_NoOps>> x 5>>), !cir.ptr<!cir.ptr<!cir.ptr<!rec_NoOps>>>
524+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!rec_NoOps>> x 5>> -> !cir.ptr<!cir.ptr<!cir.ptr<!rec_NoOps>>>
525525
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!cir.ptr<!rec_NoOps>>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!cir.ptr<!rec_NoOps>>>
526526
//
527527
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index
@@ -767,7 +767,7 @@ void do_things(unsigned A, unsigned B) {
767767
// CHECK-NEXT: %[[NUM_ELTS:.*]] = cir.binop(mul, %[[UB2_CAST]], %[[UB3_CAST]]) : !u64i
768768
//
769769
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
770-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[ARR_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!rec_NoOps> x 5>>), !cir.ptr<!cir.ptr<!rec_NoOps>>
770+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[ARR_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!rec_NoOps> x 5>> -> !cir.ptr<!cir.ptr<!rec_NoOps>>
771771
// CHECK-NEXT: %[[STRIDE:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!rec_NoOps>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!rec_NoOps>>
772772
//
773773
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index

clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-int.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ void do_things(unsigned A, unsigned B) {
327327
// CHECK-NEXT: %[[UB2_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB2]] : index to !u64i
328328
//
329329
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
330-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!s32i> x 5>>), !cir.ptr<!cir.ptr<!s32i>>
330+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!s32i> x 5>> -> !cir.ptr<!cir.ptr<!s32i>>
331331
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!s32i>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!s32i>>
332332
//
333333
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index
@@ -437,7 +437,7 @@ void do_things(unsigned A, unsigned B) {
437437
// CHECK-NEXT: %[[UB3_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB3]] : index to !u64i
438438
//
439439
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
440-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!s32i>> x 5>>), !cir.ptr<!cir.ptr<!cir.ptr<!s32i>>>
440+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!s32i>> x 5>> -> !cir.ptr<!cir.ptr<!cir.ptr<!s32i>>>
441441
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!cir.ptr<!s32i>>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!cir.ptr<!s32i>>>
442442
//
443443
// CHECK-NEXT: %[[UB2:.*]] = acc.get_upperbound %[[BOUND2]] : (!acc.data_bounds_ty) -> index
@@ -518,7 +518,7 @@ void do_things(unsigned A, unsigned B) {
518518
// CHECK-NEXT: %[[UB2_CAST:.*]] = builtin.unrealized_conversion_cast %[[UB2]] : index to !u64i
519519
//
520520
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
521-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!s32i>> x 5>>), !cir.ptr<!cir.ptr<!cir.ptr<!s32i>>>
521+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[TL_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!cir.ptr<!s32i>> x 5>> -> !cir.ptr<!cir.ptr<!cir.ptr<!s32i>>>
522522
// CHECK-NEXT: %[[TL_DEREF:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!cir.ptr<!s32i>>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!cir.ptr<!s32i>>>
523523
//
524524
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index
@@ -765,7 +765,7 @@ void do_things(unsigned A, unsigned B) {
765765
// CHECK-NEXT: %[[NUM_ELTS:.*]] = cir.binop(mul, %[[UB2_CAST]], %[[UB3_CAST]]) : !u64i
766766
//
767767
// CHECK-NEXT: %[[ZERO:.*]] = cir.const #cir.int<0> : !u64i
768-
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast(array_to_ptrdecay, %[[ARR_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!s32i> x 5>>), !cir.ptr<!cir.ptr<!s32i>>
768+
// CHECK-NEXT: %[[DECAY:.*]] = cir.cast array_to_ptrdecay %[[ARR_ALLOCA]] : !cir.ptr<!cir.array<!cir.ptr<!s32i> x 5>> -> !cir.ptr<!cir.ptr<!s32i>>
769769
// CHECK-NEXT: %[[STRIDE:.*]] = cir.ptr_stride(%[[DECAY]] : !cir.ptr<!cir.ptr<!s32i>>, %[[ZERO]] : !u64i), !cir.ptr<!cir.ptr<!s32i>>
770770
//
771771
// CHECK-NEXT: %[[UB1:.*]] = acc.get_upperbound %[[BOUND1]] : (!acc.data_bounds_ty) -> index

0 commit comments

Comments
 (0)