[llvm] [AggressiveInstCombine] Inline strcmp/strncmp (PR #89371)

Franklin Zhang via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 10:57:13 PDT 2024


https://github.com/FLZ101 updated https://github.com/llvm/llvm-project/pull/89371

>From 9726bd4c3ba06ac0451629f2f88b33f6e795a55a Mon Sep 17 00:00:00 2001
From: zhangfenglei <zhangfenglei at huawei.com>
Date: Fri, 19 Apr 2024 19:20:18 +0800
Subject: [PATCH 1/3] [AggressiveInstCombine] Inline strcmp/strncmp

Inline calls to strcmp(s1, s2) and strncmp(s1, s2, N),
where N and exactly one of s1 and s2 are constant.
---
 .../AggressiveInstCombine.cpp                 | 258 +++++++++++++++++-
 .../AggressiveInstCombine/strcmp.ll           | 219 ---------------
 .../AggressiveInstCombine/strncmp-1.ll        | 203 ++++++++++++++
 .../AggressiveInstCombine/strncmp-2.ll        | 145 ++++++++++
 4 files changed, 603 insertions(+), 222 deletions(-)
 delete mode 100644 llvm/test/Transforms/AggressiveInstCombine/strcmp.ll
 create mode 100644 llvm/test/Transforms/AggressiveInstCombine/strncmp-1.ll
 create mode 100644 llvm/test/Transforms/AggressiveInstCombine/strncmp-2.ll

diff --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
index e586e9eda1322f..eddd7382c27bbc 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
@@ -19,6 +19,7 @@
 #include "llvm/Analysis/AssumptionCache.h"
 #include "llvm/Analysis/BasicAliasAnalysis.h"
 #include "llvm/Analysis/ConstantFolding.h"
+#include "llvm/Analysis/DomTreeUpdater.h"
 #include "llvm/Analysis/GlobalsModRef.h"
 #include "llvm/Analysis/TargetLibraryInfo.h"
 #include "llvm/Analysis/TargetTransformInfo.h"
@@ -28,6 +29,7 @@
 #include "llvm/IR/Function.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/PatternMatch.h"
+#include "llvm/Transforms/Utils/BasicBlockUtils.h"
 #include "llvm/Transforms/Utils/BuildLibCalls.h"
 #include "llvm/Transforms/Utils/Local.h"
 
@@ -922,6 +924,251 @@ static bool foldPatternedLoads(Instruction &I, const DataLayout &DL) {
   return true;
 }
 
+static cl::opt<unsigned> StrNCmpInlineThreshold(
+    "strncmp-inline-threshold", cl::init(3), cl::Hidden,
+    cl::desc("The maximum length of a constant string for a builtin string cmp "
+             "call eligible for inlining. The default value is 3."));
+
+namespace {
+class StrNCmpInliner {
+public:
+  StrNCmpInliner(CallInst *CI, LibFunc Func, Function::iterator &BBNext,
+                 DomTreeUpdater *DTU, const DataLayout &DL)
+      : CI(CI), Func(Func), BBNext(BBNext), DTU(DTU), DL(DL) {}
+
+  bool optimizeStrNCmp();
+
+private:
+  bool inlineCompare(Value *LHS, StringRef RHS, uint64_t N, bool Switched);
+
+  CallInst *CI;
+  LibFunc Func;
+  Function::iterator &BBNext;
+  DomTreeUpdater *DTU;
+  const DataLayout &DL;
+};
+
+} // namespace
+
+/// First we normalize calls to strncmp/strcmp to the form of
+/// compare(s1, s2, N), which means comparing first N bytes of s1 and s2
+/// (without considering '\0')
+///
+/// Examples:
+///
+/// \code
+///   strncmp(s, "a", 3) -> compare(s, "a", 2)
+///   strncmp(s, "abc", 3) -> compare(s, "abc", 3)
+///   strncmp(s, "a\0b", 3) -> compare(s, "a\0b", 2)
+///   strcmp(s, "a") -> compare(s, "a", 2)
+///
+///   char s2[] = {'a'}
+///   strncmp(s, s2, 3) -> compare(s, s2, 3)
+///
+///   char s2[] = {'a', 'b', 'c', 'd'}
+///   strncmp(s, s2, 3) -> compare(s, s2, 3)
+/// \endcode
+///
+/// We only handle cases that N and exactly one of s1 and s2 are constant. Cases
+/// that s1 and s2 are both constant are already handled by the instcombine
+/// pass.
+///
+/// We do not handle cases that N > StrNCmpInlineThreshold.
+///
+/// We also do not handles cases that N < 2, which are already
+/// handled by the instcombine pass.
+///
+bool StrNCmpInliner::optimizeStrNCmp() {
+  if (StrNCmpInlineThreshold < 2)
+    return false;
+
+  Value *Str1P = CI->getArgOperand(0);
+  Value *Str2P = CI->getArgOperand(1);
+  // should be handled elsewhere
+  if (Str1P == Str2P)
+    return false;
+
+  StringRef Str1, Str2;
+  bool HasStr1 = getConstantStringInfo(Str1P, Str1, false);
+  bool HasStr2 = getConstantStringInfo(Str2P, Str2, false);
+  if (!(HasStr1 ^ HasStr2))
+    return false;
+
+  // note that '\0' and characters after it are not trimmed
+  StringRef Str = HasStr1 ? Str1 : Str2;
+
+  size_t Idx = Str.find('\0');
+  uint64_t N = Idx == StringRef::npos ? UINT64_MAX : Idx + 1;
+  if (Func == LibFunc_strncmp) {
+    if (!isa<ConstantInt>(CI->getArgOperand(2)))
+      return false;
+    N = std::min(N, cast<ConstantInt>(CI->getArgOperand(2))->getZExtValue());
+  }
+  // now N means how many bytes we need to compare at most
+  if (N > Str.size() || N < 2 || N > StrNCmpInlineThreshold)
+    return false;
+
+  Value *StrP = HasStr1 ? Str2P : Str1P;
+
+  // cases that StrP has two or more dereferenceable bytes might be better
+  // optimized elsewhere
+  bool CanBeNull = false, CanBeFreed = false;
+  if (StrP->getPointerDereferenceableBytes(DL, CanBeNull, CanBeFreed) > 1)
+    return false;
+
+  return inlineCompare(StrP, Str, N, HasStr1);
+}
+
+/// Convert
+///
+/// \code
+///   ret = compare(s1, s2, N)
+/// \endcode
+///
+/// into
+///
+/// \code
+///   ret = (int)s1[0] - (int)s2[0]
+///   if (ret != 0)
+///     goto NE
+///   ...
+///   ret = (int)s1[N-2] - (int)s2[N-2]
+///   if (ret != 0)
+///     goto NE
+///   ret = (int)s1[N-1] - (int)s2[N-1]
+///   NE:
+/// \endcode
+///
+/// CFG before and after the transformation:
+///
+/// (before)
+/// BBCI
+///
+/// (after)
+/// BBBefore -> BBSubs[0] (sub,icmp) --NE-> BBNE -> BBCI
+///                      |                    ^
+///                      E                    |
+///                      |                    |
+///             BBSubs[1] (sub,icmp) --NE-----+
+///                     ...                   |
+///             BBSubs[N-1]    (sub) ---------+
+///
+bool StrNCmpInliner::inlineCompare(Value *LHS, StringRef RHS, uint64_t N,
+                                   bool Switched) {
+  IRBuilder<> B(CI->getContext());
+
+  BasicBlock *BBCI = CI->getParent();
+  bool IsEntry = BBCI->isEntryBlock();
+  BasicBlock *BBBefore = splitBlockBefore(BBCI, CI, DTU, nullptr, nullptr,
+                                          BBCI->getName() + ".before");
+
+  SmallVector<BasicBlock *> BBSubs;
+  for (uint64_t i = 0; i < N + 1; ++i)
+    BBSubs.push_back(
+        BasicBlock::Create(CI->getContext(), "sub", BBCI->getParent(), BBCI));
+  BasicBlock *BBNE = BBSubs[N];
+
+  cast<BranchInst>(BBBefore->getTerminator())->setSuccessor(0, BBSubs[0]);
+
+  B.SetInsertPoint(BBNE);
+  PHINode *Phi = B.CreatePHI(CI->getType(), N);
+  B.CreateBr(BBCI);
+
+  Value *Base = LHS;
+  for (uint64_t i = 0; i < N; ++i) {
+    B.SetInsertPoint(BBSubs[i]);
+    Value *VL = B.CreateZExt(
+        B.CreateLoad(B.getInt8Ty(),
+                     B.CreateInBoundsGEP(B.getInt8Ty(), Base, B.getInt64(i))),
+        CI->getType());
+    Value *VR = ConstantInt::get(CI->getType(), RHS[i]);
+    Value *Sub = Switched ? B.CreateSub(VR, VL) : B.CreateSub(VL, VR);
+    if (i < N - 1)
+      B.CreateCondBr(B.CreateICmpNE(Sub, ConstantInt::get(CI->getType(), 0)),
+                     BBNE, BBSubs[i + 1]);
+    else
+      B.CreateBr(BBNE);
+
+    Phi->addIncoming(Sub, BBSubs[i]);
+  }
+
+  CI->replaceAllUsesWith(Phi);
+  CI->eraseFromParent();
+
+  BBNext = BBCI->getIterator();
+
+  // Update DomTree
+  if (DTU) {
+    if (IsEntry) {
+      DTU->recalculate(*BBCI->getParent());
+    } else {
+      SmallVector<DominatorTree::UpdateType, 8> Updates;
+      Updates.push_back({DominatorTree::Delete, BBBefore, BBCI});
+      Updates.push_back({DominatorTree::Insert, BBBefore, BBSubs[0]});
+      for (uint64_t i = 0; i < N; ++i) {
+        if (i < N - 1)
+          Updates.push_back({DominatorTree::Insert, BBSubs[i], BBSubs[i + 1]});
+        Updates.push_back({DominatorTree::Insert, BBSubs[i], BBNE});
+      }
+      Updates.push_back({DominatorTree::Insert, BBNE, BBCI});
+      DTU->applyUpdates(Updates);
+    }
+  }
+  return true;
+}
+
+static bool inlineLibCalls(Function &F, TargetLibraryInfo &TLI,
+                           const TargetTransformInfo &TTI, DominatorTree &DT,
+                           bool &MadeCFGChange) {
+  MadeCFGChange = false;
+  DomTreeUpdater DTU(&DT, DomTreeUpdater::UpdateStrategy::Lazy);
+
+  bool MadeChange = false;
+
+  Function::iterator CurrBB;
+  for (Function::iterator BB = F.begin(), BE = F.end(); BB != BE;) {
+    CurrBB = BB++;
+
+    for (BasicBlock::iterator II = CurrBB->begin(), IE = CurrBB->end();
+         II != IE; ++II) {
+      CallInst *Call = dyn_cast<CallInst>(&*II);
+      Function *CalledFunc;
+
+      if (!Call || !(CalledFunc = Call->getCalledFunction()))
+        continue;
+
+      if (Call->isNoBuiltin())
+        continue;
+
+      // Skip if function either has local linkage or is not a known library
+      // function.
+      LibFunc LF;
+      if (CalledFunc->hasLocalLinkage() || !TLI.getLibFunc(*CalledFunc, LF) ||
+          !TLI.has(LF))
+        continue;
+
+      switch (LF) {
+      case LibFunc_strcmp:
+      case LibFunc_strncmp: {
+        auto &DL = F.getParent()->getDataLayout();
+        if (StrNCmpInliner(Call, LF, BB, &DTU, DL).optimizeStrNCmp()) {
+          MadeCFGChange = true;
+          break;
+        }
+        continue;
+      }
+      default:
+        continue;
+      }
+
+      MadeChange = true;
+      break;
+    }
+  }
+
+  return MadeChange;
+}
+
 /// This is the entry point for folds that could be implemented in regular
 /// InstCombine, but they are separated because they are not expected to
 /// occur frequently and/or have more than a constant-length pattern match.
@@ -969,11 +1216,12 @@ static bool foldUnusualPatterns(Function &F, DominatorTree &DT,
 /// handled in the callers of this function.
 static bool runImpl(Function &F, AssumptionCache &AC, TargetTransformInfo &TTI,
                     TargetLibraryInfo &TLI, DominatorTree &DT,
-                    AliasAnalysis &AA) {
+                    AliasAnalysis &AA, bool &MadeCFGChange) {
   bool MadeChange = false;
   const DataLayout &DL = F.getParent()->getDataLayout();
   TruncInstCombine TIC(AC, TLI, DL, DT);
   MadeChange |= TIC.run(F);
+  MadeChange |= inlineLibCalls(F, TLI, TTI, DT, MadeCFGChange);
   MadeChange |= foldUnusualPatterns(F, DT, TTI, TLI, AA, AC);
   return MadeChange;
 }
@@ -985,12 +1233,16 @@ PreservedAnalyses AggressiveInstCombinePass::run(Function &F,
   auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
   auto &TTI = AM.getResult<TargetIRAnalysis>(F);
   auto &AA = AM.getResult<AAManager>(F);
-  if (!runImpl(F, AC, TTI, TLI, DT, AA)) {
+  bool MadeCFGChange = false;
+  if (!runImpl(F, AC, TTI, TLI, DT, AA, MadeCFGChange)) {
     // No changes, all analyses are preserved.
     return PreservedAnalyses::all();
   }
   // Mark all the analyses that instcombine updates as preserved.
   PreservedAnalyses PA;
-  PA.preserveSet<CFGAnalyses>();
+  if (MadeCFGChange)
+    PA.preserve<DominatorTreeAnalysis>();
+  else
+    PA.preserveSet<CFGAnalyses>();
   return PA;
 }
diff --git a/llvm/test/Transforms/AggressiveInstCombine/strcmp.ll b/llvm/test/Transforms/AggressiveInstCombine/strcmp.ll
deleted file mode 100644
index 99dd450e6f44e6..00000000000000
--- a/llvm/test/Transforms/AggressiveInstCombine/strcmp.ll
+++ /dev/null
@@ -1,219 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=aggressive-instcombine -S | FileCheck %s
-
-declare i32 @strcmp(ptr, ptr)
-
- at s0 = constant [1 x i8] c"\00"
- at s1 = constant [2 x i8] c"0\00"
- at s2 = constant [3 x i8] c"01\00"
- at s3 = constant [4 x i8] c"012\00"
- at s4 = constant [5 x i8] c"0123\00"
-
-; Expand strcmp(C, "x"), strcmp(C, "xy").
-
-define i1 @expand_strcmp_s0(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_s0(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s0)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s0)
-  %cmp = icmp eq i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_eq_s1(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_eq_s1(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s1)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s1)
-  %cmp = icmp eq i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_eq_s1_commuted(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_eq_s1_commuted(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr @s1, ptr [[C:%.*]])
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr @s1, ptr %C)
-  %cmp = icmp eq i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_ne_s1(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_ne_s1(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s1)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s1)
-  %cmp = icmp ne i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_sgt_s1(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_sgt_s1(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s1)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s1)
-  %cmp = icmp sgt i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_sge_s1(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_sge_s1(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s1)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp sge i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s1)
-  %cmp = icmp sge i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_slt_s1(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_slt_s1(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s1)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s1)
-  %cmp = icmp slt i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_sle_s1(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_sle_s1(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s1)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp sle i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s1)
-  %cmp = icmp sle i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_s1_fail_1(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_s1_fail_1(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s1)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 1
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s1)
-  %cmp = icmp eq i32 %call, 1
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_s1_fail_2(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_s1_fail_2(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr @s1, ptr @s1)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr @s1, ptr @s1)
-  %cmp = icmp eq i32 %call, 0
-  ret i1 %cmp
-}
-
-define i32 @expand_strcmp_s1_fail_3(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_s1_fail_3(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s1)
-; CHECK-NEXT:    ret i32 [[CALL]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s1)
-  ret i32 %call
-}
-
-define i1 @expand_strcmp_eq_s2(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_eq_s2(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s2)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s2)
-  %cmp = icmp eq i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_ne_s2(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_ne_s2(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s2)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s2)
-  %cmp = icmp ne i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_sgt_s2(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_sgt_s2(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s2)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s2)
-  %cmp = icmp sgt i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_sge_s2(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_sge_s2(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s2)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp sge i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s2)
-  %cmp = icmp sge i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_slt_s2(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_slt_s2(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s2)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s2)
-  %cmp = icmp slt i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_sle_s2(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_sle_s2(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s2)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp sle i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s2)
-  %cmp = icmp sle i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_s3(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_s3(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s3)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s3)
-  %cmp = icmp eq i32 %call, 0
-  ret i1 %cmp
-}
-
-define i1 @expand_strcmp_s4(ptr %C) {
-; CHECK-LABEL: @expand_strcmp_s4(
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @strcmp(ptr [[C:%.*]], ptr @s4)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 0
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = call i32 @strcmp(ptr %C, ptr @s4)
-  %cmp = icmp eq i32 %call, 0
-  ret i1 %cmp
-}
diff --git a/llvm/test/Transforms/AggressiveInstCombine/strncmp-1.ll b/llvm/test/Transforms/AggressiveInstCombine/strncmp-1.ll
new file mode 100644
index 00000000000000..4679d6d7fca143
--- /dev/null
+++ b/llvm/test/Transforms/AggressiveInstCombine/strncmp-1.ll
@@ -0,0 +1,203 @@
+; RUN: opt -S -passes=aggressive-instcombine -strncmp-inline-threshold=3 < %s | FileCheck %s
+
+declare i32 @strncmp(ptr nocapture, ptr nocapture, i64)
+declare i32 @strcmp(ptr nocapture, ptr nocapture)
+
+ at .str = private unnamed_addr constant [3 x i8] c"ab\00", align 1
+ at .str.1 = private unnamed_addr constant [2 x i8] c"a\00", align 1
+
+define i32 @test_strncmp_1(ptr nocapture readonly %s) {
+; CHECK-LABEL: @test_strncmp_1(
+; CHECK-NEXT:  entry.before:
+; CHECK-NEXT:    br label [[SUB:%.*]]
+; CHECK:       sub:
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
+; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
+; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 97, [[TMP2]]
+; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
+; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB2:%.*]], label [[SUB1:%.*]]
+; CHECK:       sub1:
+; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
+; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
+; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
+; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 98, [[TMP7]]
+; CHECK-NEXT:    br label [[SUB2]]
+; CHECK:       sub2:
+; CHECK-NEXT:    [[TMP9:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ]
+; CHECK-NEXT:    br label [[ENTRY:%.*]]
+; CHECK:       entry:
+; CHECK-NEXT:    ret i32 [[TMP9]]
+;
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(3) @.str, ptr nonnull dereferenceable(1) %s, i64 2)
+  ret i32 %call
+}
+
+define i32 @test_strncmp_2(ptr nocapture readonly %s) {
+; CHECK-LABEL: @test_strncmp_2(
+; CHECK-NEXT:  entry.before:
+; CHECK-NEXT:    br label [[SUB:%.*]]
+; CHECK:       sub:
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
+; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
+; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 97, [[TMP2]]
+; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
+; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB3:%.*]], label [[SUB1:%.*]]
+; CHECK:       sub1:
+; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
+; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
+; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
+; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 98, [[TMP7]]
+; CHECK-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
+; CHECK-NEXT:    br i1 [[TMP9]], label [[SUB3]], label [[SUB2:%.*]]
+; CHECK:       sub2:
+; CHECK-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 2
+; CHECK-NEXT:    [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1
+; CHECK-NEXT:    [[TMP12:%.*]] = zext i8 [[TMP11]] to i32
+; CHECK-NEXT:    [[TMP13:%.*]] = sub i32 0, [[TMP12]]
+; CHECK-NEXT:    br label [[SUB3]]
+; CHECK:       sub3:
+; CHECK-NEXT:    [[TMP14:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ], [ [[TMP13]], [[SUB2]] ]
+; CHECK-NEXT:    br label [[ENTRY:%.*]]
+; CHECK:       entry:
+; CHECK-NEXT:    ret i32 [[TMP14]]
+;
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(3) @.str, ptr nonnull dereferenceable(1) %s, i64 3)
+  ret i32 %call
+}
+
+define i32 @test_strncmp_3(ptr nocapture readonly %s) {
+; CHECK-LABEL: @test_strncmp_3(
+; CHECK-NEXT:  entry.before:
+; CHECK-NEXT:    br label [[SUB:%.*]]
+; CHECK:       sub:
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
+; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
+; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 97, [[TMP2]]
+; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
+; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB3:%.*]], label [[SUB1:%.*]]
+; CHECK:       sub1:
+; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
+; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
+; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
+; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 98, [[TMP7]]
+; CHECK-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
+; CHECK-NEXT:    br i1 [[TMP9]], label [[SUB3]], label [[SUB2:%.*]]
+; CHECK:       sub2:
+; CHECK-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 2
+; CHECK-NEXT:    [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1
+; CHECK-NEXT:    [[TMP12:%.*]] = zext i8 [[TMP11]] to i32
+; CHECK-NEXT:    [[TMP13:%.*]] = sub i32 0, [[TMP12]]
+; CHECK-NEXT:    br label [[SUB3]]
+; CHECK:       sub3:
+; CHECK-NEXT:    [[TMP14:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ], [ [[TMP13]], [[SUB2]] ]
+; CHECK-NEXT:    br label [[ENTRY:%.*]]
+; CHECK:       entry:
+; CHECK-NEXT:    ret i32 [[TMP14]]
+;
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(3) @.str, ptr nonnull dereferenceable(1) %s, i64 4)
+  ret i32 %call
+}
+
+define i32 @test_strcmp_1(ptr nocapture readonly %s) {
+; CHECK-LABEL: @test_strcmp_1(
+; CHECK-NEXT:  entry.before:
+; CHECK-NEXT:    br label [[SUB:%.*]]
+; CHECK:       sub:
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
+; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
+; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 [[TMP2]], 97
+; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
+; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB2:%.*]], label [[SUB1:%.*]]
+; CHECK:       sub1:
+; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
+; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
+; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
+; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 [[TMP7]], 0
+; CHECK-NEXT:    br label [[SUB2]]
+; CHECK:       sub2:
+; CHECK-NEXT:    [[TMP9:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ]
+; CHECK-NEXT:    br label [[ENTRY:%.*]]
+; CHECK:       entry:
+; CHECK-NEXT:    ret i32 [[TMP9]]
+;
+entry:
+  %call = tail call i32 @strcmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(2) @.str.1)
+  ret i32 %call
+}
+
+define i32 @test_strcmp_2(ptr nocapture readonly %s) {
+; CHECK-LABEL: @test_strcmp_2(
+; CHECK-NEXT:  entry.before:
+; CHECK-NEXT:    br label [[SUB:%.*]]
+; CHECK:       sub:
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
+; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
+; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 [[TMP2]], 97
+; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
+; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB3:%.*]], label [[SUB1:%.*]]
+; CHECK:       sub1:
+; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
+; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
+; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
+; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 [[TMP7]], 98
+; CHECK-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
+; CHECK-NEXT:    br i1 [[TMP9]], label [[SUB3]], label [[SUB2:%.*]]
+; CHECK:       sub2:
+; CHECK-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 2
+; CHECK-NEXT:    [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1
+; CHECK-NEXT:    [[TMP12:%.*]] = zext i8 [[TMP11]] to i32
+; CHECK-NEXT:    [[TMP13:%.*]] = sub i32 [[TMP12]], 0
+; CHECK-NEXT:    br label [[SUB3]]
+; CHECK:       sub3:
+; CHECK-NEXT:    [[TMP14:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ], [ [[TMP13]], [[SUB2]] ]
+; CHECK-NEXT:    br label [[ENTRY:%.*]]
+; CHECK:       entry:
+; CHECK-NEXT:    ret i32 [[TMP14]]
+;
+entry:
+  %call = tail call i32 @strcmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(3) @.str)
+  ret i32 %call
+}
+
+define i32 @test_strcmp_3(ptr nocapture readonly %s) {
+; CHECK-LABEL: @test_strcmp_3(
+; CHECK-NEXT:  entry.before:
+; CHECK-NEXT:    br label [[SUB:%.*]]
+; CHECK:       sub:
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
+; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
+; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 97, [[TMP2]]
+; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
+; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB3:%.*]], label [[SUB1:%.*]]
+; CHECK:       sub1:
+; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
+; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
+; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
+; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 98, [[TMP7]]
+; CHECK-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
+; CHECK-NEXT:    br i1 [[TMP9]], label [[SUB3]], label [[SUB2:%.*]]
+; CHECK:       sub2:
+; CHECK-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 2
+; CHECK-NEXT:    [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1
+; CHECK-NEXT:    [[TMP12:%.*]] = zext i8 [[TMP11]] to i32
+; CHECK-NEXT:    [[TMP13:%.*]] = sub i32 0, [[TMP12]]
+; CHECK-NEXT:    br label [[SUB3]]
+; CHECK:       sub3:
+; CHECK-NEXT:    [[TMP14:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ], [ [[TMP13]], [[SUB2]] ]
+; CHECK-NEXT:    br label [[ENTRY:%.*]]
+; CHECK:       entry:
+; CHECK-NEXT:    ret i32 [[TMP14]]
+;
+entry:
+  %call = tail call i32 @strcmp(ptr nonnull dereferenceable(3) @.str, ptr nonnull dereferenceable(1) %s)
+  ret i32 %call
+}
diff --git a/llvm/test/Transforms/AggressiveInstCombine/strncmp-2.ll b/llvm/test/Transforms/AggressiveInstCombine/strncmp-2.ll
new file mode 100644
index 00000000000000..17dd9d39d17408
--- /dev/null
+++ b/llvm/test/Transforms/AggressiveInstCombine/strncmp-2.ll
@@ -0,0 +1,145 @@
+; RUN: opt -S -passes=aggressive-instcombine -strncmp-inline-threshold=3 < %s | FileCheck %s
+
+declare i32 @strncmp(ptr nocapture, ptr nocapture, i64)
+declare i32 @strcmp(ptr nocapture, ptr nocapture)
+
+ at .str = private unnamed_addr constant [3 x i8] c"aa\00", align 1
+ at .str.1 = private unnamed_addr constant [4 x i8] c"aab\00", align 1
+ at __const.test_strncmp_8.s2 = private unnamed_addr constant [2 x i8] c"aa", align 1
+
+; int test_strncmp_1(const char *s) {
+;   if (!strncmp(s, "aa", 2))
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strncmp_1(i8* nocapture readonly %s) {
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(3) @.str, i64 2)
+  %tobool.not = icmp eq i32 %call, 0
+  %retval.0 = select i1 %tobool.not, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strncmp_1(
+; CHECK-NOT: @strncmp
+
+; int test_strncmp_2(const char *s) {
+;   if (!strncmp(s, "aa", 3))
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strncmp_2(i8* nocapture readonly %s) {
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(3) @.str, i64 3)
+  %tobool.not = icmp eq i32 %call, 0
+  %retval.0 = select i1 %tobool.not, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strncmp_2(
+; CHECK-NOT: @strncmp
+
+; int test_strncmp_3(const char *s) {
+;   if (!strncmp(s, "aab", 3))
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strncmp_3(i8* nocapture readonly %s) {
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(4) @.str.1, i64 3)
+  %tobool.not = icmp eq i32 %call, 0
+  %retval.0 = select i1 %tobool.not, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strncmp_3(
+; CHECK-NOT: @strncmp
+
+; int test_strncmp_4(const char *s) {
+;   if (!strncmp(s, "aab", 4))
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strncmp_4(i8* nocapture readonly %s) {
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(4) @.str.1, i64 4)
+  %tobool.not = icmp eq i32 %call, 0
+  %retval.0 = select i1 %tobool.not, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strncmp_4(
+; CHECK: @strncmp
+
+; int test_strncmp_5(const char *s) {
+;   if (strncmp(s, "aa", 2) < 0)
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strncmp_5(i8* nocapture readonly %s) {
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(3) @.str, i64 2)
+  %cmp = icmp slt i32 %call, 0
+  %retval.0 = select i1 %cmp, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strncmp_5(
+; CHECK-NOT: @strncmp
+
+; int test_strncmp_6(const char *s1) {
+;   char s2[] = {'a', 'a'};
+;   if (strncmp(s1, s2, 2) < 0)
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strncmp_6(i8* nocapture readonly %s1) {
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(1) %s1, ptr nonnull dereferenceable(3) @__const.test_strncmp_8.s2, i64 2)
+  %cmp = icmp slt i32 %call, 0
+  %retval.0 = select i1 %cmp, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strncmp_6(
+; CHECK-NOT: @strncmp
+
+; int test_strncmp_7(const char *s1) {
+;   char s2[] = {'a', 'a'};
+;   if (strncmp(s1, s2, 3) < 0)
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strncmp_7(i8* nocapture readonly %s1) {
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull dereferenceable(1) %s1, ptr nonnull dereferenceable(3) @__const.test_strncmp_8.s2, i64 3)
+  %cmp = icmp slt i32 %call, 0
+  %retval.0 = select i1 %cmp, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strncmp_7(
+; CHECK: @strncmp
+
+; int test_strcmp_1(const char *s) {
+;   if (!strcmp(s, "aa"))
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strcmp_1(i8* nocapture readonly %s) {
+entry:
+  %call = tail call i32 @strcmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(3) @.str)
+  %tobool.not = icmp eq i32 %call, 0
+  %retval.0 = select i1 %tobool.not, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strcmp_1(
+; CHECK-NOT: @strcmp
+
+; int test_strcmp_2(const char *s) {
+;   if (!strcmp(s, "aab"))
+;     return 11;
+;   return 41;
+; }
+define i32 @test_strcmp_2(i8* nocapture readonly %s) {
+entry:
+  %call = tail call i32 @strcmp(ptr nonnull dereferenceable(1) %s, ptr nonnull dereferenceable(4) @.str.1)
+  %tobool.not = icmp eq i32 %call, 0
+  %retval.0 = select i1 %tobool.not, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strcmp_2(
+; CHECK: @strcmp

>From e2d35214107379b64dd009571ed159553aebb3dd Mon Sep 17 00:00:00 2001
From: zhangfenglei <zhangfenglei at huawei.com>
Date: Sat, 20 Apr 2024 17:39:42 +0800
Subject: [PATCH 2/3] [AggressiveInstCombine] Inline strcmp/strncmp

* add missing test cases
* remove redundant code
---
 .../AggressiveInstCombine.cpp                 | 46 +++++-------
 .../AggressiveInstCombine/strncmp-1.ll        | 75 ++++++++++---------
 .../AggressiveInstCombine/strncmp-2.ll        | 20 +++++
 3 files changed, 78 insertions(+), 63 deletions(-)

diff --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
index eddd7382c27bbc..011892b1110340 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
@@ -1055,18 +1055,17 @@ bool StrNCmpInliner::optimizeStrNCmp() {
 ///
 bool StrNCmpInliner::inlineCompare(Value *LHS, StringRef RHS, uint64_t N,
                                    bool Switched) {
-  IRBuilder<> B(CI->getContext());
+  auto &Ctx = CI->getContext();
+  IRBuilder<> B(Ctx);
 
   BasicBlock *BBCI = CI->getParent();
-  bool IsEntry = BBCI->isEntryBlock();
   BasicBlock *BBBefore = splitBlockBefore(BBCI, CI, DTU, nullptr, nullptr,
                                           BBCI->getName() + ".before");
 
   SmallVector<BasicBlock *> BBSubs;
-  for (uint64_t i = 0; i < N + 1; ++i)
-    BBSubs.push_back(
-        BasicBlock::Create(CI->getContext(), "sub", BBCI->getParent(), BBCI));
-  BasicBlock *BBNE = BBSubs[N];
+  for (uint64_t i = 0; i < N; ++i)
+    BBSubs.push_back(BasicBlock::Create(Ctx, "sub", BBCI->getParent(), BBCI));
+  BasicBlock *BBNE = BasicBlock::Create(Ctx, "ne", BBCI->getParent(), BBCI);
 
   cast<BranchInst>(BBBefore->getTerminator())->setSuccessor(0, BBSubs[0]);
 
@@ -1099,27 +1098,23 @@ bool StrNCmpInliner::inlineCompare(Value *LHS, StringRef RHS, uint64_t N,
 
   // Update DomTree
   if (DTU) {
-    if (IsEntry) {
-      DTU->recalculate(*BBCI->getParent());
-    } else {
-      SmallVector<DominatorTree::UpdateType, 8> Updates;
-      Updates.push_back({DominatorTree::Delete, BBBefore, BBCI});
-      Updates.push_back({DominatorTree::Insert, BBBefore, BBSubs[0]});
-      for (uint64_t i = 0; i < N; ++i) {
-        if (i < N - 1)
-          Updates.push_back({DominatorTree::Insert, BBSubs[i], BBSubs[i + 1]});
-        Updates.push_back({DominatorTree::Insert, BBSubs[i], BBNE});
-      }
-      Updates.push_back({DominatorTree::Insert, BBNE, BBCI});
-      DTU->applyUpdates(Updates);
+    SmallVector<DominatorTree::UpdateType, 8> Updates;
+    Updates.push_back({DominatorTree::Delete, BBBefore, BBCI});
+    Updates.push_back({DominatorTree::Insert, BBBefore, BBSubs[0]});
+    for (uint64_t i = 0; i < N; ++i) {
+      if (i < N - 1)
+        Updates.push_back({DominatorTree::Insert, BBSubs[i], BBSubs[i + 1]});
+      Updates.push_back({DominatorTree::Insert, BBSubs[i], BBNE});
     }
+    Updates.push_back({DominatorTree::Insert, BBNE, BBCI});
+    DTU->applyUpdates(Updates);
   }
   return true;
 }
 
 static bool inlineLibCalls(Function &F, TargetLibraryInfo &TLI,
                            const TargetTransformInfo &TTI, DominatorTree &DT,
-                           bool &MadeCFGChange) {
+                           const DataLayout &DL, bool &MadeCFGChange) {
   MadeCFGChange = false;
   DomTreeUpdater DTU(&DT, DomTreeUpdater::UpdateStrategy::Lazy);
 
@@ -1137,20 +1132,13 @@ static bool inlineLibCalls(Function &F, TargetLibraryInfo &TLI,
       if (!Call || !(CalledFunc = Call->getCalledFunction()))
         continue;
 
-      if (Call->isNoBuiltin())
-        continue;
-
-      // Skip if function either has local linkage or is not a known library
-      // function.
       LibFunc LF;
-      if (CalledFunc->hasLocalLinkage() || !TLI.getLibFunc(*CalledFunc, LF) ||
-          !TLI.has(LF))
+      if (!TLI.getLibFunc(*CalledFunc, LF))
         continue;
 
       switch (LF) {
       case LibFunc_strcmp:
       case LibFunc_strncmp: {
-        auto &DL = F.getParent()->getDataLayout();
         if (StrNCmpInliner(Call, LF, BB, &DTU, DL).optimizeStrNCmp()) {
           MadeCFGChange = true;
           break;
@@ -1221,7 +1209,7 @@ static bool runImpl(Function &F, AssumptionCache &AC, TargetTransformInfo &TTI,
   const DataLayout &DL = F.getParent()->getDataLayout();
   TruncInstCombine TIC(AC, TLI, DL, DT);
   MadeChange |= TIC.run(F);
-  MadeChange |= inlineLibCalls(F, TLI, TTI, DT, MadeCFGChange);
+  MadeChange |= inlineLibCalls(F, TLI, TTI, DT, DL, MadeCFGChange);
   MadeChange |= foldUnusualPatterns(F, DT, TTI, TLI, AA, AC);
   return MadeChange;
 }
diff --git a/llvm/test/Transforms/AggressiveInstCombine/strncmp-1.ll b/llvm/test/Transforms/AggressiveInstCombine/strncmp-1.ll
index 4679d6d7fca143..16f6d9c25c1c65 100644
--- a/llvm/test/Transforms/AggressiveInstCombine/strncmp-1.ll
+++ b/llvm/test/Transforms/AggressiveInstCombine/strncmp-1.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
 ; RUN: opt -S -passes=aggressive-instcombine -strncmp-inline-threshold=3 < %s | FileCheck %s
 
 declare i32 @strncmp(ptr nocapture, ptr nocapture, i64)
@@ -7,23 +8,24 @@ declare i32 @strcmp(ptr nocapture, ptr nocapture)
 @.str.1 = private unnamed_addr constant [2 x i8] c"a\00", align 1
 
 define i32 @test_strncmp_1(ptr nocapture readonly %s) {
-; CHECK-LABEL: @test_strncmp_1(
+; CHECK-LABEL: define i32 @test_strncmp_1(
+; CHECK-SAME: ptr nocapture readonly [[S:%.*]]) {
 ; CHECK-NEXT:  entry.before:
 ; CHECK-NEXT:    br label [[SUB:%.*]]
 ; CHECK:       sub:
-; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 0
 ; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
 ; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
 ; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 97, [[TMP2]]
 ; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
-; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB2:%.*]], label [[SUB1:%.*]]
+; CHECK-NEXT:    br i1 [[TMP4]], label [[NE:%.*]], label [[SUB1:%.*]]
 ; CHECK:       sub1:
 ; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
 ; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
 ; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
 ; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 98, [[TMP7]]
-; CHECK-NEXT:    br label [[SUB2]]
-; CHECK:       sub2:
+; CHECK-NEXT:    br label [[NE]]
+; CHECK:       ne:
 ; CHECK-NEXT:    [[TMP9:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ]
 ; CHECK-NEXT:    br label [[ENTRY:%.*]]
 ; CHECK:       entry:
@@ -35,30 +37,31 @@ entry:
 }
 
 define i32 @test_strncmp_2(ptr nocapture readonly %s) {
-; CHECK-LABEL: @test_strncmp_2(
+; CHECK-LABEL: define i32 @test_strncmp_2(
+; CHECK-SAME: ptr nocapture readonly [[S:%.*]]) {
 ; CHECK-NEXT:  entry.before:
 ; CHECK-NEXT:    br label [[SUB:%.*]]
 ; CHECK:       sub:
-; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 0
 ; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
 ; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
 ; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 97, [[TMP2]]
 ; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
-; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB3:%.*]], label [[SUB1:%.*]]
+; CHECK-NEXT:    br i1 [[TMP4]], label [[NE:%.*]], label [[SUB1:%.*]]
 ; CHECK:       sub1:
 ; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
 ; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
 ; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
 ; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 98, [[TMP7]]
 ; CHECK-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
-; CHECK-NEXT:    br i1 [[TMP9]], label [[SUB3]], label [[SUB2:%.*]]
+; CHECK-NEXT:    br i1 [[TMP9]], label [[NE]], label [[SUB2:%.*]]
 ; CHECK:       sub2:
 ; CHECK-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 2
 ; CHECK-NEXT:    [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1
 ; CHECK-NEXT:    [[TMP12:%.*]] = zext i8 [[TMP11]] to i32
 ; CHECK-NEXT:    [[TMP13:%.*]] = sub i32 0, [[TMP12]]
-; CHECK-NEXT:    br label [[SUB3]]
-; CHECK:       sub3:
+; CHECK-NEXT:    br label [[NE]]
+; CHECK:       ne:
 ; CHECK-NEXT:    [[TMP14:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ], [ [[TMP13]], [[SUB2]] ]
 ; CHECK-NEXT:    br label [[ENTRY:%.*]]
 ; CHECK:       entry:
@@ -70,30 +73,31 @@ entry:
 }
 
 define i32 @test_strncmp_3(ptr nocapture readonly %s) {
-; CHECK-LABEL: @test_strncmp_3(
+; CHECK-LABEL: define i32 @test_strncmp_3(
+; CHECK-SAME: ptr nocapture readonly [[S:%.*]]) {
 ; CHECK-NEXT:  entry.before:
 ; CHECK-NEXT:    br label [[SUB:%.*]]
 ; CHECK:       sub:
-; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 0
 ; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
 ; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
 ; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 97, [[TMP2]]
 ; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
-; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB3:%.*]], label [[SUB1:%.*]]
+; CHECK-NEXT:    br i1 [[TMP4]], label [[NE:%.*]], label [[SUB1:%.*]]
 ; CHECK:       sub1:
 ; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
 ; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
 ; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
 ; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 98, [[TMP7]]
 ; CHECK-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
-; CHECK-NEXT:    br i1 [[TMP9]], label [[SUB3]], label [[SUB2:%.*]]
+; CHECK-NEXT:    br i1 [[TMP9]], label [[NE]], label [[SUB2:%.*]]
 ; CHECK:       sub2:
 ; CHECK-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 2
 ; CHECK-NEXT:    [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1
 ; CHECK-NEXT:    [[TMP12:%.*]] = zext i8 [[TMP11]] to i32
 ; CHECK-NEXT:    [[TMP13:%.*]] = sub i32 0, [[TMP12]]
-; CHECK-NEXT:    br label [[SUB3]]
-; CHECK:       sub3:
+; CHECK-NEXT:    br label [[NE]]
+; CHECK:       ne:
 ; CHECK-NEXT:    [[TMP14:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ], [ [[TMP13]], [[SUB2]] ]
 ; CHECK-NEXT:    br label [[ENTRY:%.*]]
 ; CHECK:       entry:
@@ -105,23 +109,24 @@ entry:
 }
 
 define i32 @test_strcmp_1(ptr nocapture readonly %s) {
-; CHECK-LABEL: @test_strcmp_1(
+; CHECK-LABEL: define i32 @test_strcmp_1(
+; CHECK-SAME: ptr nocapture readonly [[S:%.*]]) {
 ; CHECK-NEXT:  entry.before:
 ; CHECK-NEXT:    br label [[SUB:%.*]]
 ; CHECK:       sub:
-; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 0
 ; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
 ; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
 ; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 [[TMP2]], 97
 ; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
-; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB2:%.*]], label [[SUB1:%.*]]
+; CHECK-NEXT:    br i1 [[TMP4]], label [[NE:%.*]], label [[SUB1:%.*]]
 ; CHECK:       sub1:
 ; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
 ; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
 ; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
 ; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 [[TMP7]], 0
-; CHECK-NEXT:    br label [[SUB2]]
-; CHECK:       sub2:
+; CHECK-NEXT:    br label [[NE]]
+; CHECK:       ne:
 ; CHECK-NEXT:    [[TMP9:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ]
 ; CHECK-NEXT:    br label [[ENTRY:%.*]]
 ; CHECK:       entry:
@@ -133,30 +138,31 @@ entry:
 }
 
 define i32 @test_strcmp_2(ptr nocapture readonly %s) {
-; CHECK-LABEL: @test_strcmp_2(
+; CHECK-LABEL: define i32 @test_strcmp_2(
+; CHECK-SAME: ptr nocapture readonly [[S:%.*]]) {
 ; CHECK-NEXT:  entry.before:
 ; CHECK-NEXT:    br label [[SUB:%.*]]
 ; CHECK:       sub:
-; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 0
 ; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
 ; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
 ; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 [[TMP2]], 97
 ; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
-; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB3:%.*]], label [[SUB1:%.*]]
+; CHECK-NEXT:    br i1 [[TMP4]], label [[NE:%.*]], label [[SUB1:%.*]]
 ; CHECK:       sub1:
 ; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
 ; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
 ; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
 ; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 [[TMP7]], 98
 ; CHECK-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
-; CHECK-NEXT:    br i1 [[TMP9]], label [[SUB3]], label [[SUB2:%.*]]
+; CHECK-NEXT:    br i1 [[TMP9]], label [[NE]], label [[SUB2:%.*]]
 ; CHECK:       sub2:
 ; CHECK-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 2
 ; CHECK-NEXT:    [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1
 ; CHECK-NEXT:    [[TMP12:%.*]] = zext i8 [[TMP11]] to i32
 ; CHECK-NEXT:    [[TMP13:%.*]] = sub i32 [[TMP12]], 0
-; CHECK-NEXT:    br label [[SUB3]]
-; CHECK:       sub3:
+; CHECK-NEXT:    br label [[NE]]
+; CHECK:       ne:
 ; CHECK-NEXT:    [[TMP14:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ], [ [[TMP13]], [[SUB2]] ]
 ; CHECK-NEXT:    br label [[ENTRY:%.*]]
 ; CHECK:       entry:
@@ -168,30 +174,31 @@ entry:
 }
 
 define i32 @test_strcmp_3(ptr nocapture readonly %s) {
-; CHECK-LABEL: @test_strcmp_3(
+; CHECK-LABEL: define i32 @test_strcmp_3(
+; CHECK-SAME: ptr nocapture readonly [[S:%.*]]) {
 ; CHECK-NEXT:  entry.before:
 ; CHECK-NEXT:    br label [[SUB:%.*]]
 ; CHECK:       sub:
-; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S:%.*]], i64 0
+; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 0
 ; CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[TMP0]], align 1
 ; CHECK-NEXT:    [[TMP2:%.*]] = zext i8 [[TMP1]] to i32
 ; CHECK-NEXT:    [[TMP3:%.*]] = sub i32 97, [[TMP2]]
 ; CHECK-NEXT:    [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
-; CHECK-NEXT:    br i1 [[TMP4]], label [[SUB3:%.*]], label [[SUB1:%.*]]
+; CHECK-NEXT:    br i1 [[TMP4]], label [[NE:%.*]], label [[SUB1:%.*]]
 ; CHECK:       sub1:
 ; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 1
 ; CHECK-NEXT:    [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1
 ; CHECK-NEXT:    [[TMP7:%.*]] = zext i8 [[TMP6]] to i32
 ; CHECK-NEXT:    [[TMP8:%.*]] = sub i32 98, [[TMP7]]
 ; CHECK-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
-; CHECK-NEXT:    br i1 [[TMP9]], label [[SUB3]], label [[SUB2:%.*]]
+; CHECK-NEXT:    br i1 [[TMP9]], label [[NE]], label [[SUB2:%.*]]
 ; CHECK:       sub2:
 ; CHECK-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 2
 ; CHECK-NEXT:    [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1
 ; CHECK-NEXT:    [[TMP12:%.*]] = zext i8 [[TMP11]] to i32
 ; CHECK-NEXT:    [[TMP13:%.*]] = sub i32 0, [[TMP12]]
-; CHECK-NEXT:    br label [[SUB3]]
-; CHECK:       sub3:
+; CHECK-NEXT:    br label [[NE]]
+; CHECK:       ne:
 ; CHECK-NEXT:    [[TMP14:%.*]] = phi i32 [ [[TMP3]], [[SUB]] ], [ [[TMP8]], [[SUB1]] ], [ [[TMP13]], [[SUB2]] ]
 ; CHECK-NEXT:    br label [[ENTRY:%.*]]
 ; CHECK:       entry:
diff --git a/llvm/test/Transforms/AggressiveInstCombine/strncmp-2.ll b/llvm/test/Transforms/AggressiveInstCombine/strncmp-2.ll
index 17dd9d39d17408..15d5e17a86cf03 100644
--- a/llvm/test/Transforms/AggressiveInstCombine/strncmp-2.ll
+++ b/llvm/test/Transforms/AggressiveInstCombine/strncmp-2.ll
@@ -22,6 +22,16 @@ entry:
 ; CHECK-LABEL: @test_strncmp_1(
 ; CHECK-NOT: @strncmp
 
+define i32 @test_strncmp_1_dereferenceable(i8* nocapture readonly dereferenceable(2) %s) {
+entry:
+  %call = tail call i32 @strncmp(ptr nonnull %s, ptr nonnull dereferenceable(3) @.str, i64 2)
+  %tobool.not = icmp eq i32 %call, 0
+  %retval.0 = select i1 %tobool.not, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strncmp_1_dereferenceable(
+; CHECK: @strncmp
+
 ; int test_strncmp_2(const char *s) {
 ;   if (!strncmp(s, "aa", 3))
 ;     return 11;
@@ -129,6 +139,16 @@ entry:
 ; CHECK-LABEL: @test_strcmp_1(
 ; CHECK-NOT: @strcmp
 
+define i32 @test_strcmp_1_dereferenceable(i8* nocapture readonly dereferenceable(2) %s) {
+entry:
+  %call = tail call i32 @strcmp(ptr nonnull %s, ptr nonnull dereferenceable(3) @.str)
+  %tobool.not = icmp eq i32 %call, 0
+  %retval.0 = select i1 %tobool.not, i32 11, i32 41
+  ret i32 %retval.0
+}
+; CHECK-LABEL: @test_strcmp_1_dereferenceable(
+; CHECK: @strcmp
+
 ; int test_strcmp_2(const char *s) {
 ;   if (!strcmp(s, "aab"))
 ;     return 11;

>From 666c9089fb4bb44e3a6f4cb3f4980761f4bc8475 Mon Sep 17 00:00:00 2001
From: zhangfenglei <zhangfenglei at huawei.com>
Date: Fri, 26 Apr 2024 01:56:56 +0800
Subject: [PATCH 3/3] bug-1

---
 .../AggressiveInstCombine.cpp                 |    3 +
 .../AggressiveInstCombine/strncmp-3.ll        | 1014 +++++++++++++++++
 2 files changed, 1017 insertions(+)
 create mode 100644 llvm/test/Transforms/AggressiveInstCombine/strncmp-3.ll

diff --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
index 011892b1110340..9faf2caa615c93 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
@@ -1124,6 +1124,9 @@ static bool inlineLibCalls(Function &F, TargetLibraryInfo &TLI,
   for (Function::iterator BB = F.begin(), BE = F.end(); BB != BE;) {
     CurrBB = BB++;
 
+    if (!DT.isReachableFromEntry(&*CurrBB))
+      continue;
+
     for (BasicBlock::iterator II = CurrBB->begin(), IE = CurrBB->end();
          II != IE; ++II) {
       CallInst *Call = dyn_cast<CallInst>(&*II);
diff --git a/llvm/test/Transforms/AggressiveInstCombine/strncmp-3.ll b/llvm/test/Transforms/AggressiveInstCombine/strncmp-3.ll
new file mode 100644
index 00000000000000..31528b07808b7a
--- /dev/null
+++ b/llvm/test/Transforms/AggressiveInstCombine/strncmp-3.ll
@@ -0,0 +1,1014 @@
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+ at .str.227 = constant [3 x i8] c"-h\00"
+
+define void @Configure() {
+  %1 = load i8, ptr null, align 1
+  tail call void @llvm.dbg.value(metadata i32 3, metadata !988, metadata !DIExpression()), !dbg !991
+  %2 = call i32 @strncmp(ptr null, ptr @.str.227, i64 2)
+  ret void
+}
+
+declare i32 @strncmp(ptr, ptr, i64)
+
+; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
+declare void @llvm.dbg.value(metadata, metadata, metadata) #0
+
+attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!987}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 19.0.0git (https://github.com/FLZ101/llvm-project.git e2d35214107379b64dd009571ed159553aebb3dd)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "/media/d/work/learn-riscv/test-suite/MultiSource/Applications/JM/lencod/configfile.c", directory: "/media/d/work/learn-riscv/build-r/MultiSource/Applications/JM/lencod", checksumkind: CSK_MD5, checksum: "16267042b42445e6a929b0dd473a0b1f")
+!2 = !{}
+!3 = !{!4, !9, !12, !15, !18, !20, !22, !25, !28, !31, !33, !35, !37, !39, !42, !44, !47, !50, !52, !54, !56, !59, !61, !63, !65, !67, !69, !72, !74, !76, !78, !81, !83, !85, !87, !89, !91, !93, !95, !97, !99, !101, !103, !105, !108, !110, !112, !114, !116, !118, !120, !122, !124, !126, !128, !130, !132, !134, !136, !138, !140, !142, !144, !146, !149, !151, !153, !155, !158, !160, !162, !164, !166, !168, !170, !172, !174, !176, !178, !180, !182, !184, !186, !188, !190, !192, !194, !196, !198, !200, !202, !204, !206, !208, !211, !214, !216, !218, !220, !222, !224, !226, !228, !230, !232, !234, !236, !238, !240, !242, !244, !246, !248, !250, !252, !254, !257, !259, !261, !263, !265, !267, !269, !271, !273, !276, !279, !281, !283, !285, !287, !289, !291, !293, !295, !297, !299, !301, !304, !306, !308, !310, !312, !314, !316, !318, !320, !322, !324, !326, !328, !330, !332, !334, !336, !338, !340, !342, !344, !346, !348, !350, !352, !354, !356, !358, !360, !362, !364, !366, !368, !370, !372, !374, !376, !378, !380, !382, !384, !386, !388, !390, !392, !394, !396, !399, !401, !403, !405, !407, !409, !411, !413, !415, !417, !419, !421, !423, !425, !427, !429, !431, !433, !435, !437, !439, !441, !443, !445, !447, !449, !451, !453, !455, !457, !459, !461, !463, !465, !467, !469, !471, !473, !475, !477, !482, !486, !488, !490, !493, !495, !497, !500, !502, !504, !506, !509, !511, !514, !516, !519, !522, !525, !527, !532, !537, !539, !541, !543, !545, !547, !549, !553, !559, !562, !567, !569, !571, !573, !579, !581, !587, !592, !594, !596, !598, !601, !603, !606, !608, !610, !612, !614, !616, !618, !620, !622, !624, !626, !628, !630, !636, !638, !645, !647, !649, !652, !654, !656, !658, !660, !663, !666, !669, !674, !679, !681, !683, !685, !687, !694, !696, !698, !700, !702, !706, !708, !713, !715, !717, !719, !721, !723, !725, !727, !730, !732, !734, !736, !738, !740, !742, !744, !746, !748, !750, !752, !754, !756, !758, !760, !762, !766, !769, !771, !774, !776, !779, !781, !784, !787, !790, !792, !794, !796, !798, !801, !804, !807, !809, !812, !814, !817, !820, !822, !825, !828, !831, !833, !835, !838, !840, !843, !845, !848, !850, !852, !855, !858, !860, !863, !866, !869, !871, !873, !875, !877, !880, !883, !886, !889, !892, !894, !897, !900, !903, !905, !907, !909, !911, !913, !915, !917, !919, !922, !925, !928, !930, !932, !935, !938, !940, !943, !945, !947, !949, !951, !953, !955, !957, !960, !963, !966, !968, !970, !972, !975, !977, !979, !981, !984}
+!4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression())
+!5 = distinct !DIGlobalVariable(scope: null, file: !6, line: 44, type: !7, isLocal: true, isDefinition: true)
+!6 = !DIFile(filename: "test-suite/MultiSource/Applications/JM/lencod/configfile.h", directory: "/media/d/work/learn-riscv", checksumkind: CSK_MD5, checksum: "c18fe705aabfba62febc195d83b2fdbb")
+!7 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 88, elements: !2)
+!8 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
+!9 = !DIGlobalVariableExpression(var: !10, expr: !DIExpression())
+!10 = distinct !DIGlobalVariable(scope: null, file: !6, line: 45, type: !11, isLocal: true, isDefinition: true)
+!11 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 72, elements: !2)
+!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression())
+!13 = distinct !DIGlobalVariable(scope: null, file: !6, line: 46, type: !14, isLocal: true, isDefinition: true)
+!14 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 80, elements: !2)
+!15 = !DIGlobalVariableExpression(var: !16, expr: !DIExpression())
+!16 = distinct !DIGlobalVariable(scope: null, file: !6, line: 47, type: !17, isLocal: true, isDefinition: true)
+!17 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 120, elements: !2)
+!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression())
+!19 = distinct !DIGlobalVariable(scope: null, file: !6, line: 48, type: !14, isLocal: true, isDefinition: true)
+!20 = !DIGlobalVariableExpression(var: !21, expr: !DIExpression())
+!21 = distinct !DIGlobalVariable(scope: null, file: !6, line: 49, type: !7, isLocal: true, isDefinition: true)
+!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression())
+!23 = distinct !DIGlobalVariable(scope: null, file: !6, line: 50, type: !24, isLocal: true, isDefinition: true)
+!24 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 96, elements: !2)
+!25 = !DIGlobalVariableExpression(var: !26, expr: !DIExpression())
+!26 = distinct !DIGlobalVariable(scope: null, file: !6, line: 51, type: !27, isLocal: true, isDefinition: true)
+!27 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 112, elements: !2)
+!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression())
+!29 = distinct !DIGlobalVariable(scope: null, file: !6, line: 52, type: !30, isLocal: true, isDefinition: true)
+!30 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 144, elements: !2)
+!31 = !DIGlobalVariableExpression(var: !32, expr: !DIExpression())
+!32 = distinct !DIGlobalVariable(scope: null, file: !6, line: 53, type: !11, isLocal: true, isDefinition: true)
+!33 = !DIGlobalVariableExpression(var: !34, expr: !DIExpression())
+!34 = distinct !DIGlobalVariable(scope: null, file: !6, line: 54, type: !11, isLocal: true, isDefinition: true)
+!35 = !DIGlobalVariableExpression(var: !36, expr: !DIExpression())
+!36 = distinct !DIGlobalVariable(scope: null, file: !6, line: 55, type: !11, isLocal: true, isDefinition: true)
+!37 = !DIGlobalVariableExpression(var: !38, expr: !DIExpression())
+!38 = distinct !DIGlobalVariable(scope: null, file: !6, line: 56, type: !14, isLocal: true, isDefinition: true)
+!39 = !DIGlobalVariableExpression(var: !40, expr: !DIExpression())
+!40 = distinct !DIGlobalVariable(scope: null, file: !6, line: 57, type: !41, isLocal: true, isDefinition: true)
+!41 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 128, elements: !2)
+!42 = !DIGlobalVariableExpression(var: !43, expr: !DIExpression())
+!43 = distinct !DIGlobalVariable(scope: null, file: !6, line: 58, type: !24, isLocal: true, isDefinition: true)
+!44 = !DIGlobalVariableExpression(var: !45, expr: !DIExpression())
+!45 = distinct !DIGlobalVariable(scope: null, file: !6, line: 59, type: !46, isLocal: true, isDefinition: true)
+!46 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 176, elements: !2)
+!47 = !DIGlobalVariableExpression(var: !48, expr: !DIExpression())
+!48 = distinct !DIGlobalVariable(scope: null, file: !6, line: 60, type: !49, isLocal: true, isDefinition: true)
+!49 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 136, elements: !2)
+!50 = !DIGlobalVariableExpression(var: !51, expr: !DIExpression())
+!51 = distinct !DIGlobalVariable(scope: null, file: !6, line: 61, type: !49, isLocal: true, isDefinition: true)
+!52 = !DIGlobalVariableExpression(var: !53, expr: !DIExpression())
+!53 = distinct !DIGlobalVariable(scope: null, file: !6, line: 62, type: !49, isLocal: true, isDefinition: true)
+!54 = !DIGlobalVariableExpression(var: !55, expr: !DIExpression())
+!55 = distinct !DIGlobalVariable(scope: null, file: !6, line: 63, type: !30, isLocal: true, isDefinition: true)
+!56 = !DIGlobalVariableExpression(var: !57, expr: !DIExpression())
+!57 = distinct !DIGlobalVariable(scope: null, file: !6, line: 64, type: !58, isLocal: true, isDefinition: true)
+!58 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 160, elements: !2)
+!59 = !DIGlobalVariableExpression(var: !60, expr: !DIExpression())
+!60 = distinct !DIGlobalVariable(scope: null, file: !6, line: 65, type: !58, isLocal: true, isDefinition: true)
+!61 = !DIGlobalVariableExpression(var: !62, expr: !DIExpression())
+!62 = distinct !DIGlobalVariable(scope: null, file: !6, line: 66, type: !41, isLocal: true, isDefinition: true)
+!63 = !DIGlobalVariableExpression(var: !64, expr: !DIExpression())
+!64 = distinct !DIGlobalVariable(scope: null, file: !6, line: 67, type: !17, isLocal: true, isDefinition: true)
+!65 = !DIGlobalVariableExpression(var: !66, expr: !DIExpression())
+!66 = distinct !DIGlobalVariable(scope: null, file: !6, line: 68, type: !14, isLocal: true, isDefinition: true)
+!67 = !DIGlobalVariableExpression(var: !68, expr: !DIExpression())
+!68 = distinct !DIGlobalVariable(scope: null, file: !6, line: 69, type: !24, isLocal: true, isDefinition: true)
+!69 = !DIGlobalVariableExpression(var: !70, expr: !DIExpression())
+!70 = distinct !DIGlobalVariable(scope: null, file: !6, line: 70, type: !71, isLocal: true, isDefinition: true)
+!71 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 104, elements: !2)
+!72 = !DIGlobalVariableExpression(var: !73, expr: !DIExpression())
+!73 = distinct !DIGlobalVariable(scope: null, file: !6, line: 71, type: !30, isLocal: true, isDefinition: true)
+!74 = !DIGlobalVariableExpression(var: !75, expr: !DIExpression())
+!75 = distinct !DIGlobalVariable(scope: null, file: !6, line: 72, type: !14, isLocal: true, isDefinition: true)
+!76 = !DIGlobalVariableExpression(var: !77, expr: !DIExpression())
+!77 = distinct !DIGlobalVariable(scope: null, file: !6, line: 73, type: !27, isLocal: true, isDefinition: true)
+!78 = !DIGlobalVariableExpression(var: !79, expr: !DIExpression())
+!79 = distinct !DIGlobalVariable(scope: null, file: !6, line: 74, type: !80, isLocal: true, isDefinition: true)
+!80 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 192, elements: !2)
+!81 = !DIGlobalVariableExpression(var: !82, expr: !DIExpression())
+!82 = distinct !DIGlobalVariable(scope: null, file: !6, line: 75, type: !14, isLocal: true, isDefinition: true)
+!83 = !DIGlobalVariableExpression(var: !84, expr: !DIExpression())
+!84 = distinct !DIGlobalVariable(scope: null, file: !6, line: 76, type: !30, isLocal: true, isDefinition: true)
+!85 = !DIGlobalVariableExpression(var: !86, expr: !DIExpression())
+!86 = distinct !DIGlobalVariable(scope: null, file: !6, line: 77, type: !7, isLocal: true, isDefinition: true)
+!87 = !DIGlobalVariableExpression(var: !88, expr: !DIExpression())
+!88 = distinct !DIGlobalVariable(scope: null, file: !6, line: 78, type: !14, isLocal: true, isDefinition: true)
+!89 = !DIGlobalVariableExpression(var: !90, expr: !DIExpression())
+!90 = distinct !DIGlobalVariable(scope: null, file: !6, line: 79, type: !14, isLocal: true, isDefinition: true)
+!91 = !DIGlobalVariableExpression(var: !92, expr: !DIExpression())
+!92 = distinct !DIGlobalVariable(scope: null, file: !6, line: 80, type: !24, isLocal: true, isDefinition: true)
+!93 = !DIGlobalVariableExpression(var: !94, expr: !DIExpression())
+!94 = distinct !DIGlobalVariable(scope: null, file: !6, line: 81, type: !27, isLocal: true, isDefinition: true)
+!95 = !DIGlobalVariableExpression(var: !96, expr: !DIExpression())
+!96 = distinct !DIGlobalVariable(scope: null, file: !6, line: 82, type: !27, isLocal: true, isDefinition: true)
+!97 = !DIGlobalVariableExpression(var: !98, expr: !DIExpression())
+!98 = distinct !DIGlobalVariable(scope: null, file: !6, line: 83, type: !17, isLocal: true, isDefinition: true)
+!99 = !DIGlobalVariableExpression(var: !100, expr: !DIExpression())
+!100 = distinct !DIGlobalVariable(scope: null, file: !6, line: 84, type: !41, isLocal: true, isDefinition: true)
+!101 = !DIGlobalVariableExpression(var: !102, expr: !DIExpression())
+!102 = distinct !DIGlobalVariable(scope: null, file: !6, line: 85, type: !17, isLocal: true, isDefinition: true)
+!103 = !DIGlobalVariableExpression(var: !104, expr: !DIExpression())
+!104 = distinct !DIGlobalVariable(scope: null, file: !6, line: 86, type: !58, isLocal: true, isDefinition: true)
+!105 = !DIGlobalVariableExpression(var: !106, expr: !DIExpression())
+!106 = distinct !DIGlobalVariable(scope: null, file: !6, line: 87, type: !107, isLocal: true, isDefinition: true)
+!107 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 168, elements: !2)
+!108 = !DIGlobalVariableExpression(var: !109, expr: !DIExpression())
+!109 = distinct !DIGlobalVariable(scope: null, file: !6, line: 88, type: !14, isLocal: true, isDefinition: true)
+!110 = !DIGlobalVariableExpression(var: !111, expr: !DIExpression())
+!111 = distinct !DIGlobalVariable(scope: null, file: !6, line: 89, type: !7, isLocal: true, isDefinition: true)
+!112 = !DIGlobalVariableExpression(var: !113, expr: !DIExpression())
+!113 = distinct !DIGlobalVariable(scope: null, file: !6, line: 90, type: !14, isLocal: true, isDefinition: true)
+!114 = !DIGlobalVariableExpression(var: !115, expr: !DIExpression())
+!115 = distinct !DIGlobalVariable(scope: null, file: !6, line: 91, type: !14, isLocal: true, isDefinition: true)
+!116 = !DIGlobalVariableExpression(var: !117, expr: !DIExpression())
+!117 = distinct !DIGlobalVariable(scope: null, file: !6, line: 92, type: !17, isLocal: true, isDefinition: true)
+!118 = !DIGlobalVariableExpression(var: !119, expr: !DIExpression())
+!119 = distinct !DIGlobalVariable(scope: null, file: !6, line: 93, type: !7, isLocal: true, isDefinition: true)
+!120 = !DIGlobalVariableExpression(var: !121, expr: !DIExpression())
+!121 = distinct !DIGlobalVariable(scope: null, file: !6, line: 94, type: !41, isLocal: true, isDefinition: true)
+!122 = !DIGlobalVariableExpression(var: !123, expr: !DIExpression())
+!123 = distinct !DIGlobalVariable(scope: null, file: !6, line: 95, type: !41, isLocal: true, isDefinition: true)
+!124 = !DIGlobalVariableExpression(var: !125, expr: !DIExpression())
+!125 = distinct !DIGlobalVariable(scope: null, file: !6, line: 96, type: !7, isLocal: true, isDefinition: true)
+!126 = !DIGlobalVariableExpression(var: !127, expr: !DIExpression())
+!127 = distinct !DIGlobalVariable(scope: null, file: !6, line: 97, type: !24, isLocal: true, isDefinition: true)
+!128 = !DIGlobalVariableExpression(var: !129, expr: !DIExpression())
+!129 = distinct !DIGlobalVariable(scope: null, file: !6, line: 98, type: !27, isLocal: true, isDefinition: true)
+!130 = !DIGlobalVariableExpression(var: !131, expr: !DIExpression())
+!131 = distinct !DIGlobalVariable(scope: null, file: !6, line: 99, type: !49, isLocal: true, isDefinition: true)
+!132 = !DIGlobalVariableExpression(var: !133, expr: !DIExpression())
+!133 = distinct !DIGlobalVariable(scope: null, file: !6, line: 100, type: !41, isLocal: true, isDefinition: true)
+!134 = !DIGlobalVariableExpression(var: !135, expr: !DIExpression())
+!135 = distinct !DIGlobalVariable(scope: null, file: !6, line: 101, type: !41, isLocal: true, isDefinition: true)
+!136 = !DIGlobalVariableExpression(var: !137, expr: !DIExpression())
+!137 = distinct !DIGlobalVariable(scope: null, file: !6, line: 102, type: !17, isLocal: true, isDefinition: true)
+!138 = !DIGlobalVariableExpression(var: !139, expr: !DIExpression())
+!139 = distinct !DIGlobalVariable(scope: null, file: !6, line: 103, type: !17, isLocal: true, isDefinition: true)
+!140 = !DIGlobalVariableExpression(var: !141, expr: !DIExpression())
+!141 = distinct !DIGlobalVariable(scope: null, file: !6, line: 104, type: !17, isLocal: true, isDefinition: true)
+!142 = !DIGlobalVariableExpression(var: !143, expr: !DIExpression())
+!143 = distinct !DIGlobalVariable(scope: null, file: !6, line: 105, type: !17, isLocal: true, isDefinition: true)
+!144 = !DIGlobalVariableExpression(var: !145, expr: !DIExpression())
+!145 = distinct !DIGlobalVariable(scope: null, file: !6, line: 106, type: !46, isLocal: true, isDefinition: true)
+!146 = !DIGlobalVariableExpression(var: !147, expr: !DIExpression())
+!147 = distinct !DIGlobalVariable(scope: null, file: !6, line: 107, type: !148, isLocal: true, isDefinition: true)
+!148 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 152, elements: !2)
+!149 = !DIGlobalVariableExpression(var: !150, expr: !DIExpression())
+!150 = distinct !DIGlobalVariable(scope: null, file: !6, line: 108, type: !58, isLocal: true, isDefinition: true)
+!151 = !DIGlobalVariableExpression(var: !152, expr: !DIExpression())
+!152 = distinct !DIGlobalVariable(scope: null, file: !6, line: 109, type: !148, isLocal: true, isDefinition: true)
+!153 = !DIGlobalVariableExpression(var: !154, expr: !DIExpression())
+!154 = distinct !DIGlobalVariable(scope: null, file: !6, line: 110, type: !107, isLocal: true, isDefinition: true)
+!155 = !DIGlobalVariableExpression(var: !156, expr: !DIExpression())
+!156 = distinct !DIGlobalVariable(scope: null, file: !6, line: 111, type: !157, isLocal: true, isDefinition: true)
+!157 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 184, elements: !2)
+!158 = !DIGlobalVariableExpression(var: !159, expr: !DIExpression())
+!159 = distinct !DIGlobalVariable(scope: null, file: !6, line: 112, type: !7, isLocal: true, isDefinition: true)
+!160 = !DIGlobalVariableExpression(var: !161, expr: !DIExpression())
+!161 = distinct !DIGlobalVariable(scope: null, file: !6, line: 113, type: !148, isLocal: true, isDefinition: true)
+!162 = !DIGlobalVariableExpression(var: !163, expr: !DIExpression())
+!163 = distinct !DIGlobalVariable(scope: null, file: !6, line: 116, type: !58, isLocal: true, isDefinition: true)
+!164 = !DIGlobalVariableExpression(var: !165, expr: !DIExpression())
+!165 = distinct !DIGlobalVariable(scope: null, file: !6, line: 119, type: !41, isLocal: true, isDefinition: true)
+!166 = !DIGlobalVariableExpression(var: !167, expr: !DIExpression())
+!167 = distinct !DIGlobalVariable(scope: null, file: !6, line: 122, type: !14, isLocal: true, isDefinition: true)
+!168 = !DIGlobalVariableExpression(var: !169, expr: !DIExpression())
+!169 = distinct !DIGlobalVariable(scope: null, file: !6, line: 123, type: !14, isLocal: true, isDefinition: true)
+!170 = !DIGlobalVariableExpression(var: !171, expr: !DIExpression())
+!171 = distinct !DIGlobalVariable(scope: null, file: !6, line: 124, type: !14, isLocal: true, isDefinition: true)
+!172 = !DIGlobalVariableExpression(var: !173, expr: !DIExpression())
+!173 = distinct !DIGlobalVariable(scope: null, file: !6, line: 125, type: !58, isLocal: true, isDefinition: true)
+!174 = !DIGlobalVariableExpression(var: !175, expr: !DIExpression())
+!175 = distinct !DIGlobalVariable(scope: null, file: !6, line: 126, type: !27, isLocal: true, isDefinition: true)
+!176 = !DIGlobalVariableExpression(var: !177, expr: !DIExpression())
+!177 = distinct !DIGlobalVariable(scope: null, file: !6, line: 128, type: !17, isLocal: true, isDefinition: true)
+!178 = !DIGlobalVariableExpression(var: !179, expr: !DIExpression())
+!179 = distinct !DIGlobalVariable(scope: null, file: !6, line: 129, type: !58, isLocal: true, isDefinition: true)
+!180 = !DIGlobalVariableExpression(var: !181, expr: !DIExpression())
+!181 = distinct !DIGlobalVariable(scope: null, file: !6, line: 130, type: !58, isLocal: true, isDefinition: true)
+!182 = !DIGlobalVariableExpression(var: !183, expr: !DIExpression())
+!183 = distinct !DIGlobalVariable(scope: null, file: !6, line: 131, type: !58, isLocal: true, isDefinition: true)
+!184 = !DIGlobalVariableExpression(var: !185, expr: !DIExpression())
+!185 = distinct !DIGlobalVariable(scope: null, file: !6, line: 132, type: !41, isLocal: true, isDefinition: true)
+!186 = !DIGlobalVariableExpression(var: !187, expr: !DIExpression())
+!187 = distinct !DIGlobalVariable(scope: null, file: !6, line: 133, type: !14, isLocal: true, isDefinition: true)
+!188 = !DIGlobalVariableExpression(var: !189, expr: !DIExpression())
+!189 = distinct !DIGlobalVariable(scope: null, file: !6, line: 134, type: !14, isLocal: true, isDefinition: true)
+!190 = !DIGlobalVariableExpression(var: !191, expr: !DIExpression())
+!191 = distinct !DIGlobalVariable(scope: null, file: !6, line: 135, type: !14, isLocal: true, isDefinition: true)
+!192 = !DIGlobalVariableExpression(var: !193, expr: !DIExpression())
+!193 = distinct !DIGlobalVariable(scope: null, file: !6, line: 136, type: !49, isLocal: true, isDefinition: true)
+!194 = !DIGlobalVariableExpression(var: !195, expr: !DIExpression())
+!195 = distinct !DIGlobalVariable(scope: null, file: !6, line: 137, type: !30, isLocal: true, isDefinition: true)
+!196 = !DIGlobalVariableExpression(var: !197, expr: !DIExpression())
+!197 = distinct !DIGlobalVariable(scope: null, file: !6, line: 139, type: !107, isLocal: true, isDefinition: true)
+!198 = !DIGlobalVariableExpression(var: !199, expr: !DIExpression())
+!199 = distinct !DIGlobalVariable(scope: null, file: !6, line: 140, type: !58, isLocal: true, isDefinition: true)
+!200 = !DIGlobalVariableExpression(var: !201, expr: !DIExpression())
+!201 = distinct !DIGlobalVariable(scope: null, file: !6, line: 141, type: !107, isLocal: true, isDefinition: true)
+!202 = !DIGlobalVariableExpression(var: !203, expr: !DIExpression())
+!203 = distinct !DIGlobalVariable(scope: null, file: !6, line: 143, type: !71, isLocal: true, isDefinition: true)
+!204 = !DIGlobalVariableExpression(var: !205, expr: !DIExpression())
+!205 = distinct !DIGlobalVariable(scope: null, file: !6, line: 144, type: !24, isLocal: true, isDefinition: true)
+!206 = !DIGlobalVariableExpression(var: !207, expr: !DIExpression())
+!207 = distinct !DIGlobalVariable(scope: null, file: !6, line: 146, type: !24, isLocal: true, isDefinition: true)
+!208 = !DIGlobalVariableExpression(var: !209, expr: !DIExpression())
+!209 = distinct !DIGlobalVariable(scope: null, file: !6, line: 148, type: !210, isLocal: true, isDefinition: true)
+!210 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 336, elements: !2)
+!211 = !DIGlobalVariableExpression(var: !212, expr: !DIExpression())
+!212 = distinct !DIGlobalVariable(scope: null, file: !6, line: 149, type: !213, isLocal: true, isDefinition: true)
+!213 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 208, elements: !2)
+!214 = !DIGlobalVariableExpression(var: !215, expr: !DIExpression())
+!215 = distinct !DIGlobalVariable(scope: null, file: !6, line: 150, type: !107, isLocal: true, isDefinition: true)
+!216 = !DIGlobalVariableExpression(var: !217, expr: !DIExpression())
+!217 = distinct !DIGlobalVariable(scope: null, file: !6, line: 152, type: !148, isLocal: true, isDefinition: true)
+!218 = !DIGlobalVariableExpression(var: !219, expr: !DIExpression())
+!219 = distinct !DIGlobalVariable(scope: null, file: !6, line: 153, type: !107, isLocal: true, isDefinition: true)
+!220 = !DIGlobalVariableExpression(var: !221, expr: !DIExpression())
+!221 = distinct !DIGlobalVariable(scope: null, file: !6, line: 154, type: !157, isLocal: true, isDefinition: true)
+!222 = !DIGlobalVariableExpression(var: !223, expr: !DIExpression())
+!223 = distinct !DIGlobalVariable(scope: null, file: !6, line: 155, type: !30, isLocal: true, isDefinition: true)
+!224 = !DIGlobalVariableExpression(var: !225, expr: !DIExpression())
+!225 = distinct !DIGlobalVariable(scope: null, file: !6, line: 156, type: !17, isLocal: true, isDefinition: true)
+!226 = !DIGlobalVariableExpression(var: !227, expr: !DIExpression())
+!227 = distinct !DIGlobalVariable(scope: null, file: !6, line: 157, type: !148, isLocal: true, isDefinition: true)
+!228 = !DIGlobalVariableExpression(var: !229, expr: !DIExpression())
+!229 = distinct !DIGlobalVariable(scope: null, file: !6, line: 158, type: !27, isLocal: true, isDefinition: true)
+!230 = !DIGlobalVariableExpression(var: !231, expr: !DIExpression())
+!231 = distinct !DIGlobalVariable(scope: null, file: !6, line: 159, type: !148, isLocal: true, isDefinition: true)
+!232 = !DIGlobalVariableExpression(var: !233, expr: !DIExpression())
+!233 = distinct !DIGlobalVariable(scope: null, file: !6, line: 161, type: !157, isLocal: true, isDefinition: true)
+!234 = !DIGlobalVariableExpression(var: !235, expr: !DIExpression())
+!235 = distinct !DIGlobalVariable(scope: null, file: !6, line: 162, type: !148, isLocal: true, isDefinition: true)
+!236 = !DIGlobalVariableExpression(var: !237, expr: !DIExpression())
+!237 = distinct !DIGlobalVariable(scope: null, file: !6, line: 163, type: !148, isLocal: true, isDefinition: true)
+!238 = !DIGlobalVariableExpression(var: !239, expr: !DIExpression())
+!239 = distinct !DIGlobalVariable(scope: null, file: !6, line: 164, type: !157, isLocal: true, isDefinition: true)
+!240 = !DIGlobalVariableExpression(var: !241, expr: !DIExpression())
+!241 = distinct !DIGlobalVariable(scope: null, file: !6, line: 165, type: !80, isLocal: true, isDefinition: true)
+!242 = !DIGlobalVariableExpression(var: !243, expr: !DIExpression())
+!243 = distinct !DIGlobalVariable(scope: null, file: !6, line: 166, type: !49, isLocal: true, isDefinition: true)
+!244 = !DIGlobalVariableExpression(var: !245, expr: !DIExpression())
+!245 = distinct !DIGlobalVariable(scope: null, file: !6, line: 167, type: !58, isLocal: true, isDefinition: true)
+!246 = !DIGlobalVariableExpression(var: !247, expr: !DIExpression())
+!247 = distinct !DIGlobalVariable(scope: null, file: !6, line: 170, type: !157, isLocal: true, isDefinition: true)
+!248 = !DIGlobalVariableExpression(var: !249, expr: !DIExpression())
+!249 = distinct !DIGlobalVariable(scope: null, file: !6, line: 171, type: !58, isLocal: true, isDefinition: true)
+!250 = !DIGlobalVariableExpression(var: !251, expr: !DIExpression())
+!251 = distinct !DIGlobalVariable(scope: null, file: !6, line: 172, type: !58, isLocal: true, isDefinition: true)
+!252 = !DIGlobalVariableExpression(var: !253, expr: !DIExpression())
+!253 = distinct !DIGlobalVariable(scope: null, file: !6, line: 173, type: !17, isLocal: true, isDefinition: true)
+!254 = !DIGlobalVariableExpression(var: !255, expr: !DIExpression())
+!255 = distinct !DIGlobalVariable(scope: null, file: !6, line: 175, type: !256, isLocal: true, isDefinition: true)
+!256 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 200, elements: !2)
+!257 = !DIGlobalVariableExpression(var: !258, expr: !DIExpression())
+!258 = distinct !DIGlobalVariable(scope: null, file: !6, line: 176, type: !30, isLocal: true, isDefinition: true)
+!259 = !DIGlobalVariableExpression(var: !260, expr: !DIExpression())
+!260 = distinct !DIGlobalVariable(scope: null, file: !6, line: 177, type: !80, isLocal: true, isDefinition: true)
+!261 = !DIGlobalVariableExpression(var: !262, expr: !DIExpression())
+!262 = distinct !DIGlobalVariable(scope: null, file: !6, line: 178, type: !107, isLocal: true, isDefinition: true)
+!263 = !DIGlobalVariableExpression(var: !264, expr: !DIExpression())
+!264 = distinct !DIGlobalVariable(scope: null, file: !6, line: 179, type: !148, isLocal: true, isDefinition: true)
+!265 = !DIGlobalVariableExpression(var: !266, expr: !DIExpression())
+!266 = distinct !DIGlobalVariable(scope: null, file: !6, line: 180, type: !256, isLocal: true, isDefinition: true)
+!267 = !DIGlobalVariableExpression(var: !268, expr: !DIExpression())
+!268 = distinct !DIGlobalVariable(scope: null, file: !6, line: 181, type: !213, isLocal: true, isDefinition: true)
+!269 = !DIGlobalVariableExpression(var: !270, expr: !DIExpression())
+!270 = distinct !DIGlobalVariable(scope: null, file: !6, line: 183, type: !80, isLocal: true, isDefinition: true)
+!271 = !DIGlobalVariableExpression(var: !272, expr: !DIExpression())
+!272 = distinct !DIGlobalVariable(scope: null, file: !6, line: 184, type: !107, isLocal: true, isDefinition: true)
+!273 = !DIGlobalVariableExpression(var: !274, expr: !DIExpression())
+!274 = distinct !DIGlobalVariable(scope: null, file: !6, line: 185, type: !275, isLocal: true, isDefinition: true)
+!275 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 272, elements: !2)
+!276 = !DIGlobalVariableExpression(var: !277, expr: !DIExpression())
+!277 = distinct !DIGlobalVariable(scope: null, file: !6, line: 186, type: !278, isLocal: true, isDefinition: true)
+!278 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 248, elements: !2)
+!279 = !DIGlobalVariableExpression(var: !280, expr: !DIExpression())
+!280 = distinct !DIGlobalVariable(scope: null, file: !6, line: 187, type: !256, isLocal: true, isDefinition: true)
+!281 = !DIGlobalVariableExpression(var: !282, expr: !DIExpression())
+!282 = distinct !DIGlobalVariable(scope: null, file: !6, line: 189, type: !58, isLocal: true, isDefinition: true)
+!283 = !DIGlobalVariableExpression(var: !284, expr: !DIExpression())
+!284 = distinct !DIGlobalVariable(scope: null, file: !6, line: 190, type: !46, isLocal: true, isDefinition: true)
+!285 = !DIGlobalVariableExpression(var: !286, expr: !DIExpression())
+!286 = distinct !DIGlobalVariable(scope: null, file: !6, line: 191, type: !49, isLocal: true, isDefinition: true)
+!287 = !DIGlobalVariableExpression(var: !288, expr: !DIExpression())
+!288 = distinct !DIGlobalVariable(scope: null, file: !6, line: 192, type: !27, isLocal: true, isDefinition: true)
+!289 = !DIGlobalVariableExpression(var: !290, expr: !DIExpression())
+!290 = distinct !DIGlobalVariable(scope: null, file: !6, line: 194, type: !41, isLocal: true, isDefinition: true)
+!291 = !DIGlobalVariableExpression(var: !292, expr: !DIExpression())
+!292 = distinct !DIGlobalVariable(scope: null, file: !6, line: 196, type: !30, isLocal: true, isDefinition: true)
+!293 = !DIGlobalVariableExpression(var: !294, expr: !DIExpression())
+!294 = distinct !DIGlobalVariable(scope: null, file: !6, line: 197, type: !49, isLocal: true, isDefinition: true)
+!295 = !DIGlobalVariableExpression(var: !296, expr: !DIExpression())
+!296 = distinct !DIGlobalVariable(scope: null, file: !6, line: 199, type: !49, isLocal: true, isDefinition: true)
+!297 = !DIGlobalVariableExpression(var: !298, expr: !DIExpression())
+!298 = distinct !DIGlobalVariable(scope: null, file: !6, line: 200, type: !49, isLocal: true, isDefinition: true)
+!299 = !DIGlobalVariableExpression(var: !300, expr: !DIExpression())
+!300 = distinct !DIGlobalVariable(scope: null, file: !6, line: 201, type: !49, isLocal: true, isDefinition: true)
+!301 = !DIGlobalVariableExpression(var: !302, expr: !DIExpression())
+!302 = distinct !DIGlobalVariable(scope: null, file: !6, line: 202, type: !303, isLocal: true, isDefinition: true)
+!303 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 64, elements: !2)
+!304 = !DIGlobalVariableExpression(var: !305, expr: !DIExpression())
+!305 = distinct !DIGlobalVariable(scope: null, file: !6, line: 204, type: !30, isLocal: true, isDefinition: true)
+!306 = !DIGlobalVariableExpression(var: !307, expr: !DIExpression())
+!307 = distinct !DIGlobalVariable(scope: null, file: !6, line: 205, type: !303, isLocal: true, isDefinition: true)
+!308 = !DIGlobalVariableExpression(var: !309, expr: !DIExpression())
+!309 = distinct !DIGlobalVariable(scope: null, file: !6, line: 206, type: !14, isLocal: true, isDefinition: true)
+!310 = !DIGlobalVariableExpression(var: !311, expr: !DIExpression())
+!311 = distinct !DIGlobalVariable(scope: null, file: !6, line: 207, type: !14, isLocal: true, isDefinition: true)
+!312 = !DIGlobalVariableExpression(var: !313, expr: !DIExpression())
+!313 = distinct !DIGlobalVariable(scope: null, file: !6, line: 208, type: !24, isLocal: true, isDefinition: true)
+!314 = !DIGlobalVariableExpression(var: !315, expr: !DIExpression())
+!315 = distinct !DIGlobalVariable(scope: null, file: !6, line: 209, type: !71, isLocal: true, isDefinition: true)
+!316 = !DIGlobalVariableExpression(var: !317, expr: !DIExpression())
+!317 = distinct !DIGlobalVariable(scope: null, file: !6, line: 210, type: !49, isLocal: true, isDefinition: true)
+!318 = !DIGlobalVariableExpression(var: !319, expr: !DIExpression())
+!319 = distinct !DIGlobalVariable(scope: null, file: !6, line: 211, type: !30, isLocal: true, isDefinition: true)
+!320 = !DIGlobalVariableExpression(var: !321, expr: !DIExpression())
+!321 = distinct !DIGlobalVariable(scope: null, file: !6, line: 212, type: !30, isLocal: true, isDefinition: true)
+!322 = !DIGlobalVariableExpression(var: !323, expr: !DIExpression())
+!323 = distinct !DIGlobalVariable(scope: null, file: !6, line: 213, type: !30, isLocal: true, isDefinition: true)
+!324 = !DIGlobalVariableExpression(var: !325, expr: !DIExpression())
+!325 = distinct !DIGlobalVariable(scope: null, file: !6, line: 214, type: !30, isLocal: true, isDefinition: true)
+!326 = !DIGlobalVariableExpression(var: !327, expr: !DIExpression())
+!327 = distinct !DIGlobalVariable(scope: null, file: !6, line: 215, type: !30, isLocal: true, isDefinition: true)
+!328 = !DIGlobalVariableExpression(var: !329, expr: !DIExpression())
+!329 = distinct !DIGlobalVariable(scope: null, file: !6, line: 216, type: !27, isLocal: true, isDefinition: true)
+!330 = !DIGlobalVariableExpression(var: !331, expr: !DIExpression())
+!331 = distinct !DIGlobalVariable(scope: null, file: !6, line: 217, type: !27, isLocal: true, isDefinition: true)
+!332 = !DIGlobalVariableExpression(var: !333, expr: !DIExpression())
+!333 = distinct !DIGlobalVariable(scope: null, file: !6, line: 219, type: !24, isLocal: true, isDefinition: true)
+!334 = !DIGlobalVariableExpression(var: !335, expr: !DIExpression())
+!335 = distinct !DIGlobalVariable(scope: null, file: !6, line: 220, type: !256, isLocal: true, isDefinition: true)
+!336 = !DIGlobalVariableExpression(var: !337, expr: !DIExpression())
+!337 = distinct !DIGlobalVariable(scope: null, file: !6, line: 221, type: !80, isLocal: true, isDefinition: true)
+!338 = !DIGlobalVariableExpression(var: !339, expr: !DIExpression())
+!339 = distinct !DIGlobalVariable(scope: null, file: !6, line: 222, type: !80, isLocal: true, isDefinition: true)
+!340 = !DIGlobalVariableExpression(var: !341, expr: !DIExpression())
+!341 = distinct !DIGlobalVariable(scope: null, file: !6, line: 223, type: !80, isLocal: true, isDefinition: true)
+!342 = !DIGlobalVariableExpression(var: !343, expr: !DIExpression())
+!343 = distinct !DIGlobalVariable(scope: null, file: !6, line: 224, type: !80, isLocal: true, isDefinition: true)
+!344 = !DIGlobalVariableExpression(var: !345, expr: !DIExpression())
+!345 = distinct !DIGlobalVariable(scope: null, file: !6, line: 225, type: !80, isLocal: true, isDefinition: true)
+!346 = !DIGlobalVariableExpression(var: !347, expr: !DIExpression())
+!347 = distinct !DIGlobalVariable(scope: null, file: !6, line: 226, type: !80, isLocal: true, isDefinition: true)
+!348 = !DIGlobalVariableExpression(var: !349, expr: !DIExpression())
+!349 = distinct !DIGlobalVariable(scope: null, file: !6, line: 227, type: !80, isLocal: true, isDefinition: true)
+!350 = !DIGlobalVariableExpression(var: !351, expr: !DIExpression())
+!351 = distinct !DIGlobalVariable(scope: null, file: !6, line: 228, type: !80, isLocal: true, isDefinition: true)
+!352 = !DIGlobalVariableExpression(var: !353, expr: !DIExpression())
+!353 = distinct !DIGlobalVariable(scope: null, file: !6, line: 230, type: !7, isLocal: true, isDefinition: true)
+!354 = !DIGlobalVariableExpression(var: !355, expr: !DIExpression())
+!355 = distinct !DIGlobalVariable(scope: null, file: !6, line: 232, type: !11, isLocal: true, isDefinition: true)
+!356 = !DIGlobalVariableExpression(var: !357, expr: !DIExpression())
+!357 = distinct !DIGlobalVariable(scope: null, file: !6, line: 233, type: !7, isLocal: true, isDefinition: true)
+!358 = !DIGlobalVariableExpression(var: !359, expr: !DIExpression())
+!359 = distinct !DIGlobalVariable(scope: null, file: !6, line: 235, type: !24, isLocal: true, isDefinition: true)
+!360 = !DIGlobalVariableExpression(var: !361, expr: !DIExpression())
+!361 = distinct !DIGlobalVariable(scope: null, file: !6, line: 236, type: !148, isLocal: true, isDefinition: true)
+!362 = !DIGlobalVariableExpression(var: !363, expr: !DIExpression())
+!363 = distinct !DIGlobalVariable(scope: null, file: !6, line: 237, type: !58, isLocal: true, isDefinition: true)
+!364 = !DIGlobalVariableExpression(var: !365, expr: !DIExpression())
+!365 = distinct !DIGlobalVariable(scope: null, file: !6, line: 238, type: !71, isLocal: true, isDefinition: true)
+!366 = !DIGlobalVariableExpression(var: !367, expr: !DIExpression())
+!367 = distinct !DIGlobalVariable(scope: null, file: !6, line: 239, type: !17, isLocal: true, isDefinition: true)
+!368 = !DIGlobalVariableExpression(var: !369, expr: !DIExpression())
+!369 = distinct !DIGlobalVariable(scope: null, file: !6, line: 240, type: !30, isLocal: true, isDefinition: true)
+!370 = !DIGlobalVariableExpression(var: !371, expr: !DIExpression())
+!371 = distinct !DIGlobalVariable(scope: null, file: !6, line: 241, type: !30, isLocal: true, isDefinition: true)
+!372 = !DIGlobalVariableExpression(var: !373, expr: !DIExpression())
+!373 = distinct !DIGlobalVariable(scope: null, file: !6, line: 242, type: !30, isLocal: true, isDefinition: true)
+!374 = !DIGlobalVariableExpression(var: !375, expr: !DIExpression())
+!375 = distinct !DIGlobalVariable(scope: null, file: !6, line: 243, type: !71, isLocal: true, isDefinition: true)
+!376 = !DIGlobalVariableExpression(var: !377, expr: !DIExpression())
+!377 = distinct !DIGlobalVariable(scope: null, file: !6, line: 244, type: !148, isLocal: true, isDefinition: true)
+!378 = !DIGlobalVariableExpression(var: !379, expr: !DIExpression())
+!379 = distinct !DIGlobalVariable(scope: null, file: !6, line: 245, type: !17, isLocal: true, isDefinition: true)
+!380 = !DIGlobalVariableExpression(var: !381, expr: !DIExpression())
+!381 = distinct !DIGlobalVariable(scope: null, file: !6, line: 246, type: !107, isLocal: true, isDefinition: true)
+!382 = !DIGlobalVariableExpression(var: !383, expr: !DIExpression())
+!383 = distinct !DIGlobalVariable(scope: null, file: !6, line: 249, type: !17, isLocal: true, isDefinition: true)
+!384 = !DIGlobalVariableExpression(var: !385, expr: !DIExpression())
+!385 = distinct !DIGlobalVariable(scope: null, file: !6, line: 252, type: !71, isLocal: true, isDefinition: true)
+!386 = !DIGlobalVariableExpression(var: !387, expr: !DIExpression())
+!387 = distinct !DIGlobalVariable(scope: null, file: !6, line: 253, type: !17, isLocal: true, isDefinition: true)
+!388 = !DIGlobalVariableExpression(var: !389, expr: !DIExpression())
+!389 = distinct !DIGlobalVariable(scope: null, file: !6, line: 254, type: !14, isLocal: true, isDefinition: true)
+!390 = !DIGlobalVariableExpression(var: !391, expr: !DIExpression())
+!391 = distinct !DIGlobalVariable(scope: null, file: !6, line: 255, type: !11, isLocal: true, isDefinition: true)
+!392 = !DIGlobalVariableExpression(var: !393, expr: !DIExpression())
+!393 = distinct !DIGlobalVariable(scope: null, file: !6, line: 256, type: !7, isLocal: true, isDefinition: true)
+!394 = !DIGlobalVariableExpression(var: !395, expr: !DIExpression())
+!395 = distinct !DIGlobalVariable(scope: null, file: !6, line: 257, type: !7, isLocal: true, isDefinition: true)
+!396 = !DIGlobalVariableExpression(var: !397, expr: !DIExpression())
+!397 = distinct !DIGlobalVariable(scope: null, file: !6, line: 260, type: !398, isLocal: true, isDefinition: true)
+!398 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 256, elements: !2)
+!399 = !DIGlobalVariableExpression(var: !400, expr: !DIExpression())
+!400 = distinct !DIGlobalVariable(scope: null, file: !6, line: 263, type: !80, isLocal: true, isDefinition: true)
+!401 = !DIGlobalVariableExpression(var: !402, expr: !DIExpression())
+!402 = distinct !DIGlobalVariable(scope: null, file: !6, line: 264, type: !30, isLocal: true, isDefinition: true)
+!403 = !DIGlobalVariableExpression(var: !404, expr: !DIExpression())
+!404 = distinct !DIGlobalVariable(scope: null, file: !6, line: 265, type: !30, isLocal: true, isDefinition: true)
+!405 = !DIGlobalVariableExpression(var: !406, expr: !DIExpression())
+!406 = distinct !DIGlobalVariable(scope: null, file: !6, line: 266, type: !30, isLocal: true, isDefinition: true)
+!407 = !DIGlobalVariableExpression(var: !408, expr: !DIExpression())
+!408 = distinct !DIGlobalVariable(scope: null, file: !6, line: 267, type: !148, isLocal: true, isDefinition: true)
+!409 = !DIGlobalVariableExpression(var: !410, expr: !DIExpression())
+!410 = distinct !DIGlobalVariable(scope: null, file: !6, line: 268, type: !148, isLocal: true, isDefinition: true)
+!411 = !DIGlobalVariableExpression(var: !412, expr: !DIExpression())
+!412 = distinct !DIGlobalVariable(scope: null, file: !6, line: 269, type: !107, isLocal: true, isDefinition: true)
+!413 = !DIGlobalVariableExpression(var: !414, expr: !DIExpression())
+!414 = distinct !DIGlobalVariable(scope: null, file: !6, line: 271, type: !148, isLocal: true, isDefinition: true)
+!415 = !DIGlobalVariableExpression(var: !416, expr: !DIExpression())
+!416 = distinct !DIGlobalVariable(scope: null, file: !6, line: 272, type: !148, isLocal: true, isDefinition: true)
+!417 = !DIGlobalVariableExpression(var: !418, expr: !DIExpression())
+!418 = distinct !DIGlobalVariable(scope: null, file: !6, line: 273, type: !148, isLocal: true, isDefinition: true)
+!419 = !DIGlobalVariableExpression(var: !420, expr: !DIExpression())
+!420 = distinct !DIGlobalVariable(scope: null, file: !6, line: 274, type: !58, isLocal: true, isDefinition: true)
+!421 = !DIGlobalVariableExpression(var: !422, expr: !DIExpression())
+!422 = distinct !DIGlobalVariable(scope: null, file: !6, line: 275, type: !58, isLocal: true, isDefinition: true)
+!423 = !DIGlobalVariableExpression(var: !424, expr: !DIExpression())
+!424 = distinct !DIGlobalVariable(scope: null, file: !6, line: 276, type: !46, isLocal: true, isDefinition: true)
+!425 = !DIGlobalVariableExpression(var: !426, expr: !DIExpression())
+!426 = distinct !DIGlobalVariable(scope: null, file: !6, line: 277, type: !30, isLocal: true, isDefinition: true)
+!427 = !DIGlobalVariableExpression(var: !428, expr: !DIExpression())
+!428 = distinct !DIGlobalVariable(scope: null, file: !6, line: 278, type: !80, isLocal: true, isDefinition: true)
+!429 = !DIGlobalVariableExpression(var: !430, expr: !DIExpression())
+!430 = distinct !DIGlobalVariable(scope: null, file: !6, line: 281, type: !41, isLocal: true, isDefinition: true)
+!431 = !DIGlobalVariableExpression(var: !432, expr: !DIExpression())
+!432 = distinct !DIGlobalVariable(scope: null, file: !6, line: 282, type: !107, isLocal: true, isDefinition: true)
+!433 = !DIGlobalVariableExpression(var: !434, expr: !DIExpression())
+!434 = distinct !DIGlobalVariable(scope: null, file: !6, line: 285, type: !49, isLocal: true, isDefinition: true)
+!435 = !DIGlobalVariableExpression(var: !436, expr: !DIExpression())
+!436 = distinct !DIGlobalVariable(scope: null, file: !6, line: 286, type: !17, isLocal: true, isDefinition: true)
+!437 = !DIGlobalVariableExpression(var: !438, expr: !DIExpression())
+!438 = distinct !DIGlobalVariable(scope: null, file: !6, line: 287, type: !17, isLocal: true, isDefinition: true)
+!439 = !DIGlobalVariableExpression(var: !440, expr: !DIExpression())
+!440 = distinct !DIGlobalVariable(scope: null, file: !6, line: 288, type: !58, isLocal: true, isDefinition: true)
+!441 = !DIGlobalVariableExpression(var: !442, expr: !DIExpression())
+!442 = distinct !DIGlobalVariable(scope: null, file: !6, line: 289, type: !58, isLocal: true, isDefinition: true)
+!443 = !DIGlobalVariableExpression(var: !444, expr: !DIExpression())
+!444 = distinct !DIGlobalVariable(scope: null, file: !6, line: 290, type: !58, isLocal: true, isDefinition: true)
+!445 = !DIGlobalVariableExpression(var: !446, expr: !DIExpression())
+!446 = distinct !DIGlobalVariable(scope: null, file: !6, line: 291, type: !107, isLocal: true, isDefinition: true)
+!447 = !DIGlobalVariableExpression(var: !448, expr: !DIExpression())
+!448 = distinct !DIGlobalVariable(scope: null, file: !6, line: 292, type: !107, isLocal: true, isDefinition: true)
+!449 = !DIGlobalVariableExpression(var: !450, expr: !DIExpression())
+!450 = distinct !DIGlobalVariable(scope: null, file: !6, line: 293, type: !107, isLocal: true, isDefinition: true)
+!451 = !DIGlobalVariableExpression(var: !452, expr: !DIExpression())
+!452 = distinct !DIGlobalVariable(scope: null, file: !6, line: 295, type: !46, isLocal: true, isDefinition: true)
+!453 = !DIGlobalVariableExpression(var: !454, expr: !DIExpression())
+!454 = distinct !DIGlobalVariable(scope: null, file: !6, line: 296, type: !46, isLocal: true, isDefinition: true)
+!455 = !DIGlobalVariableExpression(var: !456, expr: !DIExpression())
+!456 = distinct !DIGlobalVariable(scope: null, file: !6, line: 297, type: !46, isLocal: true, isDefinition: true)
+!457 = !DIGlobalVariableExpression(var: !458, expr: !DIExpression())
+!458 = distinct !DIGlobalVariable(scope: null, file: !6, line: 298, type: !157, isLocal: true, isDefinition: true)
+!459 = !DIGlobalVariableExpression(var: !460, expr: !DIExpression())
+!460 = distinct !DIGlobalVariable(scope: null, file: !6, line: 299, type: !157, isLocal: true, isDefinition: true)
+!461 = !DIGlobalVariableExpression(var: !462, expr: !DIExpression())
+!462 = distinct !DIGlobalVariable(scope: null, file: !6, line: 300, type: !157, isLocal: true, isDefinition: true)
+!463 = !DIGlobalVariableExpression(var: !464, expr: !DIExpression())
+!464 = distinct !DIGlobalVariable(scope: null, file: !6, line: 302, type: !7, isLocal: true, isDefinition: true)
+!465 = !DIGlobalVariableExpression(var: !466, expr: !DIExpression())
+!466 = distinct !DIGlobalVariable(scope: null, file: !6, line: 303, type: !17, isLocal: true, isDefinition: true)
+!467 = !DIGlobalVariableExpression(var: !468, expr: !DIExpression())
+!468 = distinct !DIGlobalVariable(scope: null, file: !6, line: 304, type: !17, isLocal: true, isDefinition: true)
+!469 = !DIGlobalVariableExpression(var: !470, expr: !DIExpression())
+!470 = distinct !DIGlobalVariable(scope: null, file: !6, line: 305, type: !49, isLocal: true, isDefinition: true)
+!471 = !DIGlobalVariableExpression(var: !472, expr: !DIExpression())
+!472 = distinct !DIGlobalVariable(scope: null, file: !6, line: 306, type: !49, isLocal: true, isDefinition: true)
+!473 = !DIGlobalVariableExpression(var: !474, expr: !DIExpression())
+!474 = distinct !DIGlobalVariable(scope: null, file: !6, line: 307, type: !49, isLocal: true, isDefinition: true)
+!475 = !DIGlobalVariableExpression(var: !476, expr: !DIExpression())
+!476 = distinct !DIGlobalVariable(scope: null, file: !6, line: 308, type: !71, isLocal: true, isDefinition: true)
+!477 = !DIGlobalVariableExpression(var: !478, expr: !DIExpression())
+!478 = distinct !DIGlobalVariable(name: "Map", scope: !0, file: !6, line: 43, type: !479, isLocal: false, isDefinition: true)
+!479 = !DICompositeType(tag: DW_TAG_array_type, baseType: !480, size: 100800, elements: !2)
+!480 = !DIDerivedType(tag: DW_TAG_typedef, name: "Mapping", file: !6, line: 30, baseType: !481)
+!481 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !6, line: 22, size: 448, elements: !2)
+!482 = !DIGlobalVariableExpression(var: !483, expr: !DIExpression())
+!483 = distinct !DIGlobalVariable(scope: null, file: !484, line: 98, type: !485, isLocal: true, isDefinition: true)
+!484 = !DIFile(filename: "test-suite/MultiSource/Applications/JM/lencod/configfile.c", directory: "/media/d/work/learn-riscv", checksumkind: CSK_MD5, checksum: "16267042b42445e6a929b0dd473a0b1f")
+!485 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 7648, elements: !2)
+!486 = !DIGlobalVariableExpression(var: !487, expr: !DIExpression())
+!487 = distinct !DIGlobalVariable(scope: null, file: !484, line: 139, type: !24, isLocal: true, isDefinition: true)
+!488 = !DIGlobalVariableExpression(var: !489, expr: !DIExpression())
+!489 = distinct !DIGlobalVariable(scope: null, file: !484, line: 143, type: !278, isLocal: true, isDefinition: true)
+!490 = !DIGlobalVariableExpression(var: !491, expr: !DIExpression())
+!491 = distinct !DIGlobalVariable(scope: null, file: !484, line: 151, type: !492, isLocal: true, isDefinition: true)
+!492 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 24, elements: !2)
+!493 = !DIGlobalVariableExpression(var: !494, expr: !DIExpression())
+!494 = distinct !DIGlobalVariable(scope: null, file: !484, line: 159, type: !492, isLocal: true, isDefinition: true)
+!495 = !DIGlobalVariableExpression(var: !496, expr: !DIExpression())
+!496 = distinct !DIGlobalVariable(scope: null, file: !484, line: 169, type: !46, isLocal: true, isDefinition: true)
+!497 = !DIGlobalVariableExpression(var: !498, expr: !DIExpression())
+!498 = distinct !DIGlobalVariable(scope: null, file: !484, line: 174, type: !499, isLocal: true, isDefinition: true)
+!499 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 16, elements: !2)
+!500 = !DIGlobalVariableExpression(var: !501, expr: !DIExpression())
+!501 = distinct !DIGlobalVariable(scope: null, file: !484, line: 186, type: !492, isLocal: true, isDefinition: true)
+!502 = !DIGlobalVariableExpression(var: !503, expr: !DIExpression())
+!503 = distinct !DIGlobalVariable(scope: null, file: !484, line: 198, type: !492, isLocal: true, isDefinition: true)
+!504 = !DIGlobalVariableExpression(var: !505, expr: !DIExpression())
+!505 = distinct !DIGlobalVariable(scope: null, file: !484, line: 213, type: !148, isLocal: true, isDefinition: true)
+!506 = !DIGlobalVariableExpression(var: !507, expr: !DIExpression())
+!507 = distinct !DIGlobalVariable(scope: null, file: !484, line: 235, type: !508, isLocal: true, isDefinition: true)
+!508 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 264, elements: !2)
+!509 = !DIGlobalVariableExpression(var: !510, expr: !DIExpression())
+!510 = distinct !DIGlobalVariable(scope: null, file: !484, line: 235, type: !303, isLocal: true, isDefinition: true)
+!511 = !DIGlobalVariableExpression(var: !512, expr: !DIExpression())
+!512 = distinct !DIGlobalVariable(scope: null, file: !484, line: 242, type: !513, isLocal: true, isDefinition: true)
+!513 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 632, elements: !2)
+!514 = !DIGlobalVariableExpression(var: !515, expr: !DIExpression())
+!515 = distinct !DIGlobalVariable(scope: null, file: !484, line: 271, type: !499, isLocal: true, isDefinition: true)
+!516 = !DIGlobalVariableExpression(var: !517, expr: !DIExpression())
+!517 = distinct !DIGlobalVariable(scope: null, file: !484, line: 273, type: !518, isLocal: true, isDefinition: true)
+!518 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 280, elements: !2)
+!519 = !DIGlobalVariableExpression(var: !520, expr: !DIExpression())
+!520 = distinct !DIGlobalVariable(scope: null, file: !484, line: 279, type: !521, isLocal: true, isDefinition: true)
+!521 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 312, elements: !2)
+!522 = !DIGlobalVariableExpression(var: !523, expr: !DIExpression())
+!523 = distinct !DIGlobalVariable(scope: null, file: !484, line: 286, type: !524, isLocal: true, isDefinition: true)
+!524 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 568, elements: !2)
+!525 = !DIGlobalVariableExpression(var: !526, expr: !DIExpression())
+!526 = distinct !DIGlobalVariable(scope: null, file: !484, line: 295, type: !213, isLocal: true, isDefinition: true)
+!527 = !DIGlobalVariableExpression(var: !528, expr: !DIExpression())
+!528 = distinct !DIGlobalVariable(name: "color_formats", scope: !0, file: !529, line: 58, type: !530, isLocal: false, isDefinition: true)
+!529 = !DIFile(filename: "test-suite/MultiSource/Applications/JM/lencod/global.h", directory: "/media/d/work/learn-riscv", checksumkind: CSK_MD5, checksum: "90e5940c82e1156c3df954f05627aaff")
+!530 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !529, line: 53, baseType: !531, size: 32, elements: !2)
+!531 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
+!532 = !DIGlobalVariableExpression(var: !533, expr: !DIExpression())
+!533 = distinct !DIGlobalVariable(name: "top_pic", scope: !0, file: !529, line: 487, type: !534, isLocal: false, isDefinition: true)
+!534 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !535, size: 64)
+!535 = !DIDerivedType(tag: DW_TAG_typedef, name: "Picture", file: !529, line: 485, baseType: !536)
+!536 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !529, line: 476, size: 6592, elements: !2)
+!537 = !DIGlobalVariableExpression(var: !538, expr: !DIExpression())
+!538 = distinct !DIGlobalVariable(name: "bottom_pic", scope: !0, file: !529, line: 488, type: !534, isLocal: false, isDefinition: true)
+!539 = !DIGlobalVariableExpression(var: !540, expr: !DIExpression())
+!540 = distinct !DIGlobalVariable(name: "frame_pic", scope: !0, file: !529, line: 489, type: !534, isLocal: false, isDefinition: true)
+!541 = !DIGlobalVariableExpression(var: !542, expr: !DIExpression())
+!542 = distinct !DIGlobalVariable(name: "frame_pic_1", scope: !0, file: !529, line: 490, type: !534, isLocal: false, isDefinition: true)
+!543 = !DIGlobalVariableExpression(var: !544, expr: !DIExpression())
+!544 = distinct !DIGlobalVariable(name: "frame_pic_2", scope: !0, file: !529, line: 491, type: !534, isLocal: false, isDefinition: true)
+!545 = !DIGlobalVariableExpression(var: !546, expr: !DIExpression())
+!546 = distinct !DIGlobalVariable(name: "frame_pic_3", scope: !0, file: !529, line: 492, type: !534, isLocal: false, isDefinition: true)
+!547 = !DIGlobalVariableExpression(var: !548, expr: !DIExpression())
+!548 = distinct !DIGlobalVariable(name: "frame_pic_si", scope: !0, file: !529, line: 493, type: !534, isLocal: false, isDefinition: true)
+!549 = !DIGlobalVariableExpression(var: !550, expr: !DIExpression())
+!550 = distinct !DIGlobalVariable(name: "Bit_Buffer", scope: !0, file: !529, line: 496, type: !551, isLocal: false, isDefinition: true)
+!551 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !552, size: 64)
+!552 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed)
+!553 = !DIGlobalVariableExpression(var: !554, expr: !DIExpression())
+!554 = distinct !DIGlobalVariable(name: "imgY_org", scope: !0, file: !529, line: 500, type: !555, isLocal: false, isDefinition: true)
+!555 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !556, size: 64)
+!556 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !557, size: 64)
+!557 = !DIDerivedType(tag: DW_TAG_typedef, name: "imgpel", file: !529, line: 50, baseType: !558)
+!558 = !DIBasicType(name: "unsigned short", size: 16, encoding: DW_ATE_unsigned)
+!559 = !DIGlobalVariableExpression(var: !560, expr: !DIExpression())
+!560 = distinct !DIGlobalVariable(name: "imgUV_org", scope: !0, file: !529, line: 501, type: !561, isLocal: false, isDefinition: true)
+!561 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !555, size: 64)
+!562 = !DIGlobalVariableExpression(var: !563, expr: !DIExpression())
+!563 = distinct !DIGlobalVariable(name: "imgY_sub_tmp", scope: !0, file: !529, line: 502, type: !564, isLocal: false, isDefinition: true)
+!564 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !565, size: 64)
+!565 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !566, size: 64)
+!566 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!567 = !DIGlobalVariableExpression(var: !568, expr: !DIExpression())
+!568 = distinct !DIGlobalVariable(name: "PicPos", scope: !0, file: !529, line: 504, type: !564, isLocal: false, isDefinition: true)
+!569 = !DIGlobalVariableExpression(var: !570, expr: !DIExpression())
+!570 = distinct !DIGlobalVariable(name: "log2_max_frame_num_minus4", scope: !0, file: !529, line: 505, type: !531, isLocal: false, isDefinition: true)
+!571 = !DIGlobalVariableExpression(var: !572, expr: !DIExpression())
+!572 = distinct !DIGlobalVariable(name: "log2_max_pic_order_cnt_lsb_minus4", scope: !0, file: !529, line: 506, type: !531, isLocal: false, isDefinition: true)
+!573 = !DIGlobalVariableExpression(var: !574, expr: !DIExpression())
+!574 = distinct !DIGlobalVariable(name: "me_tot_time", scope: !0, file: !529, line: 508, type: !575, isLocal: false, isDefinition: true)
+!575 = !DIDerivedType(tag: DW_TAG_typedef, name: "time_t", file: !576, line: 10, baseType: !577)
+!576 = !DIFile(filename: "/usr/include/bits/types/time_t.h", directory: "", checksumkind: CSK_MD5, checksum: "5c299a4954617c88bb03645c7864e1b1")
+!577 = !DIDerivedType(tag: DW_TAG_typedef, name: "__time_t", file: !578, line: 160, baseType: !552)
+!578 = !DIFile(filename: "/usr/include/bits/types.h", directory: "", checksumkind: CSK_MD5, checksum: "4a64d909bcfa62a0a7682c3ac78c6965")
+!579 = !DIGlobalVariableExpression(var: !580, expr: !DIExpression())
+!580 = distinct !DIGlobalVariable(name: "me_time", scope: !0, file: !529, line: 508, type: !575, isLocal: false, isDefinition: true)
+!581 = !DIGlobalVariableExpression(var: !582, expr: !DIExpression())
+!582 = distinct !DIGlobalVariable(name: "active_pps", scope: !0, file: !529, line: 509, type: !583, isLocal: false, isDefinition: true)
+!583 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !584, size: 64)
+!584 = !DIDerivedType(tag: DW_TAG_typedef, name: "pic_parameter_set_rbsp_t", file: !585, line: 143, baseType: !586)
+!585 = !DIFile(filename: "test-suite/MultiSource/Applications/JM/lencod/parsetcommon.h", directory: "/media/d/work/learn-riscv", checksumkind: CSK_MD5, checksum: "668f9fcde6542d542e1db5b77ef124b9")
+!586 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !585, line: 101, size: 1920, elements: !2)
+!587 = !DIGlobalVariableExpression(var: !588, expr: !DIExpression())
+!588 = distinct !DIGlobalVariable(name: "active_sps", scope: !0, file: !529, line: 510, type: !589, isLocal: false, isDefinition: true)
+!589 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !590, size: 64)
+!590 = !DIDerivedType(tag: DW_TAG_typedef, name: "seq_parameter_set_rbsp_t", file: !585, line: 191, baseType: !591)
+!591 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !585, line: 147, size: 17056, elements: !2)
+!592 = !DIGlobalVariableExpression(var: !593, expr: !DIExpression())
+!593 = distinct !DIGlobalVariable(name: "dsr_new_search_range", scope: !0, file: !529, line: 513, type: !566, isLocal: false, isDefinition: true)
+!594 = !DIGlobalVariableExpression(var: !595, expr: !DIExpression())
+!595 = distinct !DIGlobalVariable(name: "mb_adaptive", scope: !0, file: !529, line: 517, type: !566, isLocal: false, isDefinition: true)
+!596 = !DIGlobalVariableExpression(var: !597, expr: !DIExpression())
+!597 = distinct !DIGlobalVariable(name: "MBPairIsField", scope: !0, file: !529, line: 518, type: !566, isLocal: false, isDefinition: true)
+!598 = !DIGlobalVariableExpression(var: !599, expr: !DIExpression())
+!599 = distinct !DIGlobalVariable(name: "wp_weight", scope: !0, file: !529, line: 522, type: !600, isLocal: false, isDefinition: true)
+!600 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !564, size: 64)
+!601 = !DIGlobalVariableExpression(var: !602, expr: !DIExpression())
+!602 = distinct !DIGlobalVariable(name: "wp_offset", scope: !0, file: !529, line: 523, type: !600, isLocal: false, isDefinition: true)
+!603 = !DIGlobalVariableExpression(var: !604, expr: !DIExpression())
+!604 = distinct !DIGlobalVariable(name: "wbp_weight", scope: !0, file: !529, line: 524, type: !605, isLocal: false, isDefinition: true)
+!605 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !600, size: 64)
+!606 = !DIGlobalVariableExpression(var: !607, expr: !DIExpression())
+!607 = distinct !DIGlobalVariable(name: "luma_log_weight_denom", scope: !0, file: !529, line: 525, type: !566, isLocal: false, isDefinition: true)
+!608 = !DIGlobalVariableExpression(var: !609, expr: !DIExpression())
+!609 = distinct !DIGlobalVariable(name: "chroma_log_weight_denom", scope: !0, file: !529, line: 526, type: !566, isLocal: false, isDefinition: true)
+!610 = !DIGlobalVariableExpression(var: !611, expr: !DIExpression())
+!611 = distinct !DIGlobalVariable(name: "wp_luma_round", scope: !0, file: !529, line: 527, type: !566, isLocal: false, isDefinition: true)
+!612 = !DIGlobalVariableExpression(var: !613, expr: !DIExpression())
+!613 = distinct !DIGlobalVariable(name: "wp_chroma_round", scope: !0, file: !529, line: 528, type: !566, isLocal: false, isDefinition: true)
+!614 = !DIGlobalVariableExpression(var: !615, expr: !DIExpression())
+!615 = distinct !DIGlobalVariable(name: "imgY_org_top", scope: !0, file: !529, line: 531, type: !555, isLocal: false, isDefinition: true)
+!616 = !DIGlobalVariableExpression(var: !617, expr: !DIExpression())
+!617 = distinct !DIGlobalVariable(name: "imgY_org_bot", scope: !0, file: !529, line: 532, type: !555, isLocal: false, isDefinition: true)
+!618 = !DIGlobalVariableExpression(var: !619, expr: !DIExpression())
+!619 = distinct !DIGlobalVariable(name: "imgUV_org_top", scope: !0, file: !529, line: 534, type: !561, isLocal: false, isDefinition: true)
+!620 = !DIGlobalVariableExpression(var: !621, expr: !DIExpression())
+!621 = distinct !DIGlobalVariable(name: "imgUV_org_bot", scope: !0, file: !529, line: 535, type: !561, isLocal: false, isDefinition: true)
+!622 = !DIGlobalVariableExpression(var: !623, expr: !DIExpression())
+!623 = distinct !DIGlobalVariable(name: "imgY_org_frm", scope: !0, file: !529, line: 537, type: !555, isLocal: false, isDefinition: true)
+!624 = !DIGlobalVariableExpression(var: !625, expr: !DIExpression())
+!625 = distinct !DIGlobalVariable(name: "imgUV_org_frm", scope: !0, file: !529, line: 538, type: !561, isLocal: false, isDefinition: true)
+!626 = !DIGlobalVariableExpression(var: !627, expr: !DIExpression())
+!627 = distinct !DIGlobalVariable(name: "imgY_com", scope: !0, file: !529, line: 540, type: !555, isLocal: false, isDefinition: true)
+!628 = !DIGlobalVariableExpression(var: !629, expr: !DIExpression())
+!629 = distinct !DIGlobalVariable(name: "imgUV_com", scope: !0, file: !529, line: 541, type: !561, isLocal: false, isDefinition: true)
+!630 = !DIGlobalVariableExpression(var: !631, expr: !DIExpression())
+!631 = distinct !DIGlobalVariable(name: "direct_ref_idx", scope: !0, file: !529, line: 543, type: !632, isLocal: false, isDefinition: true)
+!632 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !633, size: 64)
+!633 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !634, size: 64)
+!634 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !635, size: 64)
+!635 = !DIBasicType(name: "signed char", size: 8, encoding: DW_ATE_signed_char)
+!636 = !DIGlobalVariableExpression(var: !637, expr: !DIExpression())
+!637 = distinct !DIGlobalVariable(name: "direct_pdir", scope: !0, file: !529, line: 544, type: !633, isLocal: false, isDefinition: true)
+!638 = !DIGlobalVariableExpression(var: !639, expr: !DIExpression())
+!639 = distinct !DIGlobalVariable(name: "pixel_map", scope: !0, file: !529, line: 547, type: !640, isLocal: false, isDefinition: true)
+!640 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !641, size: 64)
+!641 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !642, size: 64)
+!642 = !DIDerivedType(tag: DW_TAG_typedef, name: "byte", file: !643, line: 30, baseType: !644)
+!643 = !DIFile(filename: "test-suite/MultiSource/Applications/JM/lencod/defines.h", directory: "/media/d/work/learn-riscv", checksumkind: CSK_MD5, checksum: "c4886033aae67756d8a4e6b2c380294c")
+!644 = !DIBasicType(name: "unsigned char", size: 8, encoding: DW_ATE_unsigned_char)
+!645 = !DIGlobalVariableExpression(var: !646, expr: !DIExpression())
+!646 = distinct !DIGlobalVariable(name: "refresh_map", scope: !0, file: !529, line: 548, type: !640, isLocal: false, isDefinition: true)
+!647 = !DIGlobalVariableExpression(var: !648, expr: !DIExpression())
+!648 = distinct !DIGlobalVariable(name: "intras", scope: !0, file: !529, line: 549, type: !566, isLocal: false, isDefinition: true)
+!649 = !DIGlobalVariableExpression(var: !650, expr: !DIExpression())
+!650 = distinct !DIGlobalVariable(name: "frame_ctr", scope: !0, file: !529, line: 551, type: !651, isLocal: false, isDefinition: true)
+!651 = !DICompositeType(tag: DW_TAG_array_type, baseType: !566, size: 160, elements: !2)
+!652 = !DIGlobalVariableExpression(var: !653, expr: !DIExpression())
+!653 = distinct !DIGlobalVariable(name: "frame_no", scope: !0, file: !529, line: 552, type: !566, isLocal: false, isDefinition: true)
+!654 = !DIGlobalVariableExpression(var: !655, expr: !DIExpression())
+!655 = distinct !DIGlobalVariable(name: "nextP_tr_fld", scope: !0, file: !529, line: 552, type: !566, isLocal: false, isDefinition: true)
+!656 = !DIGlobalVariableExpression(var: !657, expr: !DIExpression())
+!657 = distinct !DIGlobalVariable(name: "nextP_tr_frm", scope: !0, file: !529, line: 552, type: !566, isLocal: false, isDefinition: true)
+!658 = !DIGlobalVariableExpression(var: !659, expr: !DIExpression())
+!659 = distinct !DIGlobalVariable(name: "tot_time", scope: !0, file: !529, line: 554, type: !575, isLocal: false, isDefinition: true)
+!660 = !DIGlobalVariableExpression(var: !661, expr: !DIExpression())
+!661 = distinct !DIGlobalVariable(name: "errortext", scope: !0, file: !529, line: 557, type: !662, isLocal: false, isDefinition: true)
+!662 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 2400, elements: !2)
+!663 = !DIGlobalVariableExpression(var: !664, expr: !DIExpression())
+!664 = distinct !DIGlobalVariable(name: "b8_ipredmode8x8", scope: !0, file: !529, line: 560, type: !665, isLocal: false, isDefinition: true)
+!665 = distinct !DICompositeType(tag: DW_TAG_array_type, baseType: !635, size: 128, elements: !2)
+!666 = !DIGlobalVariableExpression(var: !667, expr: !DIExpression())
+!667 = distinct !DIGlobalVariable(name: "b8_intra_pred_modes8x8", scope: !0, file: !529, line: 560, type: !668, isLocal: false, isDefinition: true)
+!668 = !DICompositeType(tag: DW_TAG_array_type, baseType: !635, size: 128, elements: !2)
+!669 = !DIGlobalVariableExpression(var: !670, expr: !DIExpression())
+!670 = distinct !DIGlobalVariable(name: "gop_structure", scope: !0, file: !529, line: 1230, type: !671, isLocal: false, isDefinition: true)
+!671 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !672, size: 64)
+!672 = !DIDerivedType(tag: DW_TAG_typedef, name: "GOP_DATA", file: !529, line: 1198, baseType: !673)
+!673 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !529, line: 1190, size: 192, elements: !2)
+!674 = !DIGlobalVariableExpression(var: !675, expr: !DIExpression())
+!675 = distinct !DIGlobalVariable(name: "rdopt", scope: !0, file: !529, line: 1231, type: !676, isLocal: false, isDefinition: true)
+!676 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !677, size: 64)
+!677 = !DIDerivedType(tag: DW_TAG_typedef, name: "RD_DATA", file: !529, line: 1185, baseType: !678)
+!678 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !529, line: 1153, size: 14016, elements: !2)
+!679 = !DIGlobalVariableExpression(var: !680, expr: !DIExpression())
+!680 = distinct !DIGlobalVariable(name: "rddata_top_frame_mb", scope: !0, file: !529, line: 1232, type: !677, isLocal: false, isDefinition: true)
+!681 = !DIGlobalVariableExpression(var: !682, expr: !DIExpression())
+!682 = distinct !DIGlobalVariable(name: "rddata_bot_frame_mb", scope: !0, file: !529, line: 1232, type: !677, isLocal: false, isDefinition: true)
+!683 = !DIGlobalVariableExpression(var: !684, expr: !DIExpression())
+!684 = distinct !DIGlobalVariable(name: "rddata_top_field_mb", scope: !0, file: !529, line: 1233, type: !677, isLocal: false, isDefinition: true)
+!685 = !DIGlobalVariableExpression(var: !686, expr: !DIExpression())
+!686 = distinct !DIGlobalVariable(name: "rddata_bot_field_mb", scope: !0, file: !529, line: 1233, type: !677, isLocal: false, isDefinition: true)
+!687 = !DIGlobalVariableExpression(var: !688, expr: !DIExpression())
+!688 = distinct !DIGlobalVariable(name: "p_stat", scope: !0, file: !529, line: 1242, type: !689, isLocal: false, isDefinition: true)
+!689 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !690, size: 64)
+!690 = !DIDerivedType(tag: DW_TAG_typedef, name: "FILE", file: !691, line: 7, baseType: !692)
+!691 = !DIFile(filename: "/usr/include/bits/types/FILE.h", directory: "", checksumkind: CSK_MD5, checksum: "571f9fb6223c42439075fdde11a0de5d")
+!692 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_IO_FILE", file: !693, line: 49, size: 1728, elements: !2)
+!693 = !DIFile(filename: "/usr/include/bits/types/struct_FILE.h", directory: "", checksumkind: CSK_MD5, checksum: "2724c33532a91348c643429afa072d1a")
+!694 = !DIGlobalVariableExpression(var: !695, expr: !DIExpression())
+!695 = distinct !DIGlobalVariable(name: "p_log", scope: !0, file: !529, line: 1243, type: !689, isLocal: false, isDefinition: true)
+!696 = !DIGlobalVariableExpression(var: !697, expr: !DIExpression())
+!697 = distinct !DIGlobalVariable(name: "p_trace", scope: !0, file: !529, line: 1244, type: !689, isLocal: false, isDefinition: true)
+!698 = !DIGlobalVariableExpression(var: !699, expr: !DIExpression())
+!699 = distinct !DIGlobalVariable(name: "p_in", scope: !0, file: !529, line: 1245, type: !566, isLocal: false, isDefinition: true)
+!700 = !DIGlobalVariableExpression(var: !701, expr: !DIExpression())
+!701 = distinct !DIGlobalVariable(name: "p_dec", scope: !0, file: !529, line: 1246, type: !566, isLocal: false, isDefinition: true)
+!702 = !DIGlobalVariableExpression(var: !703, expr: !DIExpression())
+!703 = distinct !DIGlobalVariable(name: "mb16x16_cost_frame", scope: !0, file: !529, line: 1277, type: !704, isLocal: false, isDefinition: true)
+!704 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !705, size: 64)
+!705 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float)
+!706 = !DIGlobalVariableExpression(var: !707, expr: !DIExpression())
+!707 = distinct !DIGlobalVariable(name: "Bytes_After_Header", scope: !0, file: !529, line: 1408, type: !566, isLocal: false, isDefinition: true)
+!708 = !DIGlobalVariableExpression(var: !709, expr: !DIExpression())
+!709 = distinct !DIGlobalVariable(name: "encode_one_macroblock", scope: !0, file: !529, line: 1417, type: !710, isLocal: false, isDefinition: true)
+!710 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !711, size: 64)
+!711 = !DISubroutineType(types: !712)
+!712 = !{null}
+!713 = !DIGlobalVariableExpression(var: !714, expr: !DIExpression())
+!714 = distinct !DIGlobalVariable(name: "lrec", scope: !0, file: !529, line: 1436, type: !564, isLocal: false, isDefinition: true)
+!715 = !DIGlobalVariableExpression(var: !716, expr: !DIExpression())
+!716 = distinct !DIGlobalVariable(name: "lrec_uv", scope: !0, file: !529, line: 1437, type: !600, isLocal: false, isDefinition: true)
+!717 = !DIGlobalVariableExpression(var: !718, expr: !DIExpression())
+!718 = distinct !DIGlobalVariable(name: "si_frame_indicator", scope: !0, file: !529, line: 1438, type: !566, isLocal: false, isDefinition: true)
+!719 = !DIGlobalVariableExpression(var: !720, expr: !DIExpression())
+!720 = distinct !DIGlobalVariable(name: "sp2_frame_indicator", scope: !0, file: !529, line: 1440, type: !566, isLocal: false, isDefinition: true)
+!721 = !DIGlobalVariableExpression(var: !722, expr: !DIExpression())
+!722 = distinct !DIGlobalVariable(name: "number_sp2_frames", scope: !0, file: !529, line: 1441, type: !566, isLocal: false, isDefinition: true)
+!723 = !DIGlobalVariableExpression(var: !724, expr: !DIExpression())
+!724 = distinct !DIGlobalVariable(name: "giRDOpt_B8OnlyFlag", scope: !0, file: !529, line: 1447, type: !566, isLocal: false, isDefinition: true)
+!725 = !DIGlobalVariableExpression(var: !726, expr: !DIExpression())
+!726 = distinct !DIGlobalVariable(name: "imgY_tmp", scope: !0, file: !529, line: 1454, type: !555, isLocal: false, isDefinition: true)
+!727 = !DIGlobalVariableExpression(var: !728, expr: !DIExpression())
+!728 = distinct !DIGlobalVariable(name: "imgUV_tmp", scope: !0, file: !529, line: 1455, type: !729, isLocal: false, isDefinition: true)
+!729 = !DICompositeType(tag: DW_TAG_array_type, baseType: !555, size: 128, elements: !2)
+!730 = !DIGlobalVariableExpression(var: !731, expr: !DIExpression())
+!731 = distinct !DIGlobalVariable(name: "frameNuminGOP", scope: !0, file: !529, line: 1456, type: !566, isLocal: false, isDefinition: true)
+!732 = !DIGlobalVariableExpression(var: !733, expr: !DIExpression())
+!733 = distinct !DIGlobalVariable(name: "redundant_coding", scope: !0, file: !529, line: 1457, type: !566, isLocal: false, isDefinition: true)
+!734 = !DIGlobalVariableExpression(var: !735, expr: !DIExpression())
+!735 = distinct !DIGlobalVariable(name: "key_frame", scope: !0, file: !529, line: 1458, type: !566, isLocal: false, isDefinition: true)
+!736 = !DIGlobalVariableExpression(var: !737, expr: !DIExpression())
+!737 = distinct !DIGlobalVariable(name: "redundant_ref_idx", scope: !0, file: !529, line: 1459, type: !566, isLocal: false, isDefinition: true)
+!738 = !DIGlobalVariableExpression(var: !739, expr: !DIExpression())
+!739 = distinct !DIGlobalVariable(name: "img_pad_size_uv_x", scope: !0, file: !529, line: 1464, type: !566, isLocal: false, isDefinition: true)
+!740 = !DIGlobalVariableExpression(var: !741, expr: !DIExpression())
+!741 = distinct !DIGlobalVariable(name: "img_pad_size_uv_y", scope: !0, file: !529, line: 1465, type: !566, isLocal: false, isDefinition: true)
+!742 = !DIGlobalVariableExpression(var: !743, expr: !DIExpression())
+!743 = distinct !DIGlobalVariable(name: "chroma_mask_mv_y", scope: !0, file: !529, line: 1467, type: !644, isLocal: false, isDefinition: true)
+!744 = !DIGlobalVariableExpression(var: !745, expr: !DIExpression())
+!745 = distinct !DIGlobalVariable(name: "chroma_mask_mv_x", scope: !0, file: !529, line: 1468, type: !644, isLocal: false, isDefinition: true)
+!746 = !DIGlobalVariableExpression(var: !747, expr: !DIExpression())
+!747 = distinct !DIGlobalVariable(name: "chroma_shift_y", scope: !0, file: !529, line: 1469, type: !566, isLocal: false, isDefinition: true)
+!748 = !DIGlobalVariableExpression(var: !749, expr: !DIExpression())
+!749 = distinct !DIGlobalVariable(name: "chroma_shift_x", scope: !0, file: !529, line: 1469, type: !566, isLocal: false, isDefinition: true)
+!750 = !DIGlobalVariableExpression(var: !751, expr: !DIExpression())
+!751 = distinct !DIGlobalVariable(name: "shift_cr_x", scope: !0, file: !529, line: 1470, type: !566, isLocal: false, isDefinition: true)
+!752 = !DIGlobalVariableExpression(var: !753, expr: !DIExpression())
+!753 = distinct !DIGlobalVariable(name: "shift_cr_y", scope: !0, file: !529, line: 1470, type: !566, isLocal: false, isDefinition: true)
+!754 = !DIGlobalVariableExpression(var: !755, expr: !DIExpression())
+!755 = distinct !DIGlobalVariable(name: "img_padded_size_x", scope: !0, file: !529, line: 1471, type: !566, isLocal: false, isDefinition: true)
+!756 = !DIGlobalVariableExpression(var: !757, expr: !DIExpression())
+!757 = distinct !DIGlobalVariable(name: "img_cr_padded_size_x", scope: !0, file: !529, line: 1472, type: !566, isLocal: false, isDefinition: true)
+!758 = !DIGlobalVariableExpression(var: !759, expr: !DIExpression())
+!759 = distinct !DIGlobalVariable(name: "start_me_refinement_hp", scope: !0, file: !529, line: 1480, type: !566, isLocal: false, isDefinition: true)
+!760 = !DIGlobalVariableExpression(var: !761, expr: !DIExpression())
+!761 = distinct !DIGlobalVariable(name: "start_me_refinement_qp", scope: !0, file: !529, line: 1481, type: !566, isLocal: false, isDefinition: true)
+!762 = !DIGlobalVariableExpression(var: !763, expr: !DIExpression())
+!763 = distinct !DIGlobalVariable(name: "configinput", scope: !0, file: !6, line: 34, type: !764, isLocal: false, isDefinition: true)
+!764 = !DIDerivedType(tag: DW_TAG_typedef, name: "InputParameters", file: !529, line: 867, baseType: !765)
+!765 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !529, line: 601, size: 46400, elements: !2)
+!766 = !DIGlobalVariableExpression(var: !767, expr: !DIExpression())
+!767 = distinct !DIGlobalVariable(scope: null, file: !484, line: 396, type: !768, isLocal: true, isDefinition: true)
+!768 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 536, elements: !2)
+!769 = !DIGlobalVariableExpression(var: !770, expr: !DIExpression())
+!770 = distinct !DIGlobalVariable(scope: null, file: !484, line: 399, type: !499, isLocal: true, isDefinition: true)
+!771 = !DIGlobalVariableExpression(var: !772, expr: !DIExpression())
+!772 = distinct !DIGlobalVariable(scope: null, file: !484, line: 401, type: !773, isLocal: true, isDefinition: true)
+!773 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 624, elements: !2)
+!774 = !DIGlobalVariableExpression(var: !775, expr: !DIExpression())
+!775 = distinct !DIGlobalVariable(scope: null, file: !484, line: 410, type: !492, isLocal: true, isDefinition: true)
+!776 = !DIGlobalVariableExpression(var: !777, expr: !DIExpression())
+!777 = distinct !DIGlobalVariable(scope: null, file: !484, line: 412, type: !778, isLocal: true, isDefinition: true)
+!778 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 592, elements: !2)
+!779 = !DIGlobalVariableExpression(var: !780, expr: !DIExpression())
+!780 = distinct !DIGlobalVariable(scope: null, file: !484, line: 416, type: !499, isLocal: true, isDefinition: true)
+!781 = !DIGlobalVariableExpression(var: !782, expr: !DIExpression())
+!782 = distinct !DIGlobalVariable(scope: null, file: !484, line: 423, type: !783, isLocal: true, isDefinition: true)
+!783 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 32, elements: !2)
+!784 = !DIGlobalVariableExpression(var: !785, expr: !DIExpression())
+!785 = distinct !DIGlobalVariable(scope: null, file: !484, line: 432, type: !786, isLocal: true, isDefinition: true)
+!786 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 456, elements: !2)
+!787 = !DIGlobalVariableExpression(var: !788, expr: !DIExpression())
+!788 = distinct !DIGlobalVariable(scope: null, file: !484, line: 568, type: !789, isLocal: true, isDefinition: true)
+!789 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 448, elements: !2)
+!790 = !DIGlobalVariableExpression(var: !791, expr: !DIExpression())
+!791 = distinct !DIGlobalVariable(scope: null, file: !484, line: 569, type: !789, isLocal: true, isDefinition: true)
+!792 = !DIGlobalVariableExpression(var: !793, expr: !DIExpression())
+!793 = distinct !DIGlobalVariable(scope: null, file: !484, line: 574, type: !148, isLocal: true, isDefinition: true)
+!794 = !DIGlobalVariableExpression(var: !795, expr: !DIExpression())
+!795 = distinct !DIGlobalVariable(scope: null, file: !484, line: 576, type: !148, isLocal: true, isDefinition: true)
+!796 = !DIGlobalVariableExpression(var: !797, expr: !DIExpression())
+!797 = distinct !DIGlobalVariable(scope: null, file: !484, line: 578, type: !107, isLocal: true, isDefinition: true)
+!798 = !DIGlobalVariableExpression(var: !799, expr: !DIExpression())
+!799 = distinct !DIGlobalVariable(scope: null, file: !484, line: 680, type: !800, isLocal: true, isDefinition: true)
+!800 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 752, elements: !2)
+!801 = !DIGlobalVariableExpression(var: !802, expr: !DIExpression())
+!802 = distinct !DIGlobalVariable(scope: null, file: !484, line: 691, type: !803, isLocal: true, isDefinition: true)
+!803 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 704, elements: !2)
+!804 = !DIGlobalVariableExpression(var: !805, expr: !DIExpression())
+!805 = distinct !DIGlobalVariable(scope: null, file: !484, line: 696, type: !806, isLocal: true, isDefinition: true)
+!806 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 528, elements: !2)
+!807 = !DIGlobalVariableExpression(var: !808, expr: !DIExpression())
+!808 = distinct !DIGlobalVariable(scope: null, file: !484, line: 703, type: !789, isLocal: true, isDefinition: true)
+!809 = !DIGlobalVariableExpression(var: !810, expr: !DIExpression())
+!810 = distinct !DIGlobalVariable(scope: null, file: !484, line: 710, type: !811, isLocal: true, isDefinition: true)
+!811 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 440, elements: !2)
+!812 = !DIGlobalVariableExpression(var: !813, expr: !DIExpression())
+!813 = distinct !DIGlobalVariable(scope: null, file: !484, line: 718, type: !768, isLocal: true, isDefinition: true)
+!814 = !DIGlobalVariableExpression(var: !815, expr: !DIExpression())
+!815 = distinct !DIGlobalVariable(scope: null, file: !484, line: 725, type: !816, isLocal: true, isDefinition: true)
+!816 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 400, elements: !2)
+!817 = !DIGlobalVariableExpression(var: !818, expr: !DIExpression())
+!818 = distinct !DIGlobalVariable(scope: null, file: !484, line: 732, type: !819, isLocal: true, isDefinition: true)
+!819 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 232, elements: !2)
+!820 = !DIGlobalVariableExpression(var: !821, expr: !DIExpression())
+!821 = distinct !DIGlobalVariable(scope: null, file: !484, line: 738, type: !148, isLocal: true, isDefinition: true)
+!822 = !DIGlobalVariableExpression(var: !823, expr: !DIExpression())
+!823 = distinct !DIGlobalVariable(scope: null, file: !484, line: 762, type: !824, isLocal: true, isDefinition: true)
+!824 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 416, elements: !2)
+!825 = !DIGlobalVariableExpression(var: !826, expr: !DIExpression())
+!826 = distinct !DIGlobalVariable(scope: null, file: !484, line: 786, type: !827, isLocal: true, isDefinition: true)
+!827 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 512, elements: !2)
+!828 = !DIGlobalVariableExpression(var: !829, expr: !DIExpression())
+!829 = distinct !DIGlobalVariable(scope: null, file: !484, line: 793, type: !830, isLocal: true, isDefinition: true)
+!830 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 376, elements: !2)
+!831 = !DIGlobalVariableExpression(var: !832, expr: !DIExpression())
+!832 = distinct !DIGlobalVariable(scope: null, file: !484, line: 802, type: !256, isLocal: true, isDefinition: true)
+!833 = !DIGlobalVariableExpression(var: !834, expr: !DIExpression())
+!834 = distinct !DIGlobalVariable(scope: null, file: !484, line: 829, type: !518, isLocal: true, isDefinition: true)
+!835 = !DIGlobalVariableExpression(var: !836, expr: !DIExpression())
+!836 = distinct !DIGlobalVariable(scope: null, file: !484, line: 835, type: !837, isLocal: true, isDefinition: true)
+!837 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 56, elements: !2)
+!838 = !DIGlobalVariableExpression(var: !839, expr: !DIExpression())
+!839 = distinct !DIGlobalVariable(scope: null, file: !484, line: 843, type: !213, isLocal: true, isDefinition: true)
+!840 = !DIGlobalVariableExpression(var: !841, expr: !DIExpression())
+!841 = distinct !DIGlobalVariable(scope: null, file: !484, line: 845, type: !842, isLocal: true, isDefinition: true)
+!842 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 240, elements: !2)
+!843 = !DIGlobalVariableExpression(var: !844, expr: !DIExpression())
+!844 = distinct !DIGlobalVariable(scope: null, file: !484, line: 867, type: !398, isLocal: true, isDefinition: true)
+!845 = !DIGlobalVariableExpression(var: !846, expr: !DIExpression())
+!846 = distinct !DIGlobalVariable(scope: null, file: !484, line: 876, type: !847, isLocal: true, isDefinition: true)
+!847 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 384, elements: !2)
+!848 = !DIGlobalVariableExpression(var: !849, expr: !DIExpression())
+!849 = distinct !DIGlobalVariable(scope: null, file: !484, line: 889, type: !827, isLocal: true, isDefinition: true)
+!850 = !DIGlobalVariableExpression(var: !851, expr: !DIExpression())
+!851 = distinct !DIGlobalVariable(scope: null, file: !484, line: 895, type: !768, isLocal: true, isDefinition: true)
+!852 = !DIGlobalVariableExpression(var: !853, expr: !DIExpression())
+!853 = distinct !DIGlobalVariable(scope: null, file: !484, line: 902, type: !854, isLocal: true, isDefinition: true)
+!854 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 736, elements: !2)
+!855 = !DIGlobalVariableExpression(var: !856, expr: !DIExpression())
+!856 = distinct !DIGlobalVariable(scope: null, file: !484, line: 909, type: !857, isLocal: true, isDefinition: true)
+!857 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 920, elements: !2)
+!858 = !DIGlobalVariableExpression(var: !859, expr: !DIExpression())
+!859 = distinct !DIGlobalVariable(scope: null, file: !484, line: 916, type: !811, isLocal: true, isDefinition: true)
+!860 = !DIGlobalVariableExpression(var: !861, expr: !DIExpression())
+!861 = distinct !DIGlobalVariable(scope: null, file: !484, line: 929, type: !862, isLocal: true, isDefinition: true)
+!862 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 464, elements: !2)
+!863 = !DIGlobalVariableExpression(var: !864, expr: !DIExpression())
+!864 = distinct !DIGlobalVariable(scope: null, file: !484, line: 936, type: !865, isLocal: true, isDefinition: true)
+!865 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 864, elements: !2)
+!866 = !DIGlobalVariableExpression(var: !867, expr: !DIExpression())
+!867 = distinct !DIGlobalVariable(scope: null, file: !484, line: 945, type: !868, isLocal: true, isDefinition: true)
+!868 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 392, elements: !2)
+!869 = !DIGlobalVariableExpression(var: !870, expr: !DIExpression())
+!870 = distinct !DIGlobalVariable(scope: null, file: !484, line: 951, type: !806, isLocal: true, isDefinition: true)
+!871 = !DIGlobalVariableExpression(var: !872, expr: !DIExpression())
+!872 = distinct !DIGlobalVariable(scope: null, file: !484, line: 958, type: !210, isLocal: true, isDefinition: true)
+!873 = !DIGlobalVariableExpression(var: !874, expr: !DIExpression())
+!874 = distinct !DIGlobalVariable(scope: null, file: !484, line: 965, type: !827, isLocal: true, isDefinition: true)
+!875 = !DIGlobalVariableExpression(var: !876, expr: !DIExpression())
+!876 = distinct !DIGlobalVariable(scope: null, file: !484, line: 971, type: !806, isLocal: true, isDefinition: true)
+!877 = !DIGlobalVariableExpression(var: !878, expr: !DIExpression())
+!878 = distinct !DIGlobalVariable(scope: null, file: !484, line: 976, type: !879, isLocal: true, isDefinition: true)
+!879 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 560, elements: !2)
+!880 = !DIGlobalVariableExpression(var: !881, expr: !DIExpression())
+!881 = distinct !DIGlobalVariable(scope: null, file: !484, line: 992, type: !882, isLocal: true, isDefinition: true)
+!882 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 472, elements: !2)
+!883 = !DIGlobalVariableExpression(var: !884, expr: !DIExpression())
+!884 = distinct !DIGlobalVariable(scope: null, file: !484, line: 998, type: !885, isLocal: true, isDefinition: true)
+!885 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 328, elements: !2)
+!886 = !DIGlobalVariableExpression(var: !887, expr: !DIExpression())
+!887 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1005, type: !888, isLocal: true, isDefinition: true)
+!888 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 728, elements: !2)
+!889 = !DIGlobalVariableExpression(var: !890, expr: !DIExpression())
+!890 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1009, type: !891, isLocal: true, isDefinition: true)
+!891 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 360, elements: !2)
+!892 = !DIGlobalVariableExpression(var: !893, expr: !DIExpression())
+!893 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1014, type: !824, isLocal: true, isDefinition: true)
+!894 = !DIGlobalVariableExpression(var: !895, expr: !DIExpression())
+!895 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1020, type: !896, isLocal: true, isDefinition: true)
+!896 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 488, elements: !2)
+!897 = !DIGlobalVariableExpression(var: !898, expr: !DIExpression())
+!898 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1025, type: !899, isLocal: true, isDefinition: true)
+!899 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 552, elements: !2)
+!900 = !DIGlobalVariableExpression(var: !901, expr: !DIExpression())
+!901 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1031, type: !902, isLocal: true, isDefinition: true)
+!902 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 672, elements: !2)
+!903 = !DIGlobalVariableExpression(var: !904, expr: !DIExpression())
+!904 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1036, type: !513, isLocal: true, isDefinition: true)
+!905 = !DIGlobalVariableExpression(var: !906, expr: !DIExpression())
+!906 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1042, type: !882, isLocal: true, isDefinition: true)
+!907 = !DIGlobalVariableExpression(var: !908, expr: !DIExpression())
+!908 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1048, type: !882, isLocal: true, isDefinition: true)
+!909 = !DIGlobalVariableExpression(var: !910, expr: !DIExpression())
+!910 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1053, type: !786, isLocal: true, isDefinition: true)
+!911 = !DIGlobalVariableExpression(var: !912, expr: !DIExpression())
+!912 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1059, type: !882, isLocal: true, isDefinition: true)
+!913 = !DIGlobalVariableExpression(var: !914, expr: !DIExpression())
+!914 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1070, type: !786, isLocal: true, isDefinition: true)
+!915 = !DIGlobalVariableExpression(var: !916, expr: !DIExpression())
+!916 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1075, type: !862, isLocal: true, isDefinition: true)
+!917 = !DIGlobalVariableExpression(var: !918, expr: !DIExpression())
+!918 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1080, type: !868, isLocal: true, isDefinition: true)
+!919 = !DIGlobalVariableExpression(var: !920, expr: !DIExpression())
+!920 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1085, type: !921, isLocal: true, isDefinition: true)
+!921 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 576, elements: !2)
+!922 = !DIGlobalVariableExpression(var: !923, expr: !DIExpression())
+!923 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1090, type: !924, isLocal: true, isDefinition: true)
+!924 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 584, elements: !2)
+!925 = !DIGlobalVariableExpression(var: !926, expr: !DIExpression())
+!926 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1097, type: !927, isLocal: true, isDefinition: true)
+!927 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 664, elements: !2)
+!928 = !DIGlobalVariableExpression(var: !929, expr: !DIExpression())
+!929 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1098, type: !789, isLocal: true, isDefinition: true)
+!930 = !DIGlobalVariableExpression(var: !931, expr: !DIExpression())
+!931 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1099, type: !806, isLocal: true, isDefinition: true)
+!932 = !DIGlobalVariableExpression(var: !933, expr: !DIExpression())
+!933 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1103, type: !934, isLocal: true, isDefinition: true)
+!934 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 480, elements: !2)
+!935 = !DIGlobalVariableExpression(var: !936, expr: !DIExpression())
+!936 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1104, type: !937, isLocal: true, isDefinition: true)
+!937 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 496, elements: !2)
+!938 = !DIGlobalVariableExpression(var: !939, expr: !DIExpression())
+!939 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1105, type: !882, isLocal: true, isDefinition: true)
+!940 = !DIGlobalVariableExpression(var: !941, expr: !DIExpression())
+!941 = distinct !DIGlobalVariable(scope: null, file: !484, line: 504, type: !942, isLocal: true, isDefinition: true)
+!942 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 720, elements: !2)
+!943 = !DIGlobalVariableExpression(var: !944, expr: !DIExpression())
+!944 = distinct !DIGlobalVariable(scope: null, file: !484, line: 513, type: !800, isLocal: true, isDefinition: true)
+!945 = !DIGlobalVariableExpression(var: !946, expr: !DIExpression())
+!946 = distinct !DIGlobalVariable(scope: null, file: !484, line: 524, type: !854, isLocal: true, isDefinition: true)
+!947 = !DIGlobalVariableExpression(var: !948, expr: !DIExpression())
+!948 = distinct !DIGlobalVariable(scope: null, file: !484, line: 532, type: !800, isLocal: true, isDefinition: true)
+!949 = !DIGlobalVariableExpression(var: !950, expr: !DIExpression())
+!950 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1134, type: !921, isLocal: true, isDefinition: true)
+!951 = !DIGlobalVariableExpression(var: !952, expr: !DIExpression())
+!952 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1140, type: !896, isLocal: true, isDefinition: true)
+!953 = !DIGlobalVariableExpression(var: !954, expr: !DIExpression())
+!954 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1148, type: !786, isLocal: true, isDefinition: true)
+!955 = !DIGlobalVariableExpression(var: !956, expr: !DIExpression())
+!956 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1157, type: !811, isLocal: true, isDefinition: true)
+!957 = !DIGlobalVariableExpression(var: !958, expr: !DIExpression())
+!958 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1164, type: !959, isLocal: true, isDefinition: true)
+!959 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 680, elements: !2)
+!960 = !DIGlobalVariableExpression(var: !961, expr: !DIExpression())
+!961 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1165, type: !962, isLocal: true, isDefinition: true)
+!962 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 944, elements: !2)
+!963 = !DIGlobalVariableExpression(var: !964, expr: !DIExpression())
+!964 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1175, type: !965, isLocal: true, isDefinition: true)
+!965 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 304, elements: !2)
+!966 = !DIGlobalVariableExpression(var: !967, expr: !DIExpression())
+!967 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1180, type: !885, isLocal: true, isDefinition: true)
+!968 = !DIGlobalVariableExpression(var: !969, expr: !DIExpression())
+!969 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1185, type: !847, isLocal: true, isDefinition: true)
+!970 = !DIGlobalVariableExpression(var: !971, expr: !DIExpression())
+!971 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1195, type: !275, isLocal: true, isDefinition: true)
+!972 = !DIGlobalVariableExpression(var: !973, expr: !DIExpression())
+!973 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1205, type: !974, isLocal: true, isDefinition: true)
+!974 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 296, elements: !2)
+!975 = !DIGlobalVariableExpression(var: !976, expr: !DIExpression())
+!976 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1210, type: !789, isLocal: true, isDefinition: true)
+!977 = !DIGlobalVariableExpression(var: !978, expr: !DIExpression())
+!978 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1220, type: !862, isLocal: true, isDefinition: true)
+!979 = !DIGlobalVariableExpression(var: !980, expr: !DIExpression())
+!980 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1226, type: !275, isLocal: true, isDefinition: true)
+!981 = !DIGlobalVariableExpression(var: !982, expr: !DIExpression())
+!982 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1236, type: !983, isLocal: true, isDefinition: true)
+!983 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 856, elements: !2)
+!984 = !DIGlobalVariableExpression(var: !985, expr: !DIExpression())
+!985 = distinct !DIGlobalVariable(scope: null, file: !484, line: 1241, type: !986, isLocal: true, isDefinition: true)
+!986 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 824, elements: !2)
+!987 = !{i32 2, !"Debug Info Version", i32 3}
+!988 = !DILocalVariable(name: "CLcount", scope: !989, file: !484, line: 138, type: !566)
+!989 = distinct !DISubprogram(name: "Configure", scope: !484, file: !484, line: 135, type: !990, scopeLine: 136, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
+!990 = distinct !DISubroutineType(types: !712)
+!991 = !DILocation(line: 0, scope: !989)



More information about the llvm-commits mailing list