Skip to content

Commit 20b933b

Browse files
committed
Lowering for EOSHIFT intrinsic
- added implementation for lowering of the EOSHIFT intrinsic - added tests for this implementation
1 parent 110fefa commit 20b933b

File tree

5 files changed

+301
-0
lines changed

5 files changed

+301
-0
lines changed

flang/include/flang/Optimizer/Builder/Runtime/Transformational.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ void genCshiftVector(fir::FirOpBuilder &builder, mlir::Location loc,
2727
mlir::Value resultBox, mlir::Value arrayBox,
2828
mlir::Value shiftBox);
2929

30+
void genEoshift(fir::FirOpBuilder &builder, mlir::Location loc,
31+
mlir::Value resultBox, mlir::Value arrayBox,
32+
mlir::Value shiftBox, mlir::Value boundBox, mlir::Value dimBox);
33+
34+
void genEoshiftVector(fir::FirOpBuilder &builder, mlir::Location loc,
35+
mlir::Value resultBox, mlir::Value arrayBox,
36+
mlir::Value shiftBox, mlir::Value boundBox);
37+
3038
void genMatmul(fir::FirOpBuilder &builder, mlir::Location loc,
3139
mlir::Value matrixABox, mlir::Value matrixBBox,
3240
mlir::Value resultBox);

