[clang] [Clang][OpenMP] Allow array shaping as the base of array sections in target update (PR #244591)

Akash Manna via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 19:57:29 PST 2026


https://github.com/akash-manna-sky updated https://github.com/llvm/llvm-project/pull/244591

>From 94ca18af7aba88ac422337d78bdbd72d315b178a Mon Sep 17 00:00:00 2001
From: Akash Manna <akash.manna.mymail at gmail.com>
Date: Tue, 10 Nov 2026 17:52:44 +0530
Subject: [PATCH 1/4] [Clang][OpenMP] Allow array shaping as the base of array
 sections in target update

Fixes #136294

`#pragma omp target update from((([nx][ny+2])a)[0:nx][1])`, the array shaping example from the OpenMP Examples, is rejected with "array shaping operation is not allowed here". The shaped expression only had the placeholder type that keeps it out of other contexts, so `ActOnOMPArraySectionExpr` saw no array to section and refused the base.

The shaping expression now records the array type the spec gives it, and sections use it like the type of a declared array, so the existing contiguity checks and the non-contiguous codegen apply as they are. The example needed two more things: two sections of one variable in a motion clause no longer hit the OpenMP 4.5 map restriction, and `target update` treats a section it cannot prove contiguous as non-contiguous instead of copying whole rows.

LLM tools were used for this contribution.
---
 clang/docs/ReleaseNotes.md                    |   2 +
 clang/include/clang/AST/ExprOpenMP.h          |  19 +-
 clang/lib/AST/Expr.cpp                        |  28 +-
 clang/lib/AST/OpenMPClause.cpp                |   6 +-
 clang/lib/CodeGen/CGExpr.cpp                  |  16 +
 clang/lib/CodeGen/CGOpenMPRuntime.cpp         |  15 +-
 clang/lib/Sema/SemaExpr.cpp                   |   8 +
 clang/lib/Sema/SemaOpenMP.cpp                 | 126 +++++++-
 clang/lib/Serialization/ASTReaderStmt.cpp     |   1 +
 clang/lib/Serialization/ASTWriterStmt.cpp     |   1 +
 clang/test/OpenMP/GH136294.c                  | 279 ++++++++++++++++++
 clang/test/OpenMP/target_map_messages.cpp     |   8 +
 clang/test/OpenMP/target_update_ast_print.cpp |   9 +
 .../OpenMP/target_update_from_messages.cpp    |  49 ++-
 .../test/OpenMP/target_update_to_messages.cpp |  52 +++-
 15 files changed, 570 insertions(+), 49 deletions(-)
 create mode 100644 clang/test/OpenMP/GH136294.c

diff --git a/clang/docs/ReleaseNotes.md b/clang/docs/ReleaseNotes.md
index 6d1dbbbb6eb77..69ef6a1dcd434 100644
--- a/clang/docs/ReleaseNotes.md
+++ b/clang/docs/ReleaseNotes.md
@@ -1491,6 +1491,8 @@ The `alpha.cplusplus.UseAfterLifetimeEnd` checker was renamed to `alpha.core.Use
 
 - Added parsing and semantic support for `dims` modifier in `num_teams`,
   `thread_limit` and `num_threads` clauses for OpenMP 6.1 or later.
+- Array shaping expressions can now be the base of array sections in the `to`
+  and `from` clauses of `target update`. (#GH136294)
 - Map-type-modifying modifiers applied to a list item with a user-defined mapper
   are now propagated onto the maps the mapper expands to.
 - Mapping of expressions with base-pointers through a user-defined mapper (e.g.
diff --git a/clang/include/clang/AST/ExprOpenMP.h b/clang/include/clang/AST/ExprOpenMP.h
index 4d3c5f54ad7dd..322f4d9e5572a 100644
--- a/clang/include/clang/AST/ExprOpenMP.h
+++ b/clang/include/clang/AST/ExprOpenMP.h
@@ -29,10 +29,13 @@ class OMPArrayShapingExpr final
   SourceLocation LPLoc; /// The location of the left paren
   SourceLocation RPLoc; /// The location of the right paren
   unsigned NumDims = 0; /// Number of dimensions in the shaping expression.
+  /// The n-dimensional array type designated by the shaping operation.
+  QualType ShapedType;
 
   /// Construct full expression.
-  OMPArrayShapingExpr(QualType ExprTy, Expr *Op, SourceLocation L,
-                      SourceLocation R, ArrayRef<Expr *> Dims);
+  OMPArrayShapingExpr(QualType ExprTy, QualType ShapedTy, Expr *Op,
+                      SourceLocation L, SourceLocation R,
+                      ArrayRef<Expr *> Dims);
 
   /// Construct an empty expression.
   explicit OMPArrayShapingExpr(EmptyShell Shell, unsigned NumDims)
@@ -47,6 +50,9 @@ class OMPArrayShapingExpr final
   /// Sets source ranges for the brackets in the array shaping operation.
   void setBracketsRanges(ArrayRef<SourceRange> BR);
 
+  /// Sets the array type designated by the array shaping operation.
+  void setShapedType(QualType T) { ShapedType = T; }
+
   unsigned numTrailingObjects(OverloadToken<Expr *>) const {
     // Add an extra one for the base expression.
     return NumDims + 1;
@@ -58,8 +64,9 @@ class OMPArrayShapingExpr final
 
 public:
   static OMPArrayShapingExpr *Create(const ASTContext &Context, QualType T,
-                                     Expr *Op, SourceLocation L,
-                                     SourceLocation R, ArrayRef<Expr *> Dims,
+                                     QualType ShapedTy, Expr *Op,
+                                     SourceLocation L, SourceLocation R,
+                                     ArrayRef<Expr *> Dims,
                                      ArrayRef<SourceRange> BracketRanges);
 
   static OMPArrayShapingExpr *CreateEmpty(const ASTContext &Context,
@@ -90,6 +97,10 @@ class OMPArrayShapingExpr final
   Expr *getBase() { return getTrailingObjects<Expr *>()[NumDims]; }
   const Expr *getBase() const { return getTrailingObjects<Expr *>()[NumDims]; }
 
+  /// Returns the n-dimensional array type designated by the shaping operation
+  /// (OpenMP 5.0 [2.1.4]); array sections based on this expression index it.
+  QualType getShapedType() const { return ShapedType; }
+
   static bool classof(const Stmt *T) {
     return T->getStmtClass() == OMPArrayShapingExprClass;
   }
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 1ba2ccdf697f9..984920e88262b 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -5451,10 +5451,15 @@ QualType ArraySectionExpr::getBaseOriginalType(const Expr *Base) {
     ++ArraySectionCount;
   }
   Base = Base->IgnoreParenImpCasts();
-  auto OriginalTy = Base->getType();
-  if (auto *DRE = dyn_cast<DeclRefExpr>(Base))
-    if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl()))
-      OriginalTy = PVD->getOriginalType().getNonReferenceType();
+  QualType OriginalTy;
+  if (const auto *OAShE = dyn_cast<OMPArrayShapingExpr>(Base)) {
+    OriginalTy = OAShE->getShapedType();
+  } else {
+    OriginalTy = Base->getType();
+    if (auto *DRE = dyn_cast<DeclRefExpr>(Base))
+      if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl()))
+        OriginalTy = PVD->getOriginalType().getNonReferenceType();
+  }
 
   for (unsigned Cnt = 0; Cnt < ArraySectionCount; ++Cnt) {
     if (OriginalTy->isAnyPointerType())
@@ -5536,27 +5541,28 @@ void OMPArrayShapingExpr::setBracketsRanges(ArrayRef<SourceRange> BR) {
   llvm::copy(BR, getTrailingObjects<SourceRange>());
 }
 
-OMPArrayShapingExpr::OMPArrayShapingExpr(QualType ExprTy, Expr *Op,
-                                         SourceLocation L, SourceLocation R,
+OMPArrayShapingExpr::OMPArrayShapingExpr(QualType ExprTy, QualType ShapedTy,
+                                         Expr *Op, SourceLocation L,
+                                         SourceLocation R,
                                          ArrayRef<Expr *> Dims)
     : Expr(OMPArrayShapingExprClass, ExprTy, VK_LValue, OK_Ordinary), LPLoc(L),
-      RPLoc(R), NumDims(Dims.size()) {
+      RPLoc(R), NumDims(Dims.size()), ShapedType(ShapedTy) {
   setBase(Op);
   setDimensions(Dims);
   setDependence(computeDependence(this));
 }
 
 OMPArrayShapingExpr *
-OMPArrayShapingExpr::Create(const ASTContext &Context, QualType T, Expr *Op,
-                            SourceLocation L, SourceLocation R,
-                            ArrayRef<Expr *> Dims,
+OMPArrayShapingExpr::Create(const ASTContext &Context, QualType T,
+                            QualType ShapedTy, Expr *Op, SourceLocation L,
+                            SourceLocation R, ArrayRef<Expr *> Dims,
                             ArrayRef<SourceRange> BracketRanges) {
   assert(Dims.size() == BracketRanges.size() &&
          "Different number of dimensions and brackets ranges.");
   void *Mem = Context.Allocate(
       totalSizeToAlloc<Expr *, SourceRange>(Dims.size() + 1, Dims.size()),
       alignof(OMPArrayShapingExpr));
-  auto *E = new (Mem) OMPArrayShapingExpr(T, Op, L, R, Dims);
+  auto *E = new (Mem) OMPArrayShapingExpr(T, ShapedTy, Op, L, R, Dims);
   E->setBracketsRanges(BracketRanges);
   return E;
 }
diff --git a/clang/lib/AST/OpenMPClause.cpp b/clang/lib/AST/OpenMPClause.cpp
index f0102720f7d33..b878f789154c8 100644
--- a/clang/lib/AST/OpenMPClause.cpp
+++ b/clang/lib/AST/OpenMPClause.cpp
@@ -1197,9 +1197,9 @@ OMPClauseMappableExprCommon::findAttachPtrExpr(
     if (!CurExpr)
       break;
 
-    // If CurExpr is something like `p + 10`, we need to ignore it, since
-    // we are looking for `p`.
-    if (isa<BinaryOperator>(CurExpr))
+    // If CurExpr is something like `p + 10` or `([n])p`, we need to ignore it,
+    // since we are looking for `p`.
+    if (isa<BinaryOperator, OMPArrayShapingExpr>(CurExpr))
       continue;
 
     // Keep going until we reach an Expr of pointer type.
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 98133ecf1b48f..34210248367af 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -5482,6 +5482,22 @@ static Address emitOMPArraySectionBase(CodeGenFunction &CGF, const Expr *Base,
     return Address(CGF.Builder.CreateLoad(BaseLVal.getAddress()),
                    CGF.ConvertTypeForMem(ElTy), Align);
   }
+  if (auto *OAShE =
+          dyn_cast<OMPArrayShapingExpr>(Base->IgnoreParenImpCasts())) {
+    // The shaped pointer is the address of the array; capture the variable
+    // dimensions of the shape first.
+    QualType ShapedTy = OAShE->getShapedType();
+    if (ShapedTy->isVariablyModifiedType())
+      CGF.EmitVariablyModifiedType(ShapedTy);
+    LValueBaseInfo TypeBaseInfo;
+    TBAAAccessInfo TypeTBAAInfo;
+    CharUnits Align =
+        CGF.CGM.getNaturalTypeAlignment(ElTy, &TypeBaseInfo, &TypeTBAAInfo);
+    BaseInfo.mergeForCast(TypeBaseInfo);
+    TBAAInfo = CGF.CGM.mergeTBAAInfoForCast(TBAAInfo, TypeTBAAInfo);
+    return Address(CGF.EmitScalarExpr(OAShE->getBase()),
+                   CGF.ConvertTypeForMem(ElTy), Align);
+  }
   return CGF.EmitPointerWithAlignment(Base, &BaseInfo, &TBAAInfo);
 }
 
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index d3a6ffee3ea74..4c5fe9c9192c6 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -8430,8 +8430,11 @@ class MappableExprsHandler {
           dyn_cast<OMPArrayShapingExpr>(I->getAssociatedExpression());
       const auto *UO = dyn_cast<UnaryOperator>(I->getAssociatedExpression());
       const auto *BO = dyn_cast<BinaryOperator>(I->getAssociatedExpression());
+      // An array shaping expression maps the shaped storage only as the whole
+      // list item; as the base of array sections it just reinterprets the
+      // pointer.
       bool IsPointer =
-          OAShE ||
+          (OAShE && Next == CE) ||
           (OASE && ArraySectionExpr::getBaseOriginalType(OASE)
                        .getCanonicalType()
                        ->isAnyPointerType()) ||
@@ -8728,6 +8731,14 @@ class MappableExprsHandler {
     MapValuesArrayTy DimSizes{llvm::ConstantInt::get(CGF.CGM.Int64Ty, 1)};
     uint64_t ElementTypeSize;
 
+    // Only array sections and subscripts add a dimension.
+    unsigned NumArrayDims = llvm::count_if(
+        Components,
+        [](const OMPClauseMappableExprCommon::MappableComponent &Component) {
+          return isa<ArraySectionExpr, ArraySubscriptExpr>(
+              Component.getAssociatedExpression());
+        });
+
     // Collect Size information for each dimension and get the element size as
     // the first Stride. For example, for `int arr[10][10]`, the DimSizes
     // should be [10, 10] and the first stride is 4 btyes.
@@ -8787,7 +8798,7 @@ class MappableExprsHandler {
       }
       // Get dimension value except for the last dimension since we don't need
       // it.
-      if (DimSizes.size() < Components.size() - 1) {
+      if (DimSizes.size() < NumArrayDims) {
         if (CAT)
           DimSizes.push_back(
               llvm::ConstantInt::get(CGF.Int64Ty, CAT->getZExtSize()));
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index a14c3d50d1285..00c2e2fbacbf6 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -5124,6 +5124,14 @@ ExprResult Sema::ActOnArraySubscriptExpr(Scope *S, Expr *base,
                                            rbLoc);
   }
 
+  // A subscript of an OpenMP array shaping expression is a single-element
+  // array section.
+  if (base && !base->getType().isNull() && ArgExprs.size() == 1 &&
+      base->hasPlaceholderType(BuiltinType::OMPArrayShaping))
+    return OpenMP().ActOnOMPArraySectionExpr(
+        base, lbLoc, ArgExprs.front(), SourceLocation(), SourceLocation(),
+        /*Length=*/nullptr, /*Stride=*/nullptr, rbLoc);
+
   // Since this might be a postfix expression, get rid of ParenListExprs.
   if (isa<ParenListExpr>(base)) {
     ExprResult result = MaybeConvertParenListExprToParenExpr(S, base);
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 9acf3b3724527..d56c86d90becd 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -24216,6 +24216,53 @@ static bool checkArrayExpressionDoesNotReferToUnitySize(Sema &SemaRef,
   return ConstLength.getSExtValue() != 1;
 }
 
+/// Return true if it can be proven that the provided array section refers to
+/// the whole dimension of the array whose base type is \a BaseQTy.
+static bool checkArrayExpressionRefersToWholeSize(Sema &SemaRef,
+                                                  const ArraySectionExpr *OASE,
+                                                  QualType BaseQTy) {
+  ASTContext &Ctx = SemaRef.getASTContext();
+  auto EvaluatesTo = [&Ctx](const Expr *E, int64_t Value) {
+    Expr::EvalResult Result;
+    return !E->isValueDependent() && E->EvaluateAsInt(Result, Ctx) &&
+           Result.Val.getInt().getSExtValue() == Value;
+  };
+
+  if (OASE->getColonLocFirst().isInvalid()) {
+    const auto *CATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr());
+    return CATy && CATy->getSExtSize() == 1;
+  }
+
+  const Expr *Stride = OASE->getStride();
+  if (Stride && !EvaluatesTo(Stride, 1))
+    return false;
+  const Expr *LowerBound = OASE->getLowerBound();
+  if (LowerBound && !EvaluatesTo(LowerBound, 0))
+    return false;
+
+  if (BaseQTy->isPointerType())
+    return false;
+
+  // Without a length the section covers the rest of the dimension.
+  const Expr *Length = OASE->getLength();
+  if (!Length)
+    return true;
+
+  if (const auto *CATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr()))
+    return EvaluatesTo(Length, CATy->getSExtSize());
+
+  // For a variable length array the length has to be the size expression of
+  // the dimension, e.g. c[0:n] for double c[n][m].
+  const auto *VATy = dyn_cast<VariableArrayType>(BaseQTy.getTypePtr());
+  if (!VATy || !VATy->getSizeExpr() || Length->HasSideEffects(Ctx))
+    return false;
+  llvm::FoldingSetNodeID LengthID, SizeID;
+  Length->IgnoreParenImpCasts()->Profile(LengthID, Ctx, /*Canonical=*/true);
+  VATy->getSizeExpr()->IgnoreParenImpCasts()->Profile(SizeID, Ctx,
+                                                      /*Canonical=*/true);
+  return LengthID == SizeID;
+}
+
 // The base of elements of list in a map clause have to be either:
 //  - a reference to variable or field.
 //  - a member expression.
@@ -24513,14 +24560,21 @@ class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {
       // If this array section refers to the whole dimension we can still
       // accept other array sections before this one, except if the base is a
       // pointer. Otherwise, only unitary sections are accepted.
-      if (NotWhole || IsPointer)
+      //
+      // 'target update' transfers non-contiguous sections, so a section that
+      // is not provably whole (e.g. of a variable length array) is treated as
+      // partial there: a descriptor is correct either way, whole rows are not.
+      if (NotWhole || IsPointer ||
+          (DKind == OMPD_target_update && SemaRef.getLangOpts().OpenMP >= 50 &&
+           !checkArrayExpressionRefersToWholeSize(SemaRef, OASE, CurType)))
         AllowWholeSizeArraySection = false;
     } else if (DKind == OMPD_target_update &&
                SemaRef.getLangOpts().OpenMP >= 50) {
       if (IsPointer && !AllowAnotherPtr)
         SemaRef.Diag(ELoc, diag::err_omp_section_length_undefined)
             << /*array of unknown bound */ 1;
-      else
+      // A single element (no colon) keeps the storage contiguous.
+      else if (OASE->getColonLocFirst().isValid())
         IsNonContiguous = true;
     } else if (AllowUnitySizeArraySection && NotUnity) {
       // A unity or whole array section is not allowed and that is not
@@ -24567,6 +24621,15 @@ class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {
   bool VisitOMPArrayShapingExpr(OMPArrayShapingExpr *E) {
     Expr *Base = E->getBase();
 
+    // OpenMP 5.0 [2.1.4, Array Shaping, Restrictions]: the shape-operator may
+    // appear only in clauses that explicitly allow it. As the base of array
+    // sections only the motion clauses do (OpenMP 5.0 [2.12.6]).
+    if (!Components.empty() && CKind != OMPC_to && CKind != OMPC_from) {
+      if (!NoDiagnose)
+        SemaRef.Diag(E->getBeginLoc(), diag::err_omp_array_shaping_use);
+      return false;
+    }
+
     // Record the component - we don't have any declaration associated.
     Components.emplace_back(E, nullptr, IsNonContiguous);
 
@@ -24657,11 +24720,12 @@ static const Expr *checkMapClauseExpressionBase(
       auto CI = CurComponents.rbegin();
       auto CE = CurComponents.rend();
       for (; CI != CE; ++CI) {
-        const auto *OASE =
-            dyn_cast<ArraySectionExpr>(CI->getAssociatedExpression());
-        if (!OASE)
+        const Expr *E = CI->getAssociatedExpression();
+        if (!isa<ArraySectionExpr, ArraySubscriptExpr>(E))
           continue;
-        if (OASE && OASE->getLength())
+        // The outermost dimension is a single element or has a length.
+        const auto *OASE = dyn_cast<ArraySectionExpr>(E);
+        if (!OASE || OASE->getColonLocFirst().isInvalid() || OASE->getLength())
           break;
         SemaRef.Diag(ELoc, diag::err_array_section_does_not_specify_length)
             << ERange;
@@ -24726,7 +24790,8 @@ static bool checkMapConflicts(
           // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.3]
           //  At most one list item can be an array item derived from a given
           //  variable in map clauses of the same construct.
-          if (CurrentRegionOnly &&
+          // Dropped in OpenMP 5.0.
+          if (CurrentRegionOnly && SemaRef.LangOpts.OpenMP < 50 &&
               (isa<ArraySubscriptExpr>(CI->getAssociatedExpression()) ||
                isa<ArraySectionExpr>(CI->getAssociatedExpression()) ||
                isa<OMPArrayShapingExpr>(CI->getAssociatedExpression())) &&
@@ -25639,7 +25704,7 @@ static void checkMappableExpressionList(
     // Store the components in the stack so that they can be used to check
     // against other clauses later on.
     DSAS->addMappableExpressionComponents(CurDeclaration, CurComponents,
-                                          /*WhereFoundClauseKind=*/OMPC_map);
+                                          /*WhereFoundClauseKind=*/CKind);
 
     // Save the components and declaration to create the clause. For purposes of
     // the clause creation, any component list that has base 'this' uses
@@ -28040,8 +28105,11 @@ ExprResult SemaOpenMP::ActOnOMPArraySectionExpr(
     SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length,
     Expr *Stride, SourceLocation RBLoc) {
   ASTContext &Context = getASTContext();
+  // OpenMP 5.0 [2.1.4, Array Shaping]: the result of the shape-operator is an
+  // lvalue of n-dimensional array type, so it can be the base of a section.
+  bool IsShapedBase = Base->hasPlaceholderType(BuiltinType::OMPArrayShaping);
   if (Base->hasPlaceholderType() &&
-      !Base->hasPlaceholderType(BuiltinType::ArraySection)) {
+      !Base->hasPlaceholderType(BuiltinType::ArraySection) && !IsShapedBase) {
     ExprResult Result = SemaRef.CheckPlaceholderExpr(Base);
     if (Result.isInvalid())
       return ExprError();
@@ -28088,6 +28156,12 @@ ExprResult SemaOpenMP::ActOnOMPArraySectionExpr(
 
   // Perform default conversions.
   QualType OriginalTy = ArraySectionExpr::getBaseOriginalType(Base);
+  // The dimensions of the shape may depend on template parameters.
+  if (IsShapedBase && OriginalTy->isDependentType()) {
+    return new (Context) ArraySectionExpr(
+        Base, LowerBound, Length, Stride, Context.DependentTy, VK_LValue,
+        OK_Ordinary, ColonLocFirst, ColonLocSecond, RBLoc);
+  }
   QualType ResultTy;
   if (OriginalTy->isAnyPointerType()) {
     ResultTy = OriginalTy->getPointeeType();
@@ -28210,7 +28284,7 @@ ExprResult SemaOpenMP::ActOnOMPArraySectionExpr(
     }
   }
 
-  if (!Base->hasPlaceholderType(BuiltinType::ArraySection)) {
+  if (!Base->hasPlaceholderType(BuiltinType::ArraySection) && !IsShapedBase) {
     ExprResult Result = SemaRef.DefaultFunctionArrayLvalueConversion(Base);
     if (Result.isInvalid())
       return ExprError();
@@ -28238,8 +28312,9 @@ ExprResult SemaOpenMP::ActOnOMPArrayShapingExpr(
   // Delay analysis of the types/expressions if instantiation/specialization is
   // required.
   if (!BaseTy->isPointerType() && Base->isTypeDependent())
-    return OMPArrayShapingExpr::Create(Context, Context.DependentTy, Base,
-                                       LParenLoc, RParenLoc, Dims, Brackets);
+    return OMPArrayShapingExpr::Create(Context, Context.DependentTy,
+                                       Context.DependentTy, Base, LParenLoc,
+                                       RParenLoc, Dims, Brackets);
   if (!BaseTy->isPointerType() ||
       (!Base->isTypeDependent() &&
        BaseTy->getPointeeType()->isIncompleteType()))
@@ -28292,8 +28367,31 @@ ExprResult SemaOpenMP::ActOnOMPArrayShapingExpr(
   }
   if (ErrorFound)
     return ExprError();
-  return OMPArrayShapingExpr::Create(Context, Context.OMPArrayShapingTy, Base,
-                                     LParenLoc, RParenLoc, NewDims, Brackets);
+
+  // OpenMP 5.0 [2.1.4, Array Shaping]: the result has n-dimensional array type
+  // s1 x ... x sn of T; build it like the type of a declared array.
+  QualType ShapedTy = BaseTy->getPointeeType();
+  for (Expr *Dim : llvm::reverse(NewDims)) {
+    if (Dim->isTypeDependent() || Dim->isValueDependent()) {
+      ShapedTy = Context.getDependentSizedArrayType(
+          ShapedTy, Dim, ArraySizeModifier::Normal, /*IndexTypeQuals=*/0);
+      continue;
+    }
+    std::optional<llvm::APSInt> Size;
+    // An array of variable length arrays is itself a variable length array.
+    if (ShapedTy->isDependentType() || ShapedTy->isConstantSizeType())
+      Size = Dim->getIntegerConstantExpr(Context);
+    if (Size)
+      ShapedTy = Context.getConstantArrayType(ShapedTy, *Size, Dim,
+                                              ArraySizeModifier::Normal,
+                                              /*IndexTypeQuals=*/0);
+    else
+      ShapedTy = Context.getVariableArrayType(
+          ShapedTy, Dim, ArraySizeModifier::Normal, /*IndexTypeQuals=*/0);
+  }
+  return OMPArrayShapingExpr::Create(Context, Context.OMPArrayShapingTy,
+                                     ShapedTy, Base, LParenLoc, RParenLoc,
+                                     NewDims, Brackets);
 }
 
 ExprResult SemaOpenMP::ActOnOMPIteratorExpr(Scope *S,
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index 26aee27c65e82..8a3aa44a25e68 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -1047,6 +1047,7 @@ void ASTStmtReader::VisitOMPArrayShapingExpr(OMPArrayShapingExpr *E) {
   E->setBracketsRanges(SRs);
   E->setLParenLoc(readSourceLocation());
   E->setRParenLoc(readSourceLocation());
+  E->setShapedType(Record.readType());
 }
 
 void ASTStmtReader::VisitOMPIteratorExpr(OMPIteratorExpr *E) {
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index c6e74fd19750a..3746443756f0a 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -983,6 +983,7 @@ void ASTStmtWriter::VisitOMPArrayShapingExpr(OMPArrayShapingExpr *E) {
     Record.AddSourceRange(SR);
   Record.AddSourceLocation(E->getLParenLoc());
   Record.AddSourceLocation(E->getRParenLoc());
+  Record.AddTypeRef(E->getShapedType());
   Code = serialization::EXPR_OMP_ARRAY_SHAPING;
 }
 
diff --git a/clang/test/OpenMP/GH136294.c b/clang/test/OpenMP/GH136294.c
new file mode 100644
index 0000000000000..e283a23574b6b
--- /dev/null
+++ b/clang/test/OpenMP/GH136294.c
@@ -0,0 +1,279 @@
+// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=amdgpu-amd-amdhsa -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=amdgpu-amd-amdhsa -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=amdgpu-amd-amdhsa -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+
+// RUN: %clang_cc1 -verify -fopenmp-simd -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=amdgpu-amd-amdhsa -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY %s
+// SIMD-ONLY-NOT: {{__kmpc|__tgt}}
+
+// expected-no-diagnostics
+#ifndef HEADER
+#define HEADER
+
+// Array shaping expressions used as the base of array sections in the motion
+// clauses of 'target update' (OpenMP 5.0 [2.1.4, Array Shaping]). A column of
+// the shaped two-dimensional array is a non-contiguous section; it has to be
+// transferred through a descriptor with one entry per dimension, exactly like
+// the same section of a declared array.
+
+// FROM | NON_CONTIG, one entry per list item; the size slot holds the number
+// of dimensions of the descriptor (two array dimensions plus the element).
+// CHECK-DAG: [[FROM2_SIZES:@.+]] = private unnamed_addr constant [2 x i64] [i64 3, i64 3]
+// CHECK-DAG: [[FROM2_TYPES:@.+]] = private unnamed_addr constant [2 x i64] [i64 17592186044418, i64 17592186044418]
+// TO | NON_CONTIG
+// CHECK-DAG: [[TO2_SIZES:@.+]] = private unnamed_addr constant [2 x i64] [i64 3, i64 3]
+// CHECK-DAG: [[TO2_TYPES:@.+]] = private unnamed_addr constant [2 x i64] [i64 17592186044417, i64 17592186044417]
+// The declared variable length array control.
+// CHECK-DAG: [[VLA_SIZES:@.+]] = private unnamed_addr constant [1 x i64] [i64 3]
+// CHECK-DAG: [[VLA_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 17592186044418]
+// Constant dimensions.
+// CHECK-DAG: [[CONST_SIZES:@.+]] = private unnamed_addr constant [1 x i64] [i64 3]
+// CHECK-DAG: [[CONST_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 17592186044418]
+// A row of the shaped array is contiguous: 4 doubles, TO.
+// CHECK-DAG: [[ROW_SIZES:@.+]] = private unnamed_addr constant [1 x i64] [i64 32]
+// CHECK-DAG: [[ROW_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 1]
+
+void exch_data(double *a, int nx, int ny);
+
+// The example of the OpenMP Examples document: the boundary columns of a
+// pointer shaped as a (nx) x (ny+2) array.
+// CHECK-LABEL: define {{.*}}void @array_ing(
+// CHECK:       store ptr %a, ptr [[A_ADDR:%.+]],
+// CHECK-NEXT:  store i32 %nx, ptr [[NX_ADDR:%.+]],
+// CHECK-NEXT:  store i32 %ny, ptr [[NY_ADDR:%.+]],
+void array_ing(double *a, int nx, int ny) {
+#pragma omp target data map(a[0 : nx * (ny + 2)])
+  {
+    // CHECK:      call void @__tgt_target_data_begin_mapper(
+
+    // The base pointer is the value of 'a'; the dimensions of the shape are
+    // evaluated like the sizes of a variable length array.
+    // CHECK:      [[BP:%.+]] = load ptr, ptr [[A_ADDR]],
+    // CHECK-NEXT: [[NX:%.+]] = load i32, ptr [[NX_ADDR]],
+    // CHECK-NEXT: [[NX_64:%.+]] = zext i32 [[NX]] to i64
+    // CHECK-NEXT: [[NY:%.+]] = load i32, ptr [[NY_ADDR]],
+    // CHECK-NEXT: [[NY2:%.+]] = add nsw i32 [[NY]], 2
+    // CHECK-NEXT: [[NY2_64:%.+]] = zext i32 [[NY2]] to i64
+    // The section pointer is &a[0][1] of the shaped array.
+    // CHECK-NEXT: [[A:%.+]] = load ptr, ptr [[A_ADDR]],
+    // CHECK-NEXT: [[ROW0:%.+]] = mul nsw i64 0, [[NY2_64]]
+    // CHECK-NEXT: [[ROW0_PTR:%.+]] = getelementptr inbounds nuw double, ptr [[A]], i64 [[ROW0]]
+    // CHECK-NEXT: [[COL1_PTR:%.+]] = getelementptr inbounds nuw double, ptr [[ROW0_PTR]], i64 1
+    // Descriptor of the outer dimension: offset 0, count nx, stride (ny+2)*8.
+    // CHECK-NEXT: [[NY_B:%.+]] = load i32, ptr [[NY_ADDR]],
+    // CHECK-NEXT: [[NY2_B:%.+]] = add nsw i32 [[NY_B]], 2
+    // CHECK-NEXT: [[NY2_B64:%.+]] = zext i32 [[NY2_B]] to i64
+    // CHECK-NEXT: [[NX_B:%.+]] = load i32, ptr [[NX_ADDR]],
+    // CHECK-NEXT: [[COUNT0:%.+]] = zext i32 [[NX_B]] to i64
+    // CHECK-NEXT: [[STRIDE0:%.+]] = mul nuw i64 8, [[NY2_B64]]
+    // CHECK-NEXT: [[OFFSET0:%.+]] = mul nuw i64 [[STRIDE0]], 0
+
+    // The second list item, &a[0][ny] of the shaped array; its own shaping
+    // expression evaluates the dimensions again.
+    // CHECK-NEXT: [[BP2:%.+]] = load ptr, ptr [[A_ADDR]],
+    // CHECK-NEXT: [[NY_C:%.+]] = load i32, ptr [[NY_ADDR]],
+    // CHECK-NEXT: [[NY_IDX:%.+]] = sext i32 [[NY_C]] to i64
+    // CHECK-NEXT: [[NX_C:%.+]] = load i32, ptr [[NX_ADDR]],
+    // CHECK-NEXT: [[NX_C64:%.+]] = zext i32 [[NX_C]] to i64
+    // CHECK-NEXT: [[NY_D:%.+]] = load i32, ptr [[NY_ADDR]],
+    // CHECK-NEXT: [[NY2_D:%.+]] = add nsw i32 [[NY_D]], 2
+    // CHECK-NEXT: [[NY2_D64:%.+]] = zext i32 [[NY2_D]] to i64
+    // CHECK-NEXT: [[A2:%.+]] = load ptr, ptr [[A_ADDR]],
+    // CHECK-NEXT: [[ROW0_2:%.+]] = mul nsw i64 0, [[NY2_D64]]
+    // CHECK-NEXT: [[ROW0_PTR2:%.+]] = getelementptr inbounds nuw double, ptr [[A2]], i64 [[ROW0_2]]
+    // CHECK-NEXT: [[COLNY_PTR:%.+]] = getelementptr inbounds nuw double, ptr [[ROW0_PTR2]], i64 [[NY_IDX]]
+    // Its inner dimension starts at offset ny*8.
+    // CHECK-NEXT: [[NY_E:%.+]] = load i32, ptr [[NY_ADDR]],
+    // CHECK-NEXT: [[NY2_E:%.+]] = add nsw i32 [[NY_E]], 2
+    // CHECK-NEXT: [[NY2_E64:%.+]] = zext i32 [[NY2_E]] to i64
+    // CHECK-NEXT: [[NY_F:%.+]] = load i32, ptr [[NY_ADDR]],
+    // CHECK-NEXT: [[NY_F64:%.+]] = zext i32 [[NY_F]] to i64
+    // CHECK-NEXT: [[OFFSET1_2:%.+]] = mul nuw i64 8, [[NY_F64]]
+    // CHECK-NEXT: [[NX_G:%.+]] = load i32, ptr [[NX_ADDR]],
+    // CHECK-NEXT: [[COUNT0_2:%.+]] = zext i32 [[NX_G]] to i64
+    // CHECK-NEXT: [[STRIDE0_2:%.+]] = mul nuw i64 8, [[NY2_E64]]
+    // CHECK-NEXT: [[OFFSET0_2:%.+]] = mul nuw i64 [[STRIDE0_2]], 0
+
+    // CHECK:      store ptr [[BP]], ptr
+    // CHECK:      store ptr [[COL1_PTR]], ptr
+    // CHECK:      store ptr [[BP2]], ptr
+    // CHECK:      store ptr [[COLNY_PTR]], ptr
+
+    // Descriptor of the first list item: [0:nx] x [1] x element.
+    // CHECK:      [[DIM0:%.+]] = getelementptr inbounds [3 x [[DESC:%struct.descriptor_dim[.0-9]*]]], ptr [[DIMS:%.+]], i64 0, i64 0
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM0]], i32 0, i32 0
+    // CHECK-NEXT: store i64 [[OFFSET0]], ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM0]], i32 0, i32 1
+    // CHECK-NEXT: store i64 [[COUNT0]], ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM0]], i32 0, i32 2
+    // CHECK-NEXT: store i64 [[STRIDE0]], ptr [[F]],
+    // CHECK-NEXT: [[DIM1:%.+]] = getelementptr inbounds [3 x [[DESC]]], ptr [[DIMS]], i64 0, i64 1
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM1]], i32 0, i32 0
+    // CHECK-NEXT: store i64 8, ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM1]], i32 0, i32 1
+    // CHECK-NEXT: store i64 1, ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM1]], i32 0, i32 2
+    // CHECK-NEXT: store i64 8, ptr [[F]],
+    // CHECK-NEXT: [[DIM2:%.+]] = getelementptr inbounds [3 x [[DESC]]], ptr [[DIMS]], i64 0, i64 2
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM2]], i32 0, i32 0
+    // CHECK-NEXT: store i64 0, ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM2]], i32 0, i32 1
+    // CHECK-NEXT: store i64 8, ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM2]], i32 0, i32 2
+    // CHECK-NEXT: store i64 1, ptr [[F]],
+    // CHECK-NEXT: [[PTR0:%.+]] = getelementptr inbounds [2 x ptr], ptr [[PTRS:%.+]], i32 0, i32 0
+    // CHECK-NEXT: store ptr [[DIMS]], ptr [[PTR0]],
+
+    // Descriptor of the second list item: [0:nx] x [ny] x element.
+    // CHECK-NEXT: [[DIM0_2:%.+]] = getelementptr inbounds [3 x [[DESC]]], ptr [[DIMS2:%.+]], i64 0, i64 0
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM0_2]], i32 0, i32 0
+    // CHECK-NEXT: store i64 [[OFFSET0_2]], ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM0_2]], i32 0, i32 1
+    // CHECK-NEXT: store i64 [[COUNT0_2]], ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM0_2]], i32 0, i32 2
+    // CHECK-NEXT: store i64 [[STRIDE0_2]], ptr [[F]],
+    // CHECK-NEXT: [[DIM1_2:%.+]] = getelementptr inbounds [3 x [[DESC]]], ptr [[DIMS2]], i64 0, i64 1
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM1_2]], i32 0, i32 0
+    // CHECK-NEXT: store i64 [[OFFSET1_2]], ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM1_2]], i32 0, i32 1
+    // CHECK-NEXT: store i64 1, ptr [[F]],
+    // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[DESC]], ptr [[DIM1_2]], i32 0, i32 2
+    // CHECK-NEXT: store i64 8, ptr [[F]],
+    // CHECK:      [[PTR1:%.+]] = getelementptr inbounds [2 x ptr], ptr [[PTRS]], i32 0, i32 1
+    // CHECK-NEXT: store ptr [[DIMS2]], ptr [[PTR1]],
+    // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 2, ptr %{{.+}}, ptr %{{.+}}, ptr [[FROM2_SIZES]], ptr [[FROM2_TYPES]], ptr null, ptr null)
+#pragma omp target update from((([nx][ny + 2])a)[0:nx][1], (([nx][ny + 2])a)[0:nx][ny])
+
+    // CHECK:      call void @exch_data(
+    exch_data(a, nx, ny);
+
+    // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 2, ptr %{{.+}}, ptr %{{.+}}, ptr [[TO2_SIZES]], ptr [[TO2_TYPES]], ptr null, ptr null)
+#pragma omp target update to((([nx][ny + 2])a)[0:nx][0], (([nx][ny + 2])a)[0:nx][ny + 1])
+    // CHECK:      call void @__tgt_target_data_end_mapper(
+  }
+}
+
+// The same section of a declared variable length array: the dimension size is
+// not a constant, so contiguity cannot be decided at compile time and the
+// section is transferred through a descriptor as well (one entry, not whole
+// rows).
+// CHECK-LABEL: define {{.*}}void @vla_control(
+// CHECK:       store i32 %nx, ptr [[VNX_ADDR:%.+]],
+// CHECK-NEXT:  store i32 %ny, ptr [[VNY_ADDR:%.+]],
+void vla_control(int nx, int ny) {
+  double c[nx][ny + 2];
+  // CHECK:      [[VLA:%.+]] = alloca double, i64
+  // CHECK:      [[VROW0:%.+]] = mul nsw i64 0, [[VNY2_64:%.+]]
+  // CHECK-NEXT: [[VROW0_PTR:%.+]] = getelementptr inbounds nuw double, ptr [[VLA]], i64 [[VROW0]]
+  // CHECK-NEXT: [[VCOL1_PTR:%.+]] = getelementptr inbounds nuw double, ptr [[VROW0_PTR]], i64 1
+  // CHECK-NEXT: [[VNY_B:%.+]] = load i32, ptr [[VNY_ADDR]],
+  // CHECK-NEXT: [[VNY2_B:%.+]] = add nsw i32 [[VNY_B]], 2
+  // CHECK-NEXT: [[VNY2_B64:%.+]] = zext i32 [[VNY2_B]] to i64
+  // CHECK-NEXT: [[VNX_B:%.+]] = load i32, ptr [[VNX_ADDR]],
+  // CHECK-NEXT: [[VCOUNT0:%.+]] = zext i32 [[VNX_B]] to i64
+  // CHECK-NEXT: [[VSTRIDE0:%.+]] = mul nuw i64 8, [[VNY2_B64]]
+  // CHECK-NEXT: [[VOFFSET0:%.+]] = mul nuw i64 [[VSTRIDE0]], 0
+  // CHECK:      store ptr [[VLA]], ptr
+  // CHECK:      store ptr [[VCOL1_PTR]], ptr
+  // CHECK:      [[VDIM0:%.+]] = getelementptr inbounds [3 x [[VDESC:%struct.descriptor_dim[.0-9]*]]], ptr [[VDIMS:%.+]], i64 0, i64 0
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[VDESC]], ptr [[VDIM0]], i32 0, i32 0
+  // CHECK-NEXT: store i64 [[VOFFSET0]], ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[VDESC]], ptr [[VDIM0]], i32 0, i32 1
+  // CHECK-NEXT: store i64 [[VCOUNT0]], ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[VDESC]], ptr [[VDIM0]], i32 0, i32 2
+  // CHECK-NEXT: store i64 [[VSTRIDE0]], ptr [[F]],
+  // CHECK-NEXT: [[VDIM1:%.+]] = getelementptr inbounds [3 x [[VDESC]]], ptr [[VDIMS]], i64 0, i64 1
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[VDESC]], ptr [[VDIM1]], i32 0, i32 0
+  // CHECK-NEXT: store i64 8, ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[VDESC]], ptr [[VDIM1]], i32 0, i32 1
+  // CHECK-NEXT: store i64 1, ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[VDESC]], ptr [[VDIM1]], i32 0, i32 2
+  // CHECK-NEXT: store i64 8, ptr [[F]],
+  // CHECK:      store ptr [[VDIMS]], ptr
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr [[VLA_SIZES]], ptr [[VLA_TYPES]], ptr null, ptr null)
+#pragma omp target update from(c[0:nx][1])
+}
+
+// Constant dimensions: the descriptors are compile-time constants.
+// CHECK-LABEL: define {{.*}}void @const_dims(
+// CHECK:       store ptr %p, ptr [[P_ADDR:%.+]],
+void const_dims(double *p) {
+  // &p[0][1] of the shaped double[3][4].
+  // CHECK:      [[CBP:%.+]] = load ptr, ptr [[P_ADDR]],
+  // CHECK-NEXT: [[CP:%.+]] = load ptr, ptr [[P_ADDR]],
+  // CHECK-NEXT: [[CROW0:%.+]] = getelementptr inbounds nuw [4 x double], ptr [[CP]], i64 0
+  // CHECK-NEXT: [[CDECAY:%.+]] = getelementptr inbounds [4 x double], ptr [[CROW0]], i64 0, i64 0
+  // CHECK-NEXT: [[CCOL1:%.+]] = getelementptr inbounds nuw double, ptr [[CDECAY]], i64 1
+  // CHECK:      store ptr [[CBP]], ptr
+  // CHECK:      store ptr [[CCOL1]], ptr
+  // [0:3]: offset 0, count 3, stride 4*8; [1]: offset 8, count 1, stride 8;
+  // element: offset 0, count 8 bytes, stride 1.
+  // CHECK:      [[CDIM0:%.+]] = getelementptr inbounds [3 x [[CDESC:%struct.descriptor_dim[.0-9]*]]], ptr [[CDIMS:%.+]], i64 0, i64 0
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM0]], i32 0, i32 0
+  // CHECK-NEXT: store i64 0, ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM0]], i32 0, i32 1
+  // CHECK-NEXT: store i64 3, ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM0]], i32 0, i32 2
+  // CHECK-NEXT: store i64 32, ptr [[F]],
+  // CHECK-NEXT: [[CDIM1:%.+]] = getelementptr inbounds [3 x [[CDESC]]], ptr [[CDIMS]], i64 0, i64 1
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM1]], i32 0, i32 0
+  // CHECK-NEXT: store i64 8, ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM1]], i32 0, i32 1
+  // CHECK-NEXT: store i64 1, ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM1]], i32 0, i32 2
+  // CHECK-NEXT: store i64 8, ptr [[F]],
+  // CHECK-NEXT: [[CDIM2:%.+]] = getelementptr inbounds [3 x [[CDESC]]], ptr [[CDIMS]], i64 0, i64 2
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM2]], i32 0, i32 0
+  // CHECK-NEXT: store i64 0, ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM2]], i32 0, i32 1
+  // CHECK-NEXT: store i64 8, ptr [[F]],
+  // CHECK-NEXT: [[F:%.+]] = getelementptr inbounds nuw [[CDESC]], ptr [[CDIM2]], i32 0, i32 2
+  // CHECK-NEXT: store i64 1, ptr [[F]],
+  // CHECK:      store ptr [[CDIMS]], ptr
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr [[CONST_SIZES]], ptr [[CONST_TYPES]], ptr null, ptr null)
+#pragma omp target update from((([3][4])p)[0:3][1])
+
+  // A subscript of the shaped array selects one row, which is contiguous:
+  // &p[1][0], 4 doubles.
+  // CHECK:      [[RBP:%.+]] = load ptr, ptr [[P_ADDR]],
+  // CHECK-NEXT: [[RP:%.+]] = load ptr, ptr [[P_ADDR]],
+  // CHECK-NEXT: [[RROW1:%.+]] = getelementptr inbounds nuw [4 x double], ptr [[RP]], i64 1
+  // CHECK-NEXT: [[RDECAY:%.+]] = getelementptr inbounds [4 x double], ptr [[RROW1]], i64 0, i64 0
+  // CHECK-NEXT: [[RCOL0:%.+]] = getelementptr inbounds nuw double, ptr [[RDECAY]], i64 0
+  // CHECK:      store ptr [[RBP]], ptr
+  // CHECK:      store ptr [[RCOL0]], ptr
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr [[ROW_SIZES]], ptr [[ROW_TYPES]], ptr null, ptr null)
+#pragma omp target update to((([3][4])p)[1][0:4])
+}
+
+struct S {
+  double *p;
+};
+double *g;
+
+// Other bases of the shaped pointer: a data member and a global variable; the
+// shaped pointer stays the base pointer of the entry.
+// CHECK-LABEL: define {{.*}}void @other_bases(
+void other_bases(struct S s, int n, int m) {
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 {{[0-9]+}}, ptr %{{.+}}, ptr %{{.+}}, ptr {{.+}}, ptr {{.+}}, ptr null, ptr null)
+#pragma omp target update to((([n])s.p)[1:n - 2])
+  // CHECK:      [[G:%.+]] = load ptr, ptr @g,
+  // CHECK:      store ptr [[G]], ptr
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr @{{.+}}, ptr null, ptr null)
+#pragma omp target update from((([n][m])g)[0:n][1])
+}
+
+// Other clauses of the directive, and the other clauses that allow array
+// shaping (depend, affinity) with a shaped base. With 'nowait' the update is
+// issued from an outlined target task.
+// CHECK-LABEL: define {{.*}}void @clauses(
+void clauses(double *p, int n, int m, int dev) {
+  // CHECK-DAG:  call ptr @__kmpc_omp_target_task_alloc(
+  // CHECK-DAG:  call i32 @__kmpc_omp_reg_task_with_affinity(
+  // CHECK-DAG:  call i32 @__kmpc_omp_task_with_deps(
+  // CHECK-DAG:  call void @__tgt_target_data_update_nowait_mapper(ptr @{{.+}}, i64 %{{.+}}, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr null, ptr null, i32 0, ptr null, i32 0, ptr null)
+#pragma omp target update to((([n][m])p)[0:n][1]) if(n > 2) device(dev) nowait
+#pragma omp task depend(in : (([n][m])p)[0:n][1]) affinity((([n][m])p)[0:n][1])
+  ;
+}
+
+#endif // HEADER
diff --git a/clang/test/OpenMP/target_map_messages.cpp b/clang/test/OpenMP/target_map_messages.cpp
index 0ee70bee9cc5d..c7534b22fbf75 100644
--- a/clang/test/OpenMP/target_map_messages.cpp
+++ b/clang/test/OpenMP/target_map_messages.cpp
@@ -47,6 +47,14 @@ void foo(int arg) {
   {}
   #pragma omp target map(marr[:][n:][:])
   {}
+
+  double *p = &marr[0][0][0];
+  // The shape-operator is allowed only in clauses that explicitly allow it;
+  // the map clause does not allow it as the base of an array section.
+  #pragma omp target map((([10])p)[0:10]) // expected-error {{OpenMP array shaping operation is not allowed here}}
+  {}
+  #pragma omp target map(to: (([2][10])p)[1][0:10]) // expected-error {{OpenMP array shaping operation is not allowed here}}
+  {}
 }
 #else
 
diff --git a/clang/test/OpenMP/target_update_ast_print.cpp b/clang/test/OpenMP/target_update_ast_print.cpp
index d4cc84bc8b73c..de1849c91b7bc 100644
--- a/clang/test/OpenMP/target_update_ast_print.cpp
+++ b/clang/test/OpenMP/target_update_ast_print.cpp
@@ -29,6 +29,8 @@ T foo(T targ, U uarg) {
 
 #pragma omp target update from(b, ([a][targ])p) if(l<5) device(l-1) nowait depend(inout:l)
 
+#pragma omp target update to((([a][targ])p)[0:l][1], (([a][targ])p)[0:l][l+1])
+
   U marr[10][10][10];
 #pragma omp target update to(marr[2][0:2][0:2])
 
@@ -76,16 +78,19 @@ T foo(T targ, U uarg) {
 // CHECK-NEXT: int l;
 // CHECK-NEXT: #pragma omp target update to(([a][targ])p,a) if(l > 5) device(l) nowait depend(inout : l){{$}}
 // CHECK-NEXT: #pragma omp target update from(b,([a][targ])p) if(l < 5) device(l - 1) nowait depend(inout : l)
+// CHECK-NEXT: #pragma omp target update to((([a][targ])p)[0:l][1],(([a][targ])p)[0:l][l + 1])
 // CHECK:      static int a, *p;
 // CHECK-NEXT: float b;
 // CHECK-NEXT: int l;
 // CHECK-NEXT: #pragma omp target update to(([a][targ])p,a) if(l > 5) device(l) nowait depend(inout : l)
 // CHECK-NEXT: #pragma omp target update from(b,([a][targ])p) if(l < 5) device(l - 1) nowait depend(inout : l)
+// CHECK-NEXT: #pragma omp target update to((([a][targ])p)[0:l][1],(([a][targ])p)[0:l][l + 1])
 // CHECK:      static char a, *p;
 // CHECK-NEXT: float b;
 // CHECK-NEXT: int l;
 // CHECK-NEXT: #pragma omp target update to(([a][targ])p,a) if(l > 5) device(l) nowait depend(inout : l)
 // CHECK-NEXT: #pragma omp target update from(b,([a][targ])p) if(l < 5) device(l - 1) nowait depend(inout : l)
+// CHECK-NEXT: #pragma omp target update to((([a][targ])p)[0:l][1],(([a][targ])p)[0:l][l + 1])
 // CHECK: marr[10][10][10];
 // CHECK-NEXT: #pragma omp target update to(marr[2][0:2][0:2])
 // CHECK-NEXT: #pragma omp target update from(marr[2][0:2][0:2])
@@ -123,6 +128,10 @@ int main(int argc, char **argv) {
 // CHECK-NEXT: #pragma omp target update to(argv[2][0:1:2])
 #pragma omp target update from(argv[2][0:1:2])
 // CHECK-NEXT: #pragma omp target update from(argv[2][0:1:2])
+#pragma omp target update to((([n][n])argv)[0:n][1])
+// CHECK-NEXT: #pragma omp target update to((([n][n])argv)[0:n][1])
+#pragma omp target update from((([n][n + 2])argv)[1][2:n:2])
+// CHECK-NEXT: #pragma omp target update from((([n][n + 2])argv)[1][2:n:2])
 #ifdef OMP51
 #pragma omp target update to(present: argv[2][0:1:2])
 // OMP5-NEXT: #pragma omp target update to(present: arr[2][0:1:2])
diff --git a/clang/test/OpenMP/target_update_from_messages.cpp b/clang/test/OpenMP/target_update_from_messages.cpp
index 02cd293c9a30a..128f84f06b612 100644
--- a/clang/test/OpenMP/target_update_from_messages.cpp
+++ b/clang/test/OpenMP/target_update_from_messages.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -verify=expected,le51 -fopenmp -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
-// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
-// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
-// RUN: %clang_cc1 -verify=expected,le51 -fopenmp -fopenmp-version=50 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le51 -fopenmp -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=40 -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=45 -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le51 -fopenmp -fopenmp-version=50 -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
 
-// RUN: %clang_cc1 -verify=expected,le51 -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le51 -fopenmp-simd -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
 
 void foo() {
 }
@@ -119,7 +119,7 @@ T tmain(T argc) {
 #pragma omp target update from(ba)
 #pragma omp target update from(h) // expected-error {{threadprivate variables are not allowed in 'from' clause}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from(k), to(k) // expected-error 2 {{variable can appear only once in OpenMP 'target update' construct}} expected-note 2 {{used here}}
-#pragma omp target update from(t), from(t[:5]) // expected-error 2 {{variable can appear only once in OpenMP 'target update' construct}} expected-note 2 {{used here}}
+#pragma omp target update from(t), from(t[:5]) // le45-error 2 {{variable can appear only once in OpenMP 'target update' construct}} le45-note 2 {{used here}}
 #pragma omp target update from(da)
 #pragma omp target update from(da[:4])
 
@@ -138,6 +138,23 @@ T tmain(T argc) {
 #pragma omp target update from(s7.x)
   }
 
+// OpenMP 5.0 [2.1.4, Array Shaping]: the shaped pointer is the array of the
+// list item, so it can be the base of array sections and subscripts.
+#pragma omp target update from((([2][10])m)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([I][10])m)[0:I][1], (([I][10])m)[0:I][5]) // le45-error 2 {{'I' in capture list does not name a variable}} le45-error 2 {{expected body of lambda expression}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][3][4])m)[0:2][1][0:4]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[1][:]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[:2][2:]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[0:2][0:5:2]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ']'}} le45-note {{to match this '['}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[:][1]) // le51-error 2 {{array section does not specify length for outermost dimension}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2])i)[0:2]) // le51-error 2 {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2])t)[0:2]) // le51-error 2 {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[0:2][1]) to((([2][10])m)[0:2][1]) // le51-error 2 {{variable can appear only once in OpenMP 'target update' construct}} le51-note 2 {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
+#pragma omp target data map(from: (([10])m)[0:10]) // le51-error 2 {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
+  {}
+
   return 0;
 }
 
@@ -175,7 +192,7 @@ int main(int argc, char **argv) {
 #pragma omp target update from(ba)
 #pragma omp target update from(h) // expected-error {{threadprivate variables are not allowed in 'from' clause}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from(k), to(k) // expected-error {{variable can appear only once in OpenMP 'target update' construct}} expected-note {{used here}}
-#pragma omp target update from(t), from(t[:5]) // expected-error {{variable can appear only once in OpenMP 'target update' construct}} expected-note {{used here}}
+#pragma omp target update from(t), from(t[:5]) // le45-error {{variable can appear only once in OpenMP 'target update' construct}} le45-note {{used here}}
 #pragma omp target update from(da)
 #pragma omp target update from(da[:4])
 
@@ -205,6 +222,24 @@ int main(int argc, char **argv) {
 #pragma omp target update from(s7.x)
   }
 
+// OpenMP 5.0 [2.1.4, Array Shaping]: the shaped pointer is the array of the
+// list item, so it can be the base of array sections and subscripts.
+#pragma omp target update from((([2][10])m)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([argc][argc + 2])m)[0:argc][1], (([argc][argc + 2])m)[0:argc][argc + 1]) // le45-error 2 {{expected body of lambda expression}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][3][4])m)[0:2][1][0:4]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[1][:]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[:2][2:]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[0:2][0:5:2]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ']'}} le45-note {{to match this '['}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[:][1]) // le51-error {{array section does not specify length for outermost dimension}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2])i)[0:2]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2])t)[0:2]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[0:2][1]) to((([2][10])m)[0:2][1]) // le51-error {{variable can appear only once in OpenMP 'target update' construct}} le51-note {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
+#pragma omp target update from((([2][10])BB)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target data map(from: (([10])m)[0:10]) // le51-error {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
+  {}
+
   return tmain<int, 3>(argc)+tmain<to, 4>(argc); // expected-note {{in instantiation of function template specialization 'tmain<int, 3>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<int, 4>' requested here}}
 }
 
diff --git a/clang/test/OpenMP/target_update_to_messages.cpp b/clang/test/OpenMP/target_update_to_messages.cpp
index 33aaf3bb9028b..49de404c45934 100644
--- a/clang/test/OpenMP/target_update_to_messages.cpp
+++ b/clang/test/OpenMP/target_update_to_messages.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify=expected,le51 -fopenmp -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
-// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
-// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le51 -fopenmp -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=40 -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=45 -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
 
-// RUN: %clang_cc1 -verify=expected,le51 -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
-// RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
-// RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le51 -fopenmp-simd -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -fopenmp-version=40 -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -fopenmp-version=45 -ferror-limit 300 %s -Wno-openmp-mapping -Wuninitialized
 
 void foo() {
 }
@@ -124,7 +124,7 @@ T tmain(T argc) {
 #pragma omp target update to(ba)
 #pragma omp target update to(h) // expected-error {{threadprivate variables are not allowed in 'to' clause}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to(k), from(k) // expected-error 2 {{variable can appear only once in OpenMP 'target update' construct}} expected-note 2 {{used here}}
-#pragma omp target update to(t), to(t[:5]) // expected-error 2 {{variable can appear only once in OpenMP 'target update' construct}} expected-note 2 {{used here}}
+#pragma omp target update to(t), to(t[:5]) // le45-error 2 {{variable can appear only once in OpenMP 'target update' construct}} le45-note 2 {{used here}}
 #pragma omp target update to(da)
 #pragma omp target update to(da[:4])
 
@@ -142,6 +142,23 @@ T tmain(T argc) {
   {
 #pragma omp target update to(s7.x)
   }
+
+// OpenMP 5.0 [2.1.4, Array Shaping]: the shaped pointer is the array of the
+// list item, so it can be the base of array sections and subscripts.
+#pragma omp target update to((([2][10])m)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([I][10])m)[0:I][1], (([I][10])m)[0:I][5]) // le45-error 2 {{'I' in capture list does not name a variable}} le45-error 2 {{expected body of lambda expression}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][3][4])m)[0:2][1][0:4]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[1][:]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[:2][2:]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[0:2][0:5:2]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ']'}} le45-note {{to match this '['}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[:][1]) // le51-error 2 {{array section does not specify length for outermost dimension}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2])i)[0:2]) // le51-error 2 {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2])t)[0:2]) // le51-error 2 {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[0:2][1]) from((([2][10])m)[0:2][1]) // le51-error 2 {{variable can appear only once in OpenMP 'target update' construct}} le51-note 2 {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
+#pragma omp target data map(to: (([10])m)[0:10]) // le51-error 2 {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
+  {}
   return 0;
 }
 
@@ -179,7 +196,7 @@ int main(int argc, char **argv) {
 #pragma omp target update to(ba)
 #pragma omp target update to(h) // expected-error {{threadprivate variables are not allowed in 'to' clause}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to(k), from(k) // expected-error {{variable can appear only once in OpenMP 'target update' construct}} expected-note {{used here}}
-#pragma omp target update to(t), to(t[:5]) // expected-error {{variable can appear only once in OpenMP 'target update' construct}} expected-note {{used here}}
+#pragma omp target update to(t), to(t[:5]) // le45-error {{variable can appear only once in OpenMP 'target update' construct}} le45-note {{used here}}
 #pragma omp target update to(da)
 #pragma omp target update to(da[:4])
 
@@ -210,6 +227,25 @@ int main(int argc, char **argv) {
 #pragma omp target update to(*(m+(m))) // expected-error {{invalid operands to binary expression ('int *' and 'int *')}}
 #pragma omp target update to(*(1+y+y)) // expected-error {{indirection requires pointer operand ('int' invalid)}}
   {}
+
+// OpenMP 5.0 [2.1.4, Array Shaping]: the shaped pointer is the array of the
+// list item, so it can be the base of array sections and subscripts.
+#pragma omp target update to((([2][10])m)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([argc][argc + 2])m)[0:argc][1], (([argc][argc + 2])m)[0:argc][argc + 1]) // le45-error 2 {{expected body of lambda expression}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][3][4])m)[0:2][1][0:4]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[1][:]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[:2][2:]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[0:2][0:5:2]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ']'}} le45-note {{to match this '['}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[:][1]) // le51-error {{array section does not specify length for outermost dimension}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2])i)[0:2]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2])t)[0:2]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[0:2][1]) from((([2][10])m)[0:2][1]) // le51-error {{variable can appear only once in OpenMP 'target update' construct}} le51-note {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
+#pragma omp target update to((([2][10])BB)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to(present: (([2][10])m)[0:2][1]) // le45-error {{use of undeclared identifier 'present'}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target data map(to: (([10])m)[0:10]) // le51-error {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
+  {}
   return tmain<int, 3>(argc)+tmain<from, 4>(argc); // expected-note {{in instantiation of function template specialization 'tmain<int, 3>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<int, 4>' requested here}}
 }
 

>From 1352c61eea29b5c7a33698d4241bd20c2917d855 Mon Sep 17 00:00:00 2001
From: Akash Manna <akash.manna.mymail at gmail.com>
Date: Sun, 22 Nov 2026 09:59:29 +0530
Subject: [PATCH 2/4] [Clang][OpenMP] Address review comments on shaped array
 sections

Shaping expressions no longer take part in the conflict redundancy walk,
and a matching array component without a declaration is not dereferenced.
A variable length array with an explicit length is never a whole
dimension. A non-contiguous section of a shaped pointer uses the pointer
value as its base and only its own sections as descriptor dimensions.
Oversized constant dimensions and function pointees are rejected, and the
whole-size checks use APSInt.
---
 clang/lib/CodeGen/CGOpenMPRuntime.cpp         | 29 ++++++++-
 clang/lib/Sema/SemaOpenMP.cpp                 | 60 +++++++++----------
 clang/test/OpenMP/GH136294.c                  | 42 ++++++++++---
 .../OpenMP/target_update_from_messages.cpp    |  7 +++
 .../test/OpenMP/target_update_to_messages.cpp |  7 +++
 5 files changed, 104 insertions(+), 41 deletions(-)

diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 0dfc276158c25..f3ed789516cc6 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -8456,6 +8456,20 @@ class MappableExprsHandler {
           dyn_cast<OMPArrayShapingExpr>(I->getAssociatedExpression());
       const auto *UO = dyn_cast<UnaryOperator>(I->getAssociatedExpression());
       const auto *BO = dyn_cast<BinaryOperator>(I->getAssociatedExpression());
+      // A non-contiguous section of a shaped array is transferred on its own:
+      // the shaped pointer is its base pointer, whatever expression (member,
+      // subscript, global) yields it.
+      if (OAShE && Next != CE && IsNonContiguous) {
+        BP = Address(
+            CGF.EmitScalarExpr(OAShE->getBase()),
+            CGF.ConvertTypeForMem(
+                OAShE->getBase()->getType()->getPointeeType()),
+            CGF.getContext().getTypeAlignInChars(OAShE->getBase()->getType()));
+        EncounteredME = nullptr;
+        ShouldBeMemberOf = false;
+        FirstPointerInComplexData = false;
+        continue;
+      }
       // An array shaping expression maps the shaped storage only as the whole
       // list item; as the base of array sections it just reinterprets the
       // pointer.
@@ -8757,9 +8771,18 @@ class MappableExprsHandler {
     MapValuesArrayTy DimSizes{llvm::ConstantInt::get(CGF.CGM.Int64Ty, 1)};
     uint64_t ElementTypeSize;
 
+    // Components past an array shaping expression belong to the shaped pointer
+    // base, not to dimensions of the shaped array.
+    auto ArrayDimsEnd = llvm::find_if(
+        Components,
+        [](const OMPClauseMappableExprCommon::MappableComponent &Component) {
+          return isa<OMPArrayShapingExpr>(Component.getAssociatedExpression());
+        });
+    auto ArrayDimComponents =
+        llvm::make_range(Components.begin(), ArrayDimsEnd);
     // Only array sections and subscripts add a dimension.
     unsigned NumArrayDims = llvm::count_if(
-        Components,
+        ArrayDimComponents,
         [](const OMPClauseMappableExprCommon::MappableComponent &Component) {
           return isa<ArraySectionExpr, ArraySubscriptExpr>(
               Component.getAssociatedExpression());
@@ -8769,7 +8792,7 @@ class MappableExprsHandler {
     // the first Stride. For example, for `int arr[10][10]`, the DimSizes
     // should be [10, 10] and the first stride is 4 btyes.
     for (const OMPClauseMappableExprCommon::MappableComponent &Component :
-         Components) {
+         ArrayDimComponents) {
       const Expr *AssocExpr = Component.getAssociatedExpression();
       const auto *OASE = dyn_cast<ArraySectionExpr>(AssocExpr);
 
@@ -8849,7 +8872,7 @@ class MappableExprsHandler {
     // count, and stride are the same as the number of non-contiguous
     // declaration in target update to/from clause.
     for (const OMPClauseMappableExprCommon::MappableComponent &Component :
-         Components) {
+         ArrayDimComponents) {
       const Expr *AssocExpr = Component.getAssociatedExpression();
 
       if (const auto *AE = dyn_cast<ArraySubscriptExpr>(AssocExpr)) {
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 9a722df5d424d..51604969e8688 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -24508,25 +24508,25 @@ static bool checkArrayExpressionRefersToWholeSize(Sema &SemaRef,
                                                   const ArraySectionExpr *OASE,
                                                   QualType BaseQTy) {
   ASTContext &Ctx = SemaRef.getASTContext();
-  auto EvaluatesTo = [&Ctx](const Expr *E, int64_t Value) {
+  auto EvaluatesTo = [&Ctx](const Expr *E, const llvm::APSInt &Value) {
     Expr::EvalResult Result;
     return !E->isValueDependent() && E->EvaluateAsInt(Result, Ctx) &&
-           Result.Val.getInt().getSExtValue() == Value;
+           llvm::APSInt::isSameValue(Result.Val.getInt(), Value);
   };
 
   if (OASE->getColonLocFirst().isInvalid()) {
     const auto *CATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr());
-    return CATy && CATy->getSExtSize() == 1;
+    return CATy && CATy->getSize().isOne();
   }
 
   const Expr *Stride = OASE->getStride();
-  if (Stride && !EvaluatesTo(Stride, 1))
+  if (Stride && !EvaluatesTo(Stride, llvm::APSInt::get(1)))
     return false;
   const Expr *LowerBound = OASE->getLowerBound();
-  if (LowerBound && !EvaluatesTo(LowerBound, 0))
+  if (LowerBound && !EvaluatesTo(LowerBound, llvm::APSInt::get(0)))
     return false;
 
-  if (BaseQTy->isPointerType())
+  if (!BaseQTy->isConstantArrayType() && !BaseQTy->isVariableArrayType())
     return false;
 
   // Without a length the section covers the rest of the dimension.
@@ -24534,19 +24534,11 @@ static bool checkArrayExpressionRefersToWholeSize(Sema &SemaRef,
   if (!Length)
     return true;
 
-  if (const auto *CATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr()))
-    return EvaluatesTo(Length, CATy->getSExtSize());
-
-  // For a variable length array the length has to be the size expression of
-  // the dimension, e.g. c[0:n] for double c[n][m].
-  const auto *VATy = dyn_cast<VariableArrayType>(BaseQTy.getTypePtr());
-  if (!VATy || !VATy->getSizeExpr() || Length->HasSideEffects(Ctx))
-    return false;
-  llvm::FoldingSetNodeID LengthID, SizeID;
-  Length->IgnoreParenImpCasts()->Profile(LengthID, Ctx, /*Canonical=*/true);
-  VATy->getSizeExpr()->IgnoreParenImpCasts()->Profile(SizeID, Ctx,
-                                                      /*Canonical=*/true);
-  return LengthID == SizeID;
+  // The size expression of a variable length array may have changed since the
+  // declaration, so only a constant size can be compared with the length.
+  const auto *CATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr());
+  return CATy && EvaluatesTo(Length, llvm::APSInt(CATy->getSize(),
+                                                  /*isUnsigned=*/true));
 }
 
 // The base of elements of list in a map clause have to be either:
@@ -25114,9 +25106,6 @@ static bool checkMapConflicts(
                          SI->getAssociatedExpression())) {
             const Expr *E = OASE->getBase()->IgnoreParenImpCasts();
             Type = ArraySectionExpr::getBaseOriginalType(E).getCanonicalType();
-          } else if (const auto *OASE = dyn_cast<OMPArrayShapingExpr>(
-                         SI->getAssociatedExpression())) {
-            Type = OASE->getBase()->getType()->getPointeeType();
           }
           if (Type.isNull() || Type->isAnyPointerType() ||
               checkArrayExpressionDoesNotReferToWholeSize(
@@ -25149,15 +25138,20 @@ static bool checkMapConflicts(
           return false;
         }
 
-        QualType DerivedType =
-            std::prev(CI)->getAssociatedDeclaration()->getType();
+        // The last matching component has no declaration when both
+        // expressions section the same array (OpenMP 5.0 motion clauses).
+        QualType DerivedType;
+        if (const ValueDecl *DerivedDecl =
+                std::prev(CI)->getAssociatedDeclaration())
+          DerivedType = DerivedDecl->getType();
         SourceLocation DerivedLoc =
             std::prev(CI)->getAssociatedExpression()->getExprLoc();
 
         // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C++, p.1]
         //  If the type of a list item is a reference to a type T then the type
         //  will be considered to be T for all purposes of this clause.
-        DerivedType = DerivedType.getNonReferenceType();
+        if (!DerivedType.isNull())
+          DerivedType = DerivedType.getNonReferenceType();
 
         // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.1]
         //  A variable for which the type is pointer and an array section
@@ -25170,7 +25164,7 @@ static bool checkMapConflicts(
         //  storage in the device data environment, all of the original storage
         //  must have corresponding storage in the device data environment.
         //
-        if (DerivedType->isAnyPointerType()) {
+        if (!DerivedType.isNull() && DerivedType->isAnyPointerType()) {
           if (CI == CE || SI == SE) {
             SemaRef.Diag(
                 DerivedLoc,
@@ -28603,7 +28597,8 @@ ExprResult SemaOpenMP::ActOnOMPArrayShapingExpr(
                                        RParenLoc, Dims, Brackets);
   if (!BaseTy->isPointerType() ||
       (!Base->isTypeDependent() &&
-       BaseTy->getPointeeType()->isIncompleteType()))
+       (BaseTy->getPointeeType()->isIncompleteType() ||
+        BaseTy->getPointeeType()->isFunctionType())))
     return ExprError(Diag(Base->getExprLoc(),
                           diag::err_omp_non_pointer_type_array_shaping_base)
                      << Base->getSourceRange());
@@ -28657,7 +28652,8 @@ ExprResult SemaOpenMP::ActOnOMPArrayShapingExpr(
   // OpenMP 5.0 [2.1.4, Array Shaping]: the result has n-dimensional array type
   // s1 x ... x sn of T; build it like the type of a declared array.
   QualType ShapedTy = BaseTy->getPointeeType();
-  for (Expr *Dim : llvm::reverse(NewDims)) {
+  for (size_t I = NewDims.size(); I > 0; --I) {
+    Expr *Dim = NewDims[I - 1];
     if (Dim->isTypeDependent() || Dim->isValueDependent()) {
       ShapedTy = Context.getDependentSizedArrayType(
           ShapedTy, Dim, ArraySizeModifier::Normal, /*IndexTypeQuals=*/0);
@@ -28667,13 +28663,17 @@ ExprResult SemaOpenMP::ActOnOMPArrayShapingExpr(
     // An array of variable length arrays is itself a variable length array.
     if (ShapedTy->isDependentType() || ShapedTy->isConstantSizeType())
       Size = Dim->getIntegerConstantExpr(Context);
-    if (Size)
+    if (Size) {
+      if (SemaRef.checkArrayTooLarge(ShapedTy, *Size, Dim->getExprLoc(),
+                                     Brackets[I - 1]))
+        return ExprError();
       ShapedTy = Context.getConstantArrayType(ShapedTy, *Size, Dim,
                                               ArraySizeModifier::Normal,
                                               /*IndexTypeQuals=*/0);
-    else
+    } else {
       ShapedTy = Context.getVariableArrayType(
           ShapedTy, Dim, ArraySizeModifier::Normal, /*IndexTypeQuals=*/0);
+    }
   }
   return OMPArrayShapingExpr::Create(Context, Context.OMPArrayShapingTy,
                                      ShapedTy, Base, LParenLoc, RParenLoc,
diff --git a/clang/test/OpenMP/GH136294.c b/clang/test/OpenMP/GH136294.c
index e283a23574b6b..68e8883d16c0e 100644
--- a/clang/test/OpenMP/GH136294.c
+++ b/clang/test/OpenMP/GH136294.c
@@ -31,6 +31,14 @@
 // A row of the shaped array is contiguous: 4 doubles, TO.
 // CHECK-DAG: [[ROW_SIZES:@.+]] = private unnamed_addr constant [1 x i64] [i64 32]
 // CHECK-DAG: [[ROW_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 1]
+// Shaped pointers that are a member, a global and an array element: one entry
+// with the three descriptor dimensions each.
+// CHECK-DAG: [[MEMBER_SIZES:@.+]] = private unnamed_addr constant [1 x i64] [i64 3]
+// CHECK-DAG: [[MEMBER_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 17592186044418]
+// CHECK-DAG: [[GLOBAL_SIZES:@.+]] = private unnamed_addr constant [1 x i64] [i64 3]
+// CHECK-DAG: [[GLOBAL_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 17592186044418]
+// CHECK-DAG: [[ELEMENT_SIZES:@.+]] = private unnamed_addr constant [1 x i64] [i64 3]
+// CHECK-DAG: [[ELEMENT_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 17592186044417]
 
 void exch_data(double *a, int nx, int ny);
 
@@ -47,7 +55,8 @@ void array_ing(double *a, int nx, int ny) {
 
     // The base pointer is the value of 'a'; the dimensions of the shape are
     // evaluated like the sizes of a variable length array.
-    // CHECK:      [[BP:%.+]] = load ptr, ptr [[A_ADDR]],
+    // CHECK:      load ptr, ptr [[A_ADDR]],
+    // CHECK-NEXT: [[BP:%.+]] = load ptr, ptr [[A_ADDR]],
     // CHECK-NEXT: [[NX:%.+]] = load i32, ptr [[NX_ADDR]],
     // CHECK-NEXT: [[NX_64:%.+]] = zext i32 [[NX]] to i64
     // CHECK-NEXT: [[NY:%.+]] = load i32, ptr [[NY_ADDR]],
@@ -69,6 +78,7 @@ void array_ing(double *a, int nx, int ny) {
 
     // The second list item, &a[0][ny] of the shaped array; its own shaping
     // expression evaluates the dimensions again.
+    // CHECK-NEXT: load ptr, ptr [[A_ADDR]],
     // CHECK-NEXT: [[BP2:%.+]] = load ptr, ptr [[A_ADDR]],
     // CHECK-NEXT: [[NY_C:%.+]] = load i32, ptr [[NY_ADDR]],
     // CHECK-NEXT: [[NY_IDX:%.+]] = sext i32 [[NY_C]] to i64
@@ -198,7 +208,8 @@ void vla_control(int nx, int ny) {
 // CHECK:       store ptr %p, ptr [[P_ADDR:%.+]],
 void const_dims(double *p) {
   // &p[0][1] of the shaped double[3][4].
-  // CHECK:      [[CBP:%.+]] = load ptr, ptr [[P_ADDR]],
+  // CHECK:      load ptr, ptr [[P_ADDR]],
+  // CHECK-NEXT: [[CBP:%.+]] = load ptr, ptr [[P_ADDR]],
   // CHECK-NEXT: [[CP:%.+]] = load ptr, ptr [[P_ADDR]],
   // CHECK-NEXT: [[CROW0:%.+]] = getelementptr inbounds nuw [4 x double], ptr [[CP]], i64 0
   // CHECK-NEXT: [[CDECAY:%.+]] = getelementptr inbounds [4 x double], ptr [[CROW0]], i64 0, i64 0
@@ -250,16 +261,31 @@ struct S {
 };
 double *g;
 
-// Other bases of the shaped pointer: a data member and a global variable; the
-// shaped pointer stays the base pointer of the entry.
+// Other bases of the shaped pointer: a data member, a global variable and an
+// element of an array of pointers. The shaped pointer value is the base
+// pointer of the entry, and only the sections of the shaped array are
+// dimensions of the descriptor.
 // CHECK-LABEL: define {{.*}}void @other_bases(
-void other_bases(struct S s, int n, int m) {
-  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 {{[0-9]+}}, ptr %{{.+}}, ptr %{{.+}}, ptr {{.+}}, ptr {{.+}}, ptr null, ptr null)
-#pragma omp target update to((([n])s.p)[1:n - 2])
+void other_bases(struct S s, double **pp, int n, int m) {
+  // CHECK:      [[SP:%.+]] = load ptr, ptr [[SP_ADDR:%.+]],
+  // CHECK:      store ptr [[SP]], ptr
+  // CHECK:      getelementptr inbounds [3 x %struct.descriptor_dim{{.*}}], ptr %{{.+}}, i64 0, i64 0
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr [[MEMBER_SIZES]], ptr [[MEMBER_TYPES]], ptr null, ptr null)
+#pragma omp target update from((([n][m])s.p)[0:n][1])
   // CHECK:      [[G:%.+]] = load ptr, ptr @g,
   // CHECK:      store ptr [[G]], ptr
-  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr @{{.+}}, ptr null, ptr null)
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr [[GLOBAL_SIZES]], ptr [[GLOBAL_TYPES]], ptr null, ptr null)
 #pragma omp target update from((([n][m])g)[0:n][1])
+  // CHECK:      [[PP3_ADDR:%.+]] = getelementptr inbounds ptr, ptr %{{.+}}, i64 3
+  // CHECK-NEXT: [[PP3:%.+]] = load ptr, ptr [[PP3_ADDR]],
+  // CHECK:      store ptr [[PP3]], ptr
+  // CHECK:      getelementptr inbounds [3 x %struct.descriptor_dim{{.*}}], ptr %{{.+}}, i64 0, i64 0
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr [[ELEMENT_SIZES]], ptr [[ELEMENT_TYPES]], ptr null, ptr null)
+#pragma omp target update to((([n][m])pp[3])[0:n][1])
+  // A contiguous section keeps the pointer-attachment path: the member is the
+  // base pointer there as well.
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr null, ptr null)
+#pragma omp target update to((([n])s.p)[1:n - 2])
 }
 
 // Other clauses of the directive, and the other clauses that allow array
diff --git a/clang/test/OpenMP/target_update_from_messages.cpp b/clang/test/OpenMP/target_update_from_messages.cpp
index 128f84f06b612..3b7e4c58de2fb 100644
--- a/clang/test/OpenMP/target_update_from_messages.cpp
+++ b/clang/test/OpenMP/target_update_from_messages.cpp
@@ -151,6 +151,8 @@ T tmain(T argc) {
 #pragma omp target update from((([2])i)[0:2]) // le51-error 2 {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from((([2])t)[0:2]) // le51-error 2 {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from((([2][10])m)[0:2][1]) to((([2][10])m)[0:2][1]) // le51-error 2 {{variable can appear only once in OpenMP 'target update' construct}} le51-note 2 {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[0:2]) to((([2][10])m)[0:2][1]) // le51-error 2 {{variable can appear only once in OpenMP 'target update' construct}} le51-note 2 {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[0:2][1]) to(m[0]) // le51-error 2 {{same pointer dereferenced in multiple different ways in map clause expressions}} le51-note 2 {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
 #pragma omp target data map(from: (([10])m)[0:10]) // le51-error 2 {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
   {}
@@ -174,6 +176,7 @@ int main(int argc, char **argv) {
   S7 s7;
   int **BB, *offset;
   int ***BBB;
+  void (*fp)(void);
 
 #pragma omp target update from // expected-error {{expected '(' after 'from'}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
@@ -235,6 +238,10 @@ int main(int argc, char **argv) {
 #pragma omp target update from((([2])i)[0:2]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from((([2])t)[0:2]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from((([2][10])m)[0:2][1]) to((([2][10])m)[0:2][1]) // le51-error {{variable can appear only once in OpenMP 'target update' construct}} le51-note {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[0:2]) to((([2][10])m)[0:2][1]) // le51-error {{variable can appear only once in OpenMP 'target update' construct}} le51-note {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])m)[0:2][1]) to(m[0]) // le51-error {{same pointer dereferenced in multiple different ways in map clause expressions}} le51-note {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([1ULL << 62])m)[0:1]) // le51-error {{array is too large}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2])fp)[0:1]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
 #pragma omp target update from((([2][10])BB)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target data map(from: (([10])m)[0:10]) // le51-error {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
diff --git a/clang/test/OpenMP/target_update_to_messages.cpp b/clang/test/OpenMP/target_update_to_messages.cpp
index 82277d3ed1cd9..ee6c5104cd6c9 100644
--- a/clang/test/OpenMP/target_update_to_messages.cpp
+++ b/clang/test/OpenMP/target_update_to_messages.cpp
@@ -156,6 +156,8 @@ T tmain(T argc) {
 #pragma omp target update to((([2])i)[0:2]) // le51-error 2 {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to((([2])t)[0:2]) // le51-error 2 {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to((([2][10])m)[0:2][1]) from((([2][10])m)[0:2][1]) // le51-error 2 {{variable can appear only once in OpenMP 'target update' construct}} le51-note 2 {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[0:2]) from((([2][10])m)[0:2][1]) // le51-error 2 {{variable can appear only once in OpenMP 'target update' construct}} le51-note 2 {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[0:2][1]) from(m[0]) // le51-error 2 {{same pointer dereferenced in multiple different ways in map clause expressions}} le51-note 2 {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
 #pragma omp target data map(to: (([10])m)[0:10]) // le51-error 2 {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
   {}
@@ -178,6 +180,7 @@ int main(int argc, char **argv) {
   int *m;
   int **BB, *offset;
   int ***BBB;
+  void (*fp)(void);
   S8 s8v, *s8p = &s8v;
   int *S8::*s8mp = &S8::ptr;
 
@@ -245,6 +248,10 @@ int main(int argc, char **argv) {
 #pragma omp target update to((([2])i)[0:2]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to((([2])t)[0:2]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to((([2][10])m)[0:2][1]) from((([2][10])m)[0:2][1]) // le51-error {{variable can appear only once in OpenMP 'target update' construct}} le51-note {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[0:2]) from((([2][10])m)[0:2][1]) // le51-error {{variable can appear only once in OpenMP 'target update' construct}} le51-note {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])m)[0:2][1]) from(m[0]) // le51-error {{same pointer dereferenced in multiple different ways in map clause expressions}} le51-note {{used here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([1ULL << 62])m)[0:1]) // le51-error {{array is too large}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2])fp)[0:1]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
 #pragma omp target update to((([2][10])BB)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to(present: (([2][10])m)[0:2][1]) // le45-error {{use of undeclared identifier 'present'}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}

>From 4aa7e90c3d2caa795bec9d0911c4960975c75e69 Mon Sep 17 00:00:00 2001
From: Akash Manna <akash.manna.mymail at gmail.com>
Date: Tue, 24 Nov 2026 10:39:17 +0530
Subject: [PATCH 3/4] [Clang][OpenMP] Address second review round on shaped
 array sections

The outermost-length check inspects the last array expression of the
leading run instead of stopping at a subscript in the base. Each recorded
component list keeps its own clause kind, so to and from items of one
struct are checked against each other again. Element sizes of
non-contiguous descriptors and the upper address of depend and affinity
sections are computed at run time for variable length array elements.
Shaped non-contiguous items keep their attach pointer, which removes the
duplicate base load and keeps them out of the struct's combined entry,
and 'this' is accepted as the shaped base.
---
 clang/lib/AST/OpenMPClause.cpp                |   10 +-
 clang/lib/CodeGen/CGOpenMPRuntime.cpp         |   51 +-
 clang/lib/Sema/SemaOpenMP.cpp                 |   54 +-
 clang/test/OpenMP/GH136294.c                  |   58 +-
 clang/test/OpenMP/target_update_codegen.cpp   |   43 +
 .../OpenMP/target_update_from_messages.cpp    |    4 +
 .../test/OpenMP/target_update_to_messages.cpp |    4 +
 clang/test/OpenMP/task_codegen.cpp            | 3243 +++++++++--------
 8 files changed, 1799 insertions(+), 1668 deletions(-)

diff --git a/clang/lib/AST/OpenMPClause.cpp b/clang/lib/AST/OpenMPClause.cpp
index b878f789154c8..1ac8e3102661b 100644
--- a/clang/lib/AST/OpenMPClause.cpp
+++ b/clang/lib/AST/OpenMPClause.cpp
@@ -1180,8 +1180,14 @@ OMPClauseMappableExprCommon::findAttachPtrExpr(
 
   // Only check for non-contiguous sections on target_update, since we can
   // assume array-sections are contiguous on maps on other constructs, even if
-  // we are not sure of it at compile-time, like for a[1:x][2].
-  if (Components.back().isNonContiguous() && CurDirKind == OMPD_target_update)
+  // we are not sure of it at compile-time, like for a[1:x][2]. A shaped
+  // pointer is the base pointer of its non-contiguous sections, though.
+  bool HasArrayShaping =
+      llvm::any_of(Components, [](const MappableComponent &Component) {
+        return isa<OMPArrayShapingExpr>(Component.getAssociatedExpression());
+      });
+  if (Components.back().isNonContiguous() && CurDirKind == OMPD_target_update &&
+      !HasArrayShaping)
     return {nullptr, std::nullopt};
 
   // To find the attach base-pointer, we start with the second component,
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index f3ed789516cc6..e5515058fa1f0 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -3934,9 +3934,17 @@ getPointerAndSize(CodeGenFunction &CGF, const Expr *E) {
                  dyn_cast<ArraySectionExpr>(E->IgnoreParenImpCasts())) {
     LValue UpAddrLVal = CGF.EmitArraySectionExpr(ASE, /*IsLowerBound=*/false);
     Address UpAddrAddress = UpAddrLVal.getAddress();
-    llvm::Value *UpAddr = CGF.Builder.CreateConstGEP1_32(
-        UpAddrAddress.getElementType(), UpAddrAddress.emitRawPointer(CGF),
-        /*Idx0=*/1);
+    llvm::Value *UpAddr;
+    // The address holds the innermost element of a variable length array
+    // element; step over the whole element, whose size is a run time value.
+    if (UpAddrLVal.getType()->isVariableArrayType())
+      UpAddr =
+          CGF.Builder.CreateGEP(CGF.Int8Ty, UpAddrAddress.emitRawPointer(CGF),
+                                CGF.getTypeSize(UpAddrLVal.getType()));
+    else
+      UpAddr = CGF.Builder.CreateConstGEP1_32(UpAddrAddress.getElementType(),
+                                              UpAddrAddress.emitRawPointer(CGF),
+                                              /*Idx0=*/1);
     SizeVal = CGF.Builder.CreatePtrDiff(UpAddr, Addr, "", /*IsNUW=*/true);
   } else {
     SizeVal = CGF.getTypeSize(Ty);
@@ -8456,18 +8464,17 @@ class MappableExprsHandler {
           dyn_cast<OMPArrayShapingExpr>(I->getAssociatedExpression());
       const auto *UO = dyn_cast<UnaryOperator>(I->getAssociatedExpression());
       const auto *BO = dyn_cast<BinaryOperator>(I->getAssociatedExpression());
-      // A non-contiguous section of a shaped array is transferred on its own:
-      // the shaped pointer is its base pointer, whatever expression (member,
-      // subscript, global) yields it.
+      // A non-contiguous section of a shaped array is based on the shaped
+      // pointer. The attach pointer provides it, except after pointer
+      // arithmetic (e.g. `([n])(p + 10)`), which the attach pointer skips.
       if (OAShE && Next != CE && IsNonContiguous) {
-        BP = Address(
-            CGF.EmitScalarExpr(OAShE->getBase()),
-            CGF.ConvertTypeForMem(
-                OAShE->getBase()->getType()->getPointeeType()),
-            CGF.getContext().getTypeAlignInChars(OAShE->getBase()->getType()));
-        EncounteredME = nullptr;
-        ShouldBeMemberOf = false;
-        FirstPointerInComplexData = false;
+        if (!BP.isValid() ||
+            isa<BinaryOperator>(OAShE->getBase()->IgnoreParenImpCasts()))
+          BP = Address(CGF.EmitScalarExpr(OAShE->getBase()),
+                       CGF.ConvertTypeForMem(
+                           OAShE->getBase()->getType()->getPointeeType()),
+                       CGF.getContext().getTypeAlignInChars(
+                           OAShE->getBase()->getType()));
         continue;
       }
       // An array shaping expression maps the shaped storage only as the whole
@@ -8769,7 +8776,7 @@ class MappableExprsHandler {
     MapValuesArrayTy CurCounts;
     MapValuesArrayTy CurStrides = {llvm::ConstantInt::get(CGF.CGM.Int64Ty, 1)};
     MapValuesArrayTy DimSizes{llvm::ConstantInt::get(CGF.CGM.Int64Ty, 1)};
-    uint64_t ElementTypeSize;
+    llvm::Value *ElementTypeSize = nullptr;
 
     // Components past an array shaping expression belong to the shaped pointer
     // base, not to dimensions of the shaped array.
@@ -8839,10 +8846,12 @@ class MappableExprsHandler {
           // level of indirection.
           if (&Component != &*Components.begin())
             ElementType = ElementType->getPointeeOrArrayElementType();
-          ElementTypeSize =
-              Context.getTypeSizeInChars(ElementType).getQuantity();
-          CurCounts.push_back(
-              llvm::ConstantInt::get(CGF.Int64Ty, ElementTypeSize));
+          // The element may be a variable length array (a section of fewer
+          // dimensions than the array), whose size is a run time value.
+          ElementTypeSize = CGF.Builder.CreateIntCast(
+              CGF.getTypeSize(QualType(ElementType, 0)), CGF.Int64Ty,
+              /*isSigned=*/false);
+          CurCounts.push_back(ElementTypeSize);
         }
       }
       // Get dimension value except for the last dimension since we don't need
@@ -8861,8 +8870,8 @@ class MappableExprsHandler {
     // Skip the dummy dimension since we have already have its information.
     auto *DI = DimSizes.begin() + 1;
     // Product of dimension.
-    llvm::Value *DimProd =
-        llvm::ConstantInt::get(CGF.CGM.Int64Ty, ElementTypeSize);
+    assert(ElementTypeSize && "Element size of the section is not known");
+    llvm::Value *DimProd = ElementTypeSize;
 
     // Collect info for non-contiguous. Notice that offset, count, and stride
     // are only meaningful for array-section, so we insert a null for anything
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 51604969e8688..10284a5470a0f 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -140,11 +140,11 @@ class DSAStackTy {
   using LCDeclInfo = std::pair<unsigned, VarDecl *>;
   using LoopControlVariablesMapTy =
       llvm::SmallDenseMap<const ValueDecl *, LCDeclInfo, 8>;
-  /// Struct that associates a component with the clause kind where they are
-  /// found.
+  /// Struct that associates component lists with the clause kinds where they
+  /// are found.
   struct MappedExprComponentTy {
     OMPClauseMappableExprCommon::MappableExprComponentLists Components;
-    OpenMPClauseKind Kind = OMPC_unknown;
+    SmallVector<OpenMPClauseKind, 8> Kinds;
   };
   using MappedExprComponentsTy =
       llvm::DenseMap<const ValueDecl *, MappedExprComponentTy>;
@@ -1083,9 +1083,9 @@ class DSAStackTy {
     for (; SI != SE; ++SI) {
       auto MI = SI->MappedExprComponents.find(VD);
       if (MI != SI->MappedExprComponents.end())
-        for (OMPClauseMappableExprCommon::MappableExprComponentListRef L :
-             MI->second.Components)
-          if (Check(L, MI->second.Kind))
+        for (auto [L, K] :
+             llvm::zip_equal(MI->second.Components, MI->second.Kinds))
+          if (Check(L, K))
             return true;
     }
     return false;
@@ -1105,9 +1105,9 @@ class DSAStackTy {
     const SharingMapTy &StackElem = getStackElemAtLevel(Level);
     auto MI = StackElem.MappedExprComponents.find(VD);
     if (MI != StackElem.MappedExprComponents.end())
-      for (OMPClauseMappableExprCommon::MappableExprComponentListRef L :
-           MI->second.Components)
-        if (Check(L, MI->second.Kind))
+      for (auto [L, K] :
+           llvm::zip_equal(MI->second.Components, MI->second.Kinds))
+        if (Check(L, K))
           return true;
     return false;
   }
@@ -1122,7 +1122,7 @@ class DSAStackTy {
     // Create new entry and append the new components there.
     MEC.Components.resize(MEC.Components.size() + 1);
     MEC.Components.back().append(Components.begin(), Components.end());
-    MEC.Kind = WhereFoundClauseKind;
+    MEC.Kinds.push_back(WhereFoundClauseKind);
   }
 
   unsigned getNestingLevel() const {
@@ -24908,10 +24908,16 @@ class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {
       return false;
     }
 
+    // The shaped 'this' pointer is the base of the list item.
+    if (const auto *TE = dyn_cast<CXXThisExpr>(Base->IgnoreParenCasts())) {
+      assert(!RelevantExpr && "RelevantExpr is expected to be nullptr");
+      RelevantExpr = TE;
+    }
+
     // Record the component - we don't have any declaration associated.
     Components.emplace_back(E, nullptr, IsNonContiguous);
 
-    return Visit(Base->IgnoreParenImpCasts());
+    return RelevantExpr || Visit(Base->IgnoreParenImpCasts());
   }
 
   bool VisitUnaryOperator(UnaryOperator *UO) {
@@ -24995,18 +25001,20 @@ static const Expr *checkMapClauseExpressionBase(
     // Check if the highest dimension array section has length specified
     if (SemaRef.getLangOpts().OpenMP >= 50 && !CurComponents.empty() &&
         (CKind == OMPC_to || CKind == OMPC_from)) {
-      auto CI = CurComponents.rbegin();
-      auto CE = CurComponents.rend();
-      for (; CI != CE; ++CI) {
-        const Expr *E = CI->getAssociatedExpression();
-        if (!isa<ArraySectionExpr, ArraySubscriptExpr>(E))
-          continue;
-        // The outermost dimension is a single element or has a length.
-        const auto *OASE = dyn_cast<ArraySectionExpr>(E);
-        if (!OASE || OASE->getColonLocFirst().isInvalid() || OASE->getLength())
-          break;
-        SemaRef.Diag(ELoc, diag::err_array_section_does_not_specify_length)
-            << ERange;
+      // The outermost dimension is the last array expression of the leading
+      // run; a subscript in the base (e.g. 'pp[3]') is not a dimension.
+      auto It = llvm::find_if_not(
+          CurComponents,
+          [](const OMPClauseMappableExprCommon::MappableComponent &C) {
+            return isa<ArraySectionExpr, ArraySubscriptExpr>(
+                C.getAssociatedExpression());
+          });
+      if (It != CurComponents.begin()) {
+        const auto *OASE = dyn_cast<ArraySectionExpr>(
+            std::prev(It)->getAssociatedExpression());
+        if (OASE && OASE->getColonLocFirst().isValid() && !OASE->getLength())
+          SemaRef.Diag(ELoc, diag::err_array_section_does_not_specify_length)
+              << ERange;
       }
     }
     return Checker.getFoundBase();
diff --git a/clang/test/OpenMP/GH136294.c b/clang/test/OpenMP/GH136294.c
index 68e8883d16c0e..e0f76ed01d162 100644
--- a/clang/test/OpenMP/GH136294.c
+++ b/clang/test/OpenMP/GH136294.c
@@ -39,6 +39,8 @@
 // CHECK-DAG: [[GLOBAL_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 17592186044418]
 // CHECK-DAG: [[ELEMENT_SIZES:@.+]] = private unnamed_addr constant [1 x i64] [i64 3]
 // CHECK-DAG: [[ELEMENT_TYPES:@.+]] = private unnamed_addr constant [1 x i64] [i64 17592186044417]
+// Combined struct entry, two members MEMBER_OF(1) | TO, section TO | NON_CONTIG.
+// CHECK-DAG: [[MIXED_TYPES:@.+]] = private unnamed_addr constant [4 x i64] [i64 0, i64 281474976710657, i64 281474976710657, i64 17592186044417]
 
 void exch_data(double *a, int nx, int ny);
 
@@ -55,8 +57,7 @@ void array_ing(double *a, int nx, int ny) {
 
     // The base pointer is the value of 'a'; the dimensions of the shape are
     // evaluated like the sizes of a variable length array.
-    // CHECK:      load ptr, ptr [[A_ADDR]],
-    // CHECK-NEXT: [[BP:%.+]] = load ptr, ptr [[A_ADDR]],
+    // CHECK:      [[BP:%.+]] = load ptr, ptr [[A_ADDR]],
     // CHECK-NEXT: [[NX:%.+]] = load i32, ptr [[NX_ADDR]],
     // CHECK-NEXT: [[NX_64:%.+]] = zext i32 [[NX]] to i64
     // CHECK-NEXT: [[NY:%.+]] = load i32, ptr [[NY_ADDR]],
@@ -78,7 +79,6 @@ void array_ing(double *a, int nx, int ny) {
 
     // The second list item, &a[0][ny] of the shaped array; its own shaping
     // expression evaluates the dimensions again.
-    // CHECK-NEXT: load ptr, ptr [[A_ADDR]],
     // CHECK-NEXT: [[BP2:%.+]] = load ptr, ptr [[A_ADDR]],
     // CHECK-NEXT: [[NY_C:%.+]] = load i32, ptr [[NY_ADDR]],
     // CHECK-NEXT: [[NY_IDX:%.+]] = sext i32 [[NY_C]] to i64
@@ -208,8 +208,7 @@ void vla_control(int nx, int ny) {
 // CHECK:       store ptr %p, ptr [[P_ADDR:%.+]],
 void const_dims(double *p) {
   // &p[0][1] of the shaped double[3][4].
-  // CHECK:      load ptr, ptr [[P_ADDR]],
-  // CHECK-NEXT: [[CBP:%.+]] = load ptr, ptr [[P_ADDR]],
+  // CHECK:      [[CBP:%.+]] = load ptr, ptr [[P_ADDR]],
   // CHECK-NEXT: [[CP:%.+]] = load ptr, ptr [[P_ADDR]],
   // CHECK-NEXT: [[CROW0:%.+]] = getelementptr inbounds nuw [4 x double], ptr [[CP]], i64 0
   // CHECK-NEXT: [[CDECAY:%.+]] = getelementptr inbounds [4 x double], ptr [[CROW0]], i64 0, i64 0
@@ -302,4 +301,53 @@ void clauses(double *p, int n, int m, int dev) {
   ;
 }
 
+// Fewer sections than dimensions: the descriptor element is a row of k doubles.
+// CHECK-LABEL: define {{.*}}void @partial_depth(
+// CHECK:       store i32 %k, ptr [[K_ADDR:%.+]],
+void partial_depth(double *p, int n, int m, int k) {
+  // CHECK:      [[K:%.+]] = load i32, ptr [[K_ADDR]],
+  // CHECK-NEXT: [[K64:%.+]] = zext i32 [[K]] to i64
+  // The entry size and the descriptor each compute the row size.
+  // CHECK:      mul nuw i64 [[K64]], 8
+  // CHECK:      [[ROW:%.+]] = mul nuw i64 [[K64]], 8
+  // CHECK:      store i64 [[ROW]], ptr
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr @{{.+}}, ptr null, ptr null)
+#pragma omp target update from((([n][m][k])p)[0:n][1])
+}
+
+// Rows in depend and affinity: the size extends over the whole last row.
+// CHECK-LABEL: define {{.*}}void @row_sections(
+void row_sections(double *p, int n, int m) {
+  // CHECK:      [[RS_ROW:%.+]] = mul nuw i64 %{{.+}}, 8
+  // CHECK-NEXT: [[RS_END:%.+]] = getelementptr i8, ptr %{{.+}}, i64 [[RS_ROW]]
+  // CHECK-NEXT: [[RS_END_INT:%.+]] = ptrtoaddr ptr [[RS_END]] to i64
+  // CHECK-NEXT: [[RS_BEGIN_INT:%.+]] = ptrtoaddr ptr %{{.+}} to i64
+  // CHECK-NEXT: [[RS_SIZE:%.+]] = sub nuw i64 [[RS_END_INT]], [[RS_BEGIN_INT]]
+  // CHECK:      store i64 [[RS_SIZE]], ptr
+#pragma omp task depend(in : (([n][m])p)[0:n]) affinity((([n][m])p)[0:n])
+  ;
+}
+
+// The base pointer is the shifted pointer, not 'p'.
+// CHECK-LABEL: define {{.*}}void @offset_base(
+void offset_base(double *p) {
+  // CHECK:      [[OB_BASE:%.+]] = getelementptr inbounds{{.*}} double, ptr %{{.+}}, i64 8
+  // CHECK:      store ptr [[OB_BASE]], ptr
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr @{{.+}}, ptr null, ptr null)
+#pragma omp target update to((([2][4])(p + 8))[0:2][1])
+}
+
+struct T {
+  int i;
+  float x;
+  double *p;
+};
+
+// The shaped section is not part of the combined entry of the struct.
+// CHECK-LABEL: define {{.*}}void @member_and_shaped(
+void member_and_shaped(struct T t, int n, int m) {
+  // CHECK: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 4, ptr %{{.+}}, ptr %{{.+}}, ptr %{{.+}}, ptr [[MIXED_TYPES]], ptr null, ptr null)
+#pragma omp target update to(t.i, t.x, (([n][m])t.p)[0:n][1])
+}
+
 #endif // HEADER
diff --git a/clang/test/OpenMP/target_update_codegen.cpp b/clang/test/OpenMP/target_update_codegen.cpp
index 1925d90651721..45bf90759656a 100644
--- a/clang/test/OpenMP/target_update_codegen.cpp
+++ b/clang/test/OpenMP/target_update_codegen.cpp
@@ -1604,5 +1604,48 @@ int a[10];
 // CK26: %[[LOAD2:.*]] = load i32, ptr %[[ITER]], align 4
 }
 
+#endif
+///==========================================================================///
+// RUN: %clang_cc1 -DCK27 -verify -Wno-vla -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK27
+// RUN: %clang_cc1 -DCK27 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK27
+// RUN: %clang_cc1 -DCK27 -verify -Wno-vla -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK27
+// RUN: %clang_cc1 -DCK27 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix CK27
+
+// RUN: %clang_cc1 -DCK27 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY20 %s
+// RUN: %clang_cc1 -DCK27 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY20 %s
+// RUN: %clang_cc1 -DCK27 -verify -Wno-vla -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY20 %s
+// RUN: %clang_cc1 -DCK27 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY20 %s
+// SIMD-ONLY20-NOT: {{__kmpc|__tgt}}
+#ifdef CK27
+
+// Shaped 'this' and shaped member as the base of array sections.
+struct ST {
+  double *p;
+  int n;
+
+  // CK27-LABEL: define {{.+}}foo
+  void foo() {
+    // CK27: [[THIS:%.+]] = load ptr, ptr %this.addr
+    // CK27: [[OBJ:%.+]] = getelementptr inbounds nuw %struct.ST, ptr [[THIS]], i{{.+}} 0
+    // CK27: store ptr [[THIS]], ptr
+    // CK27: store ptr [[OBJ]], ptr
+    // CK27: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr @{{.+}}, ptr null, ptr null)
+#pragma omp target update to((([2])this)[0:1])
+    // The member is the base pointer of the non-contiguous entry.
+    // CK27: [[P_ADDR:%.+]] = getelementptr inbounds nuw %struct.ST, ptr [[THIS]], i32 0, i32 0
+    // CK27-NEXT: [[P:%.+]] = load ptr, ptr [[P_ADDR]]
+    // CK27: store ptr [[P]], ptr
+    // CK27: getelementptr inbounds [3 x %struct.descriptor_dim{{.*}}], ptr %{{.+}}, i{{.+}} 0, i{{.+}} 0
+    // CK27: call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr @{{.+}}, ptr null, ptr null)
+#pragma omp target update from((([n][n])this->p)[0:n][1])
+  }
+};
+
+void bar(ST *st) { st->foo(); }
+
 #endif
 #endif
diff --git a/clang/test/OpenMP/target_update_from_messages.cpp b/clang/test/OpenMP/target_update_from_messages.cpp
index 3b7e4c58de2fb..e90d381872248 100644
--- a/clang/test/OpenMP/target_update_from_messages.cpp
+++ b/clang/test/OpenMP/target_update_from_messages.cpp
@@ -75,6 +75,8 @@ struct S8 {
 #pragma omp target update from(*(a+this->ptr)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from(*(*(this->ptr)+a+this->ptr)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from(*(this+this)) // expected-error {{invalid operands to binary expression ('S8 *' and 'S8 *')}}
+#pragma omp target update from(([2])this) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2])this)[0:1], (([2])this->ptr)[0:1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
   }
 };
 
@@ -244,6 +246,8 @@ int main(int argc, char **argv) {
 #pragma omp target update from((([2])fp)[0:1]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update from(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
 #pragma omp target update from((([2][10])BB)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([2][10])BB[1])[0:][1]) // le51-error {{array section does not specify length for outermost dimension}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to(s7.i) from(s7.x) from(s7.i) // expected-error {{variable can appear only once in OpenMP 'target update' construct}} expected-note {{used here}}
 #pragma omp target data map(from: (([10])m)[0:10]) // le51-error {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
   {}
 
diff --git a/clang/test/OpenMP/target_update_to_messages.cpp b/clang/test/OpenMP/target_update_to_messages.cpp
index ee6c5104cd6c9..4fc5a342cc93b 100644
--- a/clang/test/OpenMP/target_update_to_messages.cpp
+++ b/clang/test/OpenMP/target_update_to_messages.cpp
@@ -81,6 +81,8 @@ struct S8 {
     double marr[10][5][10];
 #pragma omp target update to(marr [0:1][2:4][1:2]) // le45-error {{array section does not specify contiguous storage}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
     {}
+#pragma omp target update to(([2])this) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2])this)[0:1], (([2])this->ptr)[0:1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
   }
 };
 
@@ -254,6 +256,8 @@ int main(int argc, char **argv) {
 #pragma omp target update to((([2])fp)[0:1]) // le51-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target update to(x, (([2][10])s7.p)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
 #pragma omp target update to((([2][10])BB)[0:2][1]) // le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update to((([2][10])BB[1])[0:][1]) // le51-error {{array section does not specify length for outermost dimension}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from(s7.i) to(s7.x) to(s7.i) // expected-error {{variable can appear only once in OpenMP 'target update' construct}} expected-note {{used here}}
 #pragma omp target update to(present: (([2][10])m)[0:2][1]) // le45-error {{use of undeclared identifier 'present'}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
 #pragma omp target data map(to: (([10])m)[0:10]) // le51-error {{OpenMP array shaping operation is not allowed here}} le45-error {{expected variable name or 'this' in lambda capture list}} le45-error {{expected ')'}} le45-note {{to match this '('}}
   {}
diff --git a/clang/test/OpenMP/task_codegen.cpp b/clang/test/OpenMP/task_codegen.cpp
index 4523b406e3b54..b1b6e688bbe8c 100644
--- a/clang/test/OpenMP/task_codegen.cpp
+++ b/clang/test/OpenMP/task_codegen.cpp
@@ -366,190 +366,191 @@ void test_transparent()
 // CHECK1-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
 // CHECK1-NEXT:    [[TMP35:%.*]] = mul nsw i64 9, [[TMP2]]
 // CHECK1-NEXT:    [[ARRAYIDX2:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP35]]
-// CHECK1-NEXT:    [[TMP36:%.*]] = getelementptr i32, ptr [[ARRAYIDX2]], i32 1
-// CHECK1-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
-// CHECK1-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK1-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
-// CHECK1-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK1-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP19]], i64 3
-// CHECK1-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
-// CHECK1-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
-// CHECK1-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
-// CHECK1-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
-// CHECK1-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
-// CHECK1-NEXT:    store i8 1, ptr [[TMP44]], align 8
+// CHECK1-NEXT:    [[TMP36:%.*]] = mul nuw i64 [[TMP2]], 4
+// CHECK1-NEXT:    [[TMP37:%.*]] = getelementptr i8, ptr [[ARRAYIDX2]], i64 [[TMP36]]
+// CHECK1-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[TMP37]] to i64
+// CHECK1-NEXT:    [[TMP39:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK1-NEXT:    [[TMP40:%.*]] = sub nuw i64 [[TMP38]], [[TMP39]]
+// CHECK1-NEXT:    [[TMP41:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK1-NEXT:    [[TMP42:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP19]], i64 3
+// CHECK1-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 0
+// CHECK1-NEXT:    store i64 [[TMP41]], ptr [[TMP43]], align 8
+// CHECK1-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 1
+// CHECK1-NEXT:    store i64 [[TMP40]], ptr [[TMP44]], align 8
+// CHECK1-NEXT:    [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 2
+// CHECK1-NEXT:    store i8 1, ptr [[TMP45]], align 8
 // CHECK1-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
-// CHECK1-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP15]], i32 4, ptr [[TMP19]], i32 0, ptr null)
-// CHECK1-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK1-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
-// CHECK1-NEXT:    store i32 0, ptr [[TMP48]], align 8
-// CHECK1-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP46]])
-// CHECK1-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK1-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
+// CHECK1-NEXT:    [[TMP46:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP15]], i32 4, ptr [[TMP19]], i32 0, ptr null)
+// CHECK1-NEXT:    [[TMP47:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK1-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP47]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP48]], i32 0, i32 2
+// CHECK1-NEXT:    store i32 0, ptr [[TMP49]], align 8
+// CHECK1-NEXT:    [[TMP50:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP47]])
+// CHECK1-NEXT:    [[TMP51:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK1-NEXT:    [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP51]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP53:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
 // CHECK1-NEXT:    [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK1-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
-// CHECK1-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
-// CHECK1-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
-// CHECK1-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
-// CHECK1-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
-// CHECK1-NEXT:    store i64 4, ptr [[TMP56]], align 8
-// CHECK1-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
-// CHECK1-NEXT:    store i8 3, ptr [[TMP57]], align 8
-// CHECK1-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
-// CHECK1-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP2]]
-// CHECK1-NEXT:    [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
-// CHECK1-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX7]], i64 [[TMP59]]
-// CHECK1-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
-// CHECK1-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP2]]
-// CHECK1-NEXT:    [[ARRAYIDX9:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
-// CHECK1-NEXT:    [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX9]], i64 [[TMP62]]
-// CHECK1-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX10]], i32 1
-// CHECK1-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
-// CHECK1-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX8]] to i64
-// CHECK1-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
-// CHECK1-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX8]] to i64
-// CHECK1-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
-// CHECK1-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
-// CHECK1-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
-// CHECK1-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
-// CHECK1-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
-// CHECK1-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
-// CHECK1-NEXT:    store i8 3, ptr [[TMP72]], align 8
+// CHECK1-NEXT:    [[TMP54:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
+// CHECK1-NEXT:    [[TMP55:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i64 0
+// CHECK1-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 0
+// CHECK1-NEXT:    store i64 [[TMP54]], ptr [[TMP56]], align 8
+// CHECK1-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 1
+// CHECK1-NEXT:    store i64 4, ptr [[TMP57]], align 8
+// CHECK1-NEXT:    [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 2
+// CHECK1-NEXT:    store i8 3, ptr [[TMP58]], align 8
+// CHECK1-NEXT:    [[TMP59:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-NEXT:    [[TMP60:%.*]] = sext i8 [[TMP59]] to i64
+// CHECK1-NEXT:    [[TMP61:%.*]] = mul nsw i64 4, [[TMP2]]
+// CHECK1-NEXT:    [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP61]]
+// CHECK1-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX7]], i64 [[TMP60]]
+// CHECK1-NEXT:    [[TMP62:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-NEXT:    [[TMP63:%.*]] = sext i8 [[TMP62]] to i64
+// CHECK1-NEXT:    [[TMP64:%.*]] = mul nsw i64 9, [[TMP2]]
+// CHECK1-NEXT:    [[ARRAYIDX9:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP64]]
+// CHECK1-NEXT:    [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX9]], i64 [[TMP63]]
+// CHECK1-NEXT:    [[TMP65:%.*]] = getelementptr i32, ptr [[ARRAYIDX10]], i32 1
+// CHECK1-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[TMP65]] to i64
+// CHECK1-NEXT:    [[TMP67:%.*]] = ptrtoaddr ptr [[ARRAYIDX8]] to i64
+// CHECK1-NEXT:    [[TMP68:%.*]] = sub nuw i64 [[TMP66]], [[TMP67]]
+// CHECK1-NEXT:    [[TMP69:%.*]] = ptrtoint ptr [[ARRAYIDX8]] to i64
+// CHECK1-NEXT:    [[TMP70:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i64 1
+// CHECK1-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 0
+// CHECK1-NEXT:    store i64 [[TMP69]], ptr [[TMP71]], align 8
+// CHECK1-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 1
+// CHECK1-NEXT:    store i64 [[TMP68]], ptr [[TMP72]], align 8
+// CHECK1-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 2
+// CHECK1-NEXT:    store i8 3, ptr [[TMP73]], align 8
 // CHECK1-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR11]], align 8
-// CHECK1-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
-// CHECK1-NEXT:    store i32 0, ptr [[TMP73]], align 8
-// CHECK1-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
-// CHECK1-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK1-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR13]], i64 0, i64 0
+// CHECK1-NEXT:    [[TMP74:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP52]], i32 0, i32 2
+// CHECK1-NEXT:    store i32 0, ptr [[TMP74]], align 8
+// CHECK1-NEXT:    [[TMP75:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP51]], i32 2, ptr [[TMP53]], i32 0, ptr null)
+// CHECK1-NEXT:    [[TMP76:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK1-NEXT:    [[TMP77:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP76]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP78:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR13]], i64 0, i64 0
 // CHECK1-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK1-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK1-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
-// CHECK1-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
-// CHECK1-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
-// CHECK1-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
-// CHECK1-NEXT:    store i64 4, ptr [[TMP81]], align 8
-// CHECK1-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
-// CHECK1-NEXT:    store i8 4, ptr [[TMP82]], align 8
-// CHECK1-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
-// CHECK1-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP2]]
-// CHECK1-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
-// CHECK1-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP84]]
-// CHECK1-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
-// CHECK1-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP2]]
-// CHECK1-NEXT:    [[ARRAYIDX17:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
-// CHECK1-NEXT:    [[ARRAYIDX18:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX17]], i64 [[TMP87]]
-// CHECK1-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX18]], i32 1
-// CHECK1-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
-// CHECK1-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX16]] to i64
-// CHECK1-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
-// CHECK1-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX16]] to i64
-// CHECK1-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
-// CHECK1-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
-// CHECK1-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
-// CHECK1-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
-// CHECK1-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
-// CHECK1-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
-// CHECK1-NEXT:    store i8 4, ptr [[TMP97]], align 8
+// CHECK1-NEXT:    [[TMP79:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK1-NEXT:    [[TMP80:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i64 0
+// CHECK1-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 0
+// CHECK1-NEXT:    store i64 [[TMP79]], ptr [[TMP81]], align 8
+// CHECK1-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 1
+// CHECK1-NEXT:    store i64 4, ptr [[TMP82]], align 8
+// CHECK1-NEXT:    [[TMP83:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 2
+// CHECK1-NEXT:    store i8 4, ptr [[TMP83]], align 8
+// CHECK1-NEXT:    [[TMP84:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-NEXT:    [[TMP85:%.*]] = sext i8 [[TMP84]] to i64
+// CHECK1-NEXT:    [[TMP86:%.*]] = mul nsw i64 4, [[TMP2]]
+// CHECK1-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP86]]
+// CHECK1-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP85]]
+// CHECK1-NEXT:    [[TMP87:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-NEXT:    [[TMP88:%.*]] = sext i8 [[TMP87]] to i64
+// CHECK1-NEXT:    [[TMP89:%.*]] = mul nsw i64 9, [[TMP2]]
+// CHECK1-NEXT:    [[ARRAYIDX17:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP89]]
+// CHECK1-NEXT:    [[ARRAYIDX18:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX17]], i64 [[TMP88]]
+// CHECK1-NEXT:    [[TMP90:%.*]] = getelementptr i32, ptr [[ARRAYIDX18]], i32 1
+// CHECK1-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[TMP90]] to i64
+// CHECK1-NEXT:    [[TMP92:%.*]] = ptrtoaddr ptr [[ARRAYIDX16]] to i64
+// CHECK1-NEXT:    [[TMP93:%.*]] = sub nuw i64 [[TMP91]], [[TMP92]]
+// CHECK1-NEXT:    [[TMP94:%.*]] = ptrtoint ptr [[ARRAYIDX16]] to i64
+// CHECK1-NEXT:    [[TMP95:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i64 1
+// CHECK1-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 0
+// CHECK1-NEXT:    store i64 [[TMP94]], ptr [[TMP96]], align 8
+// CHECK1-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 1
+// CHECK1-NEXT:    store i64 [[TMP93]], ptr [[TMP97]], align 8
+// CHECK1-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 2
+// CHECK1-NEXT:    store i8 4, ptr [[TMP98]], align 8
 // CHECK1-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR19]], align 8
-// CHECK1-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
-// CHECK1-NEXT:    store i32 0, ptr [[TMP98]], align 8
-// CHECK1-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
-// CHECK1-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK1-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
-// CHECK1-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
-// CHECK1-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
-// CHECK1-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
-// CHECK1-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
-// CHECK1-NEXT:    store i64 4, ptr [[TMP105]], align 8
-// CHECK1-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
-// CHECK1-NEXT:    store i8 3, ptr [[TMP106]], align 8
+// CHECK1-NEXT:    [[TMP99:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP77]], i32 0, i32 2
+// CHECK1-NEXT:    store i32 0, ptr [[TMP99]], align 8
+// CHECK1-NEXT:    [[TMP100:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP76]], i32 2, ptr [[TMP78]], i32 0, ptr null)
+// CHECK1-NEXT:    [[TMP101:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK1-NEXT:    [[TMP102:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP101]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP103:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK1-NEXT:    [[TMP104:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 0
+// CHECK1-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 0
+// CHECK1-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP105]], align 8
+// CHECK1-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 1
+// CHECK1-NEXT:    store i64 4, ptr [[TMP106]], align 8
+// CHECK1-NEXT:    [[TMP107:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 2
+// CHECK1-NEXT:    store i8 3, ptr [[TMP107]], align 8
 // CHECK1-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK1-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK1-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
-// CHECK1-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
-// CHECK1-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
-// CHECK1-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
-// CHECK1-NEXT:    store i64 4, ptr [[TMP110]], align 8
-// CHECK1-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
-// CHECK1-NEXT:    store i8 3, ptr [[TMP111]], align 8
-// CHECK1-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP2]]
-// CHECK1-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
+// CHECK1-NEXT:    [[TMP108:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK1-NEXT:    [[TMP109:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 1
+// CHECK1-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 0
+// CHECK1-NEXT:    store i64 [[TMP108]], ptr [[TMP110]], align 8
+// CHECK1-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 1
+// CHECK1-NEXT:    store i64 4, ptr [[TMP111]], align 8
+// CHECK1-NEXT:    [[TMP112:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 2
+// CHECK1-NEXT:    store i8 3, ptr [[TMP112]], align 8
+// CHECK1-NEXT:    [[TMP113:%.*]] = mul nsw i64 0, [[TMP2]]
+// CHECK1-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP113]]
 // CHECK1-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 3
-// CHECK1-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
-// CHECK1-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
-// CHECK1-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
-// CHECK1-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
-// CHECK1-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
-// CHECK1-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
-// CHECK1-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP2]]
-// CHECK1-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
+// CHECK1-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
+// CHECK1-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
+// CHECK1-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP115]], 1
+// CHECK1-NEXT:    [[TMP116:%.*]] = load i32, ptr @a, align 4
+// CHECK1-NEXT:    [[TMP117:%.*]] = sext i32 [[TMP116]] to i64
+// CHECK1-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP117]]
+// CHECK1-NEXT:    [[TMP118:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP2]]
+// CHECK1-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP118]]
 // CHECK1-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[LEN_SUB_1]]
-// CHECK1-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK1-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
-// CHECK1-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK1-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
-// CHECK1-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK1-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
-// CHECK1-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
-// CHECK1-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
-// CHECK1-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
-// CHECK1-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
-// CHECK1-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
-// CHECK1-NEXT:    store i8 3, ptr [[TMP126]], align 8
+// CHECK1-NEXT:    [[TMP119:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK1-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[TMP119]] to i64
+// CHECK1-NEXT:    [[TMP121:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK1-NEXT:    [[TMP122:%.*]] = sub nuw i64 [[TMP120]], [[TMP121]]
+// CHECK1-NEXT:    [[TMP123:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK1-NEXT:    [[TMP124:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 2
+// CHECK1-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 0
+// CHECK1-NEXT:    store i64 [[TMP123]], ptr [[TMP125]], align 8
+// CHECK1-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 1
+// CHECK1-NEXT:    store i64 [[TMP122]], ptr [[TMP126]], align 8
+// CHECK1-NEXT:    [[TMP127:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 2
+// CHECK1-NEXT:    store i8 3, ptr [[TMP127]], align 8
 // CHECK1-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR27]], align 8
-// CHECK1-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
-// CHECK1-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK1-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP130:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP128]])
+// CHECK1-NEXT:    [[TMP128:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP101]], i32 3, ptr [[TMP103]], i32 0, ptr null)
+// CHECK1-NEXT:    [[TMP129:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK1-NEXT:    [[TMP130:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP129]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP131:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP129]])
 // CHECK1-NEXT:    store i8 0, ptr [[FLAG]], align 1
-// CHECK1-NEXT:    [[TMP131:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK1-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP131]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP133:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP131]])
-// CHECK1-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED30]], i32 0, i32 0
-// CHECK1-NEXT:    store ptr [[C]], ptr [[TMP134]], align 8
-// CHECK1-NEXT:    [[TMP135:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP135]], 0
-// CHECK1-NEXT:    [[TMP136:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK1-NEXT:    [[TMP137:%.*]] = or i32 [[TMP136]], 1
-// CHECK1-NEXT:    [[TMP138:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 [[TMP137]], i64 40, i64 8, ptr @.omp_task_entry..16)
-// CHECK1-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP138]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP139]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP141:%.*]] = load ptr, ptr [[TMP140]], align 8
-// CHECK1-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP141]], ptr align 8 [[AGG_CAPTURED30]], i64 8, i1 false)
-// CHECK1-NEXT:    [[TMP142:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP138]])
-// CHECK1-NEXT:    [[TMP143:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
-// CHECK1-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP143]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP143]], i32 0, i32 2
-// CHECK1-NEXT:    [[TMP146:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP145]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP147:%.*]] = load i32, ptr [[C]], align 128
-// CHECK1-NEXT:    store i32 [[TMP147]], ptr [[TMP146]], align 128
-// CHECK1-NEXT:    [[TMP148:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP144]], i32 0, i32 2
-// CHECK1-NEXT:    store i32 0, ptr [[TMP148]], align 16
-// CHECK1-NEXT:    [[TMP149:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP143]])
-// CHECK1-NEXT:    [[TMP150:%.*]] = load i32, ptr @a, align 4
-// CHECK1-NEXT:    store i32 [[TMP150]], ptr [[RETVAL]], align 4
-// CHECK1-NEXT:    [[TMP151:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK1-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP151]])
+// CHECK1-NEXT:    [[TMP132:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK1-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP132]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP134:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP132]])
+// CHECK1-NEXT:    [[TMP135:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED30]], i32 0, i32 0
+// CHECK1-NEXT:    store ptr [[C]], ptr [[TMP135]], align 8
+// CHECK1-NEXT:    [[TMP136:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP136]], 0
+// CHECK1-NEXT:    [[TMP137:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK1-NEXT:    [[TMP138:%.*]] = or i32 [[TMP137]], 1
+// CHECK1-NEXT:    [[TMP139:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 [[TMP138]], i64 40, i64 8, ptr @.omp_task_entry..16)
+// CHECK1-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP139]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP141:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP140]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP142:%.*]] = load ptr, ptr [[TMP141]], align 8
+// CHECK1-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP142]], ptr align 8 [[AGG_CAPTURED30]], i64 8, i1 false)
+// CHECK1-NEXT:    [[TMP143:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP139]])
+// CHECK1-NEXT:    [[TMP144:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
+// CHECK1-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP144]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP146:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP144]], i32 0, i32 2
+// CHECK1-NEXT:    [[TMP147:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP146]], i32 0, i32 0
+// CHECK1-NEXT:    [[TMP148:%.*]] = load i32, ptr [[C]], align 128
+// CHECK1-NEXT:    store i32 [[TMP148]], ptr [[TMP147]], align 128
+// CHECK1-NEXT:    [[TMP149:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP145]], i32 0, i32 2
+// CHECK1-NEXT:    store i32 0, ptr [[TMP149]], align 16
+// CHECK1-NEXT:    [[TMP150:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP144]])
+// CHECK1-NEXT:    [[TMP151:%.*]] = load i32, ptr @a, align 4
+// CHECK1-NEXT:    store i32 [[TMP151]], ptr [[RETVAL]], align 4
+// CHECK1-NEXT:    [[TMP152:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK1-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP152]])
 // CHECK1-NEXT:    [[ARRAY_BEGIN32:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK1-NEXT:    [[TMP152:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN32]], i64 2
+// CHECK1-NEXT:    [[TMP153:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN32]], i64 2
 // CHECK1-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK1:       arraydestroy.body:
-// CHECK1-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP152]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK1-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP153]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK1-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK1-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK1-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN32]]
 // CHECK1-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE33:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK1:       arraydestroy.done33:
-// CHECK1-NEXT:    [[TMP153:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK1-NEXT:    ret i32 [[TMP153]]
+// CHECK1-NEXT:    [[TMP154:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK1-NEXT:    ret i32 [[TMP154]]
 //
 //
 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SC1Ev
@@ -1489,235 +1490,236 @@ void test_transparent()
 // CHECK1-51-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
 // CHECK1-51-NEXT:    [[TMP35:%.*]] = mul nsw i64 9, [[TMP2]]
 // CHECK1-51-NEXT:    [[ARRAYIDX2:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP35]]
-// CHECK1-51-NEXT:    [[TMP36:%.*]] = getelementptr i32, ptr [[ARRAYIDX2]], i32 1
-// CHECK1-51-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
-// CHECK1-51-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK1-51-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
-// CHECK1-51-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK1-51-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP19]], i64 3
-// CHECK1-51-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
-// CHECK1-51-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
-// CHECK1-51-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 1, ptr [[TMP44]], align 8
+// CHECK1-51-NEXT:    [[TMP36:%.*]] = mul nuw i64 [[TMP2]], 4
+// CHECK1-51-NEXT:    [[TMP37:%.*]] = getelementptr i8, ptr [[ARRAYIDX2]], i64 [[TMP36]]
+// CHECK1-51-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[TMP37]] to i64
+// CHECK1-51-NEXT:    [[TMP39:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK1-51-NEXT:    [[TMP40:%.*]] = sub nuw i64 [[TMP38]], [[TMP39]]
+// CHECK1-51-NEXT:    [[TMP41:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK1-51-NEXT:    [[TMP42:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP19]], i64 3
+// CHECK1-51-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP41]], ptr [[TMP43]], align 8
+// CHECK1-51-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 [[TMP40]], ptr [[TMP44]], align 8
+// CHECK1-51-NEXT:    [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 1, ptr [[TMP45]], align 8
 // CHECK1-51-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
-// CHECK1-51-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP15]], i32 4, ptr [[TMP19]], i32 0, ptr null)
-// CHECK1-51-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK1-51-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i32 0, ptr [[TMP48]], align 8
-// CHECK1-51-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP46]])
-// CHECK1-51-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK1-51-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
+// CHECK1-51-NEXT:    [[TMP46:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP15]], i32 4, ptr [[TMP19]], i32 0, ptr null)
+// CHECK1-51-NEXT:    [[TMP47:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK1-51-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP47]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP48]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i32 0, ptr [[TMP49]], align 8
+// CHECK1-51-NEXT:    [[TMP50:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP47]])
+// CHECK1-51-NEXT:    [[TMP51:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK1-51-NEXT:    [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP51]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP53:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
 // CHECK1-51-NEXT:    [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK1-51-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
-// CHECK1-51-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
-// CHECK1-51-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
-// CHECK1-51-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 4, ptr [[TMP56]], align 8
-// CHECK1-51-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 3, ptr [[TMP57]], align 8
-// CHECK1-51-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-51-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
-// CHECK1-51-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP2]]
-// CHECK1-51-NEXT:    [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
-// CHECK1-51-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX7]], i64 [[TMP59]]
-// CHECK1-51-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-51-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
-// CHECK1-51-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP2]]
-// CHECK1-51-NEXT:    [[ARRAYIDX9:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
-// CHECK1-51-NEXT:    [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX9]], i64 [[TMP62]]
-// CHECK1-51-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX10]], i32 1
-// CHECK1-51-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
-// CHECK1-51-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX8]] to i64
-// CHECK1-51-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
-// CHECK1-51-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX8]] to i64
-// CHECK1-51-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
-// CHECK1-51-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
-// CHECK1-51-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
-// CHECK1-51-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 3, ptr [[TMP72]], align 8
+// CHECK1-51-NEXT:    [[TMP54:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
+// CHECK1-51-NEXT:    [[TMP55:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i64 0
+// CHECK1-51-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP54]], ptr [[TMP56]], align 8
+// CHECK1-51-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 4, ptr [[TMP57]], align 8
+// CHECK1-51-NEXT:    [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 3, ptr [[TMP58]], align 8
+// CHECK1-51-NEXT:    [[TMP59:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-51-NEXT:    [[TMP60:%.*]] = sext i8 [[TMP59]] to i64
+// CHECK1-51-NEXT:    [[TMP61:%.*]] = mul nsw i64 4, [[TMP2]]
+// CHECK1-51-NEXT:    [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP61]]
+// CHECK1-51-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX7]], i64 [[TMP60]]
+// CHECK1-51-NEXT:    [[TMP62:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-51-NEXT:    [[TMP63:%.*]] = sext i8 [[TMP62]] to i64
+// CHECK1-51-NEXT:    [[TMP64:%.*]] = mul nsw i64 9, [[TMP2]]
+// CHECK1-51-NEXT:    [[ARRAYIDX9:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP64]]
+// CHECK1-51-NEXT:    [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX9]], i64 [[TMP63]]
+// CHECK1-51-NEXT:    [[TMP65:%.*]] = getelementptr i32, ptr [[ARRAYIDX10]], i32 1
+// CHECK1-51-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[TMP65]] to i64
+// CHECK1-51-NEXT:    [[TMP67:%.*]] = ptrtoaddr ptr [[ARRAYIDX8]] to i64
+// CHECK1-51-NEXT:    [[TMP68:%.*]] = sub nuw i64 [[TMP66]], [[TMP67]]
+// CHECK1-51-NEXT:    [[TMP69:%.*]] = ptrtoint ptr [[ARRAYIDX8]] to i64
+// CHECK1-51-NEXT:    [[TMP70:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i64 1
+// CHECK1-51-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP69]], ptr [[TMP71]], align 8
+// CHECK1-51-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 [[TMP68]], ptr [[TMP72]], align 8
+// CHECK1-51-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 3, ptr [[TMP73]], align 8
 // CHECK1-51-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR11]], align 8
-// CHECK1-51-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i32 0, ptr [[TMP73]], align 8
-// CHECK1-51-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
-// CHECK1-51-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK1-51-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR13]], i64 0, i64 0
+// CHECK1-51-NEXT:    [[TMP74:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP52]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i32 0, ptr [[TMP74]], align 8
+// CHECK1-51-NEXT:    [[TMP75:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP51]], i32 2, ptr [[TMP53]], i32 0, ptr null)
+// CHECK1-51-NEXT:    [[TMP76:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK1-51-NEXT:    [[TMP77:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP76]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP78:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR13]], i64 0, i64 0
 // CHECK1-51-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK1-51-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK1-51-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
-// CHECK1-51-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
-// CHECK1-51-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 4, ptr [[TMP81]], align 8
-// CHECK1-51-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 4, ptr [[TMP82]], align 8
-// CHECK1-51-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-51-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
-// CHECK1-51-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP2]]
-// CHECK1-51-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
-// CHECK1-51-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP84]]
-// CHECK1-51-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-51-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
-// CHECK1-51-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP2]]
-// CHECK1-51-NEXT:    [[ARRAYIDX17:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
-// CHECK1-51-NEXT:    [[ARRAYIDX18:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX17]], i64 [[TMP87]]
-// CHECK1-51-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX18]], i32 1
-// CHECK1-51-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
-// CHECK1-51-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX16]] to i64
-// CHECK1-51-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
-// CHECK1-51-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX16]] to i64
-// CHECK1-51-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
-// CHECK1-51-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
-// CHECK1-51-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
-// CHECK1-51-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 4, ptr [[TMP97]], align 8
+// CHECK1-51-NEXT:    [[TMP79:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK1-51-NEXT:    [[TMP80:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i64 0
+// CHECK1-51-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP79]], ptr [[TMP81]], align 8
+// CHECK1-51-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 4, ptr [[TMP82]], align 8
+// CHECK1-51-NEXT:    [[TMP83:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 4, ptr [[TMP83]], align 8
+// CHECK1-51-NEXT:    [[TMP84:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-51-NEXT:    [[TMP85:%.*]] = sext i8 [[TMP84]] to i64
+// CHECK1-51-NEXT:    [[TMP86:%.*]] = mul nsw i64 4, [[TMP2]]
+// CHECK1-51-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP86]]
+// CHECK1-51-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP85]]
+// CHECK1-51-NEXT:    [[TMP87:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-51-NEXT:    [[TMP88:%.*]] = sext i8 [[TMP87]] to i64
+// CHECK1-51-NEXT:    [[TMP89:%.*]] = mul nsw i64 9, [[TMP2]]
+// CHECK1-51-NEXT:    [[ARRAYIDX17:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP89]]
+// CHECK1-51-NEXT:    [[ARRAYIDX18:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX17]], i64 [[TMP88]]
+// CHECK1-51-NEXT:    [[TMP90:%.*]] = getelementptr i32, ptr [[ARRAYIDX18]], i32 1
+// CHECK1-51-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[TMP90]] to i64
+// CHECK1-51-NEXT:    [[TMP92:%.*]] = ptrtoaddr ptr [[ARRAYIDX16]] to i64
+// CHECK1-51-NEXT:    [[TMP93:%.*]] = sub nuw i64 [[TMP91]], [[TMP92]]
+// CHECK1-51-NEXT:    [[TMP94:%.*]] = ptrtoint ptr [[ARRAYIDX16]] to i64
+// CHECK1-51-NEXT:    [[TMP95:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i64 1
+// CHECK1-51-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP94]], ptr [[TMP96]], align 8
+// CHECK1-51-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 [[TMP93]], ptr [[TMP97]], align 8
+// CHECK1-51-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 4, ptr [[TMP98]], align 8
 // CHECK1-51-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR19]], align 8
-// CHECK1-51-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i32 0, ptr [[TMP98]], align 8
-// CHECK1-51-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
-// CHECK1-51-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK1-51-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
-// CHECK1-51-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
-// CHECK1-51-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
-// CHECK1-51-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 4, ptr [[TMP105]], align 8
-// CHECK1-51-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 3, ptr [[TMP106]], align 8
+// CHECK1-51-NEXT:    [[TMP99:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP77]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i32 0, ptr [[TMP99]], align 8
+// CHECK1-51-NEXT:    [[TMP100:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP76]], i32 2, ptr [[TMP78]], i32 0, ptr null)
+// CHECK1-51-NEXT:    [[TMP101:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK1-51-NEXT:    [[TMP102:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP101]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP103:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK1-51-NEXT:    [[TMP104:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 0
+// CHECK1-51-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP105]], align 8
+// CHECK1-51-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 4, ptr [[TMP106]], align 8
+// CHECK1-51-NEXT:    [[TMP107:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 3, ptr [[TMP107]], align 8
 // CHECK1-51-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK1-51-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK1-51-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
-// CHECK1-51-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
-// CHECK1-51-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 4, ptr [[TMP110]], align 8
-// CHECK1-51-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 3, ptr [[TMP111]], align 8
-// CHECK1-51-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP2]]
-// CHECK1-51-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
+// CHECK1-51-NEXT:    [[TMP108:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK1-51-NEXT:    [[TMP109:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 1
+// CHECK1-51-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP108]], ptr [[TMP110]], align 8
+// CHECK1-51-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 4, ptr [[TMP111]], align 8
+// CHECK1-51-NEXT:    [[TMP112:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 3, ptr [[TMP112]], align 8
+// CHECK1-51-NEXT:    [[TMP113:%.*]] = mul nsw i64 0, [[TMP2]]
+// CHECK1-51-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP113]]
 // CHECK1-51-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 3
-// CHECK1-51-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
-// CHECK1-51-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
-// CHECK1-51-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
-// CHECK1-51-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
-// CHECK1-51-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
-// CHECK1-51-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
-// CHECK1-51-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP2]]
-// CHECK1-51-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
+// CHECK1-51-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
+// CHECK1-51-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
+// CHECK1-51-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP115]], 1
+// CHECK1-51-NEXT:    [[TMP116:%.*]] = load i32, ptr @a, align 4
+// CHECK1-51-NEXT:    [[TMP117:%.*]] = sext i32 [[TMP116]] to i64
+// CHECK1-51-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP117]]
+// CHECK1-51-NEXT:    [[TMP118:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP2]]
+// CHECK1-51-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP118]]
 // CHECK1-51-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[LEN_SUB_1]]
-// CHECK1-51-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK1-51-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
-// CHECK1-51-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK1-51-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
-// CHECK1-51-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK1-51-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
-// CHECK1-51-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
-// CHECK1-51-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
-// CHECK1-51-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 3, ptr [[TMP126]], align 8
+// CHECK1-51-NEXT:    [[TMP119:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK1-51-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[TMP119]] to i64
+// CHECK1-51-NEXT:    [[TMP121:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK1-51-NEXT:    [[TMP122:%.*]] = sub nuw i64 [[TMP120]], [[TMP121]]
+// CHECK1-51-NEXT:    [[TMP123:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK1-51-NEXT:    [[TMP124:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 2
+// CHECK1-51-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP123]], ptr [[TMP125]], align 8
+// CHECK1-51-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 [[TMP122]], ptr [[TMP126]], align 8
+// CHECK1-51-NEXT:    [[TMP127:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 3, ptr [[TMP127]], align 8
 // CHECK1-51-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR27]], align 8
-// CHECK1-51-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
-// CHECK1-51-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK1-51-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP130:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR29]], i64 0, i64 0
-// CHECK1-51-NEXT:    [[TMP131:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 0
-// CHECK1-51-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP132]], align 8
-// CHECK1-51-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 4, ptr [[TMP133]], align 8
-// CHECK1-51-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 8, ptr [[TMP134]], align 8
+// CHECK1-51-NEXT:    [[TMP128:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP101]], i32 3, ptr [[TMP103]], i32 0, ptr null)
+// CHECK1-51-NEXT:    [[TMP129:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK1-51-NEXT:    [[TMP130:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP129]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP131:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR29]], i64 0, i64 0
+// CHECK1-51-NEXT:    [[TMP132:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i64 0
+// CHECK1-51-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP132]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP133]], align 8
+// CHECK1-51-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP132]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 4, ptr [[TMP134]], align 8
+// CHECK1-51-NEXT:    [[TMP135:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP132]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 8, ptr [[TMP135]], align 8
 // CHECK1-51-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK1-51-NEXT:    [[TMP135:%.*]] = ptrtoint ptr [[ARRAYIDX30]] to i64
-// CHECK1-51-NEXT:    [[TMP136:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 1
-// CHECK1-51-NEXT:    [[TMP137:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP135]], ptr [[TMP137]], align 8
-// CHECK1-51-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 4, ptr [[TMP138]], align 8
-// CHECK1-51-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 8, ptr [[TMP139]], align 8
-// CHECK1-51-NEXT:    [[TMP140:%.*]] = mul nsw i64 0, [[TMP2]]
-// CHECK1-51-NEXT:    [[ARRAYIDX31:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP140]]
+// CHECK1-51-NEXT:    [[TMP136:%.*]] = ptrtoint ptr [[ARRAYIDX30]] to i64
+// CHECK1-51-NEXT:    [[TMP137:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i64 1
+// CHECK1-51-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP137]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP136]], ptr [[TMP138]], align 8
+// CHECK1-51-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP137]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 4, ptr [[TMP139]], align 8
+// CHECK1-51-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP137]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 8, ptr [[TMP140]], align 8
+// CHECK1-51-NEXT:    [[TMP141:%.*]] = mul nsw i64 0, [[TMP2]]
+// CHECK1-51-NEXT:    [[ARRAYIDX31:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP141]]
 // CHECK1-51-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX31]], i64 3
-// CHECK1-51-NEXT:    [[TMP141:%.*]] = load i32, ptr @a, align 4
-// CHECK1-51-NEXT:    [[TMP142:%.*]] = sext i32 [[TMP141]] to i64
-// CHECK1-51-NEXT:    [[LEN_SUB_133:%.*]] = sub nsw i64 [[TMP142]], 1
-// CHECK1-51-NEXT:    [[TMP143:%.*]] = load i32, ptr @a, align 4
-// CHECK1-51-NEXT:    [[TMP144:%.*]] = sext i32 [[TMP143]] to i64
-// CHECK1-51-NEXT:    [[LB_ADD_LEN34:%.*]] = add nsw i64 -1, [[TMP144]]
-// CHECK1-51-NEXT:    [[TMP145:%.*]] = mul nsw i64 [[LB_ADD_LEN34]], [[TMP2]]
-// CHECK1-51-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP145]]
+// CHECK1-51-NEXT:    [[TMP142:%.*]] = load i32, ptr @a, align 4
+// CHECK1-51-NEXT:    [[TMP143:%.*]] = sext i32 [[TMP142]] to i64
+// CHECK1-51-NEXT:    [[LEN_SUB_133:%.*]] = sub nsw i64 [[TMP143]], 1
+// CHECK1-51-NEXT:    [[TMP144:%.*]] = load i32, ptr @a, align 4
+// CHECK1-51-NEXT:    [[TMP145:%.*]] = sext i32 [[TMP144]] to i64
+// CHECK1-51-NEXT:    [[LB_ADD_LEN34:%.*]] = add nsw i64 -1, [[TMP145]]
+// CHECK1-51-NEXT:    [[TMP146:%.*]] = mul nsw i64 [[LB_ADD_LEN34]], [[TMP2]]
+// CHECK1-51-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP146]]
 // CHECK1-51-NEXT:    [[ARRAYIDX36:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX35]], i64 [[LEN_SUB_133]]
-// CHECK1-51-NEXT:    [[TMP146:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
-// CHECK1-51-NEXT:    [[TMP147:%.*]] = ptrtoaddr ptr [[TMP146]] to i64
-// CHECK1-51-NEXT:    [[TMP148:%.*]] = ptrtoaddr ptr [[ARRAYIDX32]] to i64
-// CHECK1-51-NEXT:    [[TMP149:%.*]] = sub nuw i64 [[TMP147]], [[TMP148]]
-// CHECK1-51-NEXT:    [[TMP150:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
-// CHECK1-51-NEXT:    [[TMP151:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 2
-// CHECK1-51-NEXT:    [[TMP152:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 0
-// CHECK1-51-NEXT:    store i64 [[TMP150]], ptr [[TMP152]], align 8
-// CHECK1-51-NEXT:    [[TMP153:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 1
-// CHECK1-51-NEXT:    store i64 [[TMP149]], ptr [[TMP153]], align 8
-// CHECK1-51-NEXT:    [[TMP154:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i8 8, ptr [[TMP154]], align 8
+// CHECK1-51-NEXT:    [[TMP147:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
+// CHECK1-51-NEXT:    [[TMP148:%.*]] = ptrtoaddr ptr [[TMP147]] to i64
+// CHECK1-51-NEXT:    [[TMP149:%.*]] = ptrtoaddr ptr [[ARRAYIDX32]] to i64
+// CHECK1-51-NEXT:    [[TMP150:%.*]] = sub nuw i64 [[TMP148]], [[TMP149]]
+// CHECK1-51-NEXT:    [[TMP151:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
+// CHECK1-51-NEXT:    [[TMP152:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i64 2
+// CHECK1-51-NEXT:    [[TMP153:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP152]], i32 0, i32 0
+// CHECK1-51-NEXT:    store i64 [[TMP151]], ptr [[TMP153]], align 8
+// CHECK1-51-NEXT:    [[TMP154:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP152]], i32 0, i32 1
+// CHECK1-51-NEXT:    store i64 [[TMP150]], ptr [[TMP154]], align 8
+// CHECK1-51-NEXT:    [[TMP155:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP152]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i8 8, ptr [[TMP155]], align 8
 // CHECK1-51-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR37]], align 8
-// CHECK1-51-NEXT:    [[TMP155:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP128]], i32 3, ptr [[TMP130]], i32 0, ptr null)
-// CHECK1-51-NEXT:    [[TMP156:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK1-51-NEXT:    [[TMP157:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP156]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP158:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP156]])
+// CHECK1-51-NEXT:    [[TMP156:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP129]], i32 3, ptr [[TMP131]], i32 0, ptr null)
+// CHECK1-51-NEXT:    [[TMP157:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK1-51-NEXT:    [[TMP158:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP157]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP159:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP157]])
 // CHECK1-51-NEXT:    store i8 0, ptr [[FLAG]], align 1
-// CHECK1-51-NEXT:    [[TMP159:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..16)
-// CHECK1-51-NEXT:    [[TMP160:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP159]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP161:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP159]])
-// CHECK1-51-NEXT:    [[TMP162:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_16]], ptr [[AGG_CAPTURED40]], i32 0, i32 0
-// CHECK1-51-NEXT:    store ptr [[C]], ptr [[TMP162]], align 8
-// CHECK1-51-NEXT:    [[TMP163:%.*]] = load i8, ptr [[B]], align 1
-// CHECK1-51-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP163]], 0
-// CHECK1-51-NEXT:    [[TMP164:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK1-51-NEXT:    [[TMP165:%.*]] = or i32 [[TMP164]], 1
-// CHECK1-51-NEXT:    [[TMP166:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 [[TMP165]], i64 40, i64 8, ptr @.omp_task_entry..18)
-// CHECK1-51-NEXT:    [[TMP167:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_17:%.*]], ptr [[TMP166]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP168:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP167]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP169:%.*]] = load ptr, ptr [[TMP168]], align 8
-// CHECK1-51-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP169]], ptr align 8 [[AGG_CAPTURED40]], i64 8, i1 false)
-// CHECK1-51-NEXT:    [[TMP170:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP166]])
-// CHECK1-51-NEXT:    [[TMP171:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..23)
-// CHECK1-51-NEXT:    [[TMP172:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22:%.*]], ptr [[TMP171]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP173:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22]], ptr [[TMP171]], i32 0, i32 2
-// CHECK1-51-NEXT:    [[TMP174:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_21:%.*]], ptr [[TMP173]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP175:%.*]] = load i32, ptr [[C]], align 128
-// CHECK1-51-NEXT:    store i32 [[TMP175]], ptr [[TMP174]], align 128
-// CHECK1-51-NEXT:    [[TMP176:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP172]], i32 0, i32 2
-// CHECK1-51-NEXT:    store i32 0, ptr [[TMP176]], align 16
-// CHECK1-51-NEXT:    [[TMP177:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP171]])
-// CHECK1-51-NEXT:    [[TMP178:%.*]] = load i32, ptr @a, align 4
-// CHECK1-51-NEXT:    store i32 [[TMP178]], ptr [[RETVAL]], align 4
-// CHECK1-51-NEXT:    [[TMP179:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK1-51-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP179]])
+// CHECK1-51-NEXT:    [[TMP160:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..16)
+// CHECK1-51-NEXT:    [[TMP161:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP160]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP162:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP160]])
+// CHECK1-51-NEXT:    [[TMP163:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_16]], ptr [[AGG_CAPTURED40]], i32 0, i32 0
+// CHECK1-51-NEXT:    store ptr [[C]], ptr [[TMP163]], align 8
+// CHECK1-51-NEXT:    [[TMP164:%.*]] = load i8, ptr [[B]], align 1
+// CHECK1-51-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP164]], 0
+// CHECK1-51-NEXT:    [[TMP165:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK1-51-NEXT:    [[TMP166:%.*]] = or i32 [[TMP165]], 1
+// CHECK1-51-NEXT:    [[TMP167:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 [[TMP166]], i64 40, i64 8, ptr @.omp_task_entry..18)
+// CHECK1-51-NEXT:    [[TMP168:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_17:%.*]], ptr [[TMP167]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP169:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP168]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP170:%.*]] = load ptr, ptr [[TMP169]], align 8
+// CHECK1-51-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP170]], ptr align 8 [[AGG_CAPTURED40]], i64 8, i1 false)
+// CHECK1-51-NEXT:    [[TMP171:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP167]])
+// CHECK1-51-NEXT:    [[TMP172:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..23)
+// CHECK1-51-NEXT:    [[TMP173:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22:%.*]], ptr [[TMP172]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP174:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22]], ptr [[TMP172]], i32 0, i32 2
+// CHECK1-51-NEXT:    [[TMP175:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_21:%.*]], ptr [[TMP174]], i32 0, i32 0
+// CHECK1-51-NEXT:    [[TMP176:%.*]] = load i32, ptr [[C]], align 128
+// CHECK1-51-NEXT:    store i32 [[TMP176]], ptr [[TMP175]], align 128
+// CHECK1-51-NEXT:    [[TMP177:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP173]], i32 0, i32 2
+// CHECK1-51-NEXT:    store i32 0, ptr [[TMP177]], align 16
+// CHECK1-51-NEXT:    [[TMP178:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP172]])
+// CHECK1-51-NEXT:    [[TMP179:%.*]] = load i32, ptr @a, align 4
+// CHECK1-51-NEXT:    store i32 [[TMP179]], ptr [[RETVAL]], align 4
+// CHECK1-51-NEXT:    [[TMP180:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK1-51-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP180]])
 // CHECK1-51-NEXT:    [[ARRAY_BEGIN42:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK1-51-NEXT:    [[TMP180:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN42]], i64 2
+// CHECK1-51-NEXT:    [[TMP181:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN42]], i64 2
 // CHECK1-51-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK1-51:       arraydestroy.body:
-// CHECK1-51-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP180]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK1-51-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP181]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK1-51-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK1-51-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK1-51-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN42]]
 // CHECK1-51-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE43:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK1-51:       arraydestroy.done43:
-// CHECK1-51-NEXT:    [[TMP181:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK1-51-NEXT:    ret i32 [[TMP181]]
+// CHECK1-51-NEXT:    [[TMP182:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK1-51-NEXT:    ret i32 [[TMP182]]
 //
 //
 // CHECK1-51-LABEL: define {{[^@]+}}@_ZN1SC1Ev
@@ -3097,190 +3099,191 @@ void test_transparent()
 // CHECK2-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
 // CHECK2-NEXT:    [[TMP35:%.*]] = mul nsw i64 9, [[TMP2]]
 // CHECK2-NEXT:    [[ARRAYIDX2:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP35]]
-// CHECK2-NEXT:    [[TMP36:%.*]] = getelementptr i32, ptr [[ARRAYIDX2]], i32 1
-// CHECK2-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
-// CHECK2-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK2-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
-// CHECK2-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK2-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP19]], i64 3
-// CHECK2-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
-// CHECK2-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
-// CHECK2-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
-// CHECK2-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
-// CHECK2-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
-// CHECK2-NEXT:    store i8 1, ptr [[TMP44]], align 8
+// CHECK2-NEXT:    [[TMP36:%.*]] = mul nuw i64 [[TMP2]], 4
+// CHECK2-NEXT:    [[TMP37:%.*]] = getelementptr i8, ptr [[ARRAYIDX2]], i64 [[TMP36]]
+// CHECK2-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[TMP37]] to i64
+// CHECK2-NEXT:    [[TMP39:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK2-NEXT:    [[TMP40:%.*]] = sub nuw i64 [[TMP38]], [[TMP39]]
+// CHECK2-NEXT:    [[TMP41:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK2-NEXT:    [[TMP42:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP19]], i64 3
+// CHECK2-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 0
+// CHECK2-NEXT:    store i64 [[TMP41]], ptr [[TMP43]], align 8
+// CHECK2-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 1
+// CHECK2-NEXT:    store i64 [[TMP40]], ptr [[TMP44]], align 8
+// CHECK2-NEXT:    [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 2
+// CHECK2-NEXT:    store i8 1, ptr [[TMP45]], align 8
 // CHECK2-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
-// CHECK2-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP15]], i32 4, ptr [[TMP19]], i32 0, ptr null)
-// CHECK2-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK2-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
-// CHECK2-NEXT:    store i32 0, ptr [[TMP48]], align 8
-// CHECK2-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP46]])
-// CHECK2-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK2-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
+// CHECK2-NEXT:    [[TMP46:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP15]], i32 4, ptr [[TMP19]], i32 0, ptr null)
+// CHECK2-NEXT:    [[TMP47:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK2-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP47]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP48]], i32 0, i32 2
+// CHECK2-NEXT:    store i32 0, ptr [[TMP49]], align 8
+// CHECK2-NEXT:    [[TMP50:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP47]])
+// CHECK2-NEXT:    [[TMP51:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK2-NEXT:    [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP51]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP53:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
 // CHECK2-NEXT:    [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK2-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
-// CHECK2-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
-// CHECK2-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
-// CHECK2-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
-// CHECK2-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
-// CHECK2-NEXT:    store i64 4, ptr [[TMP56]], align 8
-// CHECK2-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
-// CHECK2-NEXT:    store i8 3, ptr [[TMP57]], align 8
-// CHECK2-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
-// CHECK2-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP2]]
-// CHECK2-NEXT:    [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
-// CHECK2-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX7]], i64 [[TMP59]]
-// CHECK2-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
-// CHECK2-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP2]]
-// CHECK2-NEXT:    [[ARRAYIDX9:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
-// CHECK2-NEXT:    [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX9]], i64 [[TMP62]]
-// CHECK2-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX10]], i32 1
-// CHECK2-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
-// CHECK2-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX8]] to i64
-// CHECK2-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
-// CHECK2-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX8]] to i64
-// CHECK2-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
-// CHECK2-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
-// CHECK2-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
-// CHECK2-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
-// CHECK2-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
-// CHECK2-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
-// CHECK2-NEXT:    store i8 3, ptr [[TMP72]], align 8
+// CHECK2-NEXT:    [[TMP54:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
+// CHECK2-NEXT:    [[TMP55:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i64 0
+// CHECK2-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 0
+// CHECK2-NEXT:    store i64 [[TMP54]], ptr [[TMP56]], align 8
+// CHECK2-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 1
+// CHECK2-NEXT:    store i64 4, ptr [[TMP57]], align 8
+// CHECK2-NEXT:    [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 2
+// CHECK2-NEXT:    store i8 3, ptr [[TMP58]], align 8
+// CHECK2-NEXT:    [[TMP59:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-NEXT:    [[TMP60:%.*]] = sext i8 [[TMP59]] to i64
+// CHECK2-NEXT:    [[TMP61:%.*]] = mul nsw i64 4, [[TMP2]]
+// CHECK2-NEXT:    [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP61]]
+// CHECK2-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX7]], i64 [[TMP60]]
+// CHECK2-NEXT:    [[TMP62:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-NEXT:    [[TMP63:%.*]] = sext i8 [[TMP62]] to i64
+// CHECK2-NEXT:    [[TMP64:%.*]] = mul nsw i64 9, [[TMP2]]
+// CHECK2-NEXT:    [[ARRAYIDX9:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP64]]
+// CHECK2-NEXT:    [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX9]], i64 [[TMP63]]
+// CHECK2-NEXT:    [[TMP65:%.*]] = getelementptr i32, ptr [[ARRAYIDX10]], i32 1
+// CHECK2-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[TMP65]] to i64
+// CHECK2-NEXT:    [[TMP67:%.*]] = ptrtoaddr ptr [[ARRAYIDX8]] to i64
+// CHECK2-NEXT:    [[TMP68:%.*]] = sub nuw i64 [[TMP66]], [[TMP67]]
+// CHECK2-NEXT:    [[TMP69:%.*]] = ptrtoint ptr [[ARRAYIDX8]] to i64
+// CHECK2-NEXT:    [[TMP70:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i64 1
+// CHECK2-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 0
+// CHECK2-NEXT:    store i64 [[TMP69]], ptr [[TMP71]], align 8
+// CHECK2-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 1
+// CHECK2-NEXT:    store i64 [[TMP68]], ptr [[TMP72]], align 8
+// CHECK2-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 2
+// CHECK2-NEXT:    store i8 3, ptr [[TMP73]], align 8
 // CHECK2-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR11]], align 8
-// CHECK2-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
-// CHECK2-NEXT:    store i32 0, ptr [[TMP73]], align 8
-// CHECK2-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
-// CHECK2-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK2-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR13]], i64 0, i64 0
+// CHECK2-NEXT:    [[TMP74:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP52]], i32 0, i32 2
+// CHECK2-NEXT:    store i32 0, ptr [[TMP74]], align 8
+// CHECK2-NEXT:    [[TMP75:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP51]], i32 2, ptr [[TMP53]], i32 0, ptr null)
+// CHECK2-NEXT:    [[TMP76:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK2-NEXT:    [[TMP77:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP76]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP78:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR13]], i64 0, i64 0
 // CHECK2-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK2-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK2-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
-// CHECK2-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
-// CHECK2-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
-// CHECK2-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
-// CHECK2-NEXT:    store i64 4, ptr [[TMP81]], align 8
-// CHECK2-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
-// CHECK2-NEXT:    store i8 4, ptr [[TMP82]], align 8
-// CHECK2-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
-// CHECK2-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP2]]
-// CHECK2-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
-// CHECK2-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP84]]
-// CHECK2-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
-// CHECK2-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP2]]
-// CHECK2-NEXT:    [[ARRAYIDX17:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
-// CHECK2-NEXT:    [[ARRAYIDX18:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX17]], i64 [[TMP87]]
-// CHECK2-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX18]], i32 1
-// CHECK2-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
-// CHECK2-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX16]] to i64
-// CHECK2-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
-// CHECK2-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX16]] to i64
-// CHECK2-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
-// CHECK2-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
-// CHECK2-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
-// CHECK2-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
-// CHECK2-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
-// CHECK2-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
-// CHECK2-NEXT:    store i8 4, ptr [[TMP97]], align 8
+// CHECK2-NEXT:    [[TMP79:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK2-NEXT:    [[TMP80:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i64 0
+// CHECK2-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 0
+// CHECK2-NEXT:    store i64 [[TMP79]], ptr [[TMP81]], align 8
+// CHECK2-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 1
+// CHECK2-NEXT:    store i64 4, ptr [[TMP82]], align 8
+// CHECK2-NEXT:    [[TMP83:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 2
+// CHECK2-NEXT:    store i8 4, ptr [[TMP83]], align 8
+// CHECK2-NEXT:    [[TMP84:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-NEXT:    [[TMP85:%.*]] = sext i8 [[TMP84]] to i64
+// CHECK2-NEXT:    [[TMP86:%.*]] = mul nsw i64 4, [[TMP2]]
+// CHECK2-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP86]]
+// CHECK2-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP85]]
+// CHECK2-NEXT:    [[TMP87:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-NEXT:    [[TMP88:%.*]] = sext i8 [[TMP87]] to i64
+// CHECK2-NEXT:    [[TMP89:%.*]] = mul nsw i64 9, [[TMP2]]
+// CHECK2-NEXT:    [[ARRAYIDX17:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP89]]
+// CHECK2-NEXT:    [[ARRAYIDX18:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX17]], i64 [[TMP88]]
+// CHECK2-NEXT:    [[TMP90:%.*]] = getelementptr i32, ptr [[ARRAYIDX18]], i32 1
+// CHECK2-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[TMP90]] to i64
+// CHECK2-NEXT:    [[TMP92:%.*]] = ptrtoaddr ptr [[ARRAYIDX16]] to i64
+// CHECK2-NEXT:    [[TMP93:%.*]] = sub nuw i64 [[TMP91]], [[TMP92]]
+// CHECK2-NEXT:    [[TMP94:%.*]] = ptrtoint ptr [[ARRAYIDX16]] to i64
+// CHECK2-NEXT:    [[TMP95:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i64 1
+// CHECK2-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 0
+// CHECK2-NEXT:    store i64 [[TMP94]], ptr [[TMP96]], align 8
+// CHECK2-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 1
+// CHECK2-NEXT:    store i64 [[TMP93]], ptr [[TMP97]], align 8
+// CHECK2-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 2
+// CHECK2-NEXT:    store i8 4, ptr [[TMP98]], align 8
 // CHECK2-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR19]], align 8
-// CHECK2-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
-// CHECK2-NEXT:    store i32 0, ptr [[TMP98]], align 8
-// CHECK2-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
-// CHECK2-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK2-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
-// CHECK2-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
-// CHECK2-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
-// CHECK2-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
-// CHECK2-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
-// CHECK2-NEXT:    store i64 4, ptr [[TMP105]], align 8
-// CHECK2-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
-// CHECK2-NEXT:    store i8 3, ptr [[TMP106]], align 8
+// CHECK2-NEXT:    [[TMP99:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP77]], i32 0, i32 2
+// CHECK2-NEXT:    store i32 0, ptr [[TMP99]], align 8
+// CHECK2-NEXT:    [[TMP100:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP76]], i32 2, ptr [[TMP78]], i32 0, ptr null)
+// CHECK2-NEXT:    [[TMP101:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK2-NEXT:    [[TMP102:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP101]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP103:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK2-NEXT:    [[TMP104:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 0
+// CHECK2-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 0
+// CHECK2-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP105]], align 8
+// CHECK2-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 1
+// CHECK2-NEXT:    store i64 4, ptr [[TMP106]], align 8
+// CHECK2-NEXT:    [[TMP107:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 2
+// CHECK2-NEXT:    store i8 3, ptr [[TMP107]], align 8
 // CHECK2-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK2-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK2-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
-// CHECK2-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
-// CHECK2-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
-// CHECK2-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
-// CHECK2-NEXT:    store i64 4, ptr [[TMP110]], align 8
-// CHECK2-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
-// CHECK2-NEXT:    store i8 3, ptr [[TMP111]], align 8
-// CHECK2-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP2]]
-// CHECK2-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
+// CHECK2-NEXT:    [[TMP108:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK2-NEXT:    [[TMP109:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 1
+// CHECK2-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 0
+// CHECK2-NEXT:    store i64 [[TMP108]], ptr [[TMP110]], align 8
+// CHECK2-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 1
+// CHECK2-NEXT:    store i64 4, ptr [[TMP111]], align 8
+// CHECK2-NEXT:    [[TMP112:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 2
+// CHECK2-NEXT:    store i8 3, ptr [[TMP112]], align 8
+// CHECK2-NEXT:    [[TMP113:%.*]] = mul nsw i64 0, [[TMP2]]
+// CHECK2-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP113]]
 // CHECK2-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 3
-// CHECK2-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
-// CHECK2-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
-// CHECK2-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
-// CHECK2-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
-// CHECK2-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
-// CHECK2-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
-// CHECK2-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP2]]
-// CHECK2-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
+// CHECK2-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
+// CHECK2-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
+// CHECK2-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP115]], 1
+// CHECK2-NEXT:    [[TMP116:%.*]] = load i32, ptr @a, align 4
+// CHECK2-NEXT:    [[TMP117:%.*]] = sext i32 [[TMP116]] to i64
+// CHECK2-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP117]]
+// CHECK2-NEXT:    [[TMP118:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP2]]
+// CHECK2-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP118]]
 // CHECK2-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[LEN_SUB_1]]
-// CHECK2-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK2-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
-// CHECK2-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK2-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
-// CHECK2-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK2-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
-// CHECK2-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
-// CHECK2-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
-// CHECK2-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
-// CHECK2-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
-// CHECK2-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
-// CHECK2-NEXT:    store i8 3, ptr [[TMP126]], align 8
+// CHECK2-NEXT:    [[TMP119:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK2-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[TMP119]] to i64
+// CHECK2-NEXT:    [[TMP121:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK2-NEXT:    [[TMP122:%.*]] = sub nuw i64 [[TMP120]], [[TMP121]]
+// CHECK2-NEXT:    [[TMP123:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK2-NEXT:    [[TMP124:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 2
+// CHECK2-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 0
+// CHECK2-NEXT:    store i64 [[TMP123]], ptr [[TMP125]], align 8
+// CHECK2-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 1
+// CHECK2-NEXT:    store i64 [[TMP122]], ptr [[TMP126]], align 8
+// CHECK2-NEXT:    [[TMP127:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 2
+// CHECK2-NEXT:    store i8 3, ptr [[TMP127]], align 8
 // CHECK2-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR27]], align 8
-// CHECK2-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
-// CHECK2-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK2-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP130:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP128]])
+// CHECK2-NEXT:    [[TMP128:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP101]], i32 3, ptr [[TMP103]], i32 0, ptr null)
+// CHECK2-NEXT:    [[TMP129:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK2-NEXT:    [[TMP130:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP129]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP131:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP129]])
 // CHECK2-NEXT:    store i8 0, ptr [[FLAG]], align 1
-// CHECK2-NEXT:    [[TMP131:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK2-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP131]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP133:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP131]])
-// CHECK2-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED30]], i32 0, i32 0
-// CHECK2-NEXT:    store ptr [[C]], ptr [[TMP134]], align 8
-// CHECK2-NEXT:    [[TMP135:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP135]], 0
-// CHECK2-NEXT:    [[TMP136:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK2-NEXT:    [[TMP137:%.*]] = or i32 [[TMP136]], 1
-// CHECK2-NEXT:    [[TMP138:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 [[TMP137]], i64 40, i64 8, ptr @.omp_task_entry..16)
-// CHECK2-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP138]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP139]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP141:%.*]] = load ptr, ptr [[TMP140]], align 8
-// CHECK2-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP141]], ptr align 8 [[AGG_CAPTURED30]], i64 8, i1 false)
-// CHECK2-NEXT:    [[TMP142:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP138]])
-// CHECK2-NEXT:    [[TMP143:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
-// CHECK2-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP143]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP143]], i32 0, i32 2
-// CHECK2-NEXT:    [[TMP146:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP145]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP147:%.*]] = load i32, ptr [[C]], align 128
-// CHECK2-NEXT:    store i32 [[TMP147]], ptr [[TMP146]], align 128
-// CHECK2-NEXT:    [[TMP148:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP144]], i32 0, i32 2
-// CHECK2-NEXT:    store i32 0, ptr [[TMP148]], align 16
-// CHECK2-NEXT:    [[TMP149:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP143]])
-// CHECK2-NEXT:    [[TMP150:%.*]] = load i32, ptr @a, align 4
-// CHECK2-NEXT:    store i32 [[TMP150]], ptr [[RETVAL]], align 4
-// CHECK2-NEXT:    [[TMP151:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK2-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP151]])
+// CHECK2-NEXT:    [[TMP132:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK2-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP132]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP134:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP132]])
+// CHECK2-NEXT:    [[TMP135:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED30]], i32 0, i32 0
+// CHECK2-NEXT:    store ptr [[C]], ptr [[TMP135]], align 8
+// CHECK2-NEXT:    [[TMP136:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP136]], 0
+// CHECK2-NEXT:    [[TMP137:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK2-NEXT:    [[TMP138:%.*]] = or i32 [[TMP137]], 1
+// CHECK2-NEXT:    [[TMP139:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 [[TMP138]], i64 40, i64 8, ptr @.omp_task_entry..16)
+// CHECK2-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP139]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP141:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP140]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP142:%.*]] = load ptr, ptr [[TMP141]], align 8
+// CHECK2-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP142]], ptr align 8 [[AGG_CAPTURED30]], i64 8, i1 false)
+// CHECK2-NEXT:    [[TMP143:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP139]])
+// CHECK2-NEXT:    [[TMP144:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
+// CHECK2-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP144]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP146:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP144]], i32 0, i32 2
+// CHECK2-NEXT:    [[TMP147:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP146]], i32 0, i32 0
+// CHECK2-NEXT:    [[TMP148:%.*]] = load i32, ptr [[C]], align 128
+// CHECK2-NEXT:    store i32 [[TMP148]], ptr [[TMP147]], align 128
+// CHECK2-NEXT:    [[TMP149:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP145]], i32 0, i32 2
+// CHECK2-NEXT:    store i32 0, ptr [[TMP149]], align 16
+// CHECK2-NEXT:    [[TMP150:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP144]])
+// CHECK2-NEXT:    [[TMP151:%.*]] = load i32, ptr @a, align 4
+// CHECK2-NEXT:    store i32 [[TMP151]], ptr [[RETVAL]], align 4
+// CHECK2-NEXT:    [[TMP152:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK2-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP152]])
 // CHECK2-NEXT:    [[ARRAY_BEGIN32:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK2-NEXT:    [[TMP152:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN32]], i64 2
+// CHECK2-NEXT:    [[TMP153:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN32]], i64 2
 // CHECK2-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK2:       arraydestroy.body:
-// CHECK2-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP152]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK2-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP153]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK2-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK2-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK2-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN32]]
 // CHECK2-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE33:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK2:       arraydestroy.done33:
-// CHECK2-NEXT:    [[TMP153:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK2-NEXT:    ret i32 [[TMP153]]
+// CHECK2-NEXT:    [[TMP154:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK2-NEXT:    ret i32 [[TMP154]]
 //
 //
 // CHECK2-LABEL: define {{[^@]+}}@_ZN1SC1Ev
@@ -4220,235 +4223,236 @@ void test_transparent()
 // CHECK2-51-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
 // CHECK2-51-NEXT:    [[TMP35:%.*]] = mul nsw i64 9, [[TMP2]]
 // CHECK2-51-NEXT:    [[ARRAYIDX2:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP35]]
-// CHECK2-51-NEXT:    [[TMP36:%.*]] = getelementptr i32, ptr [[ARRAYIDX2]], i32 1
-// CHECK2-51-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
-// CHECK2-51-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK2-51-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
-// CHECK2-51-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK2-51-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP19]], i64 3
-// CHECK2-51-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
-// CHECK2-51-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
-// CHECK2-51-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 1, ptr [[TMP44]], align 8
+// CHECK2-51-NEXT:    [[TMP36:%.*]] = mul nuw i64 [[TMP2]], 4
+// CHECK2-51-NEXT:    [[TMP37:%.*]] = getelementptr i8, ptr [[ARRAYIDX2]], i64 [[TMP36]]
+// CHECK2-51-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[TMP37]] to i64
+// CHECK2-51-NEXT:    [[TMP39:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK2-51-NEXT:    [[TMP40:%.*]] = sub nuw i64 [[TMP38]], [[TMP39]]
+// CHECK2-51-NEXT:    [[TMP41:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK2-51-NEXT:    [[TMP42:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP19]], i64 3
+// CHECK2-51-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP41]], ptr [[TMP43]], align 8
+// CHECK2-51-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 [[TMP40]], ptr [[TMP44]], align 8
+// CHECK2-51-NEXT:    [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP42]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 1, ptr [[TMP45]], align 8
 // CHECK2-51-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
-// CHECK2-51-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP15]], i32 4, ptr [[TMP19]], i32 0, ptr null)
-// CHECK2-51-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK2-51-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i32 0, ptr [[TMP48]], align 8
-// CHECK2-51-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP46]])
-// CHECK2-51-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK2-51-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
+// CHECK2-51-NEXT:    [[TMP46:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP15]], i32 4, ptr [[TMP19]], i32 0, ptr null)
+// CHECK2-51-NEXT:    [[TMP47:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK2-51-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP47]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP48]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i32 0, ptr [[TMP49]], align 8
+// CHECK2-51-NEXT:    [[TMP50:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP47]])
+// CHECK2-51-NEXT:    [[TMP51:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK2-51-NEXT:    [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP51]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP53:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR5]], i64 0, i64 0
 // CHECK2-51-NEXT:    [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK2-51-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
-// CHECK2-51-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
-// CHECK2-51-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
-// CHECK2-51-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 4, ptr [[TMP56]], align 8
-// CHECK2-51-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 3, ptr [[TMP57]], align 8
-// CHECK2-51-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-51-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
-// CHECK2-51-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP2]]
-// CHECK2-51-NEXT:    [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
-// CHECK2-51-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX7]], i64 [[TMP59]]
-// CHECK2-51-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-51-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
-// CHECK2-51-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP2]]
-// CHECK2-51-NEXT:    [[ARRAYIDX9:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
-// CHECK2-51-NEXT:    [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX9]], i64 [[TMP62]]
-// CHECK2-51-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX10]], i32 1
-// CHECK2-51-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
-// CHECK2-51-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX8]] to i64
-// CHECK2-51-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
-// CHECK2-51-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX8]] to i64
-// CHECK2-51-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
-// CHECK2-51-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
-// CHECK2-51-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
-// CHECK2-51-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 3, ptr [[TMP72]], align 8
+// CHECK2-51-NEXT:    [[TMP54:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
+// CHECK2-51-NEXT:    [[TMP55:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i64 0
+// CHECK2-51-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP54]], ptr [[TMP56]], align 8
+// CHECK2-51-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 4, ptr [[TMP57]], align 8
+// CHECK2-51-NEXT:    [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP55]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 3, ptr [[TMP58]], align 8
+// CHECK2-51-NEXT:    [[TMP59:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-51-NEXT:    [[TMP60:%.*]] = sext i8 [[TMP59]] to i64
+// CHECK2-51-NEXT:    [[TMP61:%.*]] = mul nsw i64 4, [[TMP2]]
+// CHECK2-51-NEXT:    [[ARRAYIDX7:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP61]]
+// CHECK2-51-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX7]], i64 [[TMP60]]
+// CHECK2-51-NEXT:    [[TMP62:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-51-NEXT:    [[TMP63:%.*]] = sext i8 [[TMP62]] to i64
+// CHECK2-51-NEXT:    [[TMP64:%.*]] = mul nsw i64 9, [[TMP2]]
+// CHECK2-51-NEXT:    [[ARRAYIDX9:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP64]]
+// CHECK2-51-NEXT:    [[ARRAYIDX10:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX9]], i64 [[TMP63]]
+// CHECK2-51-NEXT:    [[TMP65:%.*]] = getelementptr i32, ptr [[ARRAYIDX10]], i32 1
+// CHECK2-51-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[TMP65]] to i64
+// CHECK2-51-NEXT:    [[TMP67:%.*]] = ptrtoaddr ptr [[ARRAYIDX8]] to i64
+// CHECK2-51-NEXT:    [[TMP68:%.*]] = sub nuw i64 [[TMP66]], [[TMP67]]
+// CHECK2-51-NEXT:    [[TMP69:%.*]] = ptrtoint ptr [[ARRAYIDX8]] to i64
+// CHECK2-51-NEXT:    [[TMP70:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i64 1
+// CHECK2-51-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP69]], ptr [[TMP71]], align 8
+// CHECK2-51-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 [[TMP68]], ptr [[TMP72]], align 8
+// CHECK2-51-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP70]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 3, ptr [[TMP73]], align 8
 // CHECK2-51-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR11]], align 8
-// CHECK2-51-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i32 0, ptr [[TMP73]], align 8
-// CHECK2-51-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
-// CHECK2-51-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK2-51-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR13]], i64 0, i64 0
+// CHECK2-51-NEXT:    [[TMP74:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP52]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i32 0, ptr [[TMP74]], align 8
+// CHECK2-51-NEXT:    [[TMP75:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP51]], i32 2, ptr [[TMP53]], i32 0, ptr null)
+// CHECK2-51-NEXT:    [[TMP76:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK2-51-NEXT:    [[TMP77:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP76]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP78:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR13]], i64 0, i64 0
 // CHECK2-51-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK2-51-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK2-51-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
-// CHECK2-51-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
-// CHECK2-51-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 4, ptr [[TMP81]], align 8
-// CHECK2-51-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 4, ptr [[TMP82]], align 8
-// CHECK2-51-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-51-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
-// CHECK2-51-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP2]]
-// CHECK2-51-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
-// CHECK2-51-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP84]]
-// CHECK2-51-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-51-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
-// CHECK2-51-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP2]]
-// CHECK2-51-NEXT:    [[ARRAYIDX17:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
-// CHECK2-51-NEXT:    [[ARRAYIDX18:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX17]], i64 [[TMP87]]
-// CHECK2-51-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX18]], i32 1
-// CHECK2-51-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
-// CHECK2-51-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX16]] to i64
-// CHECK2-51-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
-// CHECK2-51-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX16]] to i64
-// CHECK2-51-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
-// CHECK2-51-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
-// CHECK2-51-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
-// CHECK2-51-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 4, ptr [[TMP97]], align 8
+// CHECK2-51-NEXT:    [[TMP79:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK2-51-NEXT:    [[TMP80:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i64 0
+// CHECK2-51-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP79]], ptr [[TMP81]], align 8
+// CHECK2-51-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 4, ptr [[TMP82]], align 8
+// CHECK2-51-NEXT:    [[TMP83:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP80]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 4, ptr [[TMP83]], align 8
+// CHECK2-51-NEXT:    [[TMP84:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-51-NEXT:    [[TMP85:%.*]] = sext i8 [[TMP84]] to i64
+// CHECK2-51-NEXT:    [[TMP86:%.*]] = mul nsw i64 4, [[TMP2]]
+// CHECK2-51-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP86]]
+// CHECK2-51-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP85]]
+// CHECK2-51-NEXT:    [[TMP87:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-51-NEXT:    [[TMP88:%.*]] = sext i8 [[TMP87]] to i64
+// CHECK2-51-NEXT:    [[TMP89:%.*]] = mul nsw i64 9, [[TMP2]]
+// CHECK2-51-NEXT:    [[ARRAYIDX17:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP89]]
+// CHECK2-51-NEXT:    [[ARRAYIDX18:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX17]], i64 [[TMP88]]
+// CHECK2-51-NEXT:    [[TMP90:%.*]] = getelementptr i32, ptr [[ARRAYIDX18]], i32 1
+// CHECK2-51-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[TMP90]] to i64
+// CHECK2-51-NEXT:    [[TMP92:%.*]] = ptrtoaddr ptr [[ARRAYIDX16]] to i64
+// CHECK2-51-NEXT:    [[TMP93:%.*]] = sub nuw i64 [[TMP91]], [[TMP92]]
+// CHECK2-51-NEXT:    [[TMP94:%.*]] = ptrtoint ptr [[ARRAYIDX16]] to i64
+// CHECK2-51-NEXT:    [[TMP95:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i64 1
+// CHECK2-51-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP94]], ptr [[TMP96]], align 8
+// CHECK2-51-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 [[TMP93]], ptr [[TMP97]], align 8
+// CHECK2-51-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP95]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 4, ptr [[TMP98]], align 8
 // CHECK2-51-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR19]], align 8
-// CHECK2-51-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i32 0, ptr [[TMP98]], align 8
-// CHECK2-51-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
-// CHECK2-51-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK2-51-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
-// CHECK2-51-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
-// CHECK2-51-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
-// CHECK2-51-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 4, ptr [[TMP105]], align 8
-// CHECK2-51-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 3, ptr [[TMP106]], align 8
+// CHECK2-51-NEXT:    [[TMP99:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP77]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i32 0, ptr [[TMP99]], align 8
+// CHECK2-51-NEXT:    [[TMP100:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP76]], i32 2, ptr [[TMP78]], i32 0, ptr null)
+// CHECK2-51-NEXT:    [[TMP101:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK2-51-NEXT:    [[TMP102:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP101]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP103:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK2-51-NEXT:    [[TMP104:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 0
+// CHECK2-51-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP105]], align 8
+// CHECK2-51-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 4, ptr [[TMP106]], align 8
+// CHECK2-51-NEXT:    [[TMP107:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP104]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 3, ptr [[TMP107]], align 8
 // CHECK2-51-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK2-51-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK2-51-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
-// CHECK2-51-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
-// CHECK2-51-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 4, ptr [[TMP110]], align 8
-// CHECK2-51-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 3, ptr [[TMP111]], align 8
-// CHECK2-51-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP2]]
-// CHECK2-51-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
+// CHECK2-51-NEXT:    [[TMP108:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK2-51-NEXT:    [[TMP109:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 1
+// CHECK2-51-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP108]], ptr [[TMP110]], align 8
+// CHECK2-51-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 4, ptr [[TMP111]], align 8
+// CHECK2-51-NEXT:    [[TMP112:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP109]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 3, ptr [[TMP112]], align 8
+// CHECK2-51-NEXT:    [[TMP113:%.*]] = mul nsw i64 0, [[TMP2]]
+// CHECK2-51-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP113]]
 // CHECK2-51-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 3
-// CHECK2-51-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
-// CHECK2-51-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
-// CHECK2-51-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
-// CHECK2-51-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
-// CHECK2-51-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
-// CHECK2-51-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
-// CHECK2-51-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP2]]
-// CHECK2-51-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
+// CHECK2-51-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
+// CHECK2-51-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
+// CHECK2-51-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP115]], 1
+// CHECK2-51-NEXT:    [[TMP116:%.*]] = load i32, ptr @a, align 4
+// CHECK2-51-NEXT:    [[TMP117:%.*]] = sext i32 [[TMP116]] to i64
+// CHECK2-51-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP117]]
+// CHECK2-51-NEXT:    [[TMP118:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP2]]
+// CHECK2-51-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP118]]
 // CHECK2-51-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[LEN_SUB_1]]
-// CHECK2-51-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK2-51-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
-// CHECK2-51-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK2-51-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
-// CHECK2-51-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK2-51-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
-// CHECK2-51-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
-// CHECK2-51-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
-// CHECK2-51-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 3, ptr [[TMP126]], align 8
+// CHECK2-51-NEXT:    [[TMP119:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK2-51-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[TMP119]] to i64
+// CHECK2-51-NEXT:    [[TMP121:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK2-51-NEXT:    [[TMP122:%.*]] = sub nuw i64 [[TMP120]], [[TMP121]]
+// CHECK2-51-NEXT:    [[TMP123:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK2-51-NEXT:    [[TMP124:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i64 2
+// CHECK2-51-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP123]], ptr [[TMP125]], align 8
+// CHECK2-51-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 [[TMP122]], ptr [[TMP126]], align 8
+// CHECK2-51-NEXT:    [[TMP127:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP124]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 3, ptr [[TMP127]], align 8
 // CHECK2-51-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR27]], align 8
-// CHECK2-51-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
-// CHECK2-51-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK2-51-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP130:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR29]], i64 0, i64 0
-// CHECK2-51-NEXT:    [[TMP131:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 0
-// CHECK2-51-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP132]], align 8
-// CHECK2-51-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 4, ptr [[TMP133]], align 8
-// CHECK2-51-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 8, ptr [[TMP134]], align 8
+// CHECK2-51-NEXT:    [[TMP128:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP101]], i32 3, ptr [[TMP103]], i32 0, ptr null)
+// CHECK2-51-NEXT:    [[TMP129:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK2-51-NEXT:    [[TMP130:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP129]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP131:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR29]], i64 0, i64 0
+// CHECK2-51-NEXT:    [[TMP132:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i64 0
+// CHECK2-51-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP132]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP133]], align 8
+// CHECK2-51-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP132]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 4, ptr [[TMP134]], align 8
+// CHECK2-51-NEXT:    [[TMP135:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP132]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 8, ptr [[TMP135]], align 8
 // CHECK2-51-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK2-51-NEXT:    [[TMP135:%.*]] = ptrtoint ptr [[ARRAYIDX30]] to i64
-// CHECK2-51-NEXT:    [[TMP136:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 1
-// CHECK2-51-NEXT:    [[TMP137:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP135]], ptr [[TMP137]], align 8
-// CHECK2-51-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 4, ptr [[TMP138]], align 8
-// CHECK2-51-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 8, ptr [[TMP139]], align 8
-// CHECK2-51-NEXT:    [[TMP140:%.*]] = mul nsw i64 0, [[TMP2]]
-// CHECK2-51-NEXT:    [[ARRAYIDX31:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP140]]
+// CHECK2-51-NEXT:    [[TMP136:%.*]] = ptrtoint ptr [[ARRAYIDX30]] to i64
+// CHECK2-51-NEXT:    [[TMP137:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i64 1
+// CHECK2-51-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP137]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP136]], ptr [[TMP138]], align 8
+// CHECK2-51-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP137]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 4, ptr [[TMP139]], align 8
+// CHECK2-51-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP137]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 8, ptr [[TMP140]], align 8
+// CHECK2-51-NEXT:    [[TMP141:%.*]] = mul nsw i64 0, [[TMP2]]
+// CHECK2-51-NEXT:    [[ARRAYIDX31:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP141]]
 // CHECK2-51-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX31]], i64 3
-// CHECK2-51-NEXT:    [[TMP141:%.*]] = load i32, ptr @a, align 4
-// CHECK2-51-NEXT:    [[TMP142:%.*]] = sext i32 [[TMP141]] to i64
-// CHECK2-51-NEXT:    [[LEN_SUB_133:%.*]] = sub nsw i64 [[TMP142]], 1
-// CHECK2-51-NEXT:    [[TMP143:%.*]] = load i32, ptr @a, align 4
-// CHECK2-51-NEXT:    [[TMP144:%.*]] = sext i32 [[TMP143]] to i64
-// CHECK2-51-NEXT:    [[LB_ADD_LEN34:%.*]] = add nsw i64 -1, [[TMP144]]
-// CHECK2-51-NEXT:    [[TMP145:%.*]] = mul nsw i64 [[LB_ADD_LEN34]], [[TMP2]]
-// CHECK2-51-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP145]]
+// CHECK2-51-NEXT:    [[TMP142:%.*]] = load i32, ptr @a, align 4
+// CHECK2-51-NEXT:    [[TMP143:%.*]] = sext i32 [[TMP142]] to i64
+// CHECK2-51-NEXT:    [[LEN_SUB_133:%.*]] = sub nsw i64 [[TMP143]], 1
+// CHECK2-51-NEXT:    [[TMP144:%.*]] = load i32, ptr @a, align 4
+// CHECK2-51-NEXT:    [[TMP145:%.*]] = sext i32 [[TMP144]] to i64
+// CHECK2-51-NEXT:    [[LB_ADD_LEN34:%.*]] = add nsw i64 -1, [[TMP145]]
+// CHECK2-51-NEXT:    [[TMP146:%.*]] = mul nsw i64 [[LB_ADD_LEN34]], [[TMP2]]
+// CHECK2-51-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP146]]
 // CHECK2-51-NEXT:    [[ARRAYIDX36:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX35]], i64 [[LEN_SUB_133]]
-// CHECK2-51-NEXT:    [[TMP146:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
-// CHECK2-51-NEXT:    [[TMP147:%.*]] = ptrtoaddr ptr [[TMP146]] to i64
-// CHECK2-51-NEXT:    [[TMP148:%.*]] = ptrtoaddr ptr [[ARRAYIDX32]] to i64
-// CHECK2-51-NEXT:    [[TMP149:%.*]] = sub nuw i64 [[TMP147]], [[TMP148]]
-// CHECK2-51-NEXT:    [[TMP150:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
-// CHECK2-51-NEXT:    [[TMP151:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 2
-// CHECK2-51-NEXT:    [[TMP152:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 0
-// CHECK2-51-NEXT:    store i64 [[TMP150]], ptr [[TMP152]], align 8
-// CHECK2-51-NEXT:    [[TMP153:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 1
-// CHECK2-51-NEXT:    store i64 [[TMP149]], ptr [[TMP153]], align 8
-// CHECK2-51-NEXT:    [[TMP154:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i8 8, ptr [[TMP154]], align 8
+// CHECK2-51-NEXT:    [[TMP147:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
+// CHECK2-51-NEXT:    [[TMP148:%.*]] = ptrtoaddr ptr [[TMP147]] to i64
+// CHECK2-51-NEXT:    [[TMP149:%.*]] = ptrtoaddr ptr [[ARRAYIDX32]] to i64
+// CHECK2-51-NEXT:    [[TMP150:%.*]] = sub nuw i64 [[TMP148]], [[TMP149]]
+// CHECK2-51-NEXT:    [[TMP151:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
+// CHECK2-51-NEXT:    [[TMP152:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i64 2
+// CHECK2-51-NEXT:    [[TMP153:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP152]], i32 0, i32 0
+// CHECK2-51-NEXT:    store i64 [[TMP151]], ptr [[TMP153]], align 8
+// CHECK2-51-NEXT:    [[TMP154:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP152]], i32 0, i32 1
+// CHECK2-51-NEXT:    store i64 [[TMP150]], ptr [[TMP154]], align 8
+// CHECK2-51-NEXT:    [[TMP155:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP152]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i8 8, ptr [[TMP155]], align 8
 // CHECK2-51-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR37]], align 8
-// CHECK2-51-NEXT:    [[TMP155:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP128]], i32 3, ptr [[TMP130]], i32 0, ptr null)
-// CHECK2-51-NEXT:    [[TMP156:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK2-51-NEXT:    [[TMP157:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP156]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP158:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP156]])
+// CHECK2-51-NEXT:    [[TMP156:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP129]], i32 3, ptr [[TMP131]], i32 0, ptr null)
+// CHECK2-51-NEXT:    [[TMP157:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK2-51-NEXT:    [[TMP158:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP157]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP159:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP157]])
 // CHECK2-51-NEXT:    store i8 0, ptr [[FLAG]], align 1
-// CHECK2-51-NEXT:    [[TMP159:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..16)
-// CHECK2-51-NEXT:    [[TMP160:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP159]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP161:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP159]])
-// CHECK2-51-NEXT:    [[TMP162:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_16]], ptr [[AGG_CAPTURED40]], i32 0, i32 0
-// CHECK2-51-NEXT:    store ptr [[C]], ptr [[TMP162]], align 8
-// CHECK2-51-NEXT:    [[TMP163:%.*]] = load i8, ptr [[B]], align 1
-// CHECK2-51-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP163]], 0
-// CHECK2-51-NEXT:    [[TMP164:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK2-51-NEXT:    [[TMP165:%.*]] = or i32 [[TMP164]], 1
-// CHECK2-51-NEXT:    [[TMP166:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 [[TMP165]], i64 40, i64 8, ptr @.omp_task_entry..18)
-// CHECK2-51-NEXT:    [[TMP167:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_17:%.*]], ptr [[TMP166]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP168:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP167]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP169:%.*]] = load ptr, ptr [[TMP168]], align 8
-// CHECK2-51-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP169]], ptr align 8 [[AGG_CAPTURED40]], i64 8, i1 false)
-// CHECK2-51-NEXT:    [[TMP170:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP166]])
-// CHECK2-51-NEXT:    [[TMP171:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..23)
-// CHECK2-51-NEXT:    [[TMP172:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22:%.*]], ptr [[TMP171]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP173:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22]], ptr [[TMP171]], i32 0, i32 2
-// CHECK2-51-NEXT:    [[TMP174:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_21:%.*]], ptr [[TMP173]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP175:%.*]] = load i32, ptr [[C]], align 128
-// CHECK2-51-NEXT:    store i32 [[TMP175]], ptr [[TMP174]], align 128
-// CHECK2-51-NEXT:    [[TMP176:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP172]], i32 0, i32 2
-// CHECK2-51-NEXT:    store i32 0, ptr [[TMP176]], align 16
-// CHECK2-51-NEXT:    [[TMP177:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP171]])
-// CHECK2-51-NEXT:    [[TMP178:%.*]] = load i32, ptr @a, align 4
-// CHECK2-51-NEXT:    store i32 [[TMP178]], ptr [[RETVAL]], align 4
-// CHECK2-51-NEXT:    [[TMP179:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK2-51-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP179]])
+// CHECK2-51-NEXT:    [[TMP160:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..16)
+// CHECK2-51-NEXT:    [[TMP161:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP160]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP162:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP160]])
+// CHECK2-51-NEXT:    [[TMP163:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_16]], ptr [[AGG_CAPTURED40]], i32 0, i32 0
+// CHECK2-51-NEXT:    store ptr [[C]], ptr [[TMP163]], align 8
+// CHECK2-51-NEXT:    [[TMP164:%.*]] = load i8, ptr [[B]], align 1
+// CHECK2-51-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP164]], 0
+// CHECK2-51-NEXT:    [[TMP165:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK2-51-NEXT:    [[TMP166:%.*]] = or i32 [[TMP165]], 1
+// CHECK2-51-NEXT:    [[TMP167:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 [[TMP166]], i64 40, i64 8, ptr @.omp_task_entry..18)
+// CHECK2-51-NEXT:    [[TMP168:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_17:%.*]], ptr [[TMP167]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP169:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP168]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP170:%.*]] = load ptr, ptr [[TMP169]], align 8
+// CHECK2-51-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP170]], ptr align 8 [[AGG_CAPTURED40]], i64 8, i1 false)
+// CHECK2-51-NEXT:    [[TMP171:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP167]])
+// CHECK2-51-NEXT:    [[TMP172:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[TMP0]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..23)
+// CHECK2-51-NEXT:    [[TMP173:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22:%.*]], ptr [[TMP172]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP174:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22]], ptr [[TMP172]], i32 0, i32 2
+// CHECK2-51-NEXT:    [[TMP175:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_21:%.*]], ptr [[TMP174]], i32 0, i32 0
+// CHECK2-51-NEXT:    [[TMP176:%.*]] = load i32, ptr [[C]], align 128
+// CHECK2-51-NEXT:    store i32 [[TMP176]], ptr [[TMP175]], align 128
+// CHECK2-51-NEXT:    [[TMP177:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP173]], i32 0, i32 2
+// CHECK2-51-NEXT:    store i32 0, ptr [[TMP177]], align 16
+// CHECK2-51-NEXT:    [[TMP178:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[TMP0]], ptr [[TMP172]])
+// CHECK2-51-NEXT:    [[TMP179:%.*]] = load i32, ptr @a, align 4
+// CHECK2-51-NEXT:    store i32 [[TMP179]], ptr [[RETVAL]], align 4
+// CHECK2-51-NEXT:    [[TMP180:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK2-51-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP180]])
 // CHECK2-51-NEXT:    [[ARRAY_BEGIN42:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK2-51-NEXT:    [[TMP180:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN42]], i64 2
+// CHECK2-51-NEXT:    [[TMP181:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN42]], i64 2
 // CHECK2-51-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK2-51:       arraydestroy.body:
-// CHECK2-51-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP180]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK2-51-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP181]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK2-51-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK2-51-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK2-51-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN42]]
 // CHECK2-51-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE43:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK2-51:       arraydestroy.done43:
-// CHECK2-51-NEXT:    [[TMP181:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK2-51-NEXT:    ret i32 [[TMP181]]
+// CHECK2-51-NEXT:    [[TMP182:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK2-51-NEXT:    ret i32 [[TMP182]]
 //
 //
 // CHECK2-51-LABEL: define {{[^@]+}}@_ZN1SC1Ev
@@ -5830,207 +5834,208 @@ void test_transparent()
 // CHECK3-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP33]]
 // CHECK3-NEXT:    [[TMP34:%.*]] = mul nsw i64 9, [[TMP1]]
 // CHECK3-NEXT:    [[ARRAYIDX4:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
-// CHECK3-NEXT:    [[TMP35:%.*]] = getelementptr i32, ptr [[ARRAYIDX4]], i32 1
-// CHECK3-NEXT:    [[TMP36:%.*]] = ptrtoaddr ptr [[TMP35]] to i64
-// CHECK3-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK3-NEXT:    [[TMP38:%.*]] = sub nuw i64 [[TMP36]], [[TMP37]]
-// CHECK3-NEXT:    [[TMP39:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK3-NEXT:    [[TMP40:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
-// CHECK3-NEXT:    [[TMP41:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 0
-// CHECK3-NEXT:    store i64 [[TMP39]], ptr [[TMP41]], align 8
-// CHECK3-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 1
-// CHECK3-NEXT:    store i64 [[TMP38]], ptr [[TMP42]], align 8
-// CHECK3-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 2
-// CHECK3-NEXT:    store i8 1, ptr [[TMP43]], align 8
+// CHECK3-NEXT:    [[TMP35:%.*]] = mul nuw i64 [[TMP1]], 4
+// CHECK3-NEXT:    [[TMP36:%.*]] = getelementptr i8, ptr [[ARRAYIDX4]], i64 [[TMP35]]
+// CHECK3-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
+// CHECK3-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK3-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
+// CHECK3-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK3-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
+// CHECK3-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
+// CHECK3-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
+// CHECK3-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
+// CHECK3-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
+// CHECK3-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
+// CHECK3-NEXT:    store i8 1, ptr [[TMP44]], align 8
 // CHECK3-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB5]])
-// CHECK3-NEXT:    [[TMP44:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
+// CHECK3-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7:[0-9]+]])
-// CHECK3-NEXT:    [[TMP45:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK3-NEXT:    [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP45]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK3-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM8:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7]])
-// CHECK3-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP46]], i32 0, i32 2
-// CHECK3-NEXT:    store i32 0, ptr [[TMP47]], align 8
-// CHECK3-NEXT:    [[TMP48:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP45]])
+// CHECK3-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
+// CHECK3-NEXT:    store i32 0, ptr [[TMP48]], align 8
+// CHECK3-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP46]])
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM10:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9:[0-9]+]])
-// CHECK3-NEXT:    [[TMP49:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK3-NEXT:    [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP49]], i32 0, i32 0
-// CHECK3-NEXT:    [[TMP51:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
+// CHECK3-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK3-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
 // CHECK3-NEXT:    [[ARRAYIDX12:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK3-NEXT:    [[TMP52:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
-// CHECK3-NEXT:    [[TMP53:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 0
-// CHECK3-NEXT:    [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 0
-// CHECK3-NEXT:    store i64 [[TMP52]], ptr [[TMP54]], align 8
-// CHECK3-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 1
-// CHECK3-NEXT:    store i64 4, ptr [[TMP55]], align 8
-// CHECK3-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 2
-// CHECK3-NEXT:    store i8 3, ptr [[TMP56]], align 8
-// CHECK3-NEXT:    [[TMP57:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-NEXT:    [[TMP58:%.*]] = sext i8 [[TMP57]] to i64
-// CHECK3-NEXT:    [[TMP59:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK3-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP59]]
-// CHECK3-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP58]]
-// CHECK3-NEXT:    [[TMP60:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-NEXT:    [[TMP61:%.*]] = sext i8 [[TMP60]] to i64
-// CHECK3-NEXT:    [[TMP62:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK3-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP62]]
-// CHECK3-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP61]]
-// CHECK3-NEXT:    [[TMP63:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
-// CHECK3-NEXT:    [[TMP64:%.*]] = ptrtoaddr ptr [[TMP63]] to i64
-// CHECK3-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
-// CHECK3-NEXT:    [[TMP66:%.*]] = sub nuw i64 [[TMP64]], [[TMP65]]
-// CHECK3-NEXT:    [[TMP67:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK3-NEXT:    [[TMP68:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 1
-// CHECK3-NEXT:    [[TMP69:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 0
-// CHECK3-NEXT:    store i64 [[TMP67]], ptr [[TMP69]], align 8
-// CHECK3-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 1
-// CHECK3-NEXT:    store i64 [[TMP66]], ptr [[TMP70]], align 8
-// CHECK3-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 2
-// CHECK3-NEXT:    store i8 3, ptr [[TMP71]], align 8
+// CHECK3-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
+// CHECK3-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
+// CHECK3-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
+// CHECK3-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
+// CHECK3-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
+// CHECK3-NEXT:    store i64 4, ptr [[TMP56]], align 8
+// CHECK3-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
+// CHECK3-NEXT:    store i8 3, ptr [[TMP57]], align 8
+// CHECK3-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
+// CHECK3-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK3-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
+// CHECK3-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP59]]
+// CHECK3-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
+// CHECK3-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK3-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
+// CHECK3-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP62]]
+// CHECK3-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
+// CHECK3-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
+// CHECK3-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
+// CHECK3-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
+// CHECK3-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK3-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
+// CHECK3-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
+// CHECK3-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
+// CHECK3-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
+// CHECK3-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
+// CHECK3-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
+// CHECK3-NEXT:    store i8 3, ptr [[TMP72]], align 8
 // CHECK3-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR17]], align 8
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM18:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9]])
-// CHECK3-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP50]], i32 0, i32 2
-// CHECK3-NEXT:    store i32 0, ptr [[TMP72]], align 8
-// CHECK3-NEXT:    [[TMP73:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP49]], i32 2, ptr [[TMP51]], i32 0, ptr null)
+// CHECK3-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
+// CHECK3-NEXT:    store i32 0, ptr [[TMP73]], align 8
+// CHECK3-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM20:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11:[0-9]+]])
-// CHECK3-NEXT:    [[TMP74:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK3-NEXT:    [[TMP75:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP74]], i32 0, i32 0
-// CHECK3-NEXT:    [[TMP76:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK3-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK3-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
 // CHECK3-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK3-NEXT:    [[TMP77:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK3-NEXT:    [[TMP78:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 0
-// CHECK3-NEXT:    [[TMP79:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 0
-// CHECK3-NEXT:    store i64 [[TMP77]], ptr [[TMP79]], align 8
-// CHECK3-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 1
-// CHECK3-NEXT:    store i64 4, ptr [[TMP80]], align 8
-// CHECK3-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 2
-// CHECK3-NEXT:    store i8 4, ptr [[TMP81]], align 8
-// CHECK3-NEXT:    [[TMP82:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-NEXT:    [[TMP83:%.*]] = sext i8 [[TMP82]] to i64
-// CHECK3-NEXT:    [[TMP84:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK3-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP84]]
-// CHECK3-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP83]]
-// CHECK3-NEXT:    [[TMP85:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-NEXT:    [[TMP86:%.*]] = sext i8 [[TMP85]] to i64
-// CHECK3-NEXT:    [[TMP87:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK3-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP87]]
-// CHECK3-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP86]]
-// CHECK3-NEXT:    [[TMP88:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK3-NEXT:    [[TMP89:%.*]] = ptrtoaddr ptr [[TMP88]] to i64
-// CHECK3-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK3-NEXT:    [[TMP91:%.*]] = sub nuw i64 [[TMP89]], [[TMP90]]
-// CHECK3-NEXT:    [[TMP92:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK3-NEXT:    [[TMP93:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 1
-// CHECK3-NEXT:    [[TMP94:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 0
-// CHECK3-NEXT:    store i64 [[TMP92]], ptr [[TMP94]], align 8
-// CHECK3-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 1
-// CHECK3-NEXT:    store i64 [[TMP91]], ptr [[TMP95]], align 8
-// CHECK3-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 2
-// CHECK3-NEXT:    store i8 4, ptr [[TMP96]], align 8
+// CHECK3-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK3-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
+// CHECK3-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
+// CHECK3-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
+// CHECK3-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
+// CHECK3-NEXT:    store i64 4, ptr [[TMP81]], align 8
+// CHECK3-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
+// CHECK3-NEXT:    store i8 4, ptr [[TMP82]], align 8
+// CHECK3-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
+// CHECK3-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK3-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
+// CHECK3-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP84]]
+// CHECK3-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
+// CHECK3-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK3-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
+// CHECK3-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP87]]
+// CHECK3-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK3-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
+// CHECK3-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK3-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
+// CHECK3-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK3-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
+// CHECK3-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
+// CHECK3-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
+// CHECK3-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
+// CHECK3-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
+// CHECK3-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
+// CHECK3-NEXT:    store i8 4, ptr [[TMP97]], align 8
 // CHECK3-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR27]], align 8
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM28:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11]])
-// CHECK3-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP75]], i32 0, i32 2
-// CHECK3-NEXT:    store i32 0, ptr [[TMP97]], align 8
-// CHECK3-NEXT:    [[TMP98:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP74]], i32 2, ptr [[TMP76]], i32 0, ptr null)
+// CHECK3-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
+// CHECK3-NEXT:    store i32 0, ptr [[TMP98]], align 8
+// CHECK3-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM30:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13:[0-9]+]])
-// CHECK3-NEXT:    [[TMP99:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK3-NEXT:    [[TMP100:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP99]], i32 0, i32 0
-// CHECK3-NEXT:    [[TMP101:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
-// CHECK3-NEXT:    [[TMP102:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 0
-// CHECK3-NEXT:    [[TMP103:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 0
-// CHECK3-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP103]], align 8
-// CHECK3-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 1
-// CHECK3-NEXT:    store i64 4, ptr [[TMP104]], align 8
-// CHECK3-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 2
-// CHECK3-NEXT:    store i8 3, ptr [[TMP105]], align 8
+// CHECK3-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK3-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
+// CHECK3-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
+// CHECK3-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
+// CHECK3-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
+// CHECK3-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
+// CHECK3-NEXT:    store i64 4, ptr [[TMP105]], align 8
+// CHECK3-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
+// CHECK3-NEXT:    store i8 3, ptr [[TMP106]], align 8
 // CHECK3-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK3-NEXT:    [[TMP106:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
-// CHECK3-NEXT:    [[TMP107:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 1
-// CHECK3-NEXT:    [[TMP108:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 0
-// CHECK3-NEXT:    store i64 [[TMP106]], ptr [[TMP108]], align 8
-// CHECK3-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 1
-// CHECK3-NEXT:    store i64 4, ptr [[TMP109]], align 8
-// CHECK3-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 2
-// CHECK3-NEXT:    store i8 3, ptr [[TMP110]], align 8
-// CHECK3-NEXT:    [[TMP111:%.*]] = mul nsw i64 0, [[TMP1]]
-// CHECK3-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP111]]
+// CHECK3-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
+// CHECK3-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
+// CHECK3-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
+// CHECK3-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
+// CHECK3-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
+// CHECK3-NEXT:    store i64 4, ptr [[TMP110]], align 8
+// CHECK3-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
+// CHECK3-NEXT:    store i8 3, ptr [[TMP111]], align 8
+// CHECK3-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP1]]
+// CHECK3-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
 // CHECK3-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX33]], i64 3
-// CHECK3-NEXT:    [[TMP112:%.*]] = load i32, ptr @a, align 4
-// CHECK3-NEXT:    [[TMP113:%.*]] = sext i32 [[TMP112]] to i64
-// CHECK3-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP113]], 1
-// CHECK3-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
-// CHECK3-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
-// CHECK3-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP115]]
-// CHECK3-NEXT:    [[TMP116:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
-// CHECK3-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP116]]
+// CHECK3-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
+// CHECK3-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
+// CHECK3-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
+// CHECK3-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
+// CHECK3-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
+// CHECK3-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
+// CHECK3-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
+// CHECK3-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
 // CHECK3-NEXT:    [[ARRAYIDX36:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX35]], i64 [[LEN_SUB_1]]
-// CHECK3-NEXT:    [[TMP117:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
-// CHECK3-NEXT:    [[TMP118:%.*]] = ptrtoaddr ptr [[TMP117]] to i64
-// CHECK3-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
-// CHECK3-NEXT:    [[TMP120:%.*]] = sub nuw i64 [[TMP118]], [[TMP119]]
-// CHECK3-NEXT:    [[TMP121:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
-// CHECK3-NEXT:    [[TMP122:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 2
-// CHECK3-NEXT:    [[TMP123:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 0
-// CHECK3-NEXT:    store i64 [[TMP121]], ptr [[TMP123]], align 8
-// CHECK3-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 1
-// CHECK3-NEXT:    store i64 [[TMP120]], ptr [[TMP124]], align 8
-// CHECK3-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 2
-// CHECK3-NEXT:    store i8 3, ptr [[TMP125]], align 8
+// CHECK3-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
+// CHECK3-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
+// CHECK3-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
+// CHECK3-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
+// CHECK3-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
+// CHECK3-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
+// CHECK3-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
+// CHECK3-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
+// CHECK3-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
+// CHECK3-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
+// CHECK3-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
+// CHECK3-NEXT:    store i8 3, ptr [[TMP126]], align 8
 // CHECK3-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR37]], align 8
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM38:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13]])
-// CHECK3-NEXT:    [[TMP126:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP99]], i32 3, ptr [[TMP101]], i32 0, ptr null)
+// CHECK3-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM40:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15:[0-9]+]])
-// CHECK3-NEXT:    [[TMP127:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK3-NEXT:    [[TMP128:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP127]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK3-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM41:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15]])
-// CHECK3-NEXT:    [[TMP129:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], ptr [[TMP127]])
+// CHECK3-NEXT:    [[TMP130:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], ptr [[TMP128]])
 // CHECK3-NEXT:    store i8 0, ptr [[FLAG]], align 1
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM43:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17:[0-9]+]])
-// CHECK3-NEXT:    [[TMP130:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM43]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK3-NEXT:    [[TMP131:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP130]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP131:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM43]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK3-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP131]], i32 0, i32 0
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM44:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17]])
-// CHECK3-NEXT:    [[TMP132:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM44]], ptr [[TMP130]])
-// CHECK3-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED45]], i32 0, i32 0
-// CHECK3-NEXT:    store ptr [[C]], ptr [[TMP133]], align 8
-// CHECK3-NEXT:    [[TMP134:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP134]], 0
-// CHECK3-NEXT:    [[TMP135:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK3-NEXT:    [[TMP136:%.*]] = or i32 [[TMP135]], 1
+// CHECK3-NEXT:    [[TMP133:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM44]], ptr [[TMP131]])
+// CHECK3-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED45]], i32 0, i32 0
+// CHECK3-NEXT:    store ptr [[C]], ptr [[TMP134]], align 8
+// CHECK3-NEXT:    [[TMP135:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP135]], 0
+// CHECK3-NEXT:    [[TMP136:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK3-NEXT:    [[TMP137:%.*]] = or i32 [[TMP136]], 1
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM46:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19:[0-9]+]])
-// CHECK3-NEXT:    [[TMP137:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 [[TMP136]], i64 40, i64 8, ptr @.omp_task_entry..16)
-// CHECK3-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP137]], i32 0, i32 0
-// CHECK3-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP138]], i32 0, i32 0
-// CHECK3-NEXT:    [[TMP140:%.*]] = load ptr, ptr [[TMP139]], align 8
-// CHECK3-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP140]], ptr align 8 [[AGG_CAPTURED45]], i64 8, i1 false)
+// CHECK3-NEXT:    [[TMP138:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 [[TMP137]], i64 40, i64 8, ptr @.omp_task_entry..16)
+// CHECK3-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP138]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP139]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP141:%.*]] = load ptr, ptr [[TMP140]], align 8
+// CHECK3-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP141]], ptr align 8 [[AGG_CAPTURED45]], i64 8, i1 false)
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM47:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19]])
-// CHECK3-NEXT:    [[TMP141:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], ptr [[TMP137]])
+// CHECK3-NEXT:    [[TMP142:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], ptr [[TMP138]])
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM49:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21:[0-9]+]])
-// CHECK3-NEXT:    [[TMP142:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM49]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
-// CHECK3-NEXT:    [[TMP143:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP142]], i32 0, i32 0
-// CHECK3-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP142]], i32 0, i32 2
-// CHECK3-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP144]], i32 0, i32 0
-// CHECK3-NEXT:    [[TMP146:%.*]] = load i32, ptr [[C]], align 128
-// CHECK3-NEXT:    store i32 [[TMP146]], ptr [[TMP145]], align 128
+// CHECK3-NEXT:    [[TMP143:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM49]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
+// CHECK3-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP143]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP143]], i32 0, i32 2
+// CHECK3-NEXT:    [[TMP146:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP145]], i32 0, i32 0
+// CHECK3-NEXT:    [[TMP147:%.*]] = load i32, ptr [[C]], align 128
+// CHECK3-NEXT:    store i32 [[TMP147]], ptr [[TMP146]], align 128
 // CHECK3-NEXT:    [[OMP_GLOBAL_THREAD_NUM50:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21]])
-// CHECK3-NEXT:    [[TMP147:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP143]], i32 0, i32 2
-// CHECK3-NEXT:    store i32 0, ptr [[TMP147]], align 16
-// CHECK3-NEXT:    [[TMP148:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP142]])
-// CHECK3-NEXT:    [[TMP149:%.*]] = load i32, ptr @a, align 4
-// CHECK3-NEXT:    store i32 [[TMP149]], ptr [[RETVAL]], align 4
-// CHECK3-NEXT:    [[TMP150:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK3-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP150]])
+// CHECK3-NEXT:    [[TMP148:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP144]], i32 0, i32 2
+// CHECK3-NEXT:    store i32 0, ptr [[TMP148]], align 16
+// CHECK3-NEXT:    [[TMP149:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP143]])
+// CHECK3-NEXT:    [[TMP150:%.*]] = load i32, ptr @a, align 4
+// CHECK3-NEXT:    store i32 [[TMP150]], ptr [[RETVAL]], align 4
+// CHECK3-NEXT:    [[TMP151:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK3-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP151]])
 // CHECK3-NEXT:    [[ARRAY_BEGIN51:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK3-NEXT:    [[TMP151:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN51]], i64 2
+// CHECK3-NEXT:    [[TMP152:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN51]], i64 2
 // CHECK3-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK3:       arraydestroy.body:
-// CHECK3-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP151]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK3-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP152]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK3-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK3-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK3-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN51]]
 // CHECK3-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE52:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK3:       arraydestroy.done52:
-// CHECK3-NEXT:    [[TMP152:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK3-NEXT:    ret i32 [[TMP152]]
+// CHECK3-NEXT:    [[TMP153:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK3-NEXT:    ret i32 [[TMP153]]
 //
 //
 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SC1Ev
@@ -6846,207 +6851,208 @@ void test_transparent()
 // CHECK4-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP33]]
 // CHECK4-NEXT:    [[TMP34:%.*]] = mul nsw i64 9, [[TMP1]]
 // CHECK4-NEXT:    [[ARRAYIDX4:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
-// CHECK4-NEXT:    [[TMP35:%.*]] = getelementptr i32, ptr [[ARRAYIDX4]], i32 1
-// CHECK4-NEXT:    [[TMP36:%.*]] = ptrtoaddr ptr [[TMP35]] to i64
-// CHECK4-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK4-NEXT:    [[TMP38:%.*]] = sub nuw i64 [[TMP36]], [[TMP37]]
-// CHECK4-NEXT:    [[TMP39:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK4-NEXT:    [[TMP40:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
-// CHECK4-NEXT:    [[TMP41:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 0
-// CHECK4-NEXT:    store i64 [[TMP39]], ptr [[TMP41]], align 8
-// CHECK4-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 1
-// CHECK4-NEXT:    store i64 [[TMP38]], ptr [[TMP42]], align 8
-// CHECK4-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 2
-// CHECK4-NEXT:    store i8 1, ptr [[TMP43]], align 8
+// CHECK4-NEXT:    [[TMP35:%.*]] = mul nuw i64 [[TMP1]], 4
+// CHECK4-NEXT:    [[TMP36:%.*]] = getelementptr i8, ptr [[ARRAYIDX4]], i64 [[TMP35]]
+// CHECK4-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
+// CHECK4-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK4-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
+// CHECK4-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK4-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
+// CHECK4-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
+// CHECK4-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
+// CHECK4-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
+// CHECK4-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
+// CHECK4-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
+// CHECK4-NEXT:    store i8 1, ptr [[TMP44]], align 8
 // CHECK4-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB5]])
-// CHECK4-NEXT:    [[TMP44:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
+// CHECK4-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7:[0-9]+]])
-// CHECK4-NEXT:    [[TMP45:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK4-NEXT:    [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP45]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK4-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM8:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7]])
-// CHECK4-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP46]], i32 0, i32 2
-// CHECK4-NEXT:    store i32 0, ptr [[TMP47]], align 8
-// CHECK4-NEXT:    [[TMP48:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP45]])
+// CHECK4-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
+// CHECK4-NEXT:    store i32 0, ptr [[TMP48]], align 8
+// CHECK4-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP46]])
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM10:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9:[0-9]+]])
-// CHECK4-NEXT:    [[TMP49:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK4-NEXT:    [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP49]], i32 0, i32 0
-// CHECK4-NEXT:    [[TMP51:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
+// CHECK4-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK4-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
 // CHECK4-NEXT:    [[ARRAYIDX12:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK4-NEXT:    [[TMP52:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
-// CHECK4-NEXT:    [[TMP53:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 0
-// CHECK4-NEXT:    [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 0
-// CHECK4-NEXT:    store i64 [[TMP52]], ptr [[TMP54]], align 8
-// CHECK4-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 1
-// CHECK4-NEXT:    store i64 4, ptr [[TMP55]], align 8
-// CHECK4-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 2
-// CHECK4-NEXT:    store i8 3, ptr [[TMP56]], align 8
-// CHECK4-NEXT:    [[TMP57:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-NEXT:    [[TMP58:%.*]] = sext i8 [[TMP57]] to i64
-// CHECK4-NEXT:    [[TMP59:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK4-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP59]]
-// CHECK4-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP58]]
-// CHECK4-NEXT:    [[TMP60:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-NEXT:    [[TMP61:%.*]] = sext i8 [[TMP60]] to i64
-// CHECK4-NEXT:    [[TMP62:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK4-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP62]]
-// CHECK4-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP61]]
-// CHECK4-NEXT:    [[TMP63:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
-// CHECK4-NEXT:    [[TMP64:%.*]] = ptrtoaddr ptr [[TMP63]] to i64
-// CHECK4-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
-// CHECK4-NEXT:    [[TMP66:%.*]] = sub nuw i64 [[TMP64]], [[TMP65]]
-// CHECK4-NEXT:    [[TMP67:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK4-NEXT:    [[TMP68:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 1
-// CHECK4-NEXT:    [[TMP69:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 0
-// CHECK4-NEXT:    store i64 [[TMP67]], ptr [[TMP69]], align 8
-// CHECK4-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 1
-// CHECK4-NEXT:    store i64 [[TMP66]], ptr [[TMP70]], align 8
-// CHECK4-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 2
-// CHECK4-NEXT:    store i8 3, ptr [[TMP71]], align 8
+// CHECK4-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
+// CHECK4-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
+// CHECK4-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
+// CHECK4-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
+// CHECK4-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
+// CHECK4-NEXT:    store i64 4, ptr [[TMP56]], align 8
+// CHECK4-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
+// CHECK4-NEXT:    store i8 3, ptr [[TMP57]], align 8
+// CHECK4-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
+// CHECK4-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK4-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
+// CHECK4-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP59]]
+// CHECK4-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
+// CHECK4-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK4-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
+// CHECK4-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP62]]
+// CHECK4-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
+// CHECK4-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
+// CHECK4-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
+// CHECK4-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
+// CHECK4-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK4-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
+// CHECK4-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
+// CHECK4-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
+// CHECK4-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
+// CHECK4-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
+// CHECK4-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
+// CHECK4-NEXT:    store i8 3, ptr [[TMP72]], align 8
 // CHECK4-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR17]], align 8
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM18:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9]])
-// CHECK4-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP50]], i32 0, i32 2
-// CHECK4-NEXT:    store i32 0, ptr [[TMP72]], align 8
-// CHECK4-NEXT:    [[TMP73:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP49]], i32 2, ptr [[TMP51]], i32 0, ptr null)
+// CHECK4-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
+// CHECK4-NEXT:    store i32 0, ptr [[TMP73]], align 8
+// CHECK4-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM20:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11:[0-9]+]])
-// CHECK4-NEXT:    [[TMP74:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK4-NEXT:    [[TMP75:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP74]], i32 0, i32 0
-// CHECK4-NEXT:    [[TMP76:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK4-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK4-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
 // CHECK4-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK4-NEXT:    [[TMP77:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK4-NEXT:    [[TMP78:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 0
-// CHECK4-NEXT:    [[TMP79:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 0
-// CHECK4-NEXT:    store i64 [[TMP77]], ptr [[TMP79]], align 8
-// CHECK4-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 1
-// CHECK4-NEXT:    store i64 4, ptr [[TMP80]], align 8
-// CHECK4-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 2
-// CHECK4-NEXT:    store i8 4, ptr [[TMP81]], align 8
-// CHECK4-NEXT:    [[TMP82:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-NEXT:    [[TMP83:%.*]] = sext i8 [[TMP82]] to i64
-// CHECK4-NEXT:    [[TMP84:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK4-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP84]]
-// CHECK4-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP83]]
-// CHECK4-NEXT:    [[TMP85:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-NEXT:    [[TMP86:%.*]] = sext i8 [[TMP85]] to i64
-// CHECK4-NEXT:    [[TMP87:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK4-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP87]]
-// CHECK4-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP86]]
-// CHECK4-NEXT:    [[TMP88:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK4-NEXT:    [[TMP89:%.*]] = ptrtoaddr ptr [[TMP88]] to i64
-// CHECK4-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK4-NEXT:    [[TMP91:%.*]] = sub nuw i64 [[TMP89]], [[TMP90]]
-// CHECK4-NEXT:    [[TMP92:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK4-NEXT:    [[TMP93:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 1
-// CHECK4-NEXT:    [[TMP94:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 0
-// CHECK4-NEXT:    store i64 [[TMP92]], ptr [[TMP94]], align 8
-// CHECK4-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 1
-// CHECK4-NEXT:    store i64 [[TMP91]], ptr [[TMP95]], align 8
-// CHECK4-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 2
-// CHECK4-NEXT:    store i8 4, ptr [[TMP96]], align 8
+// CHECK4-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK4-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
+// CHECK4-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
+// CHECK4-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
+// CHECK4-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
+// CHECK4-NEXT:    store i64 4, ptr [[TMP81]], align 8
+// CHECK4-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
+// CHECK4-NEXT:    store i8 4, ptr [[TMP82]], align 8
+// CHECK4-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
+// CHECK4-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK4-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
+// CHECK4-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP84]]
+// CHECK4-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
+// CHECK4-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK4-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
+// CHECK4-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP87]]
+// CHECK4-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK4-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
+// CHECK4-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK4-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
+// CHECK4-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK4-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
+// CHECK4-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
+// CHECK4-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
+// CHECK4-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
+// CHECK4-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
+// CHECK4-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
+// CHECK4-NEXT:    store i8 4, ptr [[TMP97]], align 8
 // CHECK4-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR27]], align 8
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM28:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11]])
-// CHECK4-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP75]], i32 0, i32 2
-// CHECK4-NEXT:    store i32 0, ptr [[TMP97]], align 8
-// CHECK4-NEXT:    [[TMP98:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP74]], i32 2, ptr [[TMP76]], i32 0, ptr null)
+// CHECK4-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
+// CHECK4-NEXT:    store i32 0, ptr [[TMP98]], align 8
+// CHECK4-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM30:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13:[0-9]+]])
-// CHECK4-NEXT:    [[TMP99:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK4-NEXT:    [[TMP100:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP99]], i32 0, i32 0
-// CHECK4-NEXT:    [[TMP101:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
-// CHECK4-NEXT:    [[TMP102:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 0
-// CHECK4-NEXT:    [[TMP103:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 0
-// CHECK4-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP103]], align 8
-// CHECK4-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 1
-// CHECK4-NEXT:    store i64 4, ptr [[TMP104]], align 8
-// CHECK4-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 2
-// CHECK4-NEXT:    store i8 3, ptr [[TMP105]], align 8
+// CHECK4-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK4-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
+// CHECK4-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
+// CHECK4-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
+// CHECK4-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
+// CHECK4-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
+// CHECK4-NEXT:    store i64 4, ptr [[TMP105]], align 8
+// CHECK4-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
+// CHECK4-NEXT:    store i8 3, ptr [[TMP106]], align 8
 // CHECK4-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK4-NEXT:    [[TMP106:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
-// CHECK4-NEXT:    [[TMP107:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 1
-// CHECK4-NEXT:    [[TMP108:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 0
-// CHECK4-NEXT:    store i64 [[TMP106]], ptr [[TMP108]], align 8
-// CHECK4-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 1
-// CHECK4-NEXT:    store i64 4, ptr [[TMP109]], align 8
-// CHECK4-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 2
-// CHECK4-NEXT:    store i8 3, ptr [[TMP110]], align 8
-// CHECK4-NEXT:    [[TMP111:%.*]] = mul nsw i64 0, [[TMP1]]
-// CHECK4-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP111]]
+// CHECK4-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
+// CHECK4-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
+// CHECK4-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
+// CHECK4-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
+// CHECK4-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
+// CHECK4-NEXT:    store i64 4, ptr [[TMP110]], align 8
+// CHECK4-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
+// CHECK4-NEXT:    store i8 3, ptr [[TMP111]], align 8
+// CHECK4-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP1]]
+// CHECK4-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
 // CHECK4-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX33]], i64 3
-// CHECK4-NEXT:    [[TMP112:%.*]] = load i32, ptr @a, align 4
-// CHECK4-NEXT:    [[TMP113:%.*]] = sext i32 [[TMP112]] to i64
-// CHECK4-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP113]], 1
-// CHECK4-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
-// CHECK4-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
-// CHECK4-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP115]]
-// CHECK4-NEXT:    [[TMP116:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
-// CHECK4-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP116]]
+// CHECK4-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
+// CHECK4-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
+// CHECK4-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
+// CHECK4-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
+// CHECK4-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
+// CHECK4-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
+// CHECK4-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
+// CHECK4-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
 // CHECK4-NEXT:    [[ARRAYIDX36:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX35]], i64 [[LEN_SUB_1]]
-// CHECK4-NEXT:    [[TMP117:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
-// CHECK4-NEXT:    [[TMP118:%.*]] = ptrtoaddr ptr [[TMP117]] to i64
-// CHECK4-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
-// CHECK4-NEXT:    [[TMP120:%.*]] = sub nuw i64 [[TMP118]], [[TMP119]]
-// CHECK4-NEXT:    [[TMP121:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
-// CHECK4-NEXT:    [[TMP122:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 2
-// CHECK4-NEXT:    [[TMP123:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 0
-// CHECK4-NEXT:    store i64 [[TMP121]], ptr [[TMP123]], align 8
-// CHECK4-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 1
-// CHECK4-NEXT:    store i64 [[TMP120]], ptr [[TMP124]], align 8
-// CHECK4-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 2
-// CHECK4-NEXT:    store i8 3, ptr [[TMP125]], align 8
+// CHECK4-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
+// CHECK4-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
+// CHECK4-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
+// CHECK4-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
+// CHECK4-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
+// CHECK4-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
+// CHECK4-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
+// CHECK4-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
+// CHECK4-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
+// CHECK4-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
+// CHECK4-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
+// CHECK4-NEXT:    store i8 3, ptr [[TMP126]], align 8
 // CHECK4-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR37]], align 8
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM38:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13]])
-// CHECK4-NEXT:    [[TMP126:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP99]], i32 3, ptr [[TMP101]], i32 0, ptr null)
+// CHECK4-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM40:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15:[0-9]+]])
-// CHECK4-NEXT:    [[TMP127:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK4-NEXT:    [[TMP128:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP127]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK4-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM41:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15]])
-// CHECK4-NEXT:    [[TMP129:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], ptr [[TMP127]])
+// CHECK4-NEXT:    [[TMP130:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], ptr [[TMP128]])
 // CHECK4-NEXT:    store i8 0, ptr [[FLAG]], align 1
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM43:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17:[0-9]+]])
-// CHECK4-NEXT:    [[TMP130:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM43]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK4-NEXT:    [[TMP131:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP130]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP131:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM43]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK4-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP131]], i32 0, i32 0
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM44:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17]])
-// CHECK4-NEXT:    [[TMP132:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM44]], ptr [[TMP130]])
-// CHECK4-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED45]], i32 0, i32 0
-// CHECK4-NEXT:    store ptr [[C]], ptr [[TMP133]], align 8
-// CHECK4-NEXT:    [[TMP134:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP134]], 0
-// CHECK4-NEXT:    [[TMP135:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK4-NEXT:    [[TMP136:%.*]] = or i32 [[TMP135]], 1
+// CHECK4-NEXT:    [[TMP133:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM44]], ptr [[TMP131]])
+// CHECK4-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED45]], i32 0, i32 0
+// CHECK4-NEXT:    store ptr [[C]], ptr [[TMP134]], align 8
+// CHECK4-NEXT:    [[TMP135:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP135]], 0
+// CHECK4-NEXT:    [[TMP136:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK4-NEXT:    [[TMP137:%.*]] = or i32 [[TMP136]], 1
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM46:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19:[0-9]+]])
-// CHECK4-NEXT:    [[TMP137:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 [[TMP136]], i64 40, i64 8, ptr @.omp_task_entry..16)
-// CHECK4-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP137]], i32 0, i32 0
-// CHECK4-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP138]], i32 0, i32 0
-// CHECK4-NEXT:    [[TMP140:%.*]] = load ptr, ptr [[TMP139]], align 8
-// CHECK4-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP140]], ptr align 8 [[AGG_CAPTURED45]], i64 8, i1 false)
+// CHECK4-NEXT:    [[TMP138:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 [[TMP137]], i64 40, i64 8, ptr @.omp_task_entry..16)
+// CHECK4-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP138]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP139]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP141:%.*]] = load ptr, ptr [[TMP140]], align 8
+// CHECK4-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP141]], ptr align 8 [[AGG_CAPTURED45]], i64 8, i1 false)
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM47:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19]])
-// CHECK4-NEXT:    [[TMP141:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], ptr [[TMP137]])
+// CHECK4-NEXT:    [[TMP142:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], ptr [[TMP138]])
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM49:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21:[0-9]+]])
-// CHECK4-NEXT:    [[TMP142:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM49]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
-// CHECK4-NEXT:    [[TMP143:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP142]], i32 0, i32 0
-// CHECK4-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP142]], i32 0, i32 2
-// CHECK4-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP144]], i32 0, i32 0
-// CHECK4-NEXT:    [[TMP146:%.*]] = load i32, ptr [[C]], align 128
-// CHECK4-NEXT:    store i32 [[TMP146]], ptr [[TMP145]], align 128
+// CHECK4-NEXT:    [[TMP143:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM49]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
+// CHECK4-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP143]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP143]], i32 0, i32 2
+// CHECK4-NEXT:    [[TMP146:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP145]], i32 0, i32 0
+// CHECK4-NEXT:    [[TMP147:%.*]] = load i32, ptr [[C]], align 128
+// CHECK4-NEXT:    store i32 [[TMP147]], ptr [[TMP146]], align 128
 // CHECK4-NEXT:    [[OMP_GLOBAL_THREAD_NUM50:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21]])
-// CHECK4-NEXT:    [[TMP147:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP143]], i32 0, i32 2
-// CHECK4-NEXT:    store i32 0, ptr [[TMP147]], align 16
-// CHECK4-NEXT:    [[TMP148:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP142]])
-// CHECK4-NEXT:    [[TMP149:%.*]] = load i32, ptr @a, align 4
-// CHECK4-NEXT:    store i32 [[TMP149]], ptr [[RETVAL]], align 4
-// CHECK4-NEXT:    [[TMP150:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK4-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP150]])
+// CHECK4-NEXT:    [[TMP148:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP144]], i32 0, i32 2
+// CHECK4-NEXT:    store i32 0, ptr [[TMP148]], align 16
+// CHECK4-NEXT:    [[TMP149:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP143]])
+// CHECK4-NEXT:    [[TMP150:%.*]] = load i32, ptr @a, align 4
+// CHECK4-NEXT:    store i32 [[TMP150]], ptr [[RETVAL]], align 4
+// CHECK4-NEXT:    [[TMP151:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK4-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP151]])
 // CHECK4-NEXT:    [[ARRAY_BEGIN51:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK4-NEXT:    [[TMP151:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN51]], i64 2
+// CHECK4-NEXT:    [[TMP152:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN51]], i64 2
 // CHECK4-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK4:       arraydestroy.body:
-// CHECK4-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP151]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK4-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP152]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK4-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK4-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK4-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN51]]
 // CHECK4-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE52:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK4:       arraydestroy.done52:
-// CHECK4-NEXT:    [[TMP152:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK4-NEXT:    ret i32 [[TMP152]]
+// CHECK4-NEXT:    [[TMP153:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK4-NEXT:    ret i32 [[TMP153]]
 //
 //
 // CHECK4-LABEL: define {{[^@]+}}@_ZN1SC1Ev
@@ -7865,254 +7871,255 @@ void test_transparent()
 // CHECK3-51-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP33]]
 // CHECK3-51-NEXT:    [[TMP34:%.*]] = mul nsw i64 9, [[TMP1]]
 // CHECK3-51-NEXT:    [[ARRAYIDX4:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
-// CHECK3-51-NEXT:    [[TMP35:%.*]] = getelementptr i32, ptr [[ARRAYIDX4]], i32 1
-// CHECK3-51-NEXT:    [[TMP36:%.*]] = ptrtoaddr ptr [[TMP35]] to i64
-// CHECK3-51-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK3-51-NEXT:    [[TMP38:%.*]] = sub nuw i64 [[TMP36]], [[TMP37]]
-// CHECK3-51-NEXT:    [[TMP39:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK3-51-NEXT:    [[TMP40:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
-// CHECK3-51-NEXT:    [[TMP41:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP39]], ptr [[TMP41]], align 8
-// CHECK3-51-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 [[TMP38]], ptr [[TMP42]], align 8
-// CHECK3-51-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 1, ptr [[TMP43]], align 8
+// CHECK3-51-NEXT:    [[TMP35:%.*]] = mul nuw i64 [[TMP1]], 4
+// CHECK3-51-NEXT:    [[TMP36:%.*]] = getelementptr i8, ptr [[ARRAYIDX4]], i64 [[TMP35]]
+// CHECK3-51-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
+// CHECK3-51-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK3-51-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
+// CHECK3-51-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK3-51-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
+// CHECK3-51-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
+// CHECK3-51-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
+// CHECK3-51-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 1, ptr [[TMP44]], align 8
 // CHECK3-51-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB5]])
-// CHECK3-51-NEXT:    [[TMP44:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
+// CHECK3-51-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP45:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK3-51-NEXT:    [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP45]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK3-51-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM8:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7]])
-// CHECK3-51-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP46]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i32 0, ptr [[TMP47]], align 8
-// CHECK3-51-NEXT:    [[TMP48:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP45]])
+// CHECK3-51-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i32 0, ptr [[TMP48]], align 8
+// CHECK3-51-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP46]])
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM10:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP49:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK3-51-NEXT:    [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP49]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP51:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
+// CHECK3-51-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK3-51-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
 // CHECK3-51-NEXT:    [[ARRAYIDX12:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK3-51-NEXT:    [[TMP52:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
-// CHECK3-51-NEXT:    [[TMP53:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 0
-// CHECK3-51-NEXT:    [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP52]], ptr [[TMP54]], align 8
-// CHECK3-51-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 4, ptr [[TMP55]], align 8
-// CHECK3-51-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 3, ptr [[TMP56]], align 8
-// CHECK3-51-NEXT:    [[TMP57:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-51-NEXT:    [[TMP58:%.*]] = sext i8 [[TMP57]] to i64
-// CHECK3-51-NEXT:    [[TMP59:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK3-51-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP59]]
-// CHECK3-51-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP58]]
-// CHECK3-51-NEXT:    [[TMP60:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-51-NEXT:    [[TMP61:%.*]] = sext i8 [[TMP60]] to i64
-// CHECK3-51-NEXT:    [[TMP62:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK3-51-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP62]]
-// CHECK3-51-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP61]]
-// CHECK3-51-NEXT:    [[TMP63:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
-// CHECK3-51-NEXT:    [[TMP64:%.*]] = ptrtoaddr ptr [[TMP63]] to i64
-// CHECK3-51-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
-// CHECK3-51-NEXT:    [[TMP66:%.*]] = sub nuw i64 [[TMP64]], [[TMP65]]
-// CHECK3-51-NEXT:    [[TMP67:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK3-51-NEXT:    [[TMP68:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 1
-// CHECK3-51-NEXT:    [[TMP69:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP67]], ptr [[TMP69]], align 8
-// CHECK3-51-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 [[TMP66]], ptr [[TMP70]], align 8
-// CHECK3-51-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 3, ptr [[TMP71]], align 8
+// CHECK3-51-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
+// CHECK3-51-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
+// CHECK3-51-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
+// CHECK3-51-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 4, ptr [[TMP56]], align 8
+// CHECK3-51-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 3, ptr [[TMP57]], align 8
+// CHECK3-51-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-51-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
+// CHECK3-51-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK3-51-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
+// CHECK3-51-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP59]]
+// CHECK3-51-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-51-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
+// CHECK3-51-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK3-51-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
+// CHECK3-51-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP62]]
+// CHECK3-51-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
+// CHECK3-51-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
+// CHECK3-51-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
+// CHECK3-51-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
+// CHECK3-51-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK3-51-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
+// CHECK3-51-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
+// CHECK3-51-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
+// CHECK3-51-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 3, ptr [[TMP72]], align 8
 // CHECK3-51-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR17]], align 8
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM18:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9]])
-// CHECK3-51-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP50]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i32 0, ptr [[TMP72]], align 8
-// CHECK3-51-NEXT:    [[TMP73:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP49]], i32 2, ptr [[TMP51]], i32 0, ptr null)
+// CHECK3-51-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i32 0, ptr [[TMP73]], align 8
+// CHECK3-51-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM20:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP74:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK3-51-NEXT:    [[TMP75:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP74]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP76:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK3-51-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK3-51-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
 // CHECK3-51-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK3-51-NEXT:    [[TMP77:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK3-51-NEXT:    [[TMP78:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 0
-// CHECK3-51-NEXT:    [[TMP79:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP77]], ptr [[TMP79]], align 8
-// CHECK3-51-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 4, ptr [[TMP80]], align 8
-// CHECK3-51-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 4, ptr [[TMP81]], align 8
-// CHECK3-51-NEXT:    [[TMP82:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-51-NEXT:    [[TMP83:%.*]] = sext i8 [[TMP82]] to i64
-// CHECK3-51-NEXT:    [[TMP84:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK3-51-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP84]]
-// CHECK3-51-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP83]]
-// CHECK3-51-NEXT:    [[TMP85:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-51-NEXT:    [[TMP86:%.*]] = sext i8 [[TMP85]] to i64
-// CHECK3-51-NEXT:    [[TMP87:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK3-51-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP87]]
-// CHECK3-51-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP86]]
-// CHECK3-51-NEXT:    [[TMP88:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK3-51-NEXT:    [[TMP89:%.*]] = ptrtoaddr ptr [[TMP88]] to i64
-// CHECK3-51-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK3-51-NEXT:    [[TMP91:%.*]] = sub nuw i64 [[TMP89]], [[TMP90]]
-// CHECK3-51-NEXT:    [[TMP92:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK3-51-NEXT:    [[TMP93:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 1
-// CHECK3-51-NEXT:    [[TMP94:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP92]], ptr [[TMP94]], align 8
-// CHECK3-51-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 [[TMP91]], ptr [[TMP95]], align 8
-// CHECK3-51-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 4, ptr [[TMP96]], align 8
+// CHECK3-51-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK3-51-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
+// CHECK3-51-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
+// CHECK3-51-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 4, ptr [[TMP81]], align 8
+// CHECK3-51-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 4, ptr [[TMP82]], align 8
+// CHECK3-51-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-51-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
+// CHECK3-51-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK3-51-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
+// CHECK3-51-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP84]]
+// CHECK3-51-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-51-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
+// CHECK3-51-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK3-51-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
+// CHECK3-51-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP87]]
+// CHECK3-51-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK3-51-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
+// CHECK3-51-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK3-51-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
+// CHECK3-51-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK3-51-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
+// CHECK3-51-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
+// CHECK3-51-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
+// CHECK3-51-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 4, ptr [[TMP97]], align 8
 // CHECK3-51-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR27]], align 8
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM28:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11]])
-// CHECK3-51-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP75]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i32 0, ptr [[TMP97]], align 8
-// CHECK3-51-NEXT:    [[TMP98:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP74]], i32 2, ptr [[TMP76]], i32 0, ptr null)
+// CHECK3-51-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i32 0, ptr [[TMP98]], align 8
+// CHECK3-51-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM30:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP99:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK3-51-NEXT:    [[TMP100:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP99]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP101:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
-// CHECK3-51-NEXT:    [[TMP102:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 0
-// CHECK3-51-NEXT:    [[TMP103:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP103]], align 8
-// CHECK3-51-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 4, ptr [[TMP104]], align 8
-// CHECK3-51-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 3, ptr [[TMP105]], align 8
+// CHECK3-51-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK3-51-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
+// CHECK3-51-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
+// CHECK3-51-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
+// CHECK3-51-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 4, ptr [[TMP105]], align 8
+// CHECK3-51-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 3, ptr [[TMP106]], align 8
 // CHECK3-51-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK3-51-NEXT:    [[TMP106:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
-// CHECK3-51-NEXT:    [[TMP107:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 1
-// CHECK3-51-NEXT:    [[TMP108:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP106]], ptr [[TMP108]], align 8
-// CHECK3-51-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 4, ptr [[TMP109]], align 8
-// CHECK3-51-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 3, ptr [[TMP110]], align 8
-// CHECK3-51-NEXT:    [[TMP111:%.*]] = mul nsw i64 0, [[TMP1]]
-// CHECK3-51-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP111]]
+// CHECK3-51-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
+// CHECK3-51-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
+// CHECK3-51-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
+// CHECK3-51-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 4, ptr [[TMP110]], align 8
+// CHECK3-51-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 3, ptr [[TMP111]], align 8
+// CHECK3-51-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP1]]
+// CHECK3-51-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
 // CHECK3-51-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX33]], i64 3
-// CHECK3-51-NEXT:    [[TMP112:%.*]] = load i32, ptr @a, align 4
-// CHECK3-51-NEXT:    [[TMP113:%.*]] = sext i32 [[TMP112]] to i64
-// CHECK3-51-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP113]], 1
-// CHECK3-51-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
-// CHECK3-51-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
-// CHECK3-51-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP115]]
-// CHECK3-51-NEXT:    [[TMP116:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
-// CHECK3-51-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP116]]
+// CHECK3-51-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
+// CHECK3-51-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
+// CHECK3-51-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
+// CHECK3-51-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
+// CHECK3-51-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
+// CHECK3-51-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
+// CHECK3-51-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
+// CHECK3-51-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
 // CHECK3-51-NEXT:    [[ARRAYIDX36:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX35]], i64 [[LEN_SUB_1]]
-// CHECK3-51-NEXT:    [[TMP117:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
-// CHECK3-51-NEXT:    [[TMP118:%.*]] = ptrtoaddr ptr [[TMP117]] to i64
-// CHECK3-51-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
-// CHECK3-51-NEXT:    [[TMP120:%.*]] = sub nuw i64 [[TMP118]], [[TMP119]]
-// CHECK3-51-NEXT:    [[TMP121:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
-// CHECK3-51-NEXT:    [[TMP122:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 2
-// CHECK3-51-NEXT:    [[TMP123:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP121]], ptr [[TMP123]], align 8
-// CHECK3-51-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 [[TMP120]], ptr [[TMP124]], align 8
-// CHECK3-51-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 3, ptr [[TMP125]], align 8
+// CHECK3-51-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
+// CHECK3-51-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
+// CHECK3-51-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
+// CHECK3-51-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
+// CHECK3-51-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
+// CHECK3-51-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
+// CHECK3-51-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
+// CHECK3-51-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
+// CHECK3-51-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 3, ptr [[TMP126]], align 8
 // CHECK3-51-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR37]], align 8
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM38:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13]])
-// CHECK3-51-NEXT:    [[TMP126:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP99]], i32 3, ptr [[TMP101]], i32 0, ptr null)
+// CHECK3-51-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM40:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP127:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK3-51-NEXT:    [[TMP128:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP127]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP129:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR41]], i64 0, i64 0
-// CHECK3-51-NEXT:    [[TMP130:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP129]], i64 0
-// CHECK3-51-NEXT:    [[TMP131:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP131]], align 8
-// CHECK3-51-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 4, ptr [[TMP132]], align 8
-// CHECK3-51-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 8, ptr [[TMP133]], align 8
+// CHECK3-51-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK3-51-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP130:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR41]], i64 0, i64 0
+// CHECK3-51-NEXT:    [[TMP131:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 0
+// CHECK3-51-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP132]], align 8
+// CHECK3-51-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 4, ptr [[TMP133]], align 8
+// CHECK3-51-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP131]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 8, ptr [[TMP134]], align 8
 // CHECK3-51-NEXT:    [[ARRAYIDX42:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK3-51-NEXT:    [[TMP134:%.*]] = ptrtoint ptr [[ARRAYIDX42]] to i64
-// CHECK3-51-NEXT:    [[TMP135:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP129]], i64 1
-// CHECK3-51-NEXT:    [[TMP136:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP135]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP134]], ptr [[TMP136]], align 8
-// CHECK3-51-NEXT:    [[TMP137:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP135]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 4, ptr [[TMP137]], align 8
-// CHECK3-51-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP135]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 8, ptr [[TMP138]], align 8
-// CHECK3-51-NEXT:    [[TMP139:%.*]] = mul nsw i64 0, [[TMP1]]
-// CHECK3-51-NEXT:    [[ARRAYIDX43:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP139]]
+// CHECK3-51-NEXT:    [[TMP135:%.*]] = ptrtoint ptr [[ARRAYIDX42]] to i64
+// CHECK3-51-NEXT:    [[TMP136:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 1
+// CHECK3-51-NEXT:    [[TMP137:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP135]], ptr [[TMP137]], align 8
+// CHECK3-51-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 4, ptr [[TMP138]], align 8
+// CHECK3-51-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP136]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 8, ptr [[TMP139]], align 8
+// CHECK3-51-NEXT:    [[TMP140:%.*]] = mul nsw i64 0, [[TMP1]]
+// CHECK3-51-NEXT:    [[ARRAYIDX43:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP140]]
 // CHECK3-51-NEXT:    [[ARRAYIDX44:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX43]], i64 3
-// CHECK3-51-NEXT:    [[TMP140:%.*]] = load i32, ptr @a, align 4
-// CHECK3-51-NEXT:    [[TMP141:%.*]] = sext i32 [[TMP140]] to i64
-// CHECK3-51-NEXT:    [[LEN_SUB_145:%.*]] = sub nsw i64 [[TMP141]], 1
-// CHECK3-51-NEXT:    [[TMP142:%.*]] = load i32, ptr @a, align 4
-// CHECK3-51-NEXT:    [[TMP143:%.*]] = sext i32 [[TMP142]] to i64
-// CHECK3-51-NEXT:    [[LB_ADD_LEN46:%.*]] = add nsw i64 -1, [[TMP143]]
-// CHECK3-51-NEXT:    [[TMP144:%.*]] = mul nsw i64 [[LB_ADD_LEN46]], [[TMP1]]
-// CHECK3-51-NEXT:    [[ARRAYIDX47:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP144]]
+// CHECK3-51-NEXT:    [[TMP141:%.*]] = load i32, ptr @a, align 4
+// CHECK3-51-NEXT:    [[TMP142:%.*]] = sext i32 [[TMP141]] to i64
+// CHECK3-51-NEXT:    [[LEN_SUB_145:%.*]] = sub nsw i64 [[TMP142]], 1
+// CHECK3-51-NEXT:    [[TMP143:%.*]] = load i32, ptr @a, align 4
+// CHECK3-51-NEXT:    [[TMP144:%.*]] = sext i32 [[TMP143]] to i64
+// CHECK3-51-NEXT:    [[LB_ADD_LEN46:%.*]] = add nsw i64 -1, [[TMP144]]
+// CHECK3-51-NEXT:    [[TMP145:%.*]] = mul nsw i64 [[LB_ADD_LEN46]], [[TMP1]]
+// CHECK3-51-NEXT:    [[ARRAYIDX47:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP145]]
 // CHECK3-51-NEXT:    [[ARRAYIDX48:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX47]], i64 [[LEN_SUB_145]]
-// CHECK3-51-NEXT:    [[TMP145:%.*]] = getelementptr i32, ptr [[ARRAYIDX48]], i32 1
-// CHECK3-51-NEXT:    [[TMP146:%.*]] = ptrtoaddr ptr [[TMP145]] to i64
-// CHECK3-51-NEXT:    [[TMP147:%.*]] = ptrtoaddr ptr [[ARRAYIDX44]] to i64
-// CHECK3-51-NEXT:    [[TMP148:%.*]] = sub nuw i64 [[TMP146]], [[TMP147]]
-// CHECK3-51-NEXT:    [[TMP149:%.*]] = ptrtoint ptr [[ARRAYIDX44]] to i64
-// CHECK3-51-NEXT:    [[TMP150:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP129]], i64 2
-// CHECK3-51-NEXT:    [[TMP151:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP150]], i32 0, i32 0
-// CHECK3-51-NEXT:    store i64 [[TMP149]], ptr [[TMP151]], align 8
-// CHECK3-51-NEXT:    [[TMP152:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP150]], i32 0, i32 1
-// CHECK3-51-NEXT:    store i64 [[TMP148]], ptr [[TMP152]], align 8
-// CHECK3-51-NEXT:    [[TMP153:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP150]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i8 8, ptr [[TMP153]], align 8
+// CHECK3-51-NEXT:    [[TMP146:%.*]] = getelementptr i32, ptr [[ARRAYIDX48]], i32 1
+// CHECK3-51-NEXT:    [[TMP147:%.*]] = ptrtoaddr ptr [[TMP146]] to i64
+// CHECK3-51-NEXT:    [[TMP148:%.*]] = ptrtoaddr ptr [[ARRAYIDX44]] to i64
+// CHECK3-51-NEXT:    [[TMP149:%.*]] = sub nuw i64 [[TMP147]], [[TMP148]]
+// CHECK3-51-NEXT:    [[TMP150:%.*]] = ptrtoint ptr [[ARRAYIDX44]] to i64
+// CHECK3-51-NEXT:    [[TMP151:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP130]], i64 2
+// CHECK3-51-NEXT:    [[TMP152:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 0
+// CHECK3-51-NEXT:    store i64 [[TMP150]], ptr [[TMP152]], align 8
+// CHECK3-51-NEXT:    [[TMP153:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 1
+// CHECK3-51-NEXT:    store i64 [[TMP149]], ptr [[TMP153]], align 8
+// CHECK3-51-NEXT:    [[TMP154:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP151]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i8 8, ptr [[TMP154]], align 8
 // CHECK3-51-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR49]], align 8
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM50:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15]])
-// CHECK3-51-NEXT:    [[TMP154:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP127]], i32 3, ptr [[TMP129]], i32 0, ptr null)
+// CHECK3-51-NEXT:    [[TMP155:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP128]], i32 3, ptr [[TMP130]], i32 0, ptr null)
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM52:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP155:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM52]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK3-51-NEXT:    [[TMP156:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP155]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP156:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM52]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK3-51-NEXT:    [[TMP157:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP156]], i32 0, i32 0
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM53:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17]])
-// CHECK3-51-NEXT:    [[TMP157:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM53]], ptr [[TMP155]])
+// CHECK3-51-NEXT:    [[TMP158:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM53]], ptr [[TMP156]])
 // CHECK3-51-NEXT:    store i8 0, ptr [[FLAG]], align 1
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM55:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP158:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM55]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..16)
-// CHECK3-51-NEXT:    [[TMP159:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP158]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP159:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM55]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..16)
+// CHECK3-51-NEXT:    [[TMP160:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP159]], i32 0, i32 0
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM56:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19]])
-// CHECK3-51-NEXT:    [[TMP160:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM56]], ptr [[TMP158]])
-// CHECK3-51-NEXT:    [[TMP161:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_16]], ptr [[AGG_CAPTURED57]], i32 0, i32 0
-// CHECK3-51-NEXT:    store ptr [[C]], ptr [[TMP161]], align 8
-// CHECK3-51-NEXT:    [[TMP162:%.*]] = load i8, ptr [[B]], align 1
-// CHECK3-51-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP162]], 0
-// CHECK3-51-NEXT:    [[TMP163:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK3-51-NEXT:    [[TMP164:%.*]] = or i32 [[TMP163]], 1
+// CHECK3-51-NEXT:    [[TMP161:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM56]], ptr [[TMP159]])
+// CHECK3-51-NEXT:    [[TMP162:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_16]], ptr [[AGG_CAPTURED57]], i32 0, i32 0
+// CHECK3-51-NEXT:    store ptr [[C]], ptr [[TMP162]], align 8
+// CHECK3-51-NEXT:    [[TMP163:%.*]] = load i8, ptr [[B]], align 1
+// CHECK3-51-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP163]], 0
+// CHECK3-51-NEXT:    [[TMP164:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK3-51-NEXT:    [[TMP165:%.*]] = or i32 [[TMP164]], 1
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM58:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP165:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM58]], i32 [[TMP164]], i64 40, i64 8, ptr @.omp_task_entry..18)
-// CHECK3-51-NEXT:    [[TMP166:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_17:%.*]], ptr [[TMP165]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP167:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP166]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP168:%.*]] = load ptr, ptr [[TMP167]], align 8
-// CHECK3-51-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP168]], ptr align 8 [[AGG_CAPTURED57]], i64 8, i1 false)
+// CHECK3-51-NEXT:    [[TMP166:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM58]], i32 [[TMP165]], i64 40, i64 8, ptr @.omp_task_entry..18)
+// CHECK3-51-NEXT:    [[TMP167:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_17:%.*]], ptr [[TMP166]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP168:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP167]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP169:%.*]] = load ptr, ptr [[TMP168]], align 8
+// CHECK3-51-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP169]], ptr align 8 [[AGG_CAPTURED57]], i64 8, i1 false)
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM59:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21]])
-// CHECK3-51-NEXT:    [[TMP169:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM59]], ptr [[TMP165]])
+// CHECK3-51-NEXT:    [[TMP170:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM59]], ptr [[TMP166]])
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM61:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB23:[0-9]+]])
-// CHECK3-51-NEXT:    [[TMP170:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM61]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..23)
-// CHECK3-51-NEXT:    [[TMP171:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22:%.*]], ptr [[TMP170]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP172:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22]], ptr [[TMP170]], i32 0, i32 2
-// CHECK3-51-NEXT:    [[TMP173:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_21:%.*]], ptr [[TMP172]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP174:%.*]] = load i32, ptr [[C]], align 128
-// CHECK3-51-NEXT:    store i32 [[TMP174]], ptr [[TMP173]], align 128
+// CHECK3-51-NEXT:    [[TMP171:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM61]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..23)
+// CHECK3-51-NEXT:    [[TMP172:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22:%.*]], ptr [[TMP171]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP173:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_22]], ptr [[TMP171]], i32 0, i32 2
+// CHECK3-51-NEXT:    [[TMP174:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_21:%.*]], ptr [[TMP173]], i32 0, i32 0
+// CHECK3-51-NEXT:    [[TMP175:%.*]] = load i32, ptr [[C]], align 128
+// CHECK3-51-NEXT:    store i32 [[TMP175]], ptr [[TMP174]], align 128
 // CHECK3-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM62:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB23]])
-// CHECK3-51-NEXT:    [[TMP175:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP171]], i32 0, i32 2
-// CHECK3-51-NEXT:    store i32 0, ptr [[TMP175]], align 16
-// CHECK3-51-NEXT:    [[TMP176:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM62]], ptr [[TMP170]])
-// CHECK3-51-NEXT:    [[TMP177:%.*]] = load i32, ptr @a, align 4
-// CHECK3-51-NEXT:    store i32 [[TMP177]], ptr [[RETVAL]], align 4
-// CHECK3-51-NEXT:    [[TMP178:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK3-51-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP178]])
+// CHECK3-51-NEXT:    [[TMP176:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP172]], i32 0, i32 2
+// CHECK3-51-NEXT:    store i32 0, ptr [[TMP176]], align 16
+// CHECK3-51-NEXT:    [[TMP177:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM62]], ptr [[TMP171]])
+// CHECK3-51-NEXT:    [[TMP178:%.*]] = load i32, ptr @a, align 4
+// CHECK3-51-NEXT:    store i32 [[TMP178]], ptr [[RETVAL]], align 4
+// CHECK3-51-NEXT:    [[TMP179:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK3-51-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP179]])
 // CHECK3-51-NEXT:    [[ARRAY_BEGIN63:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK3-51-NEXT:    [[TMP179:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN63]], i64 2
+// CHECK3-51-NEXT:    [[TMP180:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN63]], i64 2
 // CHECK3-51-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK3-51:       arraydestroy.body:
-// CHECK3-51-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP179]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK3-51-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP180]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK3-51-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK3-51-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK3-51-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN63]]
 // CHECK3-51-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE64:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK3-51:       arraydestroy.done64:
-// CHECK3-51-NEXT:    [[TMP180:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK3-51-NEXT:    ret i32 [[TMP180]]
+// CHECK3-51-NEXT:    [[TMP181:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK3-51-NEXT:    ret i32 [[TMP181]]
 //
 //
 // CHECK3-51-LABEL: define {{[^@]+}}@_ZN1SC1Ev
@@ -9380,207 +9387,208 @@ void test_transparent()
 // CHECK4-51-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP33]]
 // CHECK4-51-NEXT:    [[TMP34:%.*]] = mul nsw i64 9, [[TMP1]]
 // CHECK4-51-NEXT:    [[ARRAYIDX4:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
-// CHECK4-51-NEXT:    [[TMP35:%.*]] = getelementptr i32, ptr [[ARRAYIDX4]], i32 1
-// CHECK4-51-NEXT:    [[TMP36:%.*]] = ptrtoaddr ptr [[TMP35]] to i64
-// CHECK4-51-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK4-51-NEXT:    [[TMP38:%.*]] = sub nuw i64 [[TMP36]], [[TMP37]]
-// CHECK4-51-NEXT:    [[TMP39:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK4-51-NEXT:    [[TMP40:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
-// CHECK4-51-NEXT:    [[TMP41:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 0
-// CHECK4-51-NEXT:    store i64 [[TMP39]], ptr [[TMP41]], align 8
-// CHECK4-51-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 1
-// CHECK4-51-NEXT:    store i64 [[TMP38]], ptr [[TMP42]], align 8
-// CHECK4-51-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i8 1, ptr [[TMP43]], align 8
+// CHECK4-51-NEXT:    [[TMP35:%.*]] = mul nuw i64 [[TMP1]], 4
+// CHECK4-51-NEXT:    [[TMP36:%.*]] = getelementptr i8, ptr [[ARRAYIDX4]], i64 [[TMP35]]
+// CHECK4-51-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
+// CHECK4-51-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK4-51-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
+// CHECK4-51-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK4-51-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
+// CHECK4-51-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
+// CHECK4-51-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
+// CHECK4-51-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
+// CHECK4-51-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
+// CHECK4-51-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i8 1, ptr [[TMP44]], align 8
 // CHECK4-51-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB5]])
-// CHECK4-51-NEXT:    [[TMP44:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
+// CHECK4-51-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7:[0-9]+]])
-// CHECK4-51-NEXT:    [[TMP45:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK4-51-NEXT:    [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP45]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK4-51-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM8:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7]])
-// CHECK4-51-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP46]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i32 0, ptr [[TMP47]], align 8
-// CHECK4-51-NEXT:    [[TMP48:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP45]])
+// CHECK4-51-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i32 0, ptr [[TMP48]], align 8
+// CHECK4-51-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP46]])
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM10:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9:[0-9]+]])
-// CHECK4-51-NEXT:    [[TMP49:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK4-51-NEXT:    [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP49]], i32 0, i32 0
-// CHECK4-51-NEXT:    [[TMP51:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
+// CHECK4-51-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK4-51-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
 // CHECK4-51-NEXT:    [[ARRAYIDX12:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK4-51-NEXT:    [[TMP52:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
-// CHECK4-51-NEXT:    [[TMP53:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 0
-// CHECK4-51-NEXT:    [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 0
-// CHECK4-51-NEXT:    store i64 [[TMP52]], ptr [[TMP54]], align 8
-// CHECK4-51-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 1
-// CHECK4-51-NEXT:    store i64 4, ptr [[TMP55]], align 8
-// CHECK4-51-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i8 3, ptr [[TMP56]], align 8
-// CHECK4-51-NEXT:    [[TMP57:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-51-NEXT:    [[TMP58:%.*]] = sext i8 [[TMP57]] to i64
-// CHECK4-51-NEXT:    [[TMP59:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK4-51-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP59]]
-// CHECK4-51-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP58]]
-// CHECK4-51-NEXT:    [[TMP60:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-51-NEXT:    [[TMP61:%.*]] = sext i8 [[TMP60]] to i64
-// CHECK4-51-NEXT:    [[TMP62:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK4-51-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP62]]
-// CHECK4-51-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP61]]
-// CHECK4-51-NEXT:    [[TMP63:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
-// CHECK4-51-NEXT:    [[TMP64:%.*]] = ptrtoaddr ptr [[TMP63]] to i64
-// CHECK4-51-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
-// CHECK4-51-NEXT:    [[TMP66:%.*]] = sub nuw i64 [[TMP64]], [[TMP65]]
-// CHECK4-51-NEXT:    [[TMP67:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK4-51-NEXT:    [[TMP68:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 1
-// CHECK4-51-NEXT:    [[TMP69:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 0
-// CHECK4-51-NEXT:    store i64 [[TMP67]], ptr [[TMP69]], align 8
-// CHECK4-51-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 1
-// CHECK4-51-NEXT:    store i64 [[TMP66]], ptr [[TMP70]], align 8
-// CHECK4-51-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i8 3, ptr [[TMP71]], align 8
+// CHECK4-51-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
+// CHECK4-51-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
+// CHECK4-51-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
+// CHECK4-51-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
+// CHECK4-51-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
+// CHECK4-51-NEXT:    store i64 4, ptr [[TMP56]], align 8
+// CHECK4-51-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i8 3, ptr [[TMP57]], align 8
+// CHECK4-51-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-51-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
+// CHECK4-51-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK4-51-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
+// CHECK4-51-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP59]]
+// CHECK4-51-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-51-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
+// CHECK4-51-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK4-51-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
+// CHECK4-51-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP62]]
+// CHECK4-51-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
+// CHECK4-51-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
+// CHECK4-51-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
+// CHECK4-51-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
+// CHECK4-51-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK4-51-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
+// CHECK4-51-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
+// CHECK4-51-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
+// CHECK4-51-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
+// CHECK4-51-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
+// CHECK4-51-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i8 3, ptr [[TMP72]], align 8
 // CHECK4-51-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR17]], align 8
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM18:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9]])
-// CHECK4-51-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP50]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i32 0, ptr [[TMP72]], align 8
-// CHECK4-51-NEXT:    [[TMP73:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP49]], i32 2, ptr [[TMP51]], i32 0, ptr null)
+// CHECK4-51-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i32 0, ptr [[TMP73]], align 8
+// CHECK4-51-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM20:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11:[0-9]+]])
-// CHECK4-51-NEXT:    [[TMP74:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK4-51-NEXT:    [[TMP75:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP74]], i32 0, i32 0
-// CHECK4-51-NEXT:    [[TMP76:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK4-51-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK4-51-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
 // CHECK4-51-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK4-51-NEXT:    [[TMP77:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK4-51-NEXT:    [[TMP78:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 0
-// CHECK4-51-NEXT:    [[TMP79:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 0
-// CHECK4-51-NEXT:    store i64 [[TMP77]], ptr [[TMP79]], align 8
-// CHECK4-51-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 1
-// CHECK4-51-NEXT:    store i64 4, ptr [[TMP80]], align 8
-// CHECK4-51-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i8 4, ptr [[TMP81]], align 8
-// CHECK4-51-NEXT:    [[TMP82:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-51-NEXT:    [[TMP83:%.*]] = sext i8 [[TMP82]] to i64
-// CHECK4-51-NEXT:    [[TMP84:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK4-51-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP84]]
-// CHECK4-51-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP83]]
-// CHECK4-51-NEXT:    [[TMP85:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-51-NEXT:    [[TMP86:%.*]] = sext i8 [[TMP85]] to i64
-// CHECK4-51-NEXT:    [[TMP87:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK4-51-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP87]]
-// CHECK4-51-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP86]]
-// CHECK4-51-NEXT:    [[TMP88:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK4-51-NEXT:    [[TMP89:%.*]] = ptrtoaddr ptr [[TMP88]] to i64
-// CHECK4-51-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK4-51-NEXT:    [[TMP91:%.*]] = sub nuw i64 [[TMP89]], [[TMP90]]
-// CHECK4-51-NEXT:    [[TMP92:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK4-51-NEXT:    [[TMP93:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 1
-// CHECK4-51-NEXT:    [[TMP94:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 0
-// CHECK4-51-NEXT:    store i64 [[TMP92]], ptr [[TMP94]], align 8
-// CHECK4-51-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 1
-// CHECK4-51-NEXT:    store i64 [[TMP91]], ptr [[TMP95]], align 8
-// CHECK4-51-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i8 4, ptr [[TMP96]], align 8
+// CHECK4-51-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK4-51-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
+// CHECK4-51-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
+// CHECK4-51-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
+// CHECK4-51-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
+// CHECK4-51-NEXT:    store i64 4, ptr [[TMP81]], align 8
+// CHECK4-51-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i8 4, ptr [[TMP82]], align 8
+// CHECK4-51-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-51-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
+// CHECK4-51-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK4-51-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
+// CHECK4-51-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP84]]
+// CHECK4-51-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-51-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
+// CHECK4-51-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK4-51-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
+// CHECK4-51-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP87]]
+// CHECK4-51-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK4-51-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
+// CHECK4-51-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK4-51-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
+// CHECK4-51-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK4-51-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
+// CHECK4-51-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
+// CHECK4-51-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
+// CHECK4-51-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
+// CHECK4-51-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
+// CHECK4-51-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i8 4, ptr [[TMP97]], align 8
 // CHECK4-51-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR27]], align 8
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM28:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11]])
-// CHECK4-51-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP75]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i32 0, ptr [[TMP97]], align 8
-// CHECK4-51-NEXT:    [[TMP98:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP74]], i32 2, ptr [[TMP76]], i32 0, ptr null)
+// CHECK4-51-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i32 0, ptr [[TMP98]], align 8
+// CHECK4-51-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM30:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13:[0-9]+]])
-// CHECK4-51-NEXT:    [[TMP99:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK4-51-NEXT:    [[TMP100:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP99]], i32 0, i32 0
-// CHECK4-51-NEXT:    [[TMP101:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
-// CHECK4-51-NEXT:    [[TMP102:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 0
-// CHECK4-51-NEXT:    [[TMP103:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 0
-// CHECK4-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP103]], align 8
-// CHECK4-51-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 1
-// CHECK4-51-NEXT:    store i64 4, ptr [[TMP104]], align 8
-// CHECK4-51-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i8 3, ptr [[TMP105]], align 8
+// CHECK4-51-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK4-51-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
+// CHECK4-51-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
+// CHECK4-51-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
+// CHECK4-51-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
+// CHECK4-51-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
+// CHECK4-51-NEXT:    store i64 4, ptr [[TMP105]], align 8
+// CHECK4-51-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i8 3, ptr [[TMP106]], align 8
 // CHECK4-51-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK4-51-NEXT:    [[TMP106:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
-// CHECK4-51-NEXT:    [[TMP107:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 1
-// CHECK4-51-NEXT:    [[TMP108:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 0
-// CHECK4-51-NEXT:    store i64 [[TMP106]], ptr [[TMP108]], align 8
-// CHECK4-51-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 1
-// CHECK4-51-NEXT:    store i64 4, ptr [[TMP109]], align 8
-// CHECK4-51-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i8 3, ptr [[TMP110]], align 8
-// CHECK4-51-NEXT:    [[TMP111:%.*]] = mul nsw i64 0, [[TMP1]]
-// CHECK4-51-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP111]]
+// CHECK4-51-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
+// CHECK4-51-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
+// CHECK4-51-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
+// CHECK4-51-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
+// CHECK4-51-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
+// CHECK4-51-NEXT:    store i64 4, ptr [[TMP110]], align 8
+// CHECK4-51-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i8 3, ptr [[TMP111]], align 8
+// CHECK4-51-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP1]]
+// CHECK4-51-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
 // CHECK4-51-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX33]], i64 3
-// CHECK4-51-NEXT:    [[TMP112:%.*]] = load i32, ptr @a, align 4
-// CHECK4-51-NEXT:    [[TMP113:%.*]] = sext i32 [[TMP112]] to i64
-// CHECK4-51-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP113]], 1
-// CHECK4-51-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
-// CHECK4-51-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
-// CHECK4-51-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP115]]
-// CHECK4-51-NEXT:    [[TMP116:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
-// CHECK4-51-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP116]]
+// CHECK4-51-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
+// CHECK4-51-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
+// CHECK4-51-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
+// CHECK4-51-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
+// CHECK4-51-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
+// CHECK4-51-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
+// CHECK4-51-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
+// CHECK4-51-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
 // CHECK4-51-NEXT:    [[ARRAYIDX36:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX35]], i64 [[LEN_SUB_1]]
-// CHECK4-51-NEXT:    [[TMP117:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
-// CHECK4-51-NEXT:    [[TMP118:%.*]] = ptrtoaddr ptr [[TMP117]] to i64
-// CHECK4-51-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
-// CHECK4-51-NEXT:    [[TMP120:%.*]] = sub nuw i64 [[TMP118]], [[TMP119]]
-// CHECK4-51-NEXT:    [[TMP121:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
-// CHECK4-51-NEXT:    [[TMP122:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 2
-// CHECK4-51-NEXT:    [[TMP123:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 0
-// CHECK4-51-NEXT:    store i64 [[TMP121]], ptr [[TMP123]], align 8
-// CHECK4-51-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 1
-// CHECK4-51-NEXT:    store i64 [[TMP120]], ptr [[TMP124]], align 8
-// CHECK4-51-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i8 3, ptr [[TMP125]], align 8
+// CHECK4-51-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
+// CHECK4-51-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
+// CHECK4-51-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
+// CHECK4-51-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
+// CHECK4-51-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
+// CHECK4-51-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
+// CHECK4-51-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
+// CHECK4-51-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
+// CHECK4-51-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
+// CHECK4-51-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
+// CHECK4-51-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i8 3, ptr [[TMP126]], align 8
 // CHECK4-51-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR37]], align 8
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM38:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13]])
-// CHECK4-51-NEXT:    [[TMP126:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP99]], i32 3, ptr [[TMP101]], i32 0, ptr null)
+// CHECK4-51-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM40:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15:[0-9]+]])
-// CHECK4-51-NEXT:    [[TMP127:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK4-51-NEXT:    [[TMP128:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP127]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK4-51-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM41:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15]])
-// CHECK4-51-NEXT:    [[TMP129:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], ptr [[TMP127]])
+// CHECK4-51-NEXT:    [[TMP130:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], ptr [[TMP128]])
 // CHECK4-51-NEXT:    store i8 0, ptr [[FLAG]], align 1
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM43:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17:[0-9]+]])
-// CHECK4-51-NEXT:    [[TMP130:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM43]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK4-51-NEXT:    [[TMP131:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP130]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP131:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM43]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK4-51-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP131]], i32 0, i32 0
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM44:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17]])
-// CHECK4-51-NEXT:    [[TMP132:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM44]], ptr [[TMP130]])
-// CHECK4-51-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED45]], i32 0, i32 0
-// CHECK4-51-NEXT:    store ptr [[C]], ptr [[TMP133]], align 8
-// CHECK4-51-NEXT:    [[TMP134:%.*]] = load i8, ptr [[B]], align 1
-// CHECK4-51-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP134]], 0
-// CHECK4-51-NEXT:    [[TMP135:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK4-51-NEXT:    [[TMP136:%.*]] = or i32 [[TMP135]], 1
+// CHECK4-51-NEXT:    [[TMP133:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM44]], ptr [[TMP131]])
+// CHECK4-51-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED45]], i32 0, i32 0
+// CHECK4-51-NEXT:    store ptr [[C]], ptr [[TMP134]], align 8
+// CHECK4-51-NEXT:    [[TMP135:%.*]] = load i8, ptr [[B]], align 1
+// CHECK4-51-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP135]], 0
+// CHECK4-51-NEXT:    [[TMP136:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK4-51-NEXT:    [[TMP137:%.*]] = or i32 [[TMP136]], 1
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM46:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19:[0-9]+]])
-// CHECK4-51-NEXT:    [[TMP137:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 [[TMP136]], i64 40, i64 8, ptr @.omp_task_entry..16)
-// CHECK4-51-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP137]], i32 0, i32 0
-// CHECK4-51-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP138]], i32 0, i32 0
-// CHECK4-51-NEXT:    [[TMP140:%.*]] = load ptr, ptr [[TMP139]], align 8
-// CHECK4-51-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP140]], ptr align 8 [[AGG_CAPTURED45]], i64 8, i1 false)
+// CHECK4-51-NEXT:    [[TMP138:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 [[TMP137]], i64 40, i64 8, ptr @.omp_task_entry..16)
+// CHECK4-51-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP138]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP139]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP141:%.*]] = load ptr, ptr [[TMP140]], align 8
+// CHECK4-51-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP141]], ptr align 8 [[AGG_CAPTURED45]], i64 8, i1 false)
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM47:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19]])
-// CHECK4-51-NEXT:    [[TMP141:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], ptr [[TMP137]])
+// CHECK4-51-NEXT:    [[TMP142:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], ptr [[TMP138]])
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM49:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21:[0-9]+]])
-// CHECK4-51-NEXT:    [[TMP142:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM49]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
-// CHECK4-51-NEXT:    [[TMP143:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP142]], i32 0, i32 0
-// CHECK4-51-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP142]], i32 0, i32 2
-// CHECK4-51-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP144]], i32 0, i32 0
-// CHECK4-51-NEXT:    [[TMP146:%.*]] = load i32, ptr [[C]], align 128
-// CHECK4-51-NEXT:    store i32 [[TMP146]], ptr [[TMP145]], align 128
+// CHECK4-51-NEXT:    [[TMP143:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM49]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
+// CHECK4-51-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP143]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP143]], i32 0, i32 2
+// CHECK4-51-NEXT:    [[TMP146:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP145]], i32 0, i32 0
+// CHECK4-51-NEXT:    [[TMP147:%.*]] = load i32, ptr [[C]], align 128
+// CHECK4-51-NEXT:    store i32 [[TMP147]], ptr [[TMP146]], align 128
 // CHECK4-51-NEXT:    [[OMP_GLOBAL_THREAD_NUM50:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21]])
-// CHECK4-51-NEXT:    [[TMP147:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP143]], i32 0, i32 2
-// CHECK4-51-NEXT:    store i32 0, ptr [[TMP147]], align 16
-// CHECK4-51-NEXT:    [[TMP148:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP142]])
-// CHECK4-51-NEXT:    [[TMP149:%.*]] = load i32, ptr @a, align 4
-// CHECK4-51-NEXT:    store i32 [[TMP149]], ptr [[RETVAL]], align 4
-// CHECK4-51-NEXT:    [[TMP150:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK4-51-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP150]])
+// CHECK4-51-NEXT:    [[TMP148:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP144]], i32 0, i32 2
+// CHECK4-51-NEXT:    store i32 0, ptr [[TMP148]], align 16
+// CHECK4-51-NEXT:    [[TMP149:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP143]])
+// CHECK4-51-NEXT:    [[TMP150:%.*]] = load i32, ptr @a, align 4
+// CHECK4-51-NEXT:    store i32 [[TMP150]], ptr [[RETVAL]], align 4
+// CHECK4-51-NEXT:    [[TMP151:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK4-51-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP151]])
 // CHECK4-51-NEXT:    [[ARRAY_BEGIN51:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK4-51-NEXT:    [[TMP151:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN51]], i64 2
+// CHECK4-51-NEXT:    [[TMP152:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN51]], i64 2
 // CHECK4-51-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK4-51:       arraydestroy.body:
-// CHECK4-51-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP151]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK4-51-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP152]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK4-51-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK4-51-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK4-51-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN51]]
 // CHECK4-51-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE52:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK4-51:       arraydestroy.done52:
-// CHECK4-51-NEXT:    [[TMP152:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK4-51-NEXT:    ret i32 [[TMP152]]
+// CHECK4-51-NEXT:    [[TMP153:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK4-51-NEXT:    ret i32 [[TMP153]]
 //
 //
 // CHECK4-51-LABEL: define {{[^@]+}}@_ZN1SC1Ev
@@ -10396,207 +10404,208 @@ void test_transparent()
 // CHECK6-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP33]]
 // CHECK6-NEXT:    [[TMP34:%.*]] = mul nsw i64 9, [[TMP1]]
 // CHECK6-NEXT:    [[ARRAYIDX4:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP34]]
-// CHECK6-NEXT:    [[TMP35:%.*]] = getelementptr i32, ptr [[ARRAYIDX4]], i32 1
-// CHECK6-NEXT:    [[TMP36:%.*]] = ptrtoaddr ptr [[TMP35]] to i64
-// CHECK6-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
-// CHECK6-NEXT:    [[TMP38:%.*]] = sub nuw i64 [[TMP36]], [[TMP37]]
-// CHECK6-NEXT:    [[TMP39:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
-// CHECK6-NEXT:    [[TMP40:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
-// CHECK6-NEXT:    [[TMP41:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 0
-// CHECK6-NEXT:    store i64 [[TMP39]], ptr [[TMP41]], align 8
-// CHECK6-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 1
-// CHECK6-NEXT:    store i64 [[TMP38]], ptr [[TMP42]], align 8
-// CHECK6-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP40]], i32 0, i32 2
-// CHECK6-NEXT:    store i8 1, ptr [[TMP43]], align 8
+// CHECK6-NEXT:    [[TMP35:%.*]] = mul nuw i64 [[TMP1]], 4
+// CHECK6-NEXT:    [[TMP36:%.*]] = getelementptr i8, ptr [[ARRAYIDX4]], i64 [[TMP35]]
+// CHECK6-NEXT:    [[TMP37:%.*]] = ptrtoaddr ptr [[TMP36]] to i64
+// CHECK6-NEXT:    [[TMP38:%.*]] = ptrtoaddr ptr [[ARRAYIDX]] to i64
+// CHECK6-NEXT:    [[TMP39:%.*]] = sub nuw i64 [[TMP37]], [[TMP38]]
+// CHECK6-NEXT:    [[TMP40:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
+// CHECK6-NEXT:    [[TMP41:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP18]], i64 3
+// CHECK6-NEXT:    [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 0
+// CHECK6-NEXT:    store i64 [[TMP40]], ptr [[TMP42]], align 8
+// CHECK6-NEXT:    [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 1
+// CHECK6-NEXT:    store i64 [[TMP39]], ptr [[TMP43]], align 8
+// CHECK6-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP41]], i32 0, i32 2
+// CHECK6-NEXT:    store i8 1, ptr [[TMP44]], align 8
 // CHECK6-NEXT:    store i64 4, ptr [[DEP_COUNTER_ADDR]], align 8
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB5]])
-// CHECK6-NEXT:    [[TMP44:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
+// CHECK6-NEXT:    [[TMP45:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM5]], ptr [[TMP14]], i32 4, ptr [[TMP18]], i32 0, ptr null)
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7:[0-9]+]])
-// CHECK6-NEXT:    [[TMP45:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
-// CHECK6-NEXT:    [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP45]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP46:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..4)
+// CHECK6-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_3:%.*]], ptr [[TMP46]], i32 0, i32 0
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM8:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB7]])
-// CHECK6-NEXT:    [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP46]], i32 0, i32 2
-// CHECK6-NEXT:    store i32 0, ptr [[TMP47]], align 8
-// CHECK6-NEXT:    [[TMP48:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP45]])
+// CHECK6-NEXT:    [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP47]], i32 0, i32 2
+// CHECK6-NEXT:    store i32 0, ptr [[TMP48]], align 8
+// CHECK6-NEXT:    [[TMP49:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM8]], ptr [[TMP46]])
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM10:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9:[0-9]+]])
-// CHECK6-NEXT:    [[TMP49:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
-// CHECK6-NEXT:    [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP49]], i32 0, i32 0
-// CHECK6-NEXT:    [[TMP51:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
+// CHECK6-NEXT:    [[TMP50:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..6)
+// CHECK6-NEXT:    [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_5:%.*]], ptr [[TMP50]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP52:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR11]], i64 0, i64 0
 // CHECK6-NEXT:    [[ARRAYIDX12:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK6-NEXT:    [[TMP52:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
-// CHECK6-NEXT:    [[TMP53:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 0
-// CHECK6-NEXT:    [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 0
-// CHECK6-NEXT:    store i64 [[TMP52]], ptr [[TMP54]], align 8
-// CHECK6-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 1
-// CHECK6-NEXT:    store i64 4, ptr [[TMP55]], align 8
-// CHECK6-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP53]], i32 0, i32 2
-// CHECK6-NEXT:    store i8 3, ptr [[TMP56]], align 8
-// CHECK6-NEXT:    [[TMP57:%.*]] = load i8, ptr [[B]], align 1
-// CHECK6-NEXT:    [[TMP58:%.*]] = sext i8 [[TMP57]] to i64
-// CHECK6-NEXT:    [[TMP59:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK6-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP59]]
-// CHECK6-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP58]]
-// CHECK6-NEXT:    [[TMP60:%.*]] = load i8, ptr [[B]], align 1
-// CHECK6-NEXT:    [[TMP61:%.*]] = sext i8 [[TMP60]] to i64
-// CHECK6-NEXT:    [[TMP62:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK6-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP62]]
-// CHECK6-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP61]]
-// CHECK6-NEXT:    [[TMP63:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
-// CHECK6-NEXT:    [[TMP64:%.*]] = ptrtoaddr ptr [[TMP63]] to i64
-// CHECK6-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
-// CHECK6-NEXT:    [[TMP66:%.*]] = sub nuw i64 [[TMP64]], [[TMP65]]
-// CHECK6-NEXT:    [[TMP67:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
-// CHECK6-NEXT:    [[TMP68:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP51]], i64 1
-// CHECK6-NEXT:    [[TMP69:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 0
-// CHECK6-NEXT:    store i64 [[TMP67]], ptr [[TMP69]], align 8
-// CHECK6-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 1
-// CHECK6-NEXT:    store i64 [[TMP66]], ptr [[TMP70]], align 8
-// CHECK6-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP68]], i32 0, i32 2
-// CHECK6-NEXT:    store i8 3, ptr [[TMP71]], align 8
+// CHECK6-NEXT:    [[TMP53:%.*]] = ptrtoint ptr [[ARRAYIDX12]] to i64
+// CHECK6-NEXT:    [[TMP54:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 0
+// CHECK6-NEXT:    [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 0
+// CHECK6-NEXT:    store i64 [[TMP53]], ptr [[TMP55]], align 8
+// CHECK6-NEXT:    [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 1
+// CHECK6-NEXT:    store i64 4, ptr [[TMP56]], align 8
+// CHECK6-NEXT:    [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP54]], i32 0, i32 2
+// CHECK6-NEXT:    store i8 3, ptr [[TMP57]], align 8
+// CHECK6-NEXT:    [[TMP58:%.*]] = load i8, ptr [[B]], align 1
+// CHECK6-NEXT:    [[TMP59:%.*]] = sext i8 [[TMP58]] to i64
+// CHECK6-NEXT:    [[TMP60:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK6-NEXT:    [[ARRAYIDX13:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP60]]
+// CHECK6-NEXT:    [[ARRAYIDX14:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX13]], i64 [[TMP59]]
+// CHECK6-NEXT:    [[TMP61:%.*]] = load i8, ptr [[B]], align 1
+// CHECK6-NEXT:    [[TMP62:%.*]] = sext i8 [[TMP61]] to i64
+// CHECK6-NEXT:    [[TMP63:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK6-NEXT:    [[ARRAYIDX15:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP63]]
+// CHECK6-NEXT:    [[ARRAYIDX16:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX15]], i64 [[TMP62]]
+// CHECK6-NEXT:    [[TMP64:%.*]] = getelementptr i32, ptr [[ARRAYIDX16]], i32 1
+// CHECK6-NEXT:    [[TMP65:%.*]] = ptrtoaddr ptr [[TMP64]] to i64
+// CHECK6-NEXT:    [[TMP66:%.*]] = ptrtoaddr ptr [[ARRAYIDX14]] to i64
+// CHECK6-NEXT:    [[TMP67:%.*]] = sub nuw i64 [[TMP65]], [[TMP66]]
+// CHECK6-NEXT:    [[TMP68:%.*]] = ptrtoint ptr [[ARRAYIDX14]] to i64
+// CHECK6-NEXT:    [[TMP69:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP52]], i64 1
+// CHECK6-NEXT:    [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 0
+// CHECK6-NEXT:    store i64 [[TMP68]], ptr [[TMP70]], align 8
+// CHECK6-NEXT:    [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 1
+// CHECK6-NEXT:    store i64 [[TMP67]], ptr [[TMP71]], align 8
+// CHECK6-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP69]], i32 0, i32 2
+// CHECK6-NEXT:    store i8 3, ptr [[TMP72]], align 8
 // CHECK6-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR17]], align 8
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM18:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB9]])
-// CHECK6-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP50]], i32 0, i32 2
-// CHECK6-NEXT:    store i32 0, ptr [[TMP72]], align 8
-// CHECK6-NEXT:    [[TMP73:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP49]], i32 2, ptr [[TMP51]], i32 0, ptr null)
+// CHECK6-NEXT:    [[TMP73:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP51]], i32 0, i32 2
+// CHECK6-NEXT:    store i32 0, ptr [[TMP73]], align 8
+// CHECK6-NEXT:    [[TMP74:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM18]], ptr [[TMP50]], i32 2, ptr [[TMP52]], i32 0, ptr null)
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM20:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11:[0-9]+]])
-// CHECK6-NEXT:    [[TMP74:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
-// CHECK6-NEXT:    [[TMP75:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP74]], i32 0, i32 0
-// CHECK6-NEXT:    [[TMP76:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
+// CHECK6-NEXT:    [[TMP75:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM20]], i32 0, i64 40, i64 1, ptr @.omp_task_entry..8)
+// CHECK6-NEXT:    [[TMP76:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_7:%.*]], ptr [[TMP75]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP77:%.*]] = getelementptr inbounds [2 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR21]], i64 0, i64 0
 // CHECK6-NEXT:    [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 0
-// CHECK6-NEXT:    [[TMP77:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
-// CHECK6-NEXT:    [[TMP78:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 0
-// CHECK6-NEXT:    [[TMP79:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 0
-// CHECK6-NEXT:    store i64 [[TMP77]], ptr [[TMP79]], align 8
-// CHECK6-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 1
-// CHECK6-NEXT:    store i64 4, ptr [[TMP80]], align 8
-// CHECK6-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP78]], i32 0, i32 2
-// CHECK6-NEXT:    store i8 4, ptr [[TMP81]], align 8
-// CHECK6-NEXT:    [[TMP82:%.*]] = load i8, ptr [[B]], align 1
-// CHECK6-NEXT:    [[TMP83:%.*]] = sext i8 [[TMP82]] to i64
-// CHECK6-NEXT:    [[TMP84:%.*]] = mul nsw i64 4, [[TMP1]]
-// CHECK6-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP84]]
-// CHECK6-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP83]]
-// CHECK6-NEXT:    [[TMP85:%.*]] = load i8, ptr [[B]], align 1
-// CHECK6-NEXT:    [[TMP86:%.*]] = sext i8 [[TMP85]] to i64
-// CHECK6-NEXT:    [[TMP87:%.*]] = mul nsw i64 9, [[TMP1]]
-// CHECK6-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP87]]
-// CHECK6-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP86]]
-// CHECK6-NEXT:    [[TMP88:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
-// CHECK6-NEXT:    [[TMP89:%.*]] = ptrtoaddr ptr [[TMP88]] to i64
-// CHECK6-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
-// CHECK6-NEXT:    [[TMP91:%.*]] = sub nuw i64 [[TMP89]], [[TMP90]]
-// CHECK6-NEXT:    [[TMP92:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
-// CHECK6-NEXT:    [[TMP93:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP76]], i64 1
-// CHECK6-NEXT:    [[TMP94:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 0
-// CHECK6-NEXT:    store i64 [[TMP92]], ptr [[TMP94]], align 8
-// CHECK6-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 1
-// CHECK6-NEXT:    store i64 [[TMP91]], ptr [[TMP95]], align 8
-// CHECK6-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP93]], i32 0, i32 2
-// CHECK6-NEXT:    store i8 4, ptr [[TMP96]], align 8
+// CHECK6-NEXT:    [[TMP78:%.*]] = ptrtoint ptr [[ARRAYIDX22]] to i64
+// CHECK6-NEXT:    [[TMP79:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 0
+// CHECK6-NEXT:    [[TMP80:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 0
+// CHECK6-NEXT:    store i64 [[TMP78]], ptr [[TMP80]], align 8
+// CHECK6-NEXT:    [[TMP81:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 1
+// CHECK6-NEXT:    store i64 4, ptr [[TMP81]], align 8
+// CHECK6-NEXT:    [[TMP82:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP79]], i32 0, i32 2
+// CHECK6-NEXT:    store i8 4, ptr [[TMP82]], align 8
+// CHECK6-NEXT:    [[TMP83:%.*]] = load i8, ptr [[B]], align 1
+// CHECK6-NEXT:    [[TMP84:%.*]] = sext i8 [[TMP83]] to i64
+// CHECK6-NEXT:    [[TMP85:%.*]] = mul nsw i64 4, [[TMP1]]
+// CHECK6-NEXT:    [[ARRAYIDX23:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP85]]
+// CHECK6-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX23]], i64 [[TMP84]]
+// CHECK6-NEXT:    [[TMP86:%.*]] = load i8, ptr [[B]], align 1
+// CHECK6-NEXT:    [[TMP87:%.*]] = sext i8 [[TMP86]] to i64
+// CHECK6-NEXT:    [[TMP88:%.*]] = mul nsw i64 9, [[TMP1]]
+// CHECK6-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP88]]
+// CHECK6-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX25]], i64 [[TMP87]]
+// CHECK6-NEXT:    [[TMP89:%.*]] = getelementptr i32, ptr [[ARRAYIDX26]], i32 1
+// CHECK6-NEXT:    [[TMP90:%.*]] = ptrtoaddr ptr [[TMP89]] to i64
+// CHECK6-NEXT:    [[TMP91:%.*]] = ptrtoaddr ptr [[ARRAYIDX24]] to i64
+// CHECK6-NEXT:    [[TMP92:%.*]] = sub nuw i64 [[TMP90]], [[TMP91]]
+// CHECK6-NEXT:    [[TMP93:%.*]] = ptrtoint ptr [[ARRAYIDX24]] to i64
+// CHECK6-NEXT:    [[TMP94:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP77]], i64 1
+// CHECK6-NEXT:    [[TMP95:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 0
+// CHECK6-NEXT:    store i64 [[TMP93]], ptr [[TMP95]], align 8
+// CHECK6-NEXT:    [[TMP96:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 1
+// CHECK6-NEXT:    store i64 [[TMP92]], ptr [[TMP96]], align 8
+// CHECK6-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP94]], i32 0, i32 2
+// CHECK6-NEXT:    store i8 4, ptr [[TMP97]], align 8
 // CHECK6-NEXT:    store i64 2, ptr [[DEP_COUNTER_ADDR27]], align 8
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM28:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB11]])
-// CHECK6-NEXT:    [[TMP97:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP75]], i32 0, i32 2
-// CHECK6-NEXT:    store i32 0, ptr [[TMP97]], align 8
-// CHECK6-NEXT:    [[TMP98:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP74]], i32 2, ptr [[TMP76]], i32 0, ptr null)
+// CHECK6-NEXT:    [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP76]], i32 0, i32 2
+// CHECK6-NEXT:    store i32 0, ptr [[TMP98]], align 8
+// CHECK6-NEXT:    [[TMP99:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM28]], ptr [[TMP75]], i32 2, ptr [[TMP77]], i32 0, ptr null)
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM30:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13:[0-9]+]])
-// CHECK6-NEXT:    [[TMP99:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
-// CHECK6-NEXT:    [[TMP100:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP99]], i32 0, i32 0
-// CHECK6-NEXT:    [[TMP101:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
-// CHECK6-NEXT:    [[TMP102:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 0
-// CHECK6-NEXT:    [[TMP103:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 0
-// CHECK6-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP103]], align 8
-// CHECK6-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 1
-// CHECK6-NEXT:    store i64 4, ptr [[TMP104]], align 8
-// CHECK6-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i32 0, i32 2
-// CHECK6-NEXT:    store i8 3, ptr [[TMP105]], align 8
+// CHECK6-NEXT:    [[TMP100:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..10)
+// CHECK6-NEXT:    [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_9:%.*]], ptr [[TMP100]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP102:%.*]] = getelementptr inbounds [3 x [[STRUCT_KMP_DEPEND_INFO]]], ptr [[DOTDEP_ARR_ADDR31]], i64 0, i64 0
+// CHECK6-NEXT:    [[TMP103:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 0
+// CHECK6-NEXT:    [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 0
+// CHECK6-NEXT:    store i64 ptrtoint (ptr @a to i64), ptr [[TMP104]], align 8
+// CHECK6-NEXT:    [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 1
+// CHECK6-NEXT:    store i64 4, ptr [[TMP105]], align 8
+// CHECK6-NEXT:    [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP103]], i32 0, i32 2
+// CHECK6-NEXT:    store i8 3, ptr [[TMP106]], align 8
 // CHECK6-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i64 0, i64 1
-// CHECK6-NEXT:    [[TMP106:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
-// CHECK6-NEXT:    [[TMP107:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 1
-// CHECK6-NEXT:    [[TMP108:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 0
-// CHECK6-NEXT:    store i64 [[TMP106]], ptr [[TMP108]], align 8
-// CHECK6-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 1
-// CHECK6-NEXT:    store i64 4, ptr [[TMP109]], align 8
-// CHECK6-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP107]], i32 0, i32 2
-// CHECK6-NEXT:    store i8 3, ptr [[TMP110]], align 8
-// CHECK6-NEXT:    [[TMP111:%.*]] = mul nsw i64 0, [[TMP1]]
-// CHECK6-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP111]]
+// CHECK6-NEXT:    [[TMP107:%.*]] = ptrtoint ptr [[ARRAYIDX32]] to i64
+// CHECK6-NEXT:    [[TMP108:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 1
+// CHECK6-NEXT:    [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 0
+// CHECK6-NEXT:    store i64 [[TMP107]], ptr [[TMP109]], align 8
+// CHECK6-NEXT:    [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 1
+// CHECK6-NEXT:    store i64 4, ptr [[TMP110]], align 8
+// CHECK6-NEXT:    [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP108]], i32 0, i32 2
+// CHECK6-NEXT:    store i8 3, ptr [[TMP111]], align 8
+// CHECK6-NEXT:    [[TMP112:%.*]] = mul nsw i64 0, [[TMP1]]
+// CHECK6-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP112]]
 // CHECK6-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX33]], i64 3
-// CHECK6-NEXT:    [[TMP112:%.*]] = load i32, ptr @a, align 4
-// CHECK6-NEXT:    [[TMP113:%.*]] = sext i32 [[TMP112]] to i64
-// CHECK6-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP113]], 1
-// CHECK6-NEXT:    [[TMP114:%.*]] = load i32, ptr @a, align 4
-// CHECK6-NEXT:    [[TMP115:%.*]] = sext i32 [[TMP114]] to i64
-// CHECK6-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP115]]
-// CHECK6-NEXT:    [[TMP116:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
-// CHECK6-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP116]]
+// CHECK6-NEXT:    [[TMP113:%.*]] = load i32, ptr @a, align 4
+// CHECK6-NEXT:    [[TMP114:%.*]] = sext i32 [[TMP113]] to i64
+// CHECK6-NEXT:    [[LEN_SUB_1:%.*]] = sub nsw i64 [[TMP114]], 1
+// CHECK6-NEXT:    [[TMP115:%.*]] = load i32, ptr @a, align 4
+// CHECK6-NEXT:    [[TMP116:%.*]] = sext i32 [[TMP115]] to i64
+// CHECK6-NEXT:    [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP116]]
+// CHECK6-NEXT:    [[TMP117:%.*]] = mul nsw i64 [[LB_ADD_LEN]], [[TMP1]]
+// CHECK6-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds nuw i32, ptr [[VLA]], i64 [[TMP117]]
 // CHECK6-NEXT:    [[ARRAYIDX36:%.*]] = getelementptr inbounds nuw i32, ptr [[ARRAYIDX35]], i64 [[LEN_SUB_1]]
-// CHECK6-NEXT:    [[TMP117:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
-// CHECK6-NEXT:    [[TMP118:%.*]] = ptrtoaddr ptr [[TMP117]] to i64
-// CHECK6-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
-// CHECK6-NEXT:    [[TMP120:%.*]] = sub nuw i64 [[TMP118]], [[TMP119]]
-// CHECK6-NEXT:    [[TMP121:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
-// CHECK6-NEXT:    [[TMP122:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP101]], i64 2
-// CHECK6-NEXT:    [[TMP123:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 0
-// CHECK6-NEXT:    store i64 [[TMP121]], ptr [[TMP123]], align 8
-// CHECK6-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 1
-// CHECK6-NEXT:    store i64 [[TMP120]], ptr [[TMP124]], align 8
-// CHECK6-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP122]], i32 0, i32 2
-// CHECK6-NEXT:    store i8 3, ptr [[TMP125]], align 8
+// CHECK6-NEXT:    [[TMP118:%.*]] = getelementptr i32, ptr [[ARRAYIDX36]], i32 1
+// CHECK6-NEXT:    [[TMP119:%.*]] = ptrtoaddr ptr [[TMP118]] to i64
+// CHECK6-NEXT:    [[TMP120:%.*]] = ptrtoaddr ptr [[ARRAYIDX34]] to i64
+// CHECK6-NEXT:    [[TMP121:%.*]] = sub nuw i64 [[TMP119]], [[TMP120]]
+// CHECK6-NEXT:    [[TMP122:%.*]] = ptrtoint ptr [[ARRAYIDX34]] to i64
+// CHECK6-NEXT:    [[TMP123:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP102]], i64 2
+// CHECK6-NEXT:    [[TMP124:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 0
+// CHECK6-NEXT:    store i64 [[TMP122]], ptr [[TMP124]], align 8
+// CHECK6-NEXT:    [[TMP125:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 1
+// CHECK6-NEXT:    store i64 [[TMP121]], ptr [[TMP125]], align 8
+// CHECK6-NEXT:    [[TMP126:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_DEPEND_INFO]], ptr [[TMP123]], i32 0, i32 2
+// CHECK6-NEXT:    store i8 3, ptr [[TMP126]], align 8
 // CHECK6-NEXT:    store i64 3, ptr [[DEP_COUNTER_ADDR37]], align 8
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM38:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB13]])
-// CHECK6-NEXT:    [[TMP126:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP99]], i32 3, ptr [[TMP101]], i32 0, ptr null)
+// CHECK6-NEXT:    [[TMP127:%.*]] = call i32 @__kmpc_omp_task_with_deps(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM38]], ptr [[TMP100]], i32 3, ptr [[TMP102]], i32 0, ptr null)
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM40:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15:[0-9]+]])
-// CHECK6-NEXT:    [[TMP127:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
-// CHECK6-NEXT:    [[TMP128:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP127]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP128:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM40]], i32 3, i64 40, i64 1, ptr @.omp_task_entry..12)
+// CHECK6-NEXT:    [[TMP129:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_11:%.*]], ptr [[TMP128]], i32 0, i32 0
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM41:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB15]])
-// CHECK6-NEXT:    [[TMP129:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], ptr [[TMP127]])
+// CHECK6-NEXT:    [[TMP130:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], ptr [[TMP128]])
 // CHECK6-NEXT:    store i8 0, ptr [[FLAG]], align 1
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM43:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17:[0-9]+]])
-// CHECK6-NEXT:    [[TMP130:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM43]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
-// CHECK6-NEXT:    [[TMP131:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP130]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP131:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM43]], i32 1, i64 40, i64 1, ptr @.omp_task_entry..14)
+// CHECK6-NEXT:    [[TMP132:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_13:%.*]], ptr [[TMP131]], i32 0, i32 0
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM44:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB17]])
-// CHECK6-NEXT:    [[TMP132:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM44]], ptr [[TMP130]])
-// CHECK6-NEXT:    [[TMP133:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED45]], i32 0, i32 0
-// CHECK6-NEXT:    store ptr [[C]], ptr [[TMP133]], align 8
-// CHECK6-NEXT:    [[TMP134:%.*]] = load i8, ptr [[B]], align 1
-// CHECK6-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP134]], 0
-// CHECK6-NEXT:    [[TMP135:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
-// CHECK6-NEXT:    [[TMP136:%.*]] = or i32 [[TMP135]], 1
+// CHECK6-NEXT:    [[TMP133:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM44]], ptr [[TMP131]])
+// CHECK6-NEXT:    [[TMP134:%.*]] = getelementptr inbounds nuw [[STRUCT_ANON_14]], ptr [[AGG_CAPTURED45]], i32 0, i32 0
+// CHECK6-NEXT:    store ptr [[C]], ptr [[TMP134]], align 8
+// CHECK6-NEXT:    [[TMP135:%.*]] = load i8, ptr [[B]], align 1
+// CHECK6-NEXT:    [[TOBOOL:%.*]] = icmp ne i8 [[TMP135]], 0
+// CHECK6-NEXT:    [[TMP136:%.*]] = select i1 [[TOBOOL]], i32 2, i32 0
+// CHECK6-NEXT:    [[TMP137:%.*]] = or i32 [[TMP136]], 1
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM46:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19:[0-9]+]])
-// CHECK6-NEXT:    [[TMP137:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 [[TMP136]], i64 40, i64 8, ptr @.omp_task_entry..16)
-// CHECK6-NEXT:    [[TMP138:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP137]], i32 0, i32 0
-// CHECK6-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP138]], i32 0, i32 0
-// CHECK6-NEXT:    [[TMP140:%.*]] = load ptr, ptr [[TMP139]], align 8
-// CHECK6-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP140]], ptr align 8 [[AGG_CAPTURED45]], i64 8, i1 false)
+// CHECK6-NEXT:    [[TMP138:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 [[TMP137]], i64 40, i64 8, ptr @.omp_task_entry..16)
+// CHECK6-NEXT:    [[TMP139:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_15:%.*]], ptr [[TMP138]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP140:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP139]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP141:%.*]] = load ptr, ptr [[TMP140]], align 8
+// CHECK6-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TMP141]], ptr align 8 [[AGG_CAPTURED45]], i64 8, i1 false)
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM47:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB19]])
-// CHECK6-NEXT:    [[TMP141:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], ptr [[TMP137]])
+// CHECK6-NEXT:    [[TMP142:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], ptr [[TMP138]])
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM49:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21:[0-9]+]])
-// CHECK6-NEXT:    [[TMP142:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM49]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
-// CHECK6-NEXT:    [[TMP143:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP142]], i32 0, i32 0
-// CHECK6-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP142]], i32 0, i32 2
-// CHECK6-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP144]], i32 0, i32 0
-// CHECK6-NEXT:    [[TMP146:%.*]] = load i32, ptr [[C]], align 128
-// CHECK6-NEXT:    store i32 [[TMP146]], ptr [[TMP145]], align 128
+// CHECK6-NEXT:    [[TMP143:%.*]] = call ptr @__kmpc_omp_task_alloc(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM49]], i32 0, i64 256, i64 1, ptr @.omp_task_entry..21)
+// CHECK6-NEXT:    [[TMP144:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20:%.*]], ptr [[TMP143]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP145:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T_WITH_PRIVATES_20]], ptr [[TMP143]], i32 0, i32 2
+// CHECK6-NEXT:    [[TMP146:%.*]] = getelementptr inbounds nuw [[STRUCT__KMP_PRIVATES_T_19:%.*]], ptr [[TMP145]], i32 0, i32 0
+// CHECK6-NEXT:    [[TMP147:%.*]] = load i32, ptr [[C]], align 128
+// CHECK6-NEXT:    store i32 [[TMP147]], ptr [[TMP146]], align 128
 // CHECK6-NEXT:    [[OMP_GLOBAL_THREAD_NUM50:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB21]])
-// CHECK6-NEXT:    [[TMP147:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP143]], i32 0, i32 2
-// CHECK6-NEXT:    store i32 0, ptr [[TMP147]], align 16
-// CHECK6-NEXT:    [[TMP148:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP142]])
-// CHECK6-NEXT:    [[TMP149:%.*]] = load i32, ptr @a, align 4
-// CHECK6-NEXT:    store i32 [[TMP149]], ptr [[RETVAL]], align 4
-// CHECK6-NEXT:    [[TMP150:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
-// CHECK6-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP150]])
+// CHECK6-NEXT:    [[TMP148:%.*]] = getelementptr inbounds nuw [[STRUCT_KMP_TASK_T]], ptr [[TMP144]], i32 0, i32 2
+// CHECK6-NEXT:    store i32 0, ptr [[TMP148]], align 16
+// CHECK6-NEXT:    [[TMP149:%.*]] = call i32 @__kmpc_omp_task(ptr @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM50]], ptr [[TMP143]])
+// CHECK6-NEXT:    [[TMP150:%.*]] = load i32, ptr @a, align 4
+// CHECK6-NEXT:    store i32 [[TMP150]], ptr [[RETVAL]], align 4
+// CHECK6-NEXT:    [[TMP151:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
+// CHECK6-NEXT:    call void @llvm.stackrestore.p0(ptr [[TMP151]])
 // CHECK6-NEXT:    [[ARRAY_BEGIN51:%.*]] = getelementptr inbounds [2 x [[STRUCT_S]]], ptr [[S]], i32 0, i32 0
-// CHECK6-NEXT:    [[TMP151:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN51]], i64 2
+// CHECK6-NEXT:    [[TMP152:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN51]], i64 2
 // CHECK6-NEXT:    br label [[ARRAYDESTROY_BODY:%.*]]
 // CHECK6:       arraydestroy.body:
-// CHECK6-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP151]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
+// CHECK6-NEXT:    [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP152]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
 // CHECK6-NEXT:    [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
 // CHECK6-NEXT:    call void @_ZN1SD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4:[0-9]+]]
 // CHECK6-NEXT:    [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN51]]
 // CHECK6-NEXT:    br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE52:%.*]], label [[ARRAYDESTROY_BODY]]
 // CHECK6:       arraydestroy.done52:
-// CHECK6-NEXT:    [[TMP152:%.*]] = load i32, ptr [[RETVAL]], align 4
-// CHECK6-NEXT:    ret i32 [[TMP152]]
+// CHECK6-NEXT:    [[TMP153:%.*]] = load i32, ptr [[RETVAL]], align 4
+// CHECK6-NEXT:    ret i32 [[TMP153]]
 //
 //
 // CHECK6-LABEL: define {{[^@]+}}@_ZN1SC1Ev

>From b216933cc302e60168789c1bfc0b64e911270dd1 Mon Sep 17 00:00:00 2001
From: Akash Manna <akash.manna.mymail at gmail.com>
Date: Tue, 24 Nov 2026 20:22:12 +0530
Subject: [PATCH 4/4] [Clang][OpenMP] Address third review round on shaped
 array sections

For a non-contiguous section of a shaped array the attach pointer is
searched only behind the shaping expression, so a section of pointers is
never taken for it, and the descriptor dimensions end at the attach
pointer. Pointers to sizeless types are rejected as shaping bases.
ArraySectionExpr::getBaseType looks through a shaping expression, and the
unreachable dependent-type return in ActOnOMPArraySectionExpr is gone.
---
 clang/lib/AST/Expr.cpp                        | 14 +++++------
 clang/lib/AST/OpenMPClause.cpp                | 24 ++++++++++---------
 clang/lib/CodeGen/CGOpenMPRuntime.cpp         | 11 +++++----
 clang/lib/Sema/SemaOpenMP.cpp                 |  7 +-----
 clang/test/OpenMP/GH136294.c                  | 11 +++++++++
 clang/test/SemaOpenMP/arm-sve-acle-types.cpp  |  7 +++++-
 .../SemaOpenMP/riscv-vector-with-openmp.c     |  7 ++++--
 7 files changed, 49 insertions(+), 32 deletions(-)

diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 984920e88262b..0e6f9ec24d25e 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -5473,12 +5473,7 @@ QualType ArraySectionExpr::getBaseOriginalType(const Expr *Base) {
 }
 
 QualType ArraySectionExpr::getElementType() const {
-  QualType BaseTy = getBase()->IgnoreParenImpCasts()->getType();
-  // We only have to look into the array section exprs, else we will get the
-  // type of the base, which should already be valid.
-  if (auto *ASE = dyn_cast<ArraySectionExpr>(getBase()->IgnoreParenImpCasts()))
-    BaseTy = ASE->getElementType();
-
+  QualType BaseTy = getBaseType();
   if (BaseTy->isAnyPointerType())
     return BaseTy->getPointeeType();
   if (BaseTy->isArrayType())
@@ -5491,12 +5486,15 @@ QualType ArraySectionExpr::getElementType() const {
 }
 
 QualType ArraySectionExpr::getBaseType() const {
+  const Expr *Base = getBase()->IgnoreParenImpCasts();
   // We only have to look into the array section exprs, else we will get the
   // type of the base, which should already be valid.
-  if (auto *ASE = dyn_cast<ArraySectionExpr>(getBase()->IgnoreParenImpCasts()))
+  if (const auto *ASE = dyn_cast<ArraySectionExpr>(Base))
     return ASE->getElementType();
+  if (const auto *OAShE = dyn_cast<OMPArrayShapingExpr>(Base))
+    return OAShE->getShapedType();
 
-  return getBase()->IgnoreParenImpCasts()->getType();
+  return Base->getType();
 }
 
 RecoveryExpr::RecoveryExpr(ASTContext &Ctx, QualType T, SourceLocation BeginLoc,
diff --git a/clang/lib/AST/OpenMPClause.cpp b/clang/lib/AST/OpenMPClause.cpp
index 1ac8e3102661b..b6a725628334d 100644
--- a/clang/lib/AST/OpenMPClause.cpp
+++ b/clang/lib/AST/OpenMPClause.cpp
@@ -1180,23 +1180,25 @@ OMPClauseMappableExprCommon::findAttachPtrExpr(
 
   // Only check for non-contiguous sections on target_update, since we can
   // assume array-sections are contiguous on maps on other constructs, even if
-  // we are not sure of it at compile-time, like for a[1:x][2]. A shaped
-  // pointer is the base pointer of its non-contiguous sections, though.
-  bool HasArrayShaping =
-      llvm::any_of(Components, [](const MappableComponent &Component) {
-        return isa<OMPArrayShapingExpr>(Component.getAssociatedExpression());
-      });
-  if (Components.back().isNonContiguous() && CurDirKind == OMPD_target_update &&
-      !HasArrayShaping)
-    return {nullptr, std::nullopt};
+  // we are not sure of it at compile-time, like for a[1:x][2]. For a shaped
+  // non-contiguous section, only look past the shaping expression for the
+  // shaped base pointer itself.
+  size_t StartIdx = 1;
+  if (Components.back().isNonContiguous() && CurDirKind == OMPD_target_update) {
+    auto It = llvm::find_if(Components, [](const MappableComponent &Component) {
+      return isa<OMPArrayShapingExpr>(Component.getAssociatedExpression());
+    });
+    if (It == Components.end())
+      return {nullptr, std::nullopt};
+    StartIdx = std::distance(Components.begin(), It) + 1;
+  }
 
   // To find the attach base-pointer, we start with the second component,
   // stripping away one component at a time, until we reach a pointer Expr
   // (that is not a binary operator). The first such pointer should be the
   // attach base-pointer for the component list.
   for (auto [I, Component] : llvm::enumerate(Components)) {
-    // Skip past the first component.
-    if (I == 0)
+    if (I < StartIdx)
       continue;
 
     const Expr *CurExpr = Component.getAssociatedExpression();
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index e5515058fa1f0..8221711629750 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -8778,12 +8778,15 @@ class MappableExprsHandler {
     MapValuesArrayTy DimSizes{llvm::ConstantInt::get(CGF.CGM.Int64Ty, 1)};
     llvm::Value *ElementTypeSize = nullptr;
 
-    // Components past an array shaping expression belong to the shaped pointer
-    // base, not to dimensions of the shaped array.
+    // The attach pointer or the array shaping expression and everything past
+    // it belong to the base, not to dimensions of the sectioned array.
     auto ArrayDimsEnd = llvm::find_if(
         Components,
-        [](const OMPClauseMappableExprCommon::MappableComponent &Component) {
-          return isa<OMPArrayShapingExpr>(Component.getAssociatedExpression());
+        [AttachPtrExpr](
+            const OMPClauseMappableExprCommon::MappableComponent &Component) {
+          const Expr *E = Component.getAssociatedExpression();
+          return (AttachPtrExpr && E == AttachPtrExpr) ||
+                 isa<OMPArrayShapingExpr>(E);
         });
     auto ArrayDimComponents =
         llvm::make_range(Components.begin(), ArrayDimsEnd);
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 10284a5470a0f..b3a4ec428819c 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -28444,12 +28444,6 @@ ExprResult SemaOpenMP::ActOnOMPArraySectionExpr(
 
   // Perform default conversions.
   QualType OriginalTy = ArraySectionExpr::getBaseOriginalType(Base);
-  // The dimensions of the shape may depend on template parameters.
-  if (IsShapedBase && OriginalTy->isDependentType()) {
-    return new (Context) ArraySectionExpr(
-        Base, LowerBound, Length, Stride, Context.DependentTy, VK_LValue,
-        OK_Ordinary, ColonLocFirst, ColonLocSecond, RBLoc);
-  }
   QualType ResultTy;
   if (OriginalTy->isAnyPointerType()) {
     ResultTy = OriginalTy->getPointeeType();
@@ -28606,6 +28600,7 @@ ExprResult SemaOpenMP::ActOnOMPArrayShapingExpr(
   if (!BaseTy->isPointerType() ||
       (!Base->isTypeDependent() &&
        (BaseTy->getPointeeType()->isIncompleteType() ||
+        BaseTy->getPointeeType()->isSizelessType() ||
         BaseTy->getPointeeType()->isFunctionType())))
     return ExprError(Diag(Base->getExprLoc(),
                           diag::err_omp_non_pointer_type_array_shaping_base)
diff --git a/clang/test/OpenMP/GH136294.c b/clang/test/OpenMP/GH136294.c
index e0f76ed01d162..f7bc8475fee26 100644
--- a/clang/test/OpenMP/GH136294.c
+++ b/clang/test/OpenMP/GH136294.c
@@ -350,4 +350,15 @@ void member_and_shaped(struct T t, int n, int m) {
 #pragma omp target update to(t.i, t.x, (([n][m])t.p)[0:n][1])
 }
 
+// A shaped array of pointers: the base pointer is 'pp', not a section of it.
+// CHECK-LABEL: define {{.*}}void @pointer_array(
+// CHECK:       store ptr %pp, ptr [[PA_PP_ADDR:%.+]],
+void pointer_array(double **pp, int n) {
+  // CHECK:      [[PA_BP:%.+]] = load ptr, ptr [[PA_PP_ADDR]],
+  // CHECK:      store ptr [[PA_BP]], ptr
+  // CHECK:      getelementptr inbounds [3 x %struct.descriptor_dim{{.*}}], ptr %{{.+}}, i64 0, i64 0
+  // CHECK:      call void @__tgt_target_data_update_mapper(ptr @{{.+}}, i64 -1, i32 1, ptr %{{.+}}, ptr %{{.+}}, ptr @{{.+}}, ptr @{{.+}}, ptr null, ptr null)
+#pragma omp target update to((([n])pp)[0:n][1])
+}
+
 #endif // HEADER
diff --git a/clang/test/SemaOpenMP/arm-sve-acle-types.cpp b/clang/test/SemaOpenMP/arm-sve-acle-types.cpp
index 03d61beff175f..86e49d7a0308e 100644
--- a/clang/test/SemaOpenMP/arm-sve-acle-types.cpp
+++ b/clang/test/SemaOpenMP/arm-sve-acle-types.cpp
@@ -1,5 +1,4 @@
 // RUN: %clang_cc1 -fopenmp -fsyntax-only -triple aarch64 -target-feature +sve -verify %s
-// expected-no-diagnostics
 
 __SVBool_t foo(int);
 
@@ -9,3 +8,9 @@ void test() {
     __SVBool_t pg = foo(1);
   }
 }
+
+// A sizeless type has no size to shape.
+void shaping(__SVInt32_t *svp, int n) {
+#pragma omp target update to(([n])svp) // expected-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+#pragma omp target update from((([n])svp)[0:n]) // expected-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+}
diff --git a/clang/test/SemaOpenMP/riscv-vector-with-openmp.c b/clang/test/SemaOpenMP/riscv-vector-with-openmp.c
index 5dae3eb9ce0b0..4b1ed920f6a01 100644
--- a/clang/test/SemaOpenMP/riscv-vector-with-openmp.c
+++ b/clang/test/SemaOpenMP/riscv-vector-with-openmp.c
@@ -2,11 +2,14 @@
 // RUN: -verify -fopenmp %s
 // REQUIRES: riscv-registered-target
 
-// expected-no-diagnostics
-
 void foo() {
   #pragma omp parallel
   {
     __rvv_int32m1_t i32m1;
   }
 }
+
+// A sizeless type has no size to shape.
+void shaping(__rvv_int32m1_t *vp, int n) {
+#pragma omp target update to(([n])vp) // expected-error {{expected expression with a pointer to a complete type as a base of an array shaping operation}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}}
+}



More information about the cfe-commits mailing list