@@ -878,7 +878,8 @@ struct ConvertOpConversion : public fir::FIROpConversion<fir::ConvertOp> {
878
878
auto rc = convertFpToFp (rp, fromBits, toBits, nt);
879
879
auto ic = convertFpToFp (ip, fromBits, toBits, nt);
880
880
auto un = mlir::LLVM::UndefOp::create (rewriter, loc, toTy);
881
- auto i1 = mlir::LLVM::InsertValueOp::create (rewriter, loc, un, rc, 0 );
881
+ llvm::SmallVector<int64_t > pos{0 };
882
+ auto i1 = mlir::LLVM::InsertValueOp::create (rewriter, loc, un, rc, pos);
882
883
rewriter.replaceOpWithNewOp <mlir::LLVM::InsertValueOp>(convert, i1, ic,
883
884
1 );
884
885
return mlir::success ();
@@ -1038,8 +1039,9 @@ struct EmboxCharOpConversion : public fir::FIROpConversion<fir::EmboxCharOp> {
1038
1039
charBuffer =
1039
1040
mlir::LLVM::BitcastOp::create (rewriter, loc, addrTy, charBuffer);
1040
1041
1042
+ llvm::SmallVector<int64_t > pos{0 };
1041
1043
auto insertBufferOp = mlir::LLVM::InsertValueOp::create (
1042
- rewriter, loc, llvmStruct, charBuffer, 0 );
1044
+ rewriter, loc, llvmStruct, charBuffer, pos );
1043
1045
rewriter.replaceOpWithNewOp <mlir::LLVM::InsertValueOp>(
1044
1046
emboxChar, insertBufferOp, lenAfterCast, 1 );
1045
1047
@@ -3888,7 +3890,8 @@ complexSum(OPTY sumop, mlir::ValueRange opnds,
3888
3890
auto rx = LLVMOP::create (rewriter, loc, eleTy, x0, x1, fmf);
3889
3891
auto ry = LLVMOP::create (rewriter, loc, eleTy, y0, y1, fmf);
3890
3892
auto r0 = mlir::LLVM::UndefOp::create (rewriter, loc, ty);
3891
- auto r1 = mlir::LLVM::InsertValueOp::create (rewriter, loc, r0, rx, 0 );
3893
+ llvm::SmallVector<int64_t > pos{0 };
3894
+ auto r1 = mlir::LLVM::InsertValueOp::create (rewriter, loc, r0, rx, pos);
3892
3895
return mlir::LLVM::InsertValueOp::create (rewriter, loc, r1, ry, 1 );
3893
3896
}
3894
3897
} // namespace
@@ -3951,7 +3954,8 @@ struct MulcOpConversion : public fir::FIROpConversion<fir::MulcOp> {
3951
3954
auto yy = mlir::LLVM::FMulOp::create (rewriter, loc, eleTy, y0, y1, fmf);
3952
3955
auto rr = mlir::LLVM::FSubOp::create (rewriter, loc, eleTy, xx, yy, fmf);
3953
3956
auto ra = mlir::LLVM::UndefOp::create (rewriter, loc, ty);
3954
- auto r1 = mlir::LLVM::InsertValueOp::create (rewriter, loc, ra, rr, 0 );
3957
+ llvm::SmallVector<int64_t > pos{0 };
3958
+ auto r1 = mlir::LLVM::InsertValueOp::create (rewriter, loc, ra, rr, pos);
3955
3959
auto r0 = mlir::LLVM::InsertValueOp::create (rewriter, loc, r1, ri, 1 );
3956
3960
rewriter.replaceOp (mulc, r0.getResult ());
3957
3961
return mlir::success ();
@@ -3991,7 +3995,8 @@ struct DivcOpConversion : public fir::FIROpConversion<fir::DivcOp> {
3991
3995
auto rr = mlir::LLVM::FDivOp::create (rewriter, loc, eleTy, rrn, d, fmf);
3992
3996
auto ri = mlir::LLVM::FDivOp::create (rewriter, loc, eleTy, rin, d, fmf);
3993
3997
auto ra = mlir::LLVM::UndefOp::create (rewriter, loc, ty);
3994
- auto r1 = mlir::LLVM::InsertValueOp::create (rewriter, loc, ra, rr, 0 );
3998
+ llvm::SmallVector<int64_t > pos{0 };
3999
+ auto r1 = mlir::LLVM::InsertValueOp::create (rewriter, loc, ra, rr, pos);
3995
4000
auto r0 = mlir::LLVM::InsertValueOp::create (rewriter, loc, r1, ri, 1 );
3996
4001
rewriter.replaceOp (divc, r0.getResult ());
3997
4002
return mlir::success ();
@@ -4014,7 +4019,8 @@ struct NegcOpConversion : public fir::FIROpConversion<fir::NegcOp> {
4014
4019
auto ip = mlir::LLVM::ExtractValueOp::create (rewriter, loc, o0, 1 );
4015
4020
auto nrp = mlir::LLVM::FNegOp::create (rewriter, loc, eleTy, rp);
4016
4021
auto nip = mlir::LLVM::FNegOp::create (rewriter, loc, eleTy, ip);
4017
- auto r = mlir::LLVM::InsertValueOp::create (rewriter, loc, o0, nrp, 0 );
4022
+ llvm::SmallVector<int64_t > pos{0 };
4023
+ auto r = mlir::LLVM::InsertValueOp::create (rewriter, loc, o0, nrp, pos);
4018
4024
rewriter.replaceOpWithNewOp <mlir::LLVM::InsertValueOp>(neg, r, nip, 1 );
4019
4025
return mlir::success ();
4020
4026
}
0 commit comments