summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2018-06-20 22:01:04 +0000
committerAlina Sbirlea <asbirlea@google.com>2018-06-20 22:01:04 +0000
commitdfd14adeb04c79e6f763d491fc7d2fb3c3b6bc07 (patch)
tree7029e176addeef1ae59e36818184a82926f9fba1
parent715ee079da4eb26fbe3c4c01cb8a3636d7a24667 (diff)
downloadbcm5719-llvm-dfd14adeb04c79e6f763d491fc7d2fb3c3b6bc07.tar.gz
bcm5719-llvm-dfd14adeb04c79e6f763d491fc7d2fb3c3b6bc07.zip
Generalize MergeBlockIntoPredecessor. Replace uses of MergeBasicBlockIntoOnlyPred.
Summary: Two utils methods have essentially the same functionality. This is an attempt to merge them into one. 1. lib/Transforms/Utils/Local.cpp : MergeBasicBlockIntoOnlyPred 2. lib/Transforms/Utils/BasicBlockUtils.cpp : MergeBlockIntoPredecessor Prior to the patch: 1. MergeBasicBlockIntoOnlyPred Updates either DomTree or DeferredDominance Moves all instructions from Pred to BB, deletes Pred Asserts BB has single predecessor If address was taken, replace the block address with constant 1 (?) 2. MergeBlockIntoPredecessor Updates DomTree, LoopInfo and MemoryDependenceResults Moves all instruction from BB to Pred, deletes BB Returns if doesn't have a single predecessor Returns if BB's address was taken After the patch: Method 2. MergeBlockIntoPredecessor is attempting to become the new default: Updates DomTree or DeferredDominance, and LoopInfo and MemoryDependenceResults Moves all instruction from BB to Pred, deletes BB Returns if doesn't have a single predecessor Returns if BB's address was taken Uses of MergeBasicBlockIntoOnlyPred that need to be replaced: 1. lib/Transforms/Scalar/LoopSimplifyCFG.cpp Updated in this patch. No challenges. 2. lib/CodeGen/CodeGenPrepare.cpp Updated in this patch. i. eliminateFallThrough is straightforward, but I added using a temporary array to avoid the iterator invalidation. ii. eliminateMostlyEmptyBlock(s) methods also now use a temporary array for blocks Some interesting aspects: - Since Pred is not deleted (BB is), the entry block does not need updating. - The entry block was being updated with the deleted block in eliminateMostlyEmptyBlock. Added assert to make obvious that BB=SinglePred. - isMergingEmptyBlockProfitable assumes BB is the one to be deleted. - eliminateMostlyEmptyBlock(BB) does not delete BB on one path, it deletes its unique predecessor instead. - adding some test owner as subscribers for the interesting tests modified: test/CodeGen/X86/avx-cmp.ll test/CodeGen/AMDGPU/nested-loop-conditions.ll test/CodeGen/AMDGPU/si-annotate-cf.ll test/CodeGen/X86/hoist-spill.ll test/CodeGen/X86/2006-11-17-IllegalMove.ll 3. lib/Transforms/Scalar/JumpThreading.cpp Not covered in this patch. It is the only use case using the DeferredDominance. I would defer to Brian Rzycki to make this replacement. Reviewers: chandlerc, spatel, davide, brzycki, bkramer, javed.absar Subscribers: qcolombet, sanjoy, nemanjai, nhaehnle, jlebar, tpr, kbarton, RKSimon, wmi, arsenm, llvm-commits Differential Revision: https://reviews.llvm.org/D48202 llvm-svn: 335183
-rw-r--r--llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h3
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp53
-rw-r--r--llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp10
-rw-r--r--llvm/lib/Transforms/Utils/BasicBlockUtils.cpp41
-rw-r--r--llvm/test/CodeGen/AMDGPU/branch-relaxation.ll4
-rw-r--r--llvm/test/CodeGen/AMDGPU/nested-loop-conditions.ll6
-rw-r--r--llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll8
-rw-r--r--llvm/test/CodeGen/ARM/indirectbr.ll2
-rw-r--r--llvm/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll2
-rw-r--r--llvm/test/CodeGen/PowerPC/memcmp-mergeexpand.ll2
-rw-r--r--llvm/test/CodeGen/PowerPC/ppc-shrink-wrapping.ll2
-rw-r--r--llvm/test/CodeGen/PowerPC/simplifyConstCmpToISEL.ll2
-rw-r--r--llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll2
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-jtb.ll6
-rw-r--r--llvm/test/CodeGen/X86/2006-11-17-IllegalMove.ll6
-rw-r--r--llvm/test/CodeGen/X86/avx-cmp.ll9
-rw-r--r--llvm/test/CodeGen/X86/avx-splat.ll2
-rw-r--r--llvm/test/CodeGen/X86/avx2-vbroadcast.ll4
-rw-r--r--llvm/test/CodeGen/X86/avx512-i1test.ll4
-rw-r--r--llvm/test/CodeGen/X86/block-placement.ll4
-rw-r--r--llvm/test/CodeGen/X86/hoist-spill.ll6
-rw-r--r--llvm/test/CodeGen/X86/ins_subreg_coalesce-1.ll2
-rw-r--r--llvm/test/CodeGen/X86/memcmp-mergeexpand.ll4
-rw-r--r--llvm/test/CodeGen/X86/pr32108.ll2
-rw-r--r--llvm/test/CodeGen/X86/setcc-lowering.ll4
-rw-r--r--llvm/test/CodeGen/X86/split-store.ll4
-rw-r--r--llvm/test/CodeGen/X86/tail-dup-merge-loop-headers.ll2
-rw-r--r--llvm/test/DebugInfo/Generic/sunk-compare.ll2
-rw-r--r--llvm/test/Transforms/CodeGenPrepare/X86/computedgoto.ll2
-rw-r--r--llvm/test/Transforms/CodeGenPrepare/basic.ll2
-rw-r--r--llvm/test/Transforms/LoopSimplifyCFG/scev.ll24
-rw-r--r--llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll2
-rw-r--r--llvm/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll3
-rw-r--r--llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll8
34 files changed, 132 insertions, 107 deletions
diff --git a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
index 6f0d2deac0a..3dfc73b6484 100644
--- a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
+++ b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
@@ -58,7 +58,8 @@ bool DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI = nullptr);
/// value indicates success or failure.
bool MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT = nullptr,
LoopInfo *LI = nullptr,
- MemoryDependenceResults *MemDep = nullptr);
+ MemoryDependenceResults *MemDep = nullptr,
+ DeferredDominance *DDT = nullptr);
/// Replace all uses of an instruction (specified by BI) with a value, then
/// remove and delete the original instruction.
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 595fcf70766..743acc5af30 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -516,8 +516,16 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
bool CodeGenPrepare::eliminateFallThrough(Function &F) {
bool Changed = false;
// Scan all of the blocks in the function, except for the entry block.
- for (Function::iterator I = std::next(F.begin()), E = F.end(); I != E;) {
- BasicBlock *BB = &*I++;
+ // Use a temporary array to avoid iterator being invalidated when
+ // deleting blocks.
+ SmallVector<WeakTrackingVH, 16> Blocks;
+ for (auto &Block : llvm::make_range(std::next(F.begin()), F.end()))
+ Blocks.push_back(&Block);
+
+ for (auto &Block : Blocks) {
+ auto *BB = cast_or_null<BasicBlock>(Block);
+ if (!BB)
+ continue;
// If the destination block has a single pred, then this is a trivial
// edge, just collapse it.
BasicBlock *SinglePred = BB->getSinglePredecessor();
@@ -528,17 +536,10 @@ bool CodeGenPrepare::eliminateFallThrough(Function &F) {
BranchInst *Term = dyn_cast<BranchInst>(SinglePred->getTerminator());
if (Term && !Term->isConditional()) {
Changed = true;
- LLVM_DEBUG(dbgs() << "To merge:\n" << *SinglePred << "\n\n\n");
- // Remember if SinglePred was the entry block of the function.
- // If so, we will need to move BB back to the entry position.
- bool isEntry = SinglePred == &SinglePred->getParent()->getEntryBlock();
- MergeBasicBlockIntoOnlyPred(BB, nullptr);
-
- if (isEntry && BB != &BB->getParent()->getEntryBlock())
- BB->moveBefore(&BB->getParent()->getEntryBlock());
+ LLVM_DEBUG(dbgs() << "To merge:\n" << *BB << "\n\n\n");
- // We have erased a block. Update the iterator.
- I = BB->getIterator();
+ // Merge BB into SinglePred and delete it.
+ MergeBlockIntoPredecessor(BB);
}
}
return Changed;
@@ -591,9 +592,17 @@ bool CodeGenPrepare::eliminateMostlyEmptyBlocks(Function &F) {
}
bool MadeChange = false;
+ // Copy blocks into a temporary array to avoid iterator invalidation issues
+ // as we remove them.
// Note that this intentionally skips the entry block.
- for (Function::iterator I = std::next(F.begin()), E = F.end(); I != E;) {
- BasicBlock *BB = &*I++;
+ SmallVector<WeakTrackingVH, 16> Blocks;
+ for (auto &Block : llvm::make_range(std::next(F.begin()), F.end()))
+ Blocks.push_back(&Block);
+
+ for (auto &Block : Blocks) {
+ BasicBlock *BB = cast_or_null<BasicBlock>(Block);
+ if (!BB)
+ continue;
BasicBlock *DestBB = findDestBlockOfMergeableEmptyBlock(BB);
if (!DestBB ||
!isMergingEmptyBlockProfitable(BB, DestBB, Preheaders.count(BB)))
@@ -762,15 +771,13 @@ void CodeGenPrepare::eliminateMostlyEmptyBlock(BasicBlock *BB) {
// just collapse it.
if (BasicBlock *SinglePred = DestBB->getSinglePredecessor()) {
if (SinglePred != DestBB) {
- // Remember if SinglePred was the entry block of the function. If so, we
- // will need to move BB back to the entry position.
- bool isEntry = SinglePred == &SinglePred->getParent()->getEntryBlock();
- MergeBasicBlockIntoOnlyPred(DestBB, nullptr);
-
- if (isEntry && BB != &BB->getParent()->getEntryBlock())
- BB->moveBefore(&BB->getParent()->getEntryBlock());
-
- LLVM_DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");
+ assert(SinglePred == BB &&
+ "Single predecessor not the same as predecessor");
+ // Merge DestBB into SinglePred/BB and delete it.
+ MergeBlockIntoPredecessor(DestBB);
+ // Note: BB(=SinglePred) will not be deleted on this path.
+ // DestBB(=its single successor) is the one that was deleted.
+ LLVM_DEBUG(dbgs() << "AFTER:\n" << *SinglePred << "\n\n\n");
return;
}
}
diff --git a/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp b/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
index 49de71e5119..2b83d3dc5f1 100644
--- a/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
@@ -27,11 +27,12 @@
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
#include "llvm/Analysis/TargetTransformInfo.h"
-#include "llvm/Transforms/Utils/Local.h"
#include "llvm/IR/Dominators.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/LoopPassManager.h"
#include "llvm/Transforms/Utils.h"
+#include "llvm/Transforms/Utils/BasicBlockUtils.h"
+#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
using namespace llvm;
@@ -55,11 +56,8 @@ static bool simplifyLoopCFG(Loop &L, DominatorTree &DT, LoopInfo &LI,
if (!Pred || !Pred->getSingleSuccessor() || LI.getLoopFor(Pred) != &L)
continue;
- // Pred is going to disappear, so we need to update the loop info.
- if (L.getHeader() == Pred)
- L.moveToHeader(Succ);
- LI.removeBlock(Pred);
- MergeBasicBlockIntoOnlyPred(Succ, &DT);
+ // Merge Succ into Pred and delete it.
+ MergeBlockIntoPredecessor(Succ, &DT, &LI);
SE.forgetLoop(&L);
Changed = true;
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index 59837042550..516a785dce1 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -117,9 +117,12 @@ bool llvm::DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI) {
bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT,
LoopInfo *LI,
- MemoryDependenceResults *MemDep) {
- // Don't merge away blocks who have their address taken.
- if (BB->hasAddressTaken()) return false;
+ MemoryDependenceResults *MemDep,
+ DeferredDominance *DDT) {
+ assert(!(DT && DDT) && "Cannot call with both DT and DDT.");
+
+ if (BB->hasAddressTaken())
+ return false;
// Can't merge if there are multiple predecessors, or no predecessors.
BasicBlock *PredBB = BB->getUniquePredecessor();
@@ -131,16 +134,9 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT,
if (PredBB->getTerminator()->isExceptional())
return false;
- succ_iterator SI(succ_begin(PredBB)), SE(succ_end(PredBB));
- BasicBlock *OnlySucc = BB;
- for (; SI != SE; ++SI)
- if (*SI != OnlySucc) {
- OnlySucc = nullptr; // There are multiple distinct successors!
- break;
- }
-
- // Can't merge if there are multiple successors.
- if (!OnlySucc) return false;
+ // Can't merge if there are multiple distinct successors.
+ if (PredBB->getUniqueSuccessor() != BB)
+ return false;
// Can't merge if there is PHI loop.
for (PHINode &PN : BB->phis())
@@ -158,6 +154,18 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT,
FoldSingleEntryPHINodes(BB, MemDep);
}
+ // Deferred DT update: Collect all the edges that exit BB. These
+ // dominator edges will be redirected from Pred.
+ std::vector<DominatorTree::UpdateType> Updates;
+ if (DDT) {
+ Updates.reserve(1 + (2 * succ_size(BB)));
+ Updates.push_back({DominatorTree::Delete, PredBB, BB});
+ for (auto I = succ_begin(BB), E = succ_end(BB); I != E; ++I) {
+ Updates.push_back({DominatorTree::Delete, BB, *I});
+ Updates.push_back({DominatorTree::Insert, PredBB, *I});
+ }
+ }
+
// Delete the unconditional branch from the predecessor...
PredBB->getInstList().pop_back();
@@ -204,7 +212,12 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT,
if (MemDep)
MemDep->invalidateCachedPredecessors();
- BB->eraseFromParent();
+ if (DDT) {
+ DDT->deleteBB(BB); // Deferred deletion of BB.
+ DDT->applyUpdates(Updates);
+ } else {
+ BB->eraseFromParent(); // Nuke BB.
+ }
return true;
}
diff --git a/llvm/test/CodeGen/AMDGPU/branch-relaxation.ll b/llvm/test/CodeGen/AMDGPU/branch-relaxation.ll
index 1fb386cd4cd..b0ee7f323f3 100644
--- a/llvm/test/CodeGen/AMDGPU/branch-relaxation.ll
+++ b/llvm/test/CodeGen/AMDGPU/branch-relaxation.ll
@@ -441,7 +441,7 @@ endif:
; GCN-NEXT: s_xor_b64 exec, exec, [[TEMP_MASK1]]
; GCN-NEXT: ; mask branch [[RET:BB[0-9]+_[0-9]+]]
-; GCN: [[LOOP_BODY:BB[0-9]+_[0-9]+]]: ; %loop_body
+; GCN: [[LOOP_BODY:BB[0-9]+_[0-9]+]]: ; %loop
; GCN: ;;#ASMSTART
; GCN: v_nop_e64
; GCN: v_nop_e64
@@ -452,7 +452,7 @@ endif:
; GCN: ;;#ASMEND
; GCN: s_cbranch_vccz [[RET]]
-; GCN-NEXT: [[LONGBB:BB[0-9]+_[0-9]+]]: ; %loop_body
+; GCN-NEXT: [[LONGBB:BB[0-9]+_[0-9]+]]: ; %loop
; GCN-NEXT: ; in Loop: Header=[[LOOP_BODY]] Depth=1
; GCN-NEXT: s_getpc_b64 vcc
; GCN-NEXT: s_sub_u32 vcc_lo, vcc_lo, ([[LONGBB]]+4)-[[LOOP_BODY]]
diff --git a/llvm/test/CodeGen/AMDGPU/nested-loop-conditions.ll b/llvm/test/CodeGen/AMDGPU/nested-loop-conditions.ll
index e198abf77d1..8489a785310 100644
--- a/llvm/test/CodeGen/AMDGPU/nested-loop-conditions.ll
+++ b/llvm/test/CodeGen/AMDGPU/nested-loop-conditions.ll
@@ -59,12 +59,12 @@
; GCN-LABEL: {{^}}reduced_nested_loop_conditions:
-; GCN: s_cmp_eq_u32 s{{[0-9]+}}, 1
-; GCN-NEXT: s_cbranch_scc1
+; GCN: s_cmp_lg_u32 s{{[0-9]+}}, 1
+; GCN-NEXT: s_cbranch_scc0
; FIXME: Should fold to unconditional branch?
; GCN: ; implicit-def
-; GCN: s_cbranch_vccz
+; GCN: s_cbranch_vccnz
; GCN: ds_read_b32
diff --git a/llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll b/llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll
index 1f915662ac0..7e7f6fc5e6d 100644
--- a/llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll
+++ b/llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll
@@ -89,11 +89,11 @@ declare float @llvm.fabs.f32(float) nounwind readnone
; This broke the old AMDIL cfg structurizer
; FUNC-LABEL: {{^}}loop_land_info_assert:
-; SI: s_cmp_gt_i32
-; SI-NEXT: s_cbranch_scc0 [[ENDPGM:BB[0-9]+_[0-9]+]]
+; SI: s_cmp_lt_i32
+; SI-NEXT: s_cbranch_scc1 [[ENDPGM:BB[0-9]+_[0-9]+]]
-; SI: s_cmpk_gt_i32
-; SI-NEXT: s_cbranch_scc1 [[ENDPGM]]
+; SI: s_cmpk_lt_i32
+; SI-NEXT: s_cbranch_scc0 [[ENDPGM]]
; SI: [[INFLOOP:BB[0-9]+_[0-9]+]]
; SI: s_cbranch_vccnz [[INFLOOP]]
diff --git a/llvm/test/CodeGen/ARM/indirectbr.ll b/llvm/test/CodeGen/ARM/indirectbr.ll
index a3ec2a7f3e7..db5014f9375 100644
--- a/llvm/test/CodeGen/ARM/indirectbr.ll
+++ b/llvm/test/CodeGen/ARM/indirectbr.ll
@@ -47,7 +47,7 @@ L3: ; preds = %L4, %bb2
br label %L2
L2: ; preds = %L3, %bb2
-; THUMB-LABEL: %L1.clone
+; THUMB-LABEL: %.split4
; THUMB: muls
%res.2 = phi i32 [ %res.1, %L3 ], [ 1, %bb2 ] ; <i32> [#uses=1]
%phitmp = mul i32 %res.2, 6 ; <i32> [#uses=1]
diff --git a/llvm/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll b/llvm/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll
index 3bfc0de1b87..fd9121a59a4 100644
--- a/llvm/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll
+++ b/llvm/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll
@@ -160,7 +160,7 @@ define signext i32 @zeroEqualityTest05() {
; Validate with memcmp()?:
define signext i32 @equalityFoldTwoConstants() {
; CHECK-LABEL: equalityFoldTwoConstants:
-; CHECK: # %bb.0: # %endblock
+; CHECK: # %bb.0: # %loadbb
; CHECK-NEXT: li 3, 1
; CHECK-NEXT: blr
%call = tail call signext i32 @memcmp(i8* bitcast ([15 x i32]* @zeroEqualityTest04.buffer1 to i8*), i8* bitcast ([15 x i32]* @zeroEqualityTest04.buffer2 to i8*), i64 16)
diff --git a/llvm/test/CodeGen/PowerPC/memcmp-mergeexpand.ll b/llvm/test/CodeGen/PowerPC/memcmp-mergeexpand.ll
index 83b1cd505db..c1e81074c86 100644
--- a/llvm/test/CodeGen/PowerPC/memcmp-mergeexpand.ll
+++ b/llvm/test/CodeGen/PowerPC/memcmp-mergeexpand.ll
@@ -7,7 +7,7 @@
define zeroext i1 @opeq1(
; PPC64LE-LABEL: opeq1:
-; PPC64LE: # %bb.0: # %opeq1.exit
+; PPC64LE: # %bb.0: # %entry
; PPC64LE-NEXT: ld 3, 0(3)
; PPC64LE-NEXT: ld 4, 0(4)
; PPC64LE-NEXT: xor 3, 3, 4
diff --git a/llvm/test/CodeGen/PowerPC/ppc-shrink-wrapping.ll b/llvm/test/CodeGen/PowerPC/ppc-shrink-wrapping.ll
index 6886b4efa85..621bda04159 100644
--- a/llvm/test/CodeGen/PowerPC/ppc-shrink-wrapping.ll
+++ b/llvm/test/CodeGen/PowerPC/ppc-shrink-wrapping.ll
@@ -169,7 +169,7 @@ declare i32 @something(...)
; CHECK-NEXT: bne 0, .[[LOOP]]
;
; Next BB
-; CHECK: %for.end
+; CHECK: %for.exit
; CHECK: mtlr {{[0-9]+}}
; CHECK-NEXT: blr
define i32 @freqSaveAndRestoreOutsideLoop2(i32 %cond) {
diff --git a/llvm/test/CodeGen/PowerPC/simplifyConstCmpToISEL.ll b/llvm/test/CodeGen/PowerPC/simplifyConstCmpToISEL.ll
index 3988d9c8d5a..bf5754dc914 100644
--- a/llvm/test/CodeGen/PowerPC/simplifyConstCmpToISEL.ll
+++ b/llvm/test/CodeGen/PowerPC/simplifyConstCmpToISEL.ll
@@ -3,7 +3,7 @@
; RUN: -ppc-convert-rr-to-ri -verify-machineinstrs | FileCheck %s
define void @test(i32 zeroext %parts) {
; CHECK-LABEL: test:
-; CHECK: # %bb.0: # %cond.end.i
+; CHECK: # %bb.0: # %entry
; CHECK-NEXT: cmplwi 0, 3, 1
; CHECK-NEXT: bnelr+ 0
; CHECK-NEXT: # %bb.1: # %test2.exit.us.unr-lcssa
diff --git a/llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll b/llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll
index d0afa3c8dfe..0372bd7beb4 100644
--- a/llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll
+++ b/llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll
@@ -25,7 +25,7 @@ bb3:
br i1 undef, label %return, label %bb
return:
-; CHECK: %return
+; CHECK: %bb3
; 'mov sp, r7' would have left sp in an invalid state
; CHECK-NOT: mov sp, r7
; CHECK-NOT: sub, sp, #4
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-jtb.ll b/llvm/test/CodeGen/Thumb2/thumb2-jtb.ll
index c71f37cee91..ba4638dfcb1 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-jtb.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-jtb.ll
@@ -14,9 +14,6 @@ define i16 @main__getopt_internal_2E_exit_2E_ce(i32, i1 %b) nounwind {
entry:
br i1 %b, label %codeRepl127.exitStub, label %newFuncRoot
-newFuncRoot:
- br label %_getopt_internal.exit.ce
-
codeRepl127.exitStub: ; preds = %_getopt_internal.exit.ce
; Add an explicit edge back to before the jump table to ensure this block
; is placed first.
@@ -103,6 +100,9 @@ codeRepl57.exitStub: ; preds = %_getopt_internal.exit.ce
codeRepl103.exitStub: ; preds = %_getopt_internal.exit.ce
ret i16 26
+newFuncRoot:
+ br label %_getopt_internal.exit.ce
+
_getopt_internal.exit.ce: ; preds = %newFuncRoot
switch i32 %0, label %codeRepl127.exitStub [
i32 -1, label %parse_options.exit.loopexit.exitStub
diff --git a/llvm/test/CodeGen/X86/2006-11-17-IllegalMove.ll b/llvm/test/CodeGen/X86/2006-11-17-IllegalMove.ll
index 268d5af1571..4af4684d66b 100644
--- a/llvm/test/CodeGen/X86/2006-11-17-IllegalMove.ll
+++ b/llvm/test/CodeGen/X86/2006-11-17-IllegalMove.ll
@@ -6,9 +6,9 @@ define void @handle_vector_size_attribute() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl 0, %eax
; CHECK-NEXT: decl %eax
-; CHECK-NEXT: cmpl $2, %eax
-; CHECK-NEXT: jae .LBB0_2
-; CHECK-NEXT: # %bb.1: # %cond_next129
+; CHECK-NEXT: cmpl $1, %eax
+; CHECK-NEXT: ja .LBB0_2
+; CHECK-NEXT: # %bb.1: # %bb77
; CHECK-NEXT: movb 0, %al
; CHECK-NEXT: movzbl %al, %eax
; CHECK-NEXT: # kill: def $eax killed $eax def $ax
diff --git a/llvm/test/CodeGen/X86/avx-cmp.ll b/llvm/test/CodeGen/X86/avx-cmp.ll
index 2e151682a03..534a00050ad 100644
--- a/llvm/test/CodeGen/X86/avx-cmp.ll
+++ b/llvm/test/CodeGen/X86/avx-cmp.ll
@@ -26,12 +26,15 @@ declare void @scale() nounwind
define void @render() nounwind {
; CHECK-LABEL: render:
; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rbp
; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: pushq %rax
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: testb %al, %al
; CHECK-NEXT: jne .LBB2_6
; CHECK-NEXT: # %bb.1: # %for.cond5.preheader
; CHECK-NEXT: xorl %ebx, %ebx
+; CHECK-NEXT: movb $1, %bpl
; CHECK-NEXT: jmp .LBB2_2
; CHECK-NEXT: .p2align 4, 0x90
; CHECK-NEXT: .LBB2_5: # %if.then
@@ -43,8 +46,8 @@ define void @render() nounwind {
; CHECK-NEXT: jne .LBB2_2
; CHECK-NEXT: # %bb.3: # %for.cond5
; CHECK-NEXT: # in Loop: Header=BB2_2 Depth=1
-; CHECK-NEXT: testb %bl, %bl
-; CHECK-NEXT: je .LBB2_2
+; CHECK-NEXT: testb %bpl, %bpl
+; CHECK-NEXT: jne .LBB2_2
; CHECK-NEXT: # %bb.4: # %for.body33
; CHECK-NEXT: # in Loop: Header=BB2_2 Depth=1
; CHECK-NEXT: vucomisd {{\.LCPI.*}}, %xmm0
@@ -52,7 +55,9 @@ define void @render() nounwind {
; CHECK-NEXT: jp .LBB2_5
; CHECK-NEXT: jmp .LBB2_2
; CHECK-NEXT: .LBB2_6: # %for.end52
+; CHECK-NEXT: addq $8, %rsp
; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: popq %rbp
; CHECK-NEXT: retq
entry:
br i1 undef, label %for.cond5, label %for.end52
diff --git a/llvm/test/CodeGen/X86/avx-splat.ll b/llvm/test/CodeGen/X86/avx-splat.ll
index 4738262a97a..e1779ac8f18 100644
--- a/llvm/test/CodeGen/X86/avx-splat.ll
+++ b/llvm/test/CodeGen/X86/avx-splat.ll
@@ -58,7 +58,7 @@ entry:
;
define <8 x float> @funcE() nounwind {
; CHECK-LABEL: funcE:
-; CHECK: # %bb.0: # %for_exit499
+; CHECK: # %bb.0: # %allocas
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: testb %al, %al
; CHECK-NEXT: # implicit-def: $ymm0
diff --git a/llvm/test/CodeGen/X86/avx2-vbroadcast.ll b/llvm/test/CodeGen/X86/avx2-vbroadcast.ll
index 3ae6c0b9d81..5d7ac684e54 100644
--- a/llvm/test/CodeGen/X86/avx2-vbroadcast.ll
+++ b/llvm/test/CodeGen/X86/avx2-vbroadcast.ll
@@ -686,7 +686,7 @@ define void @crash() nounwind alwaysinline {
; X32-NEXT: ## %bb.2: ## %ret
; X32-NEXT: retl
; X32-NEXT: .p2align 4, 0x90
-; X32-NEXT: LBB33_1: ## %footer349VF
+; X32-NEXT: LBB33_1: ## %footer329VF
; X32-NEXT: ## =>This Inner Loop Header: Depth=1
; X32-NEXT: jmp LBB33_1
;
@@ -698,7 +698,7 @@ define void @crash() nounwind alwaysinline {
; X64-NEXT: ## %bb.2: ## %ret
; X64-NEXT: retq
; X64-NEXT: .p2align 4, 0x90
-; X64-NEXT: LBB33_1: ## %footer349VF
+; X64-NEXT: LBB33_1: ## %footer329VF
; X64-NEXT: ## =>This Inner Loop Header: Depth=1
; X64-NEXT: jmp LBB33_1
WGLoopsEntry:
diff --git a/llvm/test/CodeGen/X86/avx512-i1test.ll b/llvm/test/CodeGen/X86/avx512-i1test.ll
index df81b83d7c2..7cf86fe747f 100644
--- a/llvm/test/CodeGen/X86/avx512-i1test.ll
+++ b/llvm/test/CodeGen/X86/avx512-i1test.ll
@@ -7,7 +7,7 @@ target triple = "x86_64-unknown-linux-gnu"
define void @func() {
; CHECK-LABEL: func:
-; CHECK: # %bb.0: # %L_10
+; CHECK: # %bb.0: # %bb1
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: testb %al, %al
; CHECK-NEXT: je .LBB0_1
@@ -70,7 +70,7 @@ define i64 @func2(i1 zeroext %i, i32 %j) {
; CHECK-NEXT: je .LBB1_1
; CHECK-NEXT: # %bb.2: # %if.then
; CHECK-NEXT: jmp bar # TAILCALL
-; CHECK-NEXT: .LBB1_1: # %return
+; CHECK-NEXT: .LBB1_1: # %if.end
; CHECK-NEXT: movzbl %dil, %eax
; CHECK-NEXT: orq $-2, %rax
; CHECK-NEXT: retq
diff --git a/llvm/test/CodeGen/X86/block-placement.ll b/llvm/test/CodeGen/X86/block-placement.ll
index d97e367d8d0..a9d76cfde0d 100644
--- a/llvm/test/CodeGen/X86/block-placement.ll
+++ b/llvm/test/CodeGen/X86/block-placement.ll
@@ -317,7 +317,7 @@ define void @unnatural_cfg1() {
; a function. This is a gross CFG reduced out of the single source GCC.
; CHECK-LABEL: unnatural_cfg1
; CHECK: %entry
-; CHECK: %loop.body1
+; CHECK: %loop.header
; CHECK: %loop.body2
; CHECK: %loop.body3
@@ -611,7 +611,7 @@ define void @test_unnatural_cfg_backwards_inner_loop() {
; CHECK-LABEL: test_unnatural_cfg_backwards_inner_loop
; CHECK: %entry
; CHECK: %loop2b
-; CHECK: %loop1
+; CHECK: %loop3
entry:
br i1 undef, label %loop2a, label %body
diff --git a/llvm/test/CodeGen/X86/hoist-spill.ll b/llvm/test/CodeGen/X86/hoist-spill.ll
index 03f558fc3ae..6a3f5ca01e8 100644
--- a/llvm/test/CodeGen/X86/hoist-spill.ll
+++ b/llvm/test/CodeGen/X86/hoist-spill.ll
@@ -48,9 +48,6 @@ for.cond: ; preds = %for.inc14, %entry
%cmp326 = icmp sgt i32 %k.0, %p1
br i1 %cmp326, label %for.cond4.preheader, label %for.body.preheader
-for.body.preheader: ; preds = %for.cond
- br label %for.body
-
for.cond4.preheader: ; preds = %for.body, %for.cond
%k.1.lcssa = phi i32 [ %k.0, %for.cond ], [ %add, %for.body ]
%cmp528 = icmp sgt i32 %sub., %p1
@@ -95,6 +92,9 @@ vector.body: ; preds = %vector.body, %vecto
middle.block: ; preds = %vector.body, %vector.body.preheader.split
br i1 undef, label %for.inc14, label %for.body6
+for.body.preheader: ; preds = %for.cond
+ br label %for.body
+
for.body: ; preds = %for.body, %for.body.preheader
%k.127 = phi i32 [ %k.0, %for.body.preheader ], [ %add, %for.body ]
%add = add nsw i32 %k.127, 1
diff --git a/llvm/test/CodeGen/X86/ins_subreg_coalesce-1.ll b/llvm/test/CodeGen/X86/ins_subreg_coalesce-1.ll
index 3112e1ab4be..98af189f86d 100644
--- a/llvm/test/CodeGen/X86/ins_subreg_coalesce-1.ll
+++ b/llvm/test/CodeGen/X86/ins_subreg_coalesce-1.ll
@@ -3,7 +3,7 @@
define fastcc i32 @t() nounwind {
; CHECK-LABEL: t:
-; CHECK: # %bb.0: # %walkExprTree.exit
+; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movzwl 0, %eax
; CHECK-NEXT: orl $2, %eax
; CHECK-NEXT: movw %ax, 0
diff --git a/llvm/test/CodeGen/X86/memcmp-mergeexpand.ll b/llvm/test/CodeGen/X86/memcmp-mergeexpand.ll
index 1c470177c27..785ba403465 100644
--- a/llvm/test/CodeGen/X86/memcmp-mergeexpand.ll
+++ b/llvm/test/CodeGen/X86/memcmp-mergeexpand.ll
@@ -8,7 +8,7 @@
define zeroext i1 @opeq1(
; X86-LABEL: opeq1:
-; X86: # %bb.0: # %opeq1.exit
+; X86: # %bb.0: # %entry
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
; X86-NEXT: movl (%ecx), %edx
@@ -20,7 +20,7 @@ define zeroext i1 @opeq1(
; X86-NEXT: retl
;
; X64-LABEL: opeq1:
-; X64: # %bb.0: # %opeq1.exit
+; X64: # %bb.0: # %entry
; X64-NEXT: movq (%rdi), %rax
; X64-NEXT: cmpq (%rsi), %rax
; X64-NEXT: sete %al
diff --git a/llvm/test/CodeGen/X86/pr32108.ll b/llvm/test/CodeGen/X86/pr32108.ll
index ff1b7d3401f..bde5daff285 100644
--- a/llvm/test/CodeGen/X86/pr32108.ll
+++ b/llvm/test/CodeGen/X86/pr32108.ll
@@ -3,7 +3,7 @@
define void @pr32108() {
; CHECK-LABEL: pr32108:
-; CHECK: # %bb.0: # %CF257
+; CHECK: # %bb.0: # %BB
; CHECK-NEXT: movb $0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: .p2align 4, 0x90
; CHECK-NEXT: .LBB0_1: # %CF244
diff --git a/llvm/test/CodeGen/X86/setcc-lowering.ll b/llvm/test/CodeGen/X86/setcc-lowering.ll
index 11e453e1550..ce057b28cc9 100644
--- a/llvm/test/CodeGen/X86/setcc-lowering.ll
+++ b/llvm/test/CodeGen/X86/setcc-lowering.ll
@@ -43,7 +43,7 @@ entry:
define void @pr26232(i64 %a, <16 x i1> %b) {
; AVX-LABEL: pr26232:
-; AVX: # %bb.0: # %for_loop599.preheader
+; AVX: # %bb.0: # %allocas
; AVX-NEXT: vpxor %xmm1, %xmm1, %xmm1
; AVX-NEXT: vmovdqa {{.*#+}} xmm2 = [128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128]
; AVX-NEXT: .p2align 4, 0x90
@@ -64,7 +64,7 @@ define void @pr26232(i64 %a, <16 x i1> %b) {
; AVX-NEXT: retq
;
; KNL-32-LABEL: pr26232:
-; KNL-32: # %bb.0: # %for_loop599.preheader
+; KNL-32: # %bb.0: # %allocas
; KNL-32-NEXT: pushl %esi
; KNL-32-NEXT: .cfi_def_cfa_offset 8
; KNL-32-NEXT: .cfi_offset %esi, -8
diff --git a/llvm/test/CodeGen/X86/split-store.ll b/llvm/test/CodeGen/X86/split-store.ll
index 64238901d10..575f46c04c0 100644
--- a/llvm/test/CodeGen/X86/split-store.ll
+++ b/llvm/test/CodeGen/X86/split-store.ll
@@ -232,7 +232,7 @@ define void @int1_int1_pair(i1 signext %tmp1, i1 signext %tmp2, i2* %ref.tmp) {
define void @mbb_int32_float_pair(i32 %tmp1, float %tmp2, i64* %ref.tmp) {
; CHECK-LABEL: mbb_int32_float_pair:
-; CHECK: # %bb.0: # %next
+; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl %edi, (%rsi)
; CHECK-NEXT: movss %xmm0, 4(%rsi)
; CHECK-NEXT: retq
@@ -250,7 +250,7 @@ next:
define void @mbb_int32_float_multi_stores(i32 %tmp1, float %tmp2, i64* %ref.tmp, i64* %ref.tmp1, i1 %cmp) {
; CHECK-LABEL: mbb_int32_float_multi_stores:
-; CHECK: # %bb.0: # %bb1
+; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl %edi, (%rsi)
; CHECK-NEXT: movss %xmm0, 4(%rsi)
; CHECK-NEXT: testb $1, %cl
diff --git a/llvm/test/CodeGen/X86/tail-dup-merge-loop-headers.ll b/llvm/test/CodeGen/X86/tail-dup-merge-loop-headers.ll
index 736a6d8500d..2f9cc474d27 100644
--- a/llvm/test/CodeGen/X86/tail-dup-merge-loop-headers.ll
+++ b/llvm/test/CodeGen/X86/tail-dup-merge-loop-headers.ll
@@ -10,7 +10,7 @@ target triple = "x86_64-unknown-linux-gnu"
; CHECK-NOT: # %{{[a-zA-Z_]+}}
; CHECK: # %inner_loop_latch
; CHECK-NOT: # %{{[a-zA-Z_]+}}
-; CHECK: # %inner_loop_test
+; CHECK: # %inner_loop_top
; CHECK-NOT: # %{{[a-zA-Z_]+}}
; CHECK: # %exit
define void @tail_dup_merge_loops(i32 %a, i8* %b, i8* %c) local_unnamed_addr #0 {
diff --git a/llvm/test/DebugInfo/Generic/sunk-compare.ll b/llvm/test/DebugInfo/Generic/sunk-compare.ll
index 9ccf382e873..279887b31d1 100644
--- a/llvm/test/DebugInfo/Generic/sunk-compare.ll
+++ b/llvm/test/DebugInfo/Generic/sunk-compare.ll
@@ -8,7 +8,7 @@
; We check that the compare instruction retains its debug loc after
; it is sunk into other.bb by the codegen prepare pass.
;
-; CHECK: other.bb:
+; CHECK: entry:
; CHECK-NEXT: icmp{{.*}}%x, 0, !dbg ![[MDHANDLE:[0-9]*]]
; CHECK: ![[MDHANDLE]] = !DILocation(line: 2
;
diff --git a/llvm/test/Transforms/CodeGenPrepare/X86/computedgoto.ll b/llvm/test/Transforms/CodeGenPrepare/X86/computedgoto.ll
index 00a4df9b2c5..cf04559d84c 100644
--- a/llvm/test/Transforms/CodeGenPrepare/X86/computedgoto.ll
+++ b/llvm/test/Transforms/CodeGenPrepare/X86/computedgoto.ll
@@ -168,7 +168,7 @@ exit:
; the block it terminates.
define void @loop(i64* nocapture readonly %p) {
; CHECK-LABEL: @loop(
-; CHECK-NEXT: bb0.clone:
+; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[DOTSPLIT:%.*]]
; CHECK: bb0:
; CHECK-NEXT: br label [[DOTSPLIT]]
diff --git a/llvm/test/Transforms/CodeGenPrepare/basic.ll b/llvm/test/Transforms/CodeGenPrepare/basic.ll
index 2e58de7d093..b8ca6d6cde9 100644
--- a/llvm/test/Transforms/CodeGenPrepare/basic.ll
+++ b/llvm/test/Transforms/CodeGenPrepare/basic.ll
@@ -13,7 +13,7 @@ entry:
%1 = icmp ugt i64 %0, 3
br i1 %1, label %T, label %trap
-; CHECK: T:
+; CHECK: entry:
; CHECK-NOT: br label %
trap: ; preds = %0, %entry
diff --git a/llvm/test/Transforms/LoopSimplifyCFG/scev.ll b/llvm/test/Transforms/LoopSimplifyCFG/scev.ll
index a2e8e5c6393..c0c5ec180e5 100644
--- a/llvm/test/Transforms/LoopSimplifyCFG/scev.ll
+++ b/llvm/test/Transforms/LoopSimplifyCFG/scev.ll
@@ -6,22 +6,22 @@
define void @t_run_test() {
; CHECK-LABEL: @t_run_test(
; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[LOOP_PH:%.*]]
-; CHECK: loop.ph:
-; CHECK-NEXT: br label [[LOOP_BODY:%.*]]
-; CHECK: loop.body:
-; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[LOOP_PH]] ], [ [[INC:%.*]], [[LOOP_BODY]] ]
+; CHECK-NEXT: br label %[[LOOP_PH:.*]]
+; CHECK: [[LOOP_PH]]:
+; CHECK-NEXT: br label %[[LOOP_BODY:.*]]
+; CHECK: [[LOOP_BODY]]:
+; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, %[[LOOP_PH]] ], [ [[INC:%.*]], %[[LOOP_BODY]] ]
; CHECK-NEXT: [[INC]] = add i32 [[IV]], 1
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i32 [[INC]], 10
-; CHECK-NEXT: br i1 [[CMP]], label [[LOOP_BODY]], label [[EXIT:%.*]]
-; CHECK: exit:
-; CHECK-NEXT: br label [[LOOP_BODY2:%.*]]
-; CHECK: loop.body2:
-; CHECK-NEXT: [[IV2:%.*]] = phi i32 [ 0, [[EXIT]] ], [ [[INC2:%.*]], [[LOOP_BODY2]] ]
+; CHECK-NEXT: br i1 [[CMP]], label %[[LOOP_BODY]], label %[[EXIT:.*]]
+; CHECK: [[EXIT]]:
+; CHECK-NEXT: br label %[[LOOP_BODY2:.*]]
+; CHECK: [[LOOP_BODY2]]:
+; CHECK-NEXT: [[IV2:%.*]] = phi i32 [ 0, %[[EXIT]] ], [ [[INC2:%.*]], %[[LOOP_BODY2]] ]
; CHECK-NEXT: [[INC2]] = add i32 [[IV2]], 1
; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i32 [[INC2]], 10
-; CHECK-NEXT: br i1 [[CMP2]], label [[LOOP_BODY2]], label [[EXIT2:%.*]]
-; CHECK: exit2:
+; CHECK-NEXT: br i1 [[CMP2]], label %[[LOOP_BODY2]], label %[[EXIT2:.*]]
+; CHECK: [[EXIT2]]:
; CHECK-NEXT: ret void
;
entry:
diff --git a/llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll b/llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll
index 56ff69c977e..7768c62fceb 100644
--- a/llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll
+++ b/llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll
@@ -44,7 +44,7 @@ declare %s* @getstruct() nounwind
; CHECK: @main
; Check that the loop preheader contains no address computation.
-; CHECK: %end_of_chain
+; CHECK: %while.cond.i.i
; CHECK-NOT: add{{.*}}lsl
; CHECK: ldr{{.*}}lsl #2
; CHECK: ldr{{.*}}lsl #2
diff --git a/llvm/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll b/llvm/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll
index e492f2c1872..2e32d916fe3 100644
--- a/llvm/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll
+++ b/llvm/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll
@@ -96,7 +96,8 @@ while.end: ; preds = %entry
; itself a phi.
;
; CHECK: @test3
-; CHECK: %for.body3.lr.ph.us.i.loopexit
+; CHECK: %meshBB1
+; CHECK: %meshBB
; CHECK-NEXT: Parent Loop
; CHECK-NEXT: Inner Loop
; CHECK-NEXT: incq
diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll b/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll
index 7ccd89a3606..6c409e40b28 100644
--- a/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll
+++ b/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll
@@ -13,7 +13,7 @@ entry:
; CHECK-NEXT: br i1 %{{.*}}, label %entry.split.split, label %loop_exit
;
; CHECK: entry.split.split:
-; CHECK-NEXT: br label %do_something
+; CHECK-NEXT: br label %loop_begin
loop_begin:
br i1 %cond1, label %continue, label %loop_exit ; first trivial condition
@@ -27,9 +27,9 @@ continue:
do_something:
call void @some_func() noreturn nounwind
br label %loop_begin
-; CHECK: do_something:
+; CHECK: loop_begin:
; CHECK-NEXT: call
-; CHECK-NEXT: br label %do_something
+; CHECK-NEXT: br label %loop_begin
loop_exit:
ret i32 0
@@ -38,4 +38,4 @@ loop_exit:
;
; CHECK: loop_exit.split:
; CHECK-NEXT: ret
-} \ No newline at end of file
+}
OpenPOWER on IntegriCloud