[flang-commits] [flang] [flang] Inline hlfir.copy_in for trivial types (PR #138718)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Jun 6 06:05:10 PDT 2025
================
@@ -967,6 +969,15 @@ hlfir::LoopNest hlfir::genLoopNest(mlir::Location loc,
auto ub = builder.createConvert(loc, indexType, extent);
auto doLoop =
builder.create<fir::DoLoopOp>(loc, one, ub, one, isUnordered);
+ if (!couldVectorize) {
+ mlir::LLVM::LoopVectorizeAttr va{mlir::LLVM::LoopVectorizeAttr::get(
+ builder.getContext(),
+ /*disable=*/builder.getBoolAttr(true), {}, {}, {}, {}, {}, {})};
+ mlir::LLVM::LoopAnnotationAttr la = mlir::LLVM::LoopAnnotationAttr::get(
+ builder.getContext(), {}, /*vectorize=*/va, {}, /*unroll*/ {},
+ /*unroll_and_jam*/ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {});
+ doLoop.setLoopAnnotationAttr(la);
+ }
----------------
tblah wrote:
No that's okay. Thanks!
https://github.com/llvm/llvm-project/pull/138718
More information about the flang-commits
mailing list