@@ -353,14 +353,14 @@ genReductionLoop(fir::FirOpBuilder &builder, mlir::func::FuncOp &funcOp,
353
353
// Return the reduction value from the function.
354
354
builder.create <mlir::func::ReturnOp>(loc, results[resultIndex]);
355
355
}
356
- using MinlocBodyOpGeneratorTy = llvm::function_ref<mlir::Value(
356
+ using MinMaxlocBodyOpGeneratorTy = llvm::function_ref<mlir::Value(
357
357
fir::FirOpBuilder &, mlir::Location, const mlir::Type &, mlir::Value,
358
358
mlir::Value, llvm::SmallVector<mlir::Value, Fortran::common::maxRank> &)>;
359
359
360
360
static void genMinMaxlocReductionLoop (
361
361
fir::FirOpBuilder &builder, mlir::func::FuncOp &funcOp,
362
- InitValGeneratorTy initVal, MinlocBodyOpGeneratorTy genBody, unsigned rank ,
363
- mlir::Type elementType, mlir::Location loc, bool hasMask,
362
+ InitValGeneratorTy initVal, MinMaxlocBodyOpGeneratorTy genBody,
363
+ unsigned rank, mlir::Type elementType, mlir::Location loc, bool hasMask,
364
364
mlir::Type maskElemType, mlir::Value resultArr) {
365
365
366
366
mlir::IndexType idxTy = builder.getIndexType ();
@@ -764,10 +764,10 @@ static void genRuntimeMinMaxlocBody(fir::FirOpBuilder &builder,
764
764
loc, elementType, llvm::APFloat::getLargest (sem, /* Negative=*/ isMax));
765
765
}
766
766
unsigned bits = elementType.getIntOrFloatBitWidth ();
767
- int64_t maxInt = (isMax ? llvm::APInt::getSignedMinValue (bits)
768
- : llvm::APInt::getSignedMaxValue (bits))
769
- .getSExtValue ();
770
- return builder.createIntegerConstant (loc, elementType, maxInt );
767
+ int64_t initValue = (isMax ? llvm::APInt::getSignedMinValue (bits)
768
+ : llvm::APInt::getSignedMaxValue (bits))
769
+ .getSExtValue ();
770
+ return builder.createIntegerConstant (loc, elementType, initValue );
771
771
};
772
772
773
773
mlir::Location loc = mlir::UnknownLoc::get (builder.getContext ());
0 commit comments