Skip to content

Commit 07a9eb3

Browse files
committed
Fix dst src in copy function
1 parent df6bd42 commit 07a9eb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/lib/Optimizer/OpenMP/LowerWorkshare.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ static mlir::func::FuncOp createCopyFunc(mlir::Location loc, mlir::Type varType,
162162
{loc, loc});
163163
builder.setInsertionPointToStart(&funcOp.getRegion().back());
164164

165-
Value loaded = builder.create<fir::LoadOp>(loc, funcOp.getArgument(0));
166-
builder.create<fir::StoreOp>(loc, loaded, funcOp.getArgument(1));
165+
Value loaded = builder.create<fir::LoadOp>(loc, funcOp.getArgument(1));
166+
builder.create<fir::StoreOp>(loc, loaded, funcOp.getArgument(0));
167167

168168
builder.create<mlir::func::ReturnOp>(loc);
169169
return funcOp;

0 commit comments

Comments
 (0)