Skip to content

Commit 55c64d4

Browse files
committed
More cleanup
1 parent c5df064 commit 55c64d4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

flang/lib/Optimizer/Builder/IntrinsicCall.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3186,30 +3186,30 @@ IntrinsicLibrary::genAtomicAddVector(mlir::Type resultType,
31863186
if (mlir::isa<fir::BaseBoxType>(a.getType())) {
31873187
a = fir::BoxAddrOp::create(builder, loc, a);
31883188
}
3189-
auto i32Ty = builder.getI32Type();
31903189
auto vecTy = mlir::VectorType::get({2}, resultType);
3191-
mlir::Type idxTy = builder.getIndexType();
31923190
auto refTy = fir::ReferenceType::get(resultType);
3193-
auto zero = builder.createIntegerConstant(loc, idxTy, 0);
3194-
auto one = builder.createIntegerConstant(loc, idxTy, 1);
3195-
auto v1Coord = fir::CoordinateOp::create(builder, loc, refTy,
3191+
mlir::Type i32Ty = builder.getI32Type();
3192+
mlir::Type idxTy = builder.getIndexType();
3193+
mlir::Value zero = builder.createIntegerConstant(loc, idxTy, 0);
3194+
mlir::Value one = builder.createIntegerConstant(loc, idxTy, 1);
3195+
mlir::Value v1Coord = fir::CoordinateOp::create(builder, loc, refTy,
31963196
fir::getBase(args[1]), zero);
3197-
auto v2Coord = fir::CoordinateOp::create(builder, loc, refTy,
3197+
mlir::Value v2Coord = fir::CoordinateOp::create(builder, loc, refTy,
31983198
fir::getBase(args[1]), one);
3199-
auto v1 = fir::LoadOp::create(builder, loc, v1Coord);
3200-
auto v2 = fir::LoadOp::create(builder, loc, v2Coord);
3199+
mlir::Value v1 = fir::LoadOp::create(builder, loc, v1Coord);
3200+
mlir::Value v2 = fir::LoadOp::create(builder, loc, v2Coord);
32013201
mlir::Value undef = mlir::LLVM::UndefOp::create(builder, loc, vecTy);
32023202
mlir::Value vec1 = mlir::LLVM::InsertElementOp::create(
32033203
builder, loc, undef, v1, builder.createIntegerConstant(loc, i32Ty, 0));
32043204
mlir::Value vec2 = mlir::LLVM::InsertElementOp::create(
32053205
builder, loc, vec1, v2, builder.createIntegerConstant(loc, i32Ty, 1));
3206-
auto add = genAtomBinOp(builder, loc, mlir::LLVM::AtomicBinOp::fadd, a, vec2);
3207-
auto r1 = mlir::LLVM::ExtractElementOp::create(
3206+
mlir::Value add = genAtomBinOp(builder, loc, mlir::LLVM::AtomicBinOp::fadd, a, vec2);
3207+
mlir::Value r1 = mlir::LLVM::ExtractElementOp::create(
32083208
builder, loc, add, builder.createIntegerConstant(loc, i32Ty, 0));
3209-
auto r2 = mlir::LLVM::ExtractElementOp::create(
3209+
mlir::Value r2 = mlir::LLVM::ExtractElementOp::create(
32103210
builder, loc, add, builder.createIntegerConstant(loc, i32Ty, 1));
3211-
auto c1 = fir::CoordinateOp::create(builder, loc, refTy, res, zero);
3212-
auto c2 = fir::CoordinateOp::create(builder, loc, refTy, res, one);
3211+
mlir::Value c1 = fir::CoordinateOp::create(builder, loc, refTy, res, zero);
3212+
mlir::Value c2 = fir::CoordinateOp::create(builder, loc, refTy, res, one);
32133213
fir::StoreOp::create(builder, loc, r1, c1);
32143214
fir::StoreOp::create(builder, loc, r2, c2);
32153215
mlir::Value ext = builder.createIntegerConstant(loc, idxTy, 2);

0 commit comments

Comments
 (0)