flang/lib/Lower/IntrinsicCall.cpp

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ struct IntrinsicLibrary {
457457
fir::ExtendedValue genDotProduct(mlir::Type,
458458
llvm::ArrayRef<fir::ExtendedValue>);
459459
mlir::Value genDprod(mlir::Type, llvm::ArrayRef<mlir::Value>);
460+
fir::ExtendedValue genEoshift(mlir::Type, llvm::ArrayRef<fir::ExtendedValue>);
460461
mlir::Value genExponent(mlir::Type, llvm::ArrayRef<mlir::Value>);
461462
template <Extremum, ExtremumBehavior>
462463
mlir::Value genExtremum(mlir::Type, llvm::ArrayRef<mlir::Value>);
@@ -681,6 +682,13 @@ static constexpr IntrinsicHandler handlers[]{
681682
{{{"vector_a", asAddr}, {"vector_b", asAddr}}},
682683
/*isElemental=*/false},
683684
{"dprod", &I::genDprod},
685+
{"eoshift",
686+
&I::genEoshift,
687+
{{{"array", asAddr},
688+
{"shift", asAddr},
689+
{"boundary", asValue},
690+
{"dim", asValue}}},
691+
/*isElemental=*/false},
684692
{"exponent", &I::genExponent},
685693
{"floor", &I::genFloor},
686694
{"fraction", &I::genFraction},
@@ -2123,6 +2131,92 @@ mlir::Value IntrinsicLibrary::genDprod(mlir::Type resultType,
21232131
return builder.create<mlir::MulFOp>(loc, a, b);
21242132
}
21252133

2134+
// EOSHIFT
2135+
fir::ExtendedValue
2136+
IntrinsicLibrary::genEoshift(mlir::Type resultType,
2137+
llvm::ArrayRef<fir::ExtendedValue> args) {
2138+
assert(args.size() == 4);
2139+
2140+
// Handle required ARRAY argument
2141+
fir::BoxValue arrayBox = builder.createBox(loc, args[0]);
2142+
auto array = fir::getBase(arrayBox);
2143+
auto arrayRank = arrayBox.rank();
2144+
2145+
// Create mutable fir.box to be passed to the runtime for the result.
2146+
auto resultArrayType = builder.getVarLenSeqTy(resultType, arrayRank);
2147+
auto resultMutableBox =
2148+
fir::factory::createTempMutableBox(builder, loc, resultArrayType);
2149+
auto resultIrBox =
2150+
fir::factory::getMutableIRBox(builder, loc, resultMutableBox);
2151+
2152+
// Handle optional BOUNDARY argument
2153+
mlir::Type arrayEleTy = arrayBox.getEleTy();
2154+
mlir::Value boundary = nullptr;
2155+
2156+
if (isAbsent(args[2])) {
2157+
if (arrayEleTy.isa<mlir::IntegerType>() ||
2158+
arrayEleTy.isa<mlir::FloatType>() ||
2159+
arrayEleTy.isa<fir::LogicalType>()) {
2160+
// fill in with appropriate number of 0 or .false.
2161+
auto zero = builder.createIntegerConstant(loc, builder.getIndexType(), 0);
2162+
auto temp = builder.createTemporary(loc, arrayEleTy);
2163+
auto cast = builder.createConvert(loc, arrayEleTy, zero);
2164+
builder.create<fir::StoreOp>(loc, cast, temp);
2165+
boundary = builder.createBox(loc, temp);
2166+
} else if (arrayEleTy.isa<fir::CharacterType>()) {
2167+
// fill in with appropriate number of blanks
2168+
fir::factory::CharacterExprHelper helper{builder, loc};
2169+
fir::CharacterType charTy = helper.getCharacterType(arrayEleTy);
2170+
fir::CharBoxValue temp =
2171+
helper.createCharacterTemp(arrayEleTy, charTy.getLen());
2172+
auto zero = builder.createIntegerConstant(loc, builder.getIndexType(), 0);
2173+
auto len = builder.createIntegerConstant(
2174+
loc, builder.getCharacterLengthType(), charTy.getLen());
2175+
2176+
helper.createPadding(temp, zero, len);
2177+
2178+
boundary = builder.createBox(loc, temp);
2179+
} else
2180+
fir::emitFatalError(loc, "bad type for EOSHIFT");
2181+
} else {
2182+
if (arrayEleTy.isa<mlir::IntegerType>() ||
2183+
arrayEleTy.isa<mlir::FloatType>() ||
2184+
arrayEleTy.isa<fir::LogicalType>()) {
2185+
auto temp = builder.createTemporary(loc, arrayEleTy);
2186+
auto cast = builder.createConvert(loc, arrayEleTy, fir::getBase(args[2]));
2187+
builder.create<fir::StoreOp>(loc, cast, temp);
2188+
boundary = builder.createBox(loc, temp);
2189+
} else if (arrayEleTy.isa<fir::CharacterType>())
2190+
boundary = builder.createBox(loc, args[2]);
2191+
else
2192+
fir::emitFatalError(loc, "bad type for EOSHIFT");
2193+
}
2194+
2195+
if (arrayRank == 1) {
2196+
// Vector case
2197+
// Handle required SHIFT argument as a scalar
2198+
auto shiftAddr = args[1].getUnboxed();
2199+
assert(shiftAddr && "nonscalar EOSHIFT SHIFT argument");
2200+
auto shift = builder.create<fir::LoadOp>(loc, *shiftAddr);
2201+
fir::runtime::genEoshiftVector(builder, loc, resultIrBox, array, shift,
2202+
boundary);
2203+
} else {
2204+
// Non-vector case
2205+
// Handle required SHIFT argument as an array
2206+
auto shift = builder.createBox(loc, args[1]);
2207+
2208+
// Handle optional DIM argument
2209+
auto dim =
2210+
isAbsent(args[3])
2211+
? builder.createIntegerConstant(loc, builder.getIndexType(), 1)
2212+
: fir::getBase(args[3]);
2213+
fir::runtime::genEoshift(builder, loc, resultIrBox, array, shift, boundary,
2214+
dim);
2215+
}
2216+
return readAndAddCleanUp(resultMutableBox, resultType,
2217+
"unexpected result for EOSHIFT");
2218+
}
2219+
21262220
// EXPONENT
21272221
mlir::Value IntrinsicLibrary::genExponent(mlir::Type resultType,
21282222
llvm::ArrayRef<mlir::Value> args) {

flang/lib/Optimizer/Builder/Runtime/Transformational.cpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,42 @@ void fir::runtime::genCshiftVector(fir::FirOpBuilder &builder,
5050
builder.create<fir::CallOp>(loc, cshiftFunc, args);
5151
}
5252

53+
/// Generate call to Eoshift intrinsic
54+
void fir::runtime::genEoshift(fir::FirOpBuilder &builder, mlir::Location loc,
55+
mlir::Value resultBox, mlir::Value arrayBox,
56+
mlir::Value shiftBox, mlir::Value boundBox,
57+
mlir::Value dimBox) {
58+
auto eoshiftFunc =
59+
fir::runtime::getRuntimeFunc<mkRTKey(Eoshift)>(loc, builder);
60+
auto fTy = eoshiftFunc.getType();
61+
auto sourceFile = fir::factory::locationToFilename(builder, loc);
62+
auto sourceLine =
63+
fir::factory::locationToLineNo(builder, loc, fTy.getInput(6));
64+
auto args = fir::runtime::createArguments(builder, loc, fTy, resultBox,
65+
arrayBox, shiftBox, boundBox,
66+
dimBox, sourceFile, sourceLine);
67+
builder.create<fir::CallOp>(loc, eoshiftFunc, args);
68+
}
69+
70+
/// Generate call to the vector version of the Eoshift intrinsic
71+
void fir::runtime::genEoshiftVector(fir::FirOpBuilder &builder,
72+
mlir::Location loc, mlir::Value resultBox,
73+
mlir::Value arrayBox, mlir::Value shiftBox,
74+
mlir::Value boundBox) {
75+
auto eoshiftFunc =
76+
fir::runtime::getRuntimeFunc<mkRTKey(EoshiftVector)>(loc, builder);
77+
auto fTy = eoshiftFunc.getType();
78+
79+
auto sourceFile = fir::factory::locationToFilename(builder, loc);
80+
auto sourceLine =
81+
fir::factory::locationToLineNo(builder, loc, fTy.getInput(5));
82+
83+
auto args =
84+
fir::runtime::createArguments(builder, loc, fTy, resultBox, arrayBox,
85+
shiftBox, boundBox, sourceFile, sourceLine);
86+
builder.create<fir::CallOp>(loc, eoshiftFunc, args);
87+
}
88+
5389
/// Generate call to Matmul intrinsic runtime routine.
5490
void fir::runtime::genMatmul(fir::FirOpBuilder &builder, mlir::Location loc,
5591
mlir::Value resultBox, mlir::Value matrixABox,

flang/test/Intrinsics/eoshift.f90

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
! RUN: bbc %s -o - | FileCheck %s
2+
3+
! CHECK: _QQmain
4+
program test_eoshift
5+
integer, dimension(3,3) :: a
6+
real, dimension(3,3) :: b
7+
logical, dimension(3,3) :: c
8+
character(3), dimension(3,3) :: d
9+
integer, dimension(3) :: v
10+
11+
! INTEGER vector
12+
v = (/ 1, 2, 3 /)
13+
print '(3i3)', v
14+
15+
v = EOSHIFT(v, SHIFT=1, BOUNDARY=-1)
16+
print *
17+
print '(3i3)', v
18+
19+
! INTEGER array
20+
a = reshape( (/ 1, 2, 3, 4, 5, 6, 7, 8, 9 /), (/ 3, 3 /))
21+
print *
22+
print '(3i3)', a(1,:)
23+
print '(3i3)', a(2,:)
24+
print '(3i3)', a(3,:)
25+
26+
a = EOSHIFT(a, SHIFT=(/1, 2, 1/), BOUNDARY=-5, DIM=2)
27+
print *
28+
print '(3i3)', a(1,:)
29+
print '(3i3)', a(2,:)
30+
print '(3i3)', a(3,:)
31+
32+
! REAL array
33+
b = reshape( (/ 1., 2., 3., 4., 5., 6., 7., 8., 9. /), (/ 3, 3 /))
34+
print *
35+
print '(3f5.1)', b(1,:)
36+
print '(3f5.1)', b(2,:)
37+
print '(3f5.1)', b(3,:)
38+
39+
b = EOSHIFT(b, SHIFT=(/1, 2, 1/), BOUNDARY=-1.0, DIM=1)
40+
print *
41+
print '(3f5.1)', b(1,:)
42+
print '(3f5.1)', b(2,:)
43+
print '(3f5.1)', b(3,:)
44+
45+
! LOGICAL array, no BOUNDARY or DIM given
46+
c = reshape( (/ .true., .true., .true., .true., .true., .true., .true., .true., .true. /), (/ 3, 3 /))
47+
print *
48+
print '(3l3)', c(1,:)
49+
print '(3l3)', c(2,:)
50+
print '(3l3)', c(3,:)
51+
52+
c = EOSHIFT(c, SHIFT=(/1, 2, 1/))
53+
print *
54+
print '(3l3)', c(1,:)
55+
print '(3l3)', c(2,:)
56+
print '(3l3)', c(3,:)
57+
58+
! CHARACTER array, no BOUNDARY or DIM given
59+
d = reshape( (/ "foo", "foo", "foo", "bar", "bar", "bar", "baz", "baz", "baz" /), (/ 3, 3 /))
60+
print *
61+
print '(3a5)', d(1,:)
62+
print '(3a5)', d(2,:)
63+
print '(3a5)', d(3,:)
64+
65+
d = EOSHIFT(d, SHIFT=(/1, 2, 1/))
66+
print *
67+
print '(3a5)', d(1,:)
68+
print '(3a5)', d(2,:)
69+
print '(3a5)', d(3,:)
70+
71+
end program test_eoshift
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
! RUN: bbc -emit-fir %s -o - | FileCheck %s
2+
3+
! CHECK-LABEL: eoshift_test1
4+
subroutine eoshift_test1(arr, shift)
5+
logical, dimension(3) :: arr, res
6+
integer :: shift
7+
! CHECK: %[[boundAlloc:.*]] = fir.alloca !fir.logical<4> {uniq_name = ""}
8+
! CHECK: %[[resBox:.*]] = fir.alloca !fir.box<!fir.heap<!fir.array<?x!fir.logical<4>>>> {uniq_name = ""}
9+
! CHECK: %[[res:.*]] = fir.alloca !fir.array<3x!fir.logical<4>> {bindc_name = "res", uniq_name = "_QFeoshift_test1Eres"}
10+
! CHECK: %[[resLoad:.*]] = fir.array_load %[[res]]({{.*}}) : (!fir.ref<!fir.array<3x!fir.logical<4>>>, !fir.shape<1>) -> !fir.array<3x!fir.logical<4>>
11+
! CHECK: %[[arr:.*]] = fir.embox %arg0({{.*}}) : (!fir.ref<!fir.array<3x!fir.logical<4>>>, !fir.shape<1>) -> !fir.box<!fir.array<3x!fir.logical<4>>>
12+
! CHECK: %[[bits:.*]] = fir.zero_bits !fir.heap<!fir.array<?x!fir.logical<4>>>
13+
! CHECK: %[[init:.*]] = fir.embox %[[bits]]({{.*}}) : (!fir.heap<!fir.array<?x!fir.logical<4>>>, !fir.shape<1>) -> !fir.box<!fir.heap<!fir.array<?x!fir.logical<4>>>>
14+
! CHECK: fir.store %[[init]] to %[[resBox]] : !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.logical<4>>>>>
15+
! CHECK: %[[zero:.*]] = constant 0 : index
16+
! CHECK: %[[false:.*]] = fir.convert %[[zero]] : (index) -> !fir.logical<4>
17+
! CHECK: fir.store %[[false]] to %[[boundAlloc]] : !fir.ref<!fir.logical<4>>
18+
! CHECK: %[[boundBox:.*]] = fir.embox %[[boundAlloc]] : (!fir.ref<!fir.logical<4>>) -> !fir.box<!fir.logical<4>>
19+
! CHECK: %[[shift:.*]] = fir.load %arg1 : !fir.ref<i32>
20+
21+
res = eoshift(arr, shift)
22+
23+
! CHECK: %[[resIRBox:.*]] = fir.convert %[[resBox]] : (!fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.logical<4>>>>>) -> !fir.ref<!fir.box<none>>
24+
! CHECK: %[[arrBox:.*]] = fir.convert %[[arr]] : (!fir.box<!fir.array<3x!fir.logical<4>>>) -> !fir.box<none>
25+
! CHECK: %[[shiftBox:.*]] = fir.convert %[[shift]] : (i32) -> i64
26+
! CHECK: %[[boundBoxNone:.*]] = fir.convert %[[boundBox]] : (!fir.box<!fir.logical<4>>) -> !fir.box<none>
27+
! CHECK: %[[tmp:.*]] = fir.call @_FortranAEoshiftVector(%[[resIRBox]], %[[arrBox]], %[[shiftBox]], %[[boundBoxNone]], {{.*}}, {{.*}}) : (!fir.ref<!fir.box<none>>, !fir.box<none>, i64, !fir.box<none>, !fir.ref<i8>, i32) -> none
28+
! CHECK: fir.array_merge_store %[[resLoad]], {{.*}} to %[[res]] : !fir.array<3x!fir.logical<4>>, !fir.array<3x!fir.logical<4>>, !fir.ref<!fir.array<3x!fir.logical<4>>>
29+
end subroutine eoshift_test1
30+
31+
! CHECK-LABEL: eoshift_test2
32+
subroutine eoshift_test2(arr, shift, bound, dim)
33+
integer, dimension(3,3) :: arr, res
34+
integer, dimension(3) :: shift
35+
integer :: bound, dim
36+
! CHECK: %[[boundAlloc:.*]] = fir.alloca i32 {uniq_name = ""}
37+
! CHECK: %[[resBox:.*]] = fir.alloca !fir.box<!fir.heap<!fir.array<?x?xi32>>> {uniq_name = ""}
38+
! CHECK: %[[res:.*]] = fir.alloca !fir.array<3x3xi32> {bindc_name = "res", uniq_name = "_QFeoshift_test2Eres"}
39+
!CHECK: %[[resLoad:.*]] = fir.array_load %[[res]]({{.*}}) : (!fir.ref<!fir.array<3x3xi32>>, !fir.shape<2>) -> !fir.array<3x3xi32>
40+
! CHECK: %[[bound:.*]] = fir.load %arg2 : !fir.ref<i32>
41+
! CHECK: %[[dim:.*]] = fir.load %arg3 : !fir.ref<i32>
42+
43+
res = eoshift(arr, shift, bound, dim)
44+
45+
! CHECK: %[[arr:.*]] = fir.embox %arg0({{.*}}) : (!fir.ref<!fir.array<3x3xi32>>, !fir.shape<2>) -> !fir.box<!fir.array<3x3xi32>>
46+
! CHECK: fir.store %[[bound]] to %[[boundAlloc]] : !fir.ref<i32>
47+
! CHECK: %[[boundBox:.*]] = fir.embox %[[boundAlloc]] : (!fir.ref<i32>) -> !fir.box<i32>
48+
! CHECK: %[[shiftBox:.*]] = fir.embox %arg1({{.*}}) : (!fir.ref<!fir.array<3xi32>>, !fir.shape<1>) -> !fir.box<!fir.array<3xi32>>
49+
! CHECK: %[[resIRBox:.*]] = fir.convert %[[resBox]] : (!fir.ref<!fir.box<!fir.heap<!fir.array<?x?xi32>>>>) -> !fir.ref<!fir.box<none>>
50+
! CHECK: %[[arrBox:.*]] = fir.convert %[[arr]] : (!fir.box<!fir.array<3x3xi32>>) -> !fir.box<none>
51+
! CHECK: %[[shiftBoxNone:.*]] = fir.convert %[[shiftBox]] : (!fir.box<!fir.array<3xi32>>) -> !fir.box<none>
52+
! CHECK: %[[boundBoxNone:.*]] = fir.convert %[[boundBox]] : (!fir.box<i32>) -> !fir.box<none>
53+
54+
! CHECK: %[[tmp:.*]] = fir.call @_FortranAEoshift(%[[resIRBox]], %[[arrBox]], %[[shiftBoxNone]], %[[boundBoxNone]], %[[dim]], {{.*}}, {{.*}}) : (!fir.ref<!fir.box<none>>, !fir.box<none>, !fir.box<none>, !fir.box<none>, i32, !fir.ref<i8>, i32) -> none
55+
! CHECK: fir.array_merge_store %[[resLoad]], {{.*}} to %[[res]] : !fir.array<3x3xi32>, !fir.array<3x3xi32>, !fir.ref<!fir.array<3x3xi32>>
56+
end subroutine eoshift_test2
57+
58+
! CHECK-LABEL: eoshift_test3
59+
subroutine eoshift_test3(arr, shift, dim)
60+
character(4), dimension(3,3) :: arr, res
61+
integer :: shift, dim
62+
63+
! CHECK: %[[resBox:.*]] = fir.alloca !fir.box<!fir.heap<!fir.array<?x?x!fir.char<1,?>>>> {uniq_name = ""}
64+
! CHECK: %[[arr:.*]]:2 = fir.unboxchar %arg0 : (!fir.boxchar<1>) -> (!fir.ref<!fir.char<1,?>>, index)
65+
! CHECK: %[[array:.*]] = fir.convert %[[arr]]#0 : (!fir.ref<!fir.char<1,?>>) -> !fir.ref<!fir.array<3x3x!fir.char<1,4>>>
66+
! CHECK: %[[res:.*]] = fir.alloca !fir.array<3x3x!fir.char<1,4>> {bindc_name = "res", uniq_name = "_QFeoshift_test3Eres"}
67+
! CHECK: %[[resLoad:.*]] = fir.array_load %[[res]]({{.*}}) : (!fir.ref<!fir.array<3x3x!fir.char<1,4>>>, !fir.shape<2>) -> !fir.array<3x3x!fir.char<1,4>>
68+
! CHECK: %[[dim:.*]] = fir.load %arg2 : !fir.ref<i32>
69+
! CHECK: %[[arrayBox:.*]] = fir.embox %[[array]]({{.*}}) : (!fir.ref<!fir.array<3x3x!fir.char<1,4>>>, !fir.shape<2>) -> !fir.box<!fir.array<3x3x!fir.char<1,4>>>
70+
71+
res = eoshift(arr, SHIFT=shift, DIM=dim)
72+
73+
! CHECK: %[[boundAlloc:.*]] = fir.alloca !fir.char<1,4>
74+
! CHECK: %[[zero:.*]] = constant 0 : index
75+
! CHECK: %[[len:.*]] = constant 4 : index
76+
! CHECK: %[[blankVal:.*]] = constant 32 : i8
77+
! CHECK: %[[single:.*]] = fir.undefined !fir.char<1>
78+
! CHECK: %[[blank:.*]] = fir.insert_value %[[single]], %[[blankVal]], [0 : index] : (!fir.char<1>, i8) -> !fir.char<1>
79+
! CHECK: %[[one:.*]] = constant 1 : index
80+
! CHECK: fir.do_loop %arg3 = %[[zero]] to %[[len]] step %[[one]] {
81+
! CHECK: %[[bound:.*]] = fir.convert %[[boundAlloc]] : (!fir.ref<!fir.char<1,4>>) -> !fir.ref<!fir.array<4x!fir.char<1>>>
82+
! CHECK: %[[index:.*]] = fir.coordinate_of %[[bound]], %arg3 : (!fir.ref<!fir.array<4x!fir.char<1>>>, index) -> !fir.ref<!fir.char<1>>
83+
!CHECK: fir.store %[[blank]] to %[[index]] : !fir.ref<!fir.char<1>>
84+
! CHECK: %[[boundBox:.*]] = fir.embox %[[boundAlloc]] : (!fir.ref<!fir.char<1,4>>) -> !fir.box<!fir.char<1,4>>
85+
! CHECK: %[[shiftBox:.*]] = fir.embox %arg1 : (!fir.ref<i32>) -> !fir.box<i32>
86+
! CHECK: %[[resIRBox:.*]] = fir.convert %[[resBox]] : (!fir.ref<!fir.box<!fir.heap<!fir.array<?x?x!fir.char<1,?>>>>>) -> !fir.ref<!fir.box<none>>
87+
! CHECK: %[[arrayBoxNone:.*]] = fir.convert %[[arrayBox]] : (!fir.box<!fir.array<3x3x!fir.char<1,4>>>) -> !fir.box<none>
88+
! CHECK: %[[shiftBoxNone:.*]] = fir.convert %[[shiftBox]] : (!fir.box<i32>) -> !fir.box<none>
89+
! CHECK: %[[boundBoxNone:.*]] = fir.convert %[[boundBox]] : (!fir.box<!fir.char<1,4>>) -> !fir.box<none>
90+
! CHECK: %[[tmp:.*]] = fir.call @_FortranAEoshift(%[[resIRBox]], %[[arrayBoxNone]], %[[shiftBoxNone]], %[[boundBoxNone]], %[[dim]], {{.*}}, {{.*}}) : (!fir.ref<!fir.box<none>>, !fir.box<none>, !fir.box<none>, !fir.box<none>, i32, !fir.ref<i8>, i32) -> none
91+
! CHECK: fir.array_merge_store %[[resLoad]], {{.*}} to %[[res]] : !fir.array<3x3x!fir.char<1,4>>, !fir.array<3x3x!fir.char<1,4>>, !fir.ref<!fir.array<3x3x!fir.char<1,4>>>
92+
end subroutine eoshift_test3

0 commit comments

Comments
 (0)