@@ -1419,26 +1419,28 @@ def hlfir_YieldOp : hlfir_Op<"yield", [Terminator, ParentOneOf<["RegionAssignOp"
14191419 let assemblyFormat = "$entity attr-dict `:` type($entity) custom<YieldOpCleanup>($cleanup)";
14201420}
14211421
1422- def hlfir_ElementalAddrOp : hlfir_Op<"elemental_addr", [Terminator,
1422+ def hlfir_ElementalAddrOp : hlfir_Op<"elemental_addr", [Terminator, HasParent<"RegionAssignOp">,
14231423 RecursiveMemoryEffects, RecursivelySpeculatable, hlfir_ElementalOpInterface,
14241424 AttrSizedOperandSegments]> {
14251425 let summary = "Yield the address of a vector subscripted variable inside an hlfir.region_assign";
14261426 let description = [{
1427- Used to get the address of elements in an array which is being subscripted
1428- by a vector.
1427+ Special terminator node for the left-hand side region of an hlfir.region_assign
1428+ to a vector subscripted entity .
14291429
14301430 It represents how the address of an element of such entity is computed given
14311431 one based indices.
14321432
14331433 It is very similar to hlfir.elemental, except that it does not produce an SSA
14341434 value because there is no hlfir type to describe a vector subscripted entity
1435- (the codegen of such type would be problematic).
1435+ (the codegen of such type would be problematic). Hence, it is tightly linked
1436+ to an hlfir.region_assign by its terminator property.
14361437
14371438 An optional cleanup region may be provided if any of the subscript expressions
14381439 of the designator require a cleanup.
14391440 This allows documenting cleanups that cannot be generated after the vector
14401441 subscripted designator usage (that has not been materizaled yet). The cleanups
1441- should be evaluated after the usage of the elemental addr.
1442+ will be evaluated after the assignment once the related
1443+ hlfir.region_assign is lowered.
14421444
14431445 Example: "X(VECTOR) = Y"
14441446
0 commit comments