[llvm-branch-commits] [llvm] 2461cdb - [CodeGen][SimplifyCFG] Teach DwarfEHPrepare to preserve DomTree
Roman Lebedev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 1 14:06:32 PST 2021
Author: Roman Lebedev
Date: 2021-01-02T01:01:19+03:00
New Revision: 2461cdb41724298591133c811df82b0064adfa6b
URL: https://github.com/llvm/llvm-project/commit/2461cdb41724298591133c811df82b0064adfa6b
DIFF: https://github.com/llvm/llvm-project/commit/2461cdb41724298591133c811df82b0064adfa6b.diff
LOG: [CodeGen][SimplifyCFG] Teach DwarfEHPrepare to preserve DomTree
Once the default for SimplifyCFG flips, we can no longer pass nullptr
instead of DomTree to SimplifyCFG, so we need to propagate it here.
We don't strictly need to actually preserve DomTree in DwarfEHPrepare,
but we might as well do it, since it's trivial.
Added:
Modified:
llvm/lib/CodeGen/DwarfEHPrepare.cpp
llvm/test/CodeGen/AArch64/pic-eh-stubs.ll
llvm/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
llvm/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll
llvm/test/CodeGen/ARM/arm-ttype-target2.ll
llvm/test/CodeGen/ARM/dwarf-eh.ll
llvm/test/CodeGen/ARM/ehabi-filters.ll
llvm/test/CodeGen/ARM/global-merge.ll
llvm/test/CodeGen/ARM/setjmp_longjmp.ll
llvm/test/CodeGen/Hexagon/cfi_offset.ll
llvm/test/CodeGen/Hexagon/ehabi.ll
llvm/test/CodeGen/Hexagon/packetize-allocframe.ll
llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
llvm/test/CodeGen/PowerPC/aix-exception.ll
llvm/test/CodeGen/SPARC/exception.ll
llvm/test/CodeGen/X86/2007-05-05-Personality.ll
llvm/test/CodeGen/X86/2010-08-04-MingWCrash.ll
llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
llvm/test/CodeGen/X86/basic-block-sections-eh.ll
llvm/test/CodeGen/X86/code-model-kernel.ll
llvm/test/CodeGen/X86/dwarf-eh-prepare.ll
llvm/test/CodeGen/X86/gcc_except_table-multi.ll
llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
index 5696b2e46d3b..a4824ef21640 100644
--- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
@@ -15,6 +15,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/CFG.h"
+#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/EHPersonalities.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/CodeGen/RuntimeLibcalls.h"
@@ -52,7 +53,7 @@ class DwarfEHPrepare {
Function &F;
const TargetLowering &TLI;
- DominatorTree *DT;
+ DomTreeUpdater *DTU;
const TargetTransformInfo *TTI;
/// Return the exception object from the value passed into
@@ -72,10 +73,10 @@ class DwarfEHPrepare {
public:
DwarfEHPrepare(CodeGenOpt::Level OptLevel_, FunctionCallee &RewindFunction_,
- Function &F_, const TargetLowering &TLI_, DominatorTree *DT_,
+ Function &F_, const TargetLowering &TLI_, DomTreeUpdater *DTU_,
const TargetTransformInfo *TTI_)
: OptLevel(OptLevel_), RewindFunction(RewindFunction_), F(F_), TLI(TLI_),
- DT(DT_), TTI(TTI_) {}
+ DTU(DTU_), TTI(TTI_) {}
bool run();
};
@@ -122,11 +123,13 @@ Value *DwarfEHPrepare::GetExceptionObject(ResumeInst *RI) {
size_t DwarfEHPrepare::pruneUnreachableResumes(
SmallVectorImpl<ResumeInst *> &Resumes,
SmallVectorImpl<LandingPadInst *> &CleanupLPads) {
+ assert(DTU && "Should have DomTreeUpdater here.");
+
BitVector ResumeReachable(Resumes.size());
size_t ResumeIndex = 0;
for (auto *RI : Resumes) {
for (auto *LP : CleanupLPads) {
- if (isPotentiallyReachable(LP, RI, nullptr, DT)) {
+ if (isPotentiallyReachable(LP, RI, nullptr, &DTU->getDomTree())) {
ResumeReachable.set(ResumeIndex);
break;
}
@@ -150,7 +153,7 @@ size_t DwarfEHPrepare::pruneUnreachableResumes(
BasicBlock *BB = RI->getParent();
new UnreachableInst(Ctx, RI);
RI->eraseFromParent();
- simplifyCFG(BB, *TTI);
+ simplifyCFG(BB, *TTI, DTU);
}
}
Resumes.resize(ResumesLeft);
@@ -211,6 +214,9 @@ bool DwarfEHPrepare::InsertUnwindResumeCalls() {
return true;
}
+ std::vector<DominatorTree::UpdateType> Updates;
+ Updates.reserve(Resumes.size());
+
BasicBlock *UnwindBB = BasicBlock::Create(Ctx, "unwind_resume", &F);
PHINode *PN = PHINode::Create(Type::getInt8PtrTy(Ctx), ResumesLeft, "exn.obj",
UnwindBB);
@@ -220,6 +226,7 @@ bool DwarfEHPrepare::InsertUnwindResumeCalls() {
for (ResumeInst *RI : Resumes) {
BasicBlock *Parent = RI->getParent();
BranchInst::Create(UnwindBB, Parent);
+ Updates.push_back({DominatorTree::Insert, Parent, UnwindBB});
Value *ExnObj = GetExceptionObject(RI);
PN->addIncoming(ExnObj, Parent);
@@ -234,10 +241,39 @@ bool DwarfEHPrepare::InsertUnwindResumeCalls() {
// We never expect _Unwind_Resume to return.
CI->setDoesNotReturn();
new UnreachableInst(Ctx, UnwindBB);
+
+ if (DTU && RequireAndPreserveDomTree)
+ DTU->applyUpdatesPermissive(Updates);
+
return true;
}
-bool DwarfEHPrepare::run() { return InsertUnwindResumeCalls(); }
+bool DwarfEHPrepare::run() {
+ assert(((OptLevel == CodeGenOpt::None) ||
+ (DTU &&
+ DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) &&
+ "Original domtree is invalid?");
+
+ bool Changed = InsertUnwindResumeCalls();
+
+ assert(((OptLevel == CodeGenOpt::None || !RequireAndPreserveDomTree) ||
+ (DTU &&
+ DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) &&
+ "Original domtree is invalid?");
+
+ return Changed;
+}
+
+static bool prepareDwarfEH(CodeGenOpt::Level OptLevel,
+ FunctionCallee &RewindFunction, Function &F,
+ const TargetLowering &TLI, DominatorTree *DT,
+ const TargetTransformInfo *TTI) {
+ DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager);
+
+ return DwarfEHPrepare(OptLevel, RewindFunction, F, TLI, DT ? &DTU : nullptr,
+ TTI)
+ .run();
+};
namespace {
@@ -263,7 +299,7 @@ class DwarfEHPrepareLegacyPass : public FunctionPass {
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
TTI = &getAnalysis<TargetTransformInfoWrapperPass>().getTTI(F);
}
- return DwarfEHPrepare(OptLevel, RewindFunction, F, TLI, DT, TTI).run();
+ return prepareDwarfEH(OptLevel, RewindFunction, F, TLI, DT, TTI);
}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -272,6 +308,8 @@ class DwarfEHPrepareLegacyPass : public FunctionPass {
if (OptLevel != CodeGenOpt::None) {
AU.addRequired<DominatorTreeWrapperPass>();
AU.addRequired<TargetTransformInfoWrapperPass>();
+ if (RequireAndPreserveDomTree)
+ AU.addPreserved<DominatorTreeWrapperPass>();
}
}
diff --git a/llvm/test/CodeGen/AArch64/pic-eh-stubs.ll b/llvm/test/CodeGen/AArch64/pic-eh-stubs.ll
index af95b7e100a6..a438fea89012 100644
--- a/llvm/test/CodeGen/AArch64/pic-eh-stubs.ll
+++ b/llvm/test/CodeGen/AArch64/pic-eh-stubs.ll
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=aarch64-none-linux-gnu -relocation-model=pic -simplifycfg-require-and-preserve-domtree=0 -o - %s | FileCheck %s
-; RUN: llc -mtriple=aarch64_be-none-linux-gnu -relocation-model=pic -simplifycfg-require-and-preserve-domtree=0 -o - %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-none-linux-gnu -relocation-model=pic -simplifycfg-require-and-preserve-domtree=1 -o - %s | FileCheck %s
+; RUN: llc -mtriple=aarch64_be-none-linux-gnu -relocation-model=pic -simplifycfg-require-and-preserve-domtree=1 -o - %s | FileCheck %s
; Make sure exception-handling PIC code can be linked correctly. An alternative
; to the sequence described below would have .gcc_except_table itself writable
diff --git a/llvm/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll b/llvm/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
index 34dc4463ef9f..26b2a6efeebe 100644
--- a/llvm/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
+++ b/llvm/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
@@ -1,4 +1,4 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -verify-machineinstrs
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -verify-machineinstrs
; <rdar://problem/9187612>
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
diff --git a/llvm/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll b/llvm/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll
index dda994ffb5e2..58f1f4564320 100644
--- a/llvm/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll
+++ b/llvm/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll
@@ -1,7 +1,7 @@
; Assertion `Encoding == DW_EH_PE_absptr && "Can handle absptr encoding only"' failed.
; Broken in r208166, fixed in 208715.
-; RUN: llc -mtriple=arm-linux-androideabi -o - -filetype=asm -relocation-model=pic -simplifycfg-require-and-preserve-domtree=0 %s
+; RUN: llc -mtriple=arm-linux-androideabi -o - -filetype=asm -relocation-model=pic -simplifycfg-require-and-preserve-domtree=1 %s
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
target triple = "armv4t--linux-androideabi"
diff --git a/llvm/test/CodeGen/ARM/arm-ttype-target2.ll b/llvm/test/CodeGen/ARM/arm-ttype-target2.ll
index 28ae0d3b6d4a..8db6a1d696f1 100644
--- a/llvm/test/CodeGen/ARM/arm-ttype-target2.ll
+++ b/llvm/test/CodeGen/ARM/arm-ttype-target2.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=armv7-none-linux-gnueabi -simplifycfg-require-and-preserve-domtree=0 < %s | FileCheck %s
+; RUN: llc -mtriple=armv7-none-linux-gnueabi -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
@_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
@_ZTS3Foo = linkonce_odr constant [5 x i8] c"3Foo\00"
diff --git a/llvm/test/CodeGen/ARM/dwarf-eh.ll b/llvm/test/CodeGen/ARM/dwarf-eh.ll
index 8ad81bfd78b0..34a20328fb02 100644
--- a/llvm/test/CodeGen/ARM/dwarf-eh.ll
+++ b/llvm/test/CodeGen/ARM/dwarf-eh.ll
@@ -1,6 +1,6 @@
-; RUN: llc -mtriple=arm-netbsd-eabi -o - -filetype=asm -simplifycfg-require-and-preserve-domtree=0 %s | \
+; RUN: llc -mtriple=arm-netbsd-eabi -o - -filetype=asm -simplifycfg-require-and-preserve-domtree=1 %s | \
; RUN: FileCheck %s
-; RUN: llc -mtriple=arm-netbsd-eabi -o - -filetype=asm -simplifycfg-require-and-preserve-domtree=0 %s \
+; RUN: llc -mtriple=arm-netbsd-eabi -o - -filetype=asm -simplifycfg-require-and-preserve-domtree=1 %s \
; RUN: -relocation-model=pic | FileCheck -check-prefix=CHECK-PIC %s
; ModuleID = 'test.cc'
diff --git a/llvm/test/CodeGen/ARM/ehabi-filters.ll b/llvm/test/CodeGen/ARM/ehabi-filters.ll
index aed7ade1e1c1..c2008cef94ab 100644
--- a/llvm/test/CodeGen/ARM/ehabi-filters.ll
+++ b/llvm/test/CodeGen/ARM/ehabi-filters.ll
@@ -1,4 +1,4 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s | FileCheck %s
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64"
target triple = "armv7-none-linux-gnueabi"
diff --git a/llvm/test/CodeGen/ARM/global-merge.ll b/llvm/test/CodeGen/ARM/global-merge.ll
index 4f338c216747..b02832234a72 100644
--- a/llvm/test/CodeGen/ARM/global-merge.ll
+++ b/llvm/test/CodeGen/ARM/global-merge.ll
@@ -1,4 +1,4 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=thumb-apple-darwin -arm-global-merge -global-merge-group-by-use=false -global-merge-on-const=true | FileCheck %s
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=thumb-apple-darwin -arm-global-merge -global-merge-group-by-use=false -global-merge-on-const=true | FileCheck %s
; Test the ARMGlobalMerge pass. Use -mtriple=thumb because it has a small
; value for the maximum offset (127).
diff --git a/llvm/test/CodeGen/ARM/setjmp_longjmp.ll b/llvm/test/CodeGen/ARM/setjmp_longjmp.ll
index 5f2b4dc31e59..22458a4e7288 100644
--- a/llvm/test/CodeGen/ARM/setjmp_longjmp.ll
+++ b/llvm/test/CodeGen/ARM/setjmp_longjmp.ll
@@ -1,6 +1,6 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 %s -o - | FileCheck %s
-; RUN: llc -mtriple=armv7-linux -exception-model sjlj -simplifycfg-require-and-preserve-domtree=0 %s -o - | FileCheck %s -check-prefix CHECK-LINUX
-; RUN: llc -mtriple=thumbv7-win32 -exception-model sjlj -simplifycfg-require-and-preserve-domtree=0 %s -o - | FileCheck %s -check-prefix CHECK-WIN32
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 %s -o - | FileCheck %s
+; RUN: llc -mtriple=armv7-linux -exception-model sjlj -simplifycfg-require-and-preserve-domtree=1 %s -o - | FileCheck %s -check-prefix CHECK-LINUX
+; RUN: llc -mtriple=thumbv7-win32 -exception-model sjlj -simplifycfg-require-and-preserve-domtree=1 %s -o - | FileCheck %s -check-prefix CHECK-WIN32
target triple = "armv7-apple-ios"
declare i32 @llvm.eh.sjlj.setjmp(i8*)
diff --git a/llvm/test/CodeGen/Hexagon/cfi_offset.ll b/llvm/test/CodeGen/Hexagon/cfi_offset.ll
index 8edd71a5476f..18c5d46b9704 100644
--- a/llvm/test/CodeGen/Hexagon/cfi_offset.ll
+++ b/llvm/test/CodeGen/Hexagon/cfi_offset.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -simplifycfg-require-and-preserve-domtree=0 < %s | FileCheck %s
+; RUN: llc -march=hexagon -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
; CHECK: .cfi_def_cfa r30
; CHECK: .cfi_offset r31
; CHECK: .cfi_offset r30
diff --git a/llvm/test/CodeGen/Hexagon/ehabi.ll b/llvm/test/CodeGen/Hexagon/ehabi.ll
index 893f1dbae332..cb8fd7892ecf 100644
--- a/llvm/test/CodeGen/Hexagon/ehabi.ll
+++ b/llvm/test/CodeGen/Hexagon/ehabi.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -simplifycfg-require-and-preserve-domtree=0 < %s | FileCheck %s
+; RUN: llc -march=hexagon -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
; CHECK: GCC_except_table0:
; CHECK: Call site Encoding = uleb128
diff --git a/llvm/test/CodeGen/Hexagon/packetize-allocframe.ll b/llvm/test/CodeGen/Hexagon/packetize-allocframe.ll
index 884b47bd8d7f..ecc6cf542f16 100644
--- a/llvm/test/CodeGen/Hexagon/packetize-allocframe.ll
+++ b/llvm/test/CodeGen/Hexagon/packetize-allocframe.ll
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -O2 -simplifycfg-require-and-preserve-domtree=0 < %s | FileCheck %s
+; RUN: llc -march=hexagon -O2 -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
; The purpose of this test is to make sure that the packetizer is ignoring
; CFI instructions while forming packet for allocframe. Refer to 7d7d99622
diff --git a/llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll b/llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
index 8ddaff404170..0faa1ff4f3ce 100644
--- a/llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
+++ b/llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
@@ -1,4 +1,4 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s | FileCheck %s
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
;; Formerly crashed, see PR 1508
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc64-unknown-linux-gnu"
diff --git a/llvm/test/CodeGen/PowerPC/aix-exception.ll b/llvm/test/CodeGen/PowerPC/aix-exception.ll
index 5db984cd761b..20b468781cf8 100644
--- a/llvm/test/CodeGen/PowerPC/aix-exception.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-exception.ll
@@ -1,9 +1,9 @@
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
-; RUN: -mattr=-altivec -simplifycfg-require-and-preserve-domtree=0 < %s | \
+; RUN: -mattr=-altivec -simplifycfg-require-and-preserve-domtree=1 < %s | \
; RUN: FileCheck --check-prefixes=ASM,ASM32 %s
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \
-; RUN: -mattr=-altivec -simplifycfg-require-and-preserve-domtree=0 < %s | \
+; RUN: -mattr=-altivec -simplifycfg-require-and-preserve-domtree=1 < %s | \
; RUN: FileCheck --check-prefixes=ASM,ASM64 %s
@_ZTIi = external constant i8*
diff --git a/llvm/test/CodeGen/SPARC/exception.ll b/llvm/test/CodeGen/SPARC/exception.ll
index 683ed46d0463..d6470afbead1 100644
--- a/llvm/test/CodeGen/SPARC/exception.ll
+++ b/llvm/test/CodeGen/SPARC/exception.ll
@@ -1,7 +1,7 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -march=sparc -relocation-model=static | FileCheck -check-prefix=V8ABS %s
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -march=sparc -relocation-model=pic | FileCheck -check-prefix=V8PIC %s
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -march=sparcv9 -relocation-model=static | FileCheck -check-prefix=V9ABS %s
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -march=sparcv9 -relocation-model=pic | FileCheck -check-prefix=V9PIC %s
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -march=sparc -relocation-model=static | FileCheck -check-prefix=V8ABS %s
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -march=sparc -relocation-model=pic | FileCheck -check-prefix=V8PIC %s
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -march=sparcv9 -relocation-model=static | FileCheck -check-prefix=V9ABS %s
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -march=sparcv9 -relocation-model=pic | FileCheck -check-prefix=V9PIC %s
%struct.__fundamental_type_info_pseudo = type { %struct.__type_info_pseudo }
diff --git a/llvm/test/CodeGen/X86/2007-05-05-Personality.ll b/llvm/test/CodeGen/X86/2007-05-05-Personality.ll
index 8716a6ebb198..3826380e22cc 100644
--- a/llvm/test/CodeGen/X86/2007-05-05-Personality.ll
+++ b/llvm/test/CodeGen/X86/2007-05-05-Personality.ll
@@ -1,7 +1,7 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=i686-pc-linux-gnu -o - | FileCheck %s --check-prefix=LIN
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=i386-pc-mingw32 -o - | FileCheck %s --check-prefix=WIN
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=i686-pc-windows-gnu -o - | FileCheck %s --check-prefix=WIN
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=x86_64-pc-windows-gnu -o - | FileCheck %s --check-prefix=WIN64
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=i686-pc-linux-gnu -o - | FileCheck %s --check-prefix=LIN
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=i386-pc-mingw32 -o - | FileCheck %s --check-prefix=WIN
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=i686-pc-windows-gnu -o - | FileCheck %s --check-prefix=WIN
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=x86_64-pc-windows-gnu -o - | FileCheck %s --check-prefix=WIN64
; LIN: .cfi_personality 0, __gnat_eh_personality
; LIN: .cfi_lsda 0, .Lexception0
diff --git a/llvm/test/CodeGen/X86/2010-08-04-MingWCrash.ll b/llvm/test/CodeGen/X86/2010-08-04-MingWCrash.ll
index 8e57af217cdf..0fb1e9e02d89 100644
--- a/llvm/test/CodeGen/X86/2010-08-04-MingWCrash.ll
+++ b/llvm/test/CodeGen/X86/2010-08-04-MingWCrash.ll
@@ -1,4 +1,4 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=i386-pc-mingw32
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=i386-pc-mingw32
define void @func() nounwind personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
invoke.cont:
diff --git a/llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll b/llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
index 1f9f79d182a9..f99abbc0fbda 100644
--- a/llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
+++ b/llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
@@ -1,4 +1,4 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -frame-pointer=all
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -frame-pointer=all
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
target triple = "i386-apple-macosx10.7"
diff --git a/llvm/test/CodeGen/X86/basic-block-sections-eh.ll b/llvm/test/CodeGen/X86/basic-block-sections-eh.ll
index f756f1a29cff..5a175f4f93cf 100644
--- a/llvm/test/CodeGen/X86/basic-block-sections-eh.ll
+++ b/llvm/test/CodeGen/X86/basic-block-sections-eh.ll
@@ -1,5 +1,5 @@
; Check if landing pads are kept in a separate eh section
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=i386-unknown-linux-gnu -function-sections -basic-block-sections=all -unique-basic-block-section-names | FileCheck %s -check-prefix=LINUX-SECTIONS
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=i386-unknown-linux-gnu -function-sections -basic-block-sections=all -unique-basic-block-section-names | FileCheck %s -check-prefix=LINUX-SECTIONS
@_ZTIb = external dso_local constant i8*
define i32 @_Z3foob(i1 zeroext %0) #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
diff --git a/llvm/test/CodeGen/X86/code-model-kernel.ll b/llvm/test/CodeGen/X86/code-model-kernel.ll
index 801b0e633d99..fa5c0e47e41e 100644
--- a/llvm/test/CodeGen/X86/code-model-kernel.ll
+++ b/llvm/test/CodeGen/X86/code-model-kernel.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -code-model=kernel -simplifycfg-require-and-preserve-domtree=0 %s -o - | FileCheck %s
+; RUN: llc -mtriple=x86_64-pc-linux-gnu -code-model=kernel -simplifycfg-require-and-preserve-domtree=1 %s -o - | FileCheck %s
; CHECK-LABEL: main
; CHECK: .cfi_startproc
; CHECK: .cfi_personality 0, __gxx_personality_v0
diff --git a/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll b/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll
index 6eeca39eeea5..921f4f9a7d85 100644
--- a/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll
+++ b/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll
@@ -1,4 +1,4 @@
-; RUN: opt -mtriple=x86_64-linux-gnu -dwarfehprepare -simplifycfg-require-and-preserve-domtree=0 < %s -S | FileCheck %s
+; RUN: opt -mtriple=x86_64-linux-gnu -dwarfehprepare -simplifycfg-require-and-preserve-domtree=1 < %s -S | FileCheck %s
; Check basic functionality of IR-to-IR DWARF EH preparation. This should
; eliminate resumes. This pass requires a TargetMachine, so we put it under X86
diff --git a/llvm/test/CodeGen/X86/gcc_except_table-multi.ll b/llvm/test/CodeGen/X86/gcc_except_table-multi.ll
index f699f4381e7d..2538a3477870 100644
--- a/llvm/test/CodeGen/X86/gcc_except_table-multi.ll
+++ b/llvm/test/CodeGen/X86/gcc_except_table-multi.ll
@@ -1,10 +1,10 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=x86_64 | FileCheck %s --check-prefixes=CHECK,NORMAL
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=x86_64 -unique-section-names=false | FileCheck %s --check-prefixes=CHECK,NOUNIQUE
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=x86_64 -function-sections | FileCheck %s --check-prefixes=CHECK,SEP
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=x86_64 -function-sections -unique-section-names=false | FileCheck %s --check-prefixes=CHECK,SEP_NOUNIQUE
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=x86_64 | FileCheck %s --check-prefixes=CHECK,NORMAL
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=x86_64 -unique-section-names=false | FileCheck %s --check-prefixes=CHECK,NOUNIQUE
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=x86_64 -function-sections | FileCheck %s --check-prefixes=CHECK,SEP
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=x86_64 -function-sections -unique-section-names=false | FileCheck %s --check-prefixes=CHECK,SEP_NOUNIQUE
;; Don't use `,unique` if GNU as<2.35.
-; RUN: llc -simplifycfg-require-and-preserve-domtree=0 < %s -mtriple=x86_64 -function-sections -unique-section-names=false -no-integrated-as | FileCheck %s --check-prefixes=CHECK,SEP_NOUNIQUE_GAS
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=x86_64 -function-sections -unique-section-names=false -no-integrated-as | FileCheck %s --check-prefixes=CHECK,SEP_NOUNIQUE_GAS
@_ZTIi = external constant i8*
diff --git a/llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll b/llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll
index 9ef779f0f775..b6a6ff35ea9c 100644
--- a/llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll
+++ b/llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple x86_64-unknown-unknown -exception-model sjlj -verify-machineinstrs=0 -simplifycfg-require-and-preserve-domtree=0 < %s | FileCheck %s --check-prefix=NUM
-; RUN: llc -mtriple x86_64-unknown-unknown -exception-model sjlj -verify-machineinstrs=0 -simplifycfg-require-and-preserve-domtree=0 < %s | FileCheck %s --check-prefix=SJLJ
+; RUN: llc -mtriple x86_64-unknown-unknown -exception-model sjlj -verify-machineinstrs=0 -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s --check-prefix=NUM
+; RUN: llc -mtriple x86_64-unknown-unknown -exception-model sjlj -verify-machineinstrs=0 -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s --check-prefix=SJLJ
; NUM-COUNT-3: endbr64
More information about the llvm-branch-commits
mailing list