[flang-commits] [flang] [Flang] Minloc elemental intrinsic lowering (PR #74828)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Mon Dec 18 13:37:33 PST 2023


================
@@ -523,27 +475,12 @@ genMinlocReductionLoop(fir::FirOpBuilder &builder, mlir::func::FuncOp &funcOp,
   // Load output array with 1s instead of 0s
   for (unsigned int i = 0; i < rank; ++i) {
     mlir::Type resultRefTy = builder.getRefType(resultElemType);
-    // mlir::Value one = builder.createIntegerConstant(loc, resultElemType, 1);
     mlir::Value index = builder.createIntegerConstant(loc, idxTy, i);
     mlir::Value resultElemAddr =
         builder.create<fir::CoordinateOp>(loc, resultRefTy, resultArr, index);
----------------
vzakhari wrote:

I would prefer this to be done via `DesignateOp` for the HLFIR path.

https://github.com/llvm/llvm-project/pull/74828


More information about the flang-commits mailing list