From db06b40a032944b43bbae0711dbdb66f5894e46f Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 1 Oct 2024 05:53:49 -0700 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@ac2a2816e3fe Updates LLVM usage to match [ac2a2816e3fe](https://github.com/llvm/llvm-project/commit/ac2a2816e3fe) PiperOrigin-RevId: 680981749 --- third_party/llvm/generated.patch | 407 +++++++++++++++++++++++++++++++ third_party/llvm/workspace.bzl | 4 +- 2 files changed, 409 insertions(+), 2 deletions(-) diff --git a/third_party/llvm/generated.patch b/third_party/llvm/generated.patch index 509398da9..26a6e36c6 100644 --- a/third_party/llvm/generated.patch +++ b/third_party/llvm/generated.patch @@ -1 +1,408 @@ Auto generated patch. Do not edit or delete it, even if empty. +diff -ruN --strip-trailing-cr a/clang/include/clang/AST/DeclID.h b/clang/include/clang/AST/DeclID.h +--- a/clang/include/clang/AST/DeclID.h ++++ b/clang/include/clang/AST/DeclID.h +@@ -189,6 +189,7 @@ + // Every Decl ID is a local decl ID to the module being writing in ASTWriter. + friend class ASTWriter; + friend class GlobalDeclID; ++ friend struct llvm::DenseMapInfo; + + public: + LocalDeclID() : Base() {} +@@ -266,6 +267,27 @@ + return L == R; + } + }; ++ ++template <> struct DenseMapInfo { ++ using LocalDeclID = clang::LocalDeclID; ++ using DeclID = LocalDeclID::DeclID; ++ ++ static LocalDeclID getEmptyKey() { ++ return LocalDeclID(DenseMapInfo::getEmptyKey()); ++ } ++ ++ static LocalDeclID getTombstoneKey() { ++ return LocalDeclID(DenseMapInfo::getTombstoneKey()); ++ } ++ ++ static unsigned getHashValue(const LocalDeclID &Key) { ++ return DenseMapInfo::getHashValue(Key.getRawValue()); ++ } ++ ++ static bool isEqual(const LocalDeclID &L, const LocalDeclID &R) { ++ return L == R; ++ } ++}; + + } // namespace llvm + +diff -ruN --strip-trailing-cr a/clang/include/clang/Serialization/ASTWriter.h b/clang/include/clang/Serialization/ASTWriter.h +--- a/clang/include/clang/Serialization/ASTWriter.h ++++ b/clang/include/clang/Serialization/ASTWriter.h +@@ -233,13 +233,13 @@ + /// instead of comparing the result of `getDeclID()` or `GetDeclRef()`. + llvm::SmallPtrSet PredefinedDecls; + +- /// Mapping from FunctionDecl to the list of lambda IDs inside the function. ++ /// Mapping from FunctionDecl ID to the list of lambda IDs inside the ++ /// function. + /// + /// These lambdas have to be loaded right after the function they belong to. + /// In order to have canonical declaration for lambda class from the same + /// module as enclosing function during deserialization. +- llvm::DenseMap> +- FunctionToLambdasMap; ++ llvm::DenseMap> FunctionToLambdasMap; + + /// Offset of each declaration in the bitstream, indexed by + /// the declaration's ID. +diff -ruN --strip-trailing-cr a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp +--- a/clang/lib/Serialization/ASTWriter.cpp ++++ b/clang/lib/Serialization/ASTWriter.cpp +@@ -5713,8 +5713,7 @@ + // efficent becuase it allows lazy deserialization. + RecordData FunctionToLambdasMapRecord; + for (const auto &Pair : FunctionToLambdasMap) { +- FunctionToLambdasMapRecord.push_back( +- GetDeclRef(Pair.first).getRawValue()); ++ FunctionToLambdasMapRecord.push_back(Pair.first.getRawValue()); + FunctionToLambdasMapRecord.push_back(Pair.second.size()); + for (const auto &Lambda : Pair.second) + FunctionToLambdasMapRecord.push_back(Lambda.getRawValue()); +diff -ruN --strip-trailing-cr a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp +--- a/clang/lib/Serialization/ASTWriterDecl.cpp ++++ b/clang/lib/Serialization/ASTWriterDecl.cpp +@@ -1524,7 +1524,8 @@ + // For lambdas inside canonical FunctionDecl remember the mapping. + if (auto FD = llvm::dyn_cast_or_null(D->getDeclContext()); + FD && FD->isCanonicalDecl()) { +- Writer.FunctionToLambdasMap[FD].push_back(Writer.GetDeclRef(D)); ++ Writer.FunctionToLambdasMap[Writer.GetDeclRef(FD)].push_back( ++ Writer.GetDeclRef(D)); + } + } else { + Record.push_back(CXXRecNotTemplate); +diff -ruN --strip-trailing-cr a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp ++++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +@@ -4454,7 +4454,9 @@ + auto *VecTy = getWidenedType(ScalarTy, NumScalars); + int NumParts = TTI->getNumberOfParts(VecTy); + if (NumParts == 0 || NumParts >= NumScalars || +- VecTy->getNumElements() % NumParts != 0) ++ VecTy->getNumElements() % NumParts != 0 || ++ !hasFullVectorsOrPowerOf2(*TTI, VecTy->getElementType(), ++ VecTy->getNumElements() / NumParts)) + NumParts = 1; + SmallVector ExtractMask; + SmallVector Mask; +@@ -6462,7 +6464,9 @@ + auto *VecTy = getWidenedType(ScalarTy, NumScalars); + NumParts = TTI.getNumberOfParts(VecTy); + if (NumParts == 0 || NumParts >= NumScalars || +- VecTy->getNumElements() % NumParts != 0) ++ VecTy->getNumElements() % NumParts != 0 || ++ !hasFullVectorsOrPowerOf2(TTI, VecTy->getElementType(), ++ VecTy->getNumElements() / NumParts)) + NumParts = 1; + } + unsigned VF = PowerOf2Ceil(NumScalars / NumParts); +@@ -9961,7 +9965,9 @@ + auto *MaskVecTy = getWidenedType(ScalarTy, Mask.size()); + unsigned NumParts = TTI.getNumberOfParts(MaskVecTy); + if (NumParts == 0 || NumParts >= Mask.size() || +- MaskVecTy->getNumElements() % NumParts != 0) ++ MaskVecTy->getNumElements() % NumParts != 0 || ++ !hasFullVectorsOrPowerOf2(TTI, MaskVecTy->getElementType(), ++ MaskVecTy->getNumElements() / NumParts)) + NumParts = 1; + unsigned SliceSize = getPartNumElems(Mask.size(), NumParts); + const auto *It = +@@ -9979,7 +9985,9 @@ + auto *MaskVecTy = getWidenedType(ScalarTy, Mask.size()); + unsigned NumParts = TTI.getNumberOfParts(MaskVecTy); + if (NumParts == 0 || NumParts >= Mask.size() || +- MaskVecTy->getNumElements() % NumParts != 0) ++ MaskVecTy->getNumElements() % NumParts != 0 || ++ !hasFullVectorsOrPowerOf2(TTI, MaskVecTy->getElementType(), ++ MaskVecTy->getNumElements() / NumParts)) + NumParts = 1; + unsigned SliceSize = getPartNumElems(Mask.size(), NumParts); + const auto *It = +@@ -13630,7 +13638,9 @@ + auto *VecTy = getWidenedType(ScalarTy, GatheredScalars.size()); + unsigned NumParts = TTI->getNumberOfParts(VecTy); + if (NumParts == 0 || NumParts >= GatheredScalars.size() || +- VecTy->getNumElements() % NumParts != 0) ++ VecTy->getNumElements() % NumParts != 0 || ++ !hasFullVectorsOrPowerOf2(*TTI, VecTy->getElementType(), ++ VecTy->getNumElements() / NumParts)) + NumParts = 1; + if (!all_of(GatheredScalars, IsaPred)) { + // Check for gathered extracts. +diff -ruN --strip-trailing-cr a/llvm/test/Transforms/SLPVectorizer/X86/non-power-of-2-num-elems.ll b/llvm/test/Transforms/SLPVectorizer/X86/non-power-of-2-num-elems.ll +--- a/llvm/test/Transforms/SLPVectorizer/X86/non-power-of-2-num-elems.ll ++++ b/llvm/test/Transforms/SLPVectorizer/X86/non-power-of-2-num-elems.ll +@@ -0,0 +1,183 @@ ++; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 ++; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64--linux-gnu < %s -mcpu=sapphirerapids | FileCheck %s ++ ++define void @test(ptr %src, ptr %dst, ptr %c, i64 %arrayidx14.15p) { ++; CHECK-LABEL: define void @test( ++; CHECK-SAME: ptr [[SRC:%.*]], ptr [[DST:%.*]], ptr [[C:%.*]], i64 [[ARRAYIDX14_15P:%.*]]) #[[ATTR0:[0-9]+]] { ++; CHECK-NEXT: [[ENTRY:.*]]: ++; CHECK-NEXT: [[ARRAYIDX12_5:%.*]] = getelementptr i8, ptr [[C]], i64 192 ++; CHECK-NEXT: [[ARRAYIDX14_5:%.*]] = getelementptr i8, ptr [[C]], i64 320 ++; CHECK-NEXT: [[ARRAYIDX_6:%.*]] = getelementptr i8, ptr [[C]], i64 72 ++; CHECK-NEXT: [[ARRAYIDX12_6:%.*]] = getelementptr i8, ptr [[C]], i64 200 ++; CHECK-NEXT: [[ARRAYIDX14_6:%.*]] = getelementptr i8, ptr [[C]], i64 328 ++; CHECK-NEXT: [[ARRAYIDX_7:%.*]] = getelementptr i8, ptr [[C]], i64 80 ++; CHECK-NEXT: [[ARRAYIDX12_7:%.*]] = getelementptr i8, ptr [[C]], i64 208 ++; CHECK-NEXT: [[ARRAYIDX14_7:%.*]] = getelementptr i8, ptr [[C]], i64 336 ++; CHECK-NEXT: [[ARRAYIDX12_8:%.*]] = getelementptr i8, ptr [[C]], i64 216 ++; CHECK-NEXT: [[ARRAYIDX14_8:%.*]] = getelementptr i8, ptr [[C]], i64 344 ++; CHECK-NEXT: [[ARRAYIDX_9:%.*]] = getelementptr i8, ptr [[C]], i64 96 ++; CHECK-NEXT: [[ARRAYIDX12_9:%.*]] = getelementptr i8, ptr [[C]], i64 224 ++; CHECK-NEXT: [[ARRAYIDX14_9:%.*]] = getelementptr i8, ptr [[C]], i64 352 ++; CHECK-NEXT: [[ARRAYIDX_10:%.*]] = getelementptr i8, ptr [[C]], i64 104 ++; CHECK-NEXT: [[ARRAYIDX12_10:%.*]] = getelementptr i8, ptr [[C]], i64 232 ++; CHECK-NEXT: [[ARRAYIDX14_10:%.*]] = getelementptr i8, ptr [[C]], i64 360 ++; CHECK-NEXT: [[ARRAYIDX_11:%.*]] = getelementptr i8, ptr [[C]], i64 112 ++; CHECK-NEXT: [[ARRAYIDX12_11:%.*]] = getelementptr i8, ptr [[C]], i64 240 ++; CHECK-NEXT: [[ARRAYIDX14_11:%.*]] = getelementptr i8, ptr [[C]], i64 368 ++; CHECK-NEXT: [[ARRAYIDX_12:%.*]] = getelementptr i8, ptr [[C]], i64 120 ++; CHECK-NEXT: [[ARRAYIDX12_12:%.*]] = getelementptr i8, ptr [[C]], i64 248 ++; CHECK-NEXT: [[ARRAYIDX14_12:%.*]] = getelementptr i8, ptr [[C]], i64 376 ++; CHECK-NEXT: [[ARRAYIDX14_13:%.*]] = getelementptr i8, ptr [[C]], i64 384 ++; CHECK-NEXT: [[ARRAYIDX12_5P:%.*]] = load i64, ptr [[ARRAYIDX12_5]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_5P:%.*]] = load i64, ptr [[ARRAYIDX14_5]], align 8 ++; CHECK-NEXT: [[ARRAYIDX_6P:%.*]] = load i64, ptr [[ARRAYIDX_6]], align 8 ++; CHECK-NEXT: [[ARRAYIDX12_6P:%.*]] = load i64, ptr [[ARRAYIDX12_6]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_6P:%.*]] = load i64, ptr [[ARRAYIDX14_6]], align 8 ++; CHECK-NEXT: [[ARRAYIDX_7P:%.*]] = load i64, ptr [[ARRAYIDX_7]], align 8 ++; CHECK-NEXT: [[ARRAYIDX12_7P:%.*]] = load i64, ptr [[ARRAYIDX12_7]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_7P:%.*]] = load i64, ptr [[ARRAYIDX14_7]], align 8 ++; CHECK-NEXT: [[ARRAYIDX_8P:%.*]] = load i64, ptr [[C]], align 8 ++; CHECK-NEXT: [[ARRAYIDX12_8P:%.*]] = load i64, ptr [[ARRAYIDX12_8]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_8P:%.*]] = load i64, ptr [[ARRAYIDX14_8]], align 8 ++; CHECK-NEXT: [[ARRAYIDX_9P:%.*]] = load i64, ptr [[ARRAYIDX_9]], align 8 ++; CHECK-NEXT: [[ARRAYIDX12_9P:%.*]] = load i64, ptr [[ARRAYIDX12_9]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_9P:%.*]] = load i64, ptr [[ARRAYIDX14_9]], align 8 ++; CHECK-NEXT: [[ARRAYIDX_10P:%.*]] = load i64, ptr [[ARRAYIDX_10]], align 8 ++; CHECK-NEXT: [[ARRAYIDX12_10P:%.*]] = load i64, ptr [[ARRAYIDX12_10]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_10P:%.*]] = load i64, ptr [[ARRAYIDX14_10]], align 8 ++; CHECK-NEXT: [[ARRAYIDX_11P:%.*]] = load i64, ptr [[ARRAYIDX_11]], align 8 ++; CHECK-NEXT: [[ARRAYIDX12_11P:%.*]] = load i64, ptr [[ARRAYIDX12_11]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_11P:%.*]] = load i64, ptr [[ARRAYIDX14_11]], align 8 ++; CHECK-NEXT: [[ARRAYIDX_12P:%.*]] = load i64, ptr [[ARRAYIDX_12]], align 8 ++; CHECK-NEXT: [[ARRAYIDX12_12P:%.*]] = load i64, ptr [[ARRAYIDX12_12]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_12P:%.*]] = load i64, ptr [[ARRAYIDX14_12]], align 8 ++; CHECK-NEXT: [[ARRAYIDX_13P:%.*]] = load i64, ptr [[SRC]], align 8 ++; CHECK-NEXT: [[ARRAYIDX14_13P:%.*]] = load i64, ptr [[ARRAYIDX14_13]], align 8 ++; CHECK-NEXT: br label %[[LAND_LHS_TRUE137:.*]] ++; CHECK: [[LAND_LHS_TRUE137]]: ++; CHECK-NEXT: [[TMP0:%.*]] = phi i64 [ 0, %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_15P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP1:%.*]] = phi i64 [ 0, %[[LAND_LHS_TRUE137]] ], [ 1, %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP2:%.*]] = phi i64 [ 1, %[[LAND_LHS_TRUE137]] ], [ 0, %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP3:%.*]] = phi i64 [ [[TMP0]], %[[LAND_LHS_TRUE137]] ], [ 0, %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP4:%.*]] = phi i64 [ [[TMP1]], %[[LAND_LHS_TRUE137]] ], [ 0, %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP5:%.*]] = phi i64 [ [[TMP2]], %[[LAND_LHS_TRUE137]] ], [ 0, %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP6:%.*]] = phi i64 [ [[TMP3]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_13P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP7:%.*]] = phi i64 [ [[TMP4]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_13P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP8:%.*]] = phi i64 [ [[TMP5]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_13P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP9:%.*]] = phi i64 [ [[TMP6]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_12P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP10:%.*]] = phi i64 [ [[TMP7]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_12P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP11:%.*]] = phi i64 [ [[TMP8]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_12P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP12:%.*]] = phi i64 [ [[TMP9]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_11P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP13:%.*]] = phi i64 [ [[TMP10]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_11P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP14:%.*]] = phi i64 [ [[TMP11]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_11P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP15:%.*]] = phi i64 [ [[TMP12]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_10P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP16:%.*]] = phi i64 [ [[TMP13]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_10P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP17:%.*]] = phi i64 [ [[TMP14]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_10P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP18:%.*]] = phi i64 [ [[TMP15]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_9P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP19:%.*]] = phi i64 [ [[TMP16]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_9P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP20:%.*]] = phi i64 [ [[TMP17]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_9P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP21:%.*]] = phi i64 [ [[TMP18]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_8P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP22:%.*]] = phi i64 [ [[TMP19]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_8P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP23:%.*]] = phi i64 [ [[TMP20]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_8P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP24:%.*]] = phi i64 [ [[TMP21]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_7P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP25:%.*]] = phi i64 [ [[TMP22]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_7P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP26:%.*]] = phi i64 [ [[TMP23]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_7P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP27:%.*]] = phi i64 [ [[TMP24]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_6P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP28:%.*]] = phi i64 [ [[TMP25]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_6P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP29:%.*]] = phi i64 [ [[TMP26]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_6P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP30:%.*]] = phi i64 [ [[TMP27]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_5P]], %[[ENTRY]] ] ++; CHECK-NEXT: [[TMP31:%.*]] = phi i64 [ [[TMP28]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_5P]], %[[ENTRY]] ] ++; CHECK-NEXT: store i64 [[TMP31]], ptr [[DST]], align 8 ++; CHECK-NEXT: store i64 [[TMP30]], ptr [[SRC]], align 8 ++; CHECK-NEXT: store i64 [[TMP29]], ptr [[DST]], align 8 ++; CHECK-NEXT: br label %[[LAND_LHS_TRUE137]] ++; ++entry: ++ %arrayidx12.5 = getelementptr i8, ptr %c, i64 192 ++ %arrayidx14.5 = getelementptr i8, ptr %c, i64 320 ++ %arrayidx.6 = getelementptr i8, ptr %c, i64 72 ++ %arrayidx12.6 = getelementptr i8, ptr %c, i64 200 ++ %arrayidx14.6 = getelementptr i8, ptr %c, i64 328 ++ %arrayidx.7 = getelementptr i8, ptr %c, i64 80 ++ %arrayidx12.7 = getelementptr i8, ptr %c, i64 208 ++ %arrayidx14.7 = getelementptr i8, ptr %c, i64 336 ++ %arrayidx12.8 = getelementptr i8, ptr %c, i64 216 ++ %arrayidx14.8 = getelementptr i8, ptr %c, i64 344 ++ %arrayidx.9 = getelementptr i8, ptr %c, i64 96 ++ %arrayidx12.9 = getelementptr i8, ptr %c, i64 224 ++ %arrayidx14.9 = getelementptr i8, ptr %c, i64 352 ++ %arrayidx.10 = getelementptr i8, ptr %c, i64 104 ++ %arrayidx12.10 = getelementptr i8, ptr %c, i64 232 ++ %arrayidx14.10 = getelementptr i8, ptr %c, i64 360 ++ %arrayidx.11 = getelementptr i8, ptr %c, i64 112 ++ %arrayidx12.11 = getelementptr i8, ptr %c, i64 240 ++ %arrayidx14.11 = getelementptr i8, ptr %c, i64 368 ++ %arrayidx.12 = getelementptr i8, ptr %c, i64 120 ++ %arrayidx12.12 = getelementptr i8, ptr %c, i64 248 ++ %arrayidx14.12 = getelementptr i8, ptr %c, i64 376 ++ %arrayidx14.13 = getelementptr i8, ptr %c, i64 384 ++ %arrayidx12.5p = load i64, ptr %arrayidx12.5, align 8 ++ %arrayidx14.5p = load i64, ptr %arrayidx14.5, align 8 ++ %arrayidx.6p = load i64, ptr %arrayidx.6, align 8 ++ %arrayidx12.6p = load i64, ptr %arrayidx12.6, align 8 ++ %arrayidx14.6p = load i64, ptr %arrayidx14.6, align 8 ++ %arrayidx.7p = load i64, ptr %arrayidx.7, align 8 ++ %arrayidx12.7p = load i64, ptr %arrayidx12.7, align 8 ++ %arrayidx14.7p = load i64, ptr %arrayidx14.7, align 8 ++ %arrayidx.8p = load i64, ptr %c, align 8 ++ %arrayidx12.8p = load i64, ptr %arrayidx12.8, align 8 ++ %arrayidx14.8p = load i64, ptr %arrayidx14.8, align 8 ++ %arrayidx.9p = load i64, ptr %arrayidx.9, align 8 ++ %arrayidx12.9p = load i64, ptr %arrayidx12.9, align 8 ++ %arrayidx14.9p = load i64, ptr %arrayidx14.9, align 8 ++ %arrayidx.10p = load i64, ptr %arrayidx.10, align 8 ++ %arrayidx12.10p = load i64, ptr %arrayidx12.10, align 8 ++ %arrayidx14.10p = load i64, ptr %arrayidx14.10, align 8 ++ %arrayidx.11p = load i64, ptr %arrayidx.11, align 8 ++ %arrayidx12.11p = load i64, ptr %arrayidx12.11, align 8 ++ %arrayidx14.11p = load i64, ptr %arrayidx14.11, align 8 ++ %arrayidx.12p = load i64, ptr %arrayidx.12, align 8 ++ %arrayidx12.12p = load i64, ptr %arrayidx12.12, align 8 ++ %arrayidx14.12p = load i64, ptr %arrayidx14.12, align 8 ++ %arrayidx.13p = load i64, ptr %src, align 8 ++ %arrayidx14.13p = load i64, ptr %arrayidx14.13, align 8 ++ br label %land.lhs.true137 ++ ++land.lhs.true137: ++ %0 = phi i64 [ 0, %land.lhs.true137 ], [ %arrayidx14.15p, %entry ] ++ %1 = phi i64 [ 0, %land.lhs.true137 ], [ 1, %entry ] ++ %2 = phi i64 [ 1, %land.lhs.true137 ], [ 0, %entry ] ++ %3 = phi i64 [ %0, %land.lhs.true137 ], [ 0, %entry ] ++ %4 = phi i64 [ %1, %land.lhs.true137 ], [ 0, %entry ] ++ %5 = phi i64 [ %2, %land.lhs.true137 ], [ 0, %entry ] ++ %6 = phi i64 [ %3, %land.lhs.true137 ], [ %arrayidx14.13p, %entry ] ++ %7 = phi i64 [ %4, %land.lhs.true137 ], [ %arrayidx.13p, %entry ] ++ %8 = phi i64 [ %5, %land.lhs.true137 ], [ %arrayidx.13p, %entry ] ++ %9 = phi i64 [ %6, %land.lhs.true137 ], [ %arrayidx14.12p, %entry ] ++ %10 = phi i64 [ %7, %land.lhs.true137 ], [ %arrayidx12.12p, %entry ] ++ %11 = phi i64 [ %8, %land.lhs.true137 ], [ %arrayidx.12p, %entry ] ++ %12 = phi i64 [ %9, %land.lhs.true137 ], [ %arrayidx14.11p, %entry ] ++ %13 = phi i64 [ %10, %land.lhs.true137 ], [ %arrayidx12.11p, %entry ] ++ %14 = phi i64 [ %11, %land.lhs.true137 ], [ %arrayidx.11p, %entry ] ++ %15 = phi i64 [ %12, %land.lhs.true137 ], [ %arrayidx14.10p, %entry ] ++ %16 = phi i64 [ %13, %land.lhs.true137 ], [ %arrayidx12.10p, %entry ] ++ %17 = phi i64 [ %14, %land.lhs.true137 ], [ %arrayidx.10p, %entry ] ++ %18 = phi i64 [ %15, %land.lhs.true137 ], [ %arrayidx14.9p, %entry ] ++ %19 = phi i64 [ %16, %land.lhs.true137 ], [ %arrayidx12.9p, %entry ] ++ %20 = phi i64 [ %17, %land.lhs.true137 ], [ %arrayidx.9p, %entry ] ++ %21 = phi i64 [ %18, %land.lhs.true137 ], [ %arrayidx14.8p, %entry ] ++ %22 = phi i64 [ %19, %land.lhs.true137 ], [ %arrayidx12.8p, %entry ] ++ %23 = phi i64 [ %20, %land.lhs.true137 ], [ %arrayidx.8p, %entry ] ++ %24 = phi i64 [ %21, %land.lhs.true137 ], [ %arrayidx14.7p, %entry ] ++ %25 = phi i64 [ %22, %land.lhs.true137 ], [ %arrayidx12.7p, %entry ] ++ %26 = phi i64 [ %23, %land.lhs.true137 ], [ %arrayidx.7p, %entry ] ++ %27 = phi i64 [ %24, %land.lhs.true137 ], [ %arrayidx14.6p, %entry ] ++ %28 = phi i64 [ %25, %land.lhs.true137 ], [ %arrayidx12.6p, %entry ] ++ %29 = phi i64 [ %26, %land.lhs.true137 ], [ %arrayidx.6p, %entry ] ++ %30 = phi i64 [ %27, %land.lhs.true137 ], [ %arrayidx14.5p, %entry ] ++ %31 = phi i64 [ %28, %land.lhs.true137 ], [ %arrayidx12.5p, %entry ] ++ store i64 %31, ptr %dst, align 8 ++ store i64 %30, ptr %src, align 8 ++ store i64 %29, ptr %dst, align 8 ++ br label %land.lhs.true137 ++} +diff -ruN --strip-trailing-cr a/mlir/examples/toy/Ch1/include/toy/Lexer.h b/mlir/examples/toy/Ch1/include/toy/Lexer.h +--- a/mlir/examples/toy/Ch1/include/toy/Lexer.h ++++ b/mlir/examples/toy/Ch1/include/toy/Lexer.h +@@ -15,6 +15,7 @@ + + #include "llvm/ADT/StringRef.h" + ++#include + #include + #include + +diff -ruN --strip-trailing-cr a/mlir/examples/toy/Ch2/include/toy/Lexer.h b/mlir/examples/toy/Ch2/include/toy/Lexer.h +--- a/mlir/examples/toy/Ch2/include/toy/Lexer.h ++++ b/mlir/examples/toy/Ch2/include/toy/Lexer.h +@@ -15,6 +15,7 @@ + + #include "llvm/ADT/StringRef.h" + ++#include + #include + #include + +diff -ruN --strip-trailing-cr a/mlir/examples/toy/Ch3/include/toy/Lexer.h b/mlir/examples/toy/Ch3/include/toy/Lexer.h +--- a/mlir/examples/toy/Ch3/include/toy/Lexer.h ++++ b/mlir/examples/toy/Ch3/include/toy/Lexer.h +@@ -15,6 +15,7 @@ + + #include "llvm/ADT/StringRef.h" + ++#include + #include + #include + +diff -ruN --strip-trailing-cr a/mlir/examples/toy/Ch4/include/toy/Lexer.h b/mlir/examples/toy/Ch4/include/toy/Lexer.h +--- a/mlir/examples/toy/Ch4/include/toy/Lexer.h ++++ b/mlir/examples/toy/Ch4/include/toy/Lexer.h +@@ -15,6 +15,7 @@ + + #include "llvm/ADT/StringRef.h" + ++#include + #include + #include + +diff -ruN --strip-trailing-cr a/mlir/examples/toy/Ch5/include/toy/Lexer.h b/mlir/examples/toy/Ch5/include/toy/Lexer.h +--- a/mlir/examples/toy/Ch5/include/toy/Lexer.h ++++ b/mlir/examples/toy/Ch5/include/toy/Lexer.h +@@ -15,6 +15,7 @@ + + #include "llvm/ADT/StringRef.h" + ++#include + #include + #include + +diff -ruN --strip-trailing-cr a/mlir/examples/toy/Ch6/include/toy/Lexer.h b/mlir/examples/toy/Ch6/include/toy/Lexer.h +--- a/mlir/examples/toy/Ch6/include/toy/Lexer.h ++++ b/mlir/examples/toy/Ch6/include/toy/Lexer.h +@@ -15,6 +15,7 @@ + + #include "llvm/ADT/StringRef.h" + ++#include + #include + #include + +diff -ruN --strip-trailing-cr a/mlir/examples/toy/Ch7/include/toy/Lexer.h b/mlir/examples/toy/Ch7/include/toy/Lexer.h +--- a/mlir/examples/toy/Ch7/include/toy/Lexer.h ++++ b/mlir/examples/toy/Ch7/include/toy/Lexer.h +@@ -15,6 +15,7 @@ + + #include "llvm/ADT/StringRef.h" + ++#include + #include + #include + diff --git a/third_party/llvm/workspace.bzl b/third_party/llvm/workspace.bzl index 7b1108678..e47ffaec2 100644 --- a/third_party/llvm/workspace.bzl +++ b/third_party/llvm/workspace.bzl @@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" - LLVM_COMMIT = "29b92d07746fac26cd64c914bc9c5c3833974f6d" - LLVM_SHA256 = "3e8e93e3749454af4b64f7f34b792a4748b62fc533bca1703d33b2b04e34eb70" + LLVM_COMMIT = "ac2a2816e3fe934998e5f950c9426fca0796929d" + LLVM_SHA256 = "bfcec3c9a582ab71c1e4a212e5a7cfe2c9a8164331a0b728da5c8a99d81c46de" tf_http_archive( name = name,