[llvm] cd04a9d - [SimplifyCFG] Add/update tests for merging invokes with different attrs; NFC

Noah Goldstein via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 23:08:14 PDT 2024


Author: Noah Goldstein
Date: 2024-10-10T01:07:59-05:00
New Revision: cd04a9d40191784b63a1f288afc534b6d91e293d

URL: https://github.com/llvm/llvm-project/commit/cd04a9d40191784b63a1f288afc534b6d91e293d
DIFF: https://github.com/llvm/llvm-project/commit/cd04a9d40191784b63a1f288afc534b6d91e293d.diff

LOG: [SimplifyCFG] Add/update tests for merging invokes with different attrs; NFC

Added: 
    

Modified: 
    llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad.ll b/llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad.ll
index f7f65ecac896a2..0b676bd80e185f 100644
--- a/llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad.ll
+++ b/llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals all --version 5
 ; RUN: opt < %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -sink-common-insts -S | FileCheck %s
 ; RUN: opt < %s -passes='simplifycfg<sink-common-insts>' -S | FileCheck %s
 
@@ -7,21 +7,21 @@ target triple = "x86_64-unknown-linux-gnu"
 
 ; Simple test, nothing interesting happens here.
 define void @t0_noop() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t0_noop(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t0_noop() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then:
+; CHECK-NEXT:    br i1 [[C]], label %[[IF_THEN:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont:
+; CHECK-NEXT:            to label %[[INVOKE_CONT:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -47,24 +47,24 @@ if.end:
 
 ; More interesting test, here we can merge the invokes.
 define void @t1_mergeable_invoke() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t1_mergeable_invoke(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t1_mergeable_invoke() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -100,24 +100,24 @@ if.end:
 
 ; normal block is shared, but it is unreachable, so we are fine.
 define void @t2_shared_normal_dest() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t2_shared_normal_dest(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t2_shared_normal_dest() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -150,25 +150,25 @@ if.end:
 
 ; shared normal destination is not unreachable.
 define void @t3_shared_identical_normal_dest() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t3_shared_identical_normal_dest(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t3_shared_identical_normal_dest() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       invoke.cont:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[INVOKE_CONT:.*]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.end:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -202,31 +202,31 @@ if.end:
 
 ; normal destinations are not unreachable and not shared and can not be merged.
 define void @t4_normal_dests() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t4_normal_dests(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t4_normal_dests() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    call void @another_sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -264,37 +264,37 @@ if.end:
 
 ; Invokes lead to 
diff erent landing pads.
 define void @t5_
diff erent_landingpads() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t5_
diff erent_landingpads(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t5_
diff erent_landingpads() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD0:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD0:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       common.resume:
-; CHECK-NEXT:    [[COMMON_RESUME_OP:%.*]] = phi { ptr, i32 } [ [[EH0:%.*]], [[LPAD0]] ], [ [[EH1:%.*]], [[LPAD1:%.*]] ]
+; CHECK:       [[COMMON_RESUME:.*]]:
+; CHECK-NEXT:    [[COMMON_RESUME_OP:%.*]] = phi { ptr, i32 } [ [[EH0:%.*]], %[[LPAD0]] ], [ [[EH1:%.*]], %[[LPAD1:.*]] ]
 ; CHECK-NEXT:    resume { ptr, i32 } [[COMMON_RESUME_OP]]
-; CHECK:       lpad0:
+; CHECK:       [[LPAD0]]:
 ; CHECK-NEXT:    [[EH0]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
-; CHECK-NEXT:    br label [[COMMON_RESUME:%.*]]
-; CHECK:       if.else:
+; CHECK-NEXT:    br label %[[COMMON_RESUME]]
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD1]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD1]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad1:
+; CHECK:       [[LPAD1]]:
 ; CHECK-NEXT:    [[EH1]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @another_destructor()
-; CHECK-NEXT:    br label [[COMMON_RESUME]]
-; CHECK:       if.end:
+; CHECK-NEXT:    br label %[[COMMON_RESUME]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -335,29 +335,29 @@ if.end:
 
 ; The invoked functions are 
diff erent
 define void @t6_
diff erent_invokes() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t6_
diff erent_invokes(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t6_
diff erent_invokes() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @another_simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -393,29 +393,29 @@ if.end:
 
 ; Merging of this invoke is disallowed
 define void @t7_nomerge0() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t7_nomerge0(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t7_nomerge0() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR1:[0-9]+]]
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -449,29 +449,29 @@ if.end:
   ret void
 }
 define void @t8_nomerge1() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t8_nomerge1(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t8_nomerge1() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR1]]
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -505,29 +505,29 @@ if.end:
   ret void
 }
 define void @t9_nomerge2() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t9_nomerge2(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t9_nomerge2() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR1]]
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR1]]
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -563,29 +563,29 @@ if.end:
 
 ; Just don't deal with inlineasm.
 define void @t10_inlineasm() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t10_inlineasm(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t10_inlineasm() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void asm sideeffect "something bad", ""()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void asm sideeffect "something bad", ""()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -621,31 +621,31 @@ if.end:
 
 ; landingpad has PHI nodes, and the incoming values are incompatible.
 define void @t11_phi_in_landingpad_incompatible_incoming_values() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t11_phi_in_landingpad_incompatible_incoming_values(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t11_phi_in_landingpad_incompatible_incoming_values() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
-; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ 0, [[IF_THEN0]] ], [ 1, [[IF_THEN1:%.*]] ]
+; CHECK:       [[LPAD]]:
+; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ 0, %[[IF_THEN0]] ], [ 1, %[[IF_THEN1:.*]] ]
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @consume(i32 [[PHI]])
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -683,24 +683,24 @@ if.end:
 
 ; It is okay for the invoke to take arguments
 define void @t12_arguments_are_fine() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t12_arguments_are_fine(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t12_arguments_are_fine() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw_taking_argument(i32 42)
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -736,25 +736,25 @@ if.end:
 
 ; It is okay for the invoke to take 
diff erent arguments
 define void @t13_
diff erent_arguments_are_fine() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t13_
diff erent_arguments_are_fine(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t13_
diff erent_arguments_are_fine() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*]]:
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
-; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ 42, [[IF_ELSE]] ], [ 0, [[ENTRY:%.*]] ]
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
+; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ 42, %[[IF_ELSE]] ], [ 0, %[[ENTRY]] ]
 ; CHECK-NEXT:    invoke void @simple_throw_taking_argument(i32 [[TMP0]])
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -790,27 +790,27 @@ if.end:
 
 ; There can be more than two invokes in a set
 define void @t14_three_invokes() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t14_three_invokes(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t14_three_invokes() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN2_INVOKE:%.*]], label [[IF_ELSE0:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN2_INVOKE:.*]], label %[[IF_ELSE0:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else0:
+; CHECK:       [[IF_ELSE0]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN2_INVOKE]], label [[IF_ELSE1:%.*]]
-; CHECK:       if.else1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN2_INVOKE]], label %[[IF_ELSE1:.*]]
+; CHECK:       [[IF_ELSE1]]:
 ; CHECK-NEXT:    [[C2:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C2]], label [[IF_THEN2_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then2.invoke:
+; CHECK-NEXT:    br i1 [[C2]], label %[[IF_THEN2_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN2_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[IF_THEN2_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then2.cont:
+; CHECK-NEXT:            to label %[[IF_THEN2_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN2_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -856,32 +856,32 @@ if.end:
 
 ; If not all invokes of landingpad are compatible then we still merge compatible ones.
 define void @t15_three_invokes_only_two_compatible() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t15_three_invokes_only_two_compatible(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t15_three_invokes_only_two_compatible() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE0:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE0:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else0:
+; CHECK:       [[IF_ELSE0]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_ELSE1:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_ELSE1:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.else1:
+; CHECK:       [[IF_ELSE1]]:
 ; CHECK-NEXT:    [[C2:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C2]], label [[IF_THEN2:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then2:
+; CHECK-NEXT:    br i1 [[C2]], label %[[IF_THEN2:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN2]]:
 ; CHECK-NEXT:    invoke void @another_simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT3:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont3:
+; CHECK-NEXT:            to label %[[INVOKE_CONT3:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT3]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -927,35 +927,35 @@ if.end:
 
 ; We succeed in merging invokes into two sets
 define void @t16_four_invokes_forming_two_sets() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t16_four_invokes_forming_two_sets(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t16_four_invokes_forming_two_sets() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE0:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE0:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else0:
+; CHECK:       [[IF_ELSE0]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_ELSE1:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_ELSE1:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.else1:
+; CHECK:       [[IF_ELSE1]]:
 ; CHECK-NEXT:    [[C2:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C2]], label [[IF_THEN3_INVOKE:%.*]], label [[IF_ELSE2:%.*]]
-; CHECK:       if.else2:
+; CHECK-NEXT:    br i1 [[C2]], label %[[IF_THEN3_INVOKE:.*]], label %[[IF_ELSE2:.*]]
+; CHECK:       [[IF_ELSE2]]:
 ; CHECK-NEXT:    [[C3:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C3]], label [[IF_THEN3_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then3.invoke:
+; CHECK-NEXT:    br i1 [[C3]], label %[[IF_THEN3_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN3_INVOKE]]:
 ; CHECK-NEXT:    invoke void @another_simple_throw()
-; CHECK-NEXT:            to label [[IF_THEN3_CONT:%.*]] unwind label [[LPAD]]
-; CHECK:       if.then3.cont:
+; CHECK-NEXT:            to label %[[IF_THEN3_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN3_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1009,31 +1009,30 @@ if.end:
   ret void
 }
 
-; Attributes must match
-define void @t17_mismatched_attrs_prevent_merge() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t17_mismatched_attrs_prevent_merge(
-; CHECK-NEXT:  entry:
+define void @t17_mismatched_attrs_okay_merge() personality ptr @__gxx_personality_v0 {
+; CHECK-LABEL: define void @t17_mismatched_attrs_okay_merge() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR2:[0-9]+]]
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1067,26 +1066,199 @@ if.end:
   ret void
 }
 
+define void @t17_mismatched_attrs_okay_merge_intersect() personality ptr @__gxx_personality_v0 {
+; CHECK-LABEL: define void @t17_mismatched_attrs_okay_merge_intersect() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
+; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR3:[0-9]+]]
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
+; CHECK-NEXT:    unreachable
+; CHECK:       [[LPAD]]:
+; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
+; CHECK-NEXT:            cleanup
+; CHECK-NEXT:    call void @destructor()
+; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
+; CHECK:       [[IF_ELSE]]:
+; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
+; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR2]]
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
+; CHECK-NEXT:    unreachable
+; CHECK:       [[IF_END]]:
+; CHECK-NEXT:    call void @sideeffect()
+; CHECK-NEXT:    ret void
+;
+entry:
+  %c0 = call i1 @cond()
+  br i1 %c0, label %if.then0, label %if.else
+
+if.then0:
+  invoke void @simple_throw() readnone cold to label %invoke.cont0 unwind label %lpad
+
+invoke.cont0:
+  unreachable
+
+lpad:
+  %eh = landingpad { ptr, i32 } cleanup
+  call void @destructor()
+  resume { ptr, i32 } %eh
+
+if.else:
+  %c1 = call i1 @cond()
+  br i1 %c1, label %if.then1, label %if.end
+
+if.then1:
+  invoke void @simple_throw() readnone to label %invoke.cont2 unwind label %lpad
+
+invoke.cont2:
+  unreachable
+
+if.end:
+  call void @sideeffect()
+  ret void
+}
+
+define void @t17_mismatched_attrs_okay_merge_intersect2() personality ptr @__gxx_personality_v0 {
+; CHECK-LABEL: define void @t17_mismatched_attrs_okay_merge_intersect2() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
+; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR2]]
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
+; CHECK-NEXT:    unreachable
+; CHECK:       [[LPAD]]:
+; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
+; CHECK-NEXT:            cleanup
+; CHECK-NEXT:    call void @destructor()
+; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
+; CHECK:       [[IF_ELSE]]:
+; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
+; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR3]]
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
+; CHECK-NEXT:    unreachable
+; CHECK:       [[IF_END]]:
+; CHECK-NEXT:    call void @sideeffect()
+; CHECK-NEXT:    ret void
+;
+entry:
+  %c0 = call i1 @cond()
+  br i1 %c0, label %if.then0, label %if.else
+
+if.then0:
+  invoke void @simple_throw() readnone to label %invoke.cont0 unwind label %lpad
+
+invoke.cont0:
+  unreachable
+
+lpad:
+  %eh = landingpad { ptr, i32 } cleanup
+  call void @destructor()
+  resume { ptr, i32 } %eh
+
+if.else:
+  %c1 = call i1 @cond()
+  br i1 %c1, label %if.then1, label %if.end
+
+if.then1:
+  invoke void @simple_throw() readnone cold to label %invoke.cont2 unwind label %lpad
+
+invoke.cont2:
+  unreachable
+
+if.end:
+  call void @sideeffect()
+  ret void
+}
+
+
+define void @t17_mismatched_attrs_prevent_merge() personality ptr @__gxx_personality_v0 {
+; CHECK-LABEL: define void @t17_mismatched_attrs_prevent_merge() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
+; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR4:[0-9]+]]
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
+; CHECK-NEXT:    unreachable
+; CHECK:       [[LPAD]]:
+; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
+; CHECK-NEXT:            cleanup
+; CHECK-NEXT:    call void @destructor()
+; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
+; CHECK:       [[IF_ELSE]]:
+; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
+; CHECK-NEXT:    invoke void @simple_throw()
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
+; CHECK-NEXT:    unreachable
+; CHECK:       [[IF_END]]:
+; CHECK-NEXT:    call void @sideeffect()
+; CHECK-NEXT:    ret void
+;
+entry:
+  %c0 = call i1 @cond()
+  br i1 %c0, label %if.then0, label %if.else
+
+if.then0:
+  invoke void @simple_throw() strictfp to label %invoke.cont0 unwind label %lpad
+
+invoke.cont0:
+  unreachable
+
+lpad:
+  %eh = landingpad { ptr, i32 } cleanup
+  call void @destructor()
+  resume { ptr, i32 } %eh
+
+if.else:
+  %c1 = call i1 @cond()
+  br i1 %c1, label %if.then1, label %if.end
+
+if.then1:
+  invoke void @simple_throw() to label %invoke.cont2 unwind label %lpad
+
+invoke.cont2:
+  unreachable
+
+if.end:
+  call void @sideeffect()
+  ret void
+}
+
+
 ; Common attributes are preserved
 define void @t18_attributes_are_preserved() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t18_attributes_are_preserved(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t18_attributes_are_preserved() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw() #[[ATTR2]]
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1122,24 +1294,24 @@ if.end:
 
 ; Fully identical operand bundles are good.
 define void @t19_compatible_operand_bundle() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t19_compatible_operand_bundle(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t19_compatible_operand_bundle() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw() [ "abc"(i32 42) ]
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1175,29 +1347,29 @@ if.end:
 
 ; Operand bundles must be compatible, else we can't merge.
 define void @t20_incompatible_operand_bundle() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t20_incompatible_operand_bundle(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t20_incompatible_operand_bundle() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw() [ "abc"(i32 42) ]
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @simple_throw() [ "def"(i32 0) ]
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1233,25 +1405,26 @@ if.end:
 
 ; We need to PHI together the arguments of the operand bundles.
 define void @t21_semicompatible_operand_bundle(i32 %a, i32 %b) personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t21_semicompatible_operand_bundle(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t21_semicompatible_operand_bundle(
+; CHECK-SAME: i32 [[A:%.*]], i32 [[B:%.*]]) personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*]]:
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
-; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ [[B:%.*]], [[IF_ELSE]] ], [ [[A:%.*]], [[ENTRY:%.*]] ]
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
+; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ [[B]], %[[IF_ELSE]] ], [ [[A]], %[[ENTRY]] ]
 ; CHECK-NEXT:    invoke void @simple_throw() [ "abc"(i32 [[TMP0]]) ]
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1288,24 +1461,24 @@ if.end:
 ; Even though the normal destinations are unreachable,
 ; they may have (dead) PHI nodes, so we must cleanup them.
 define void @t22_dead_phi_in_normal_dest() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t22_dead_phi_in_normal_dest(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t22_dead_phi_in_normal_dest() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1343,34 +1516,34 @@ if.end:
 
 ; landingpad has PHI nodes, and out of three invokes, only two have compatible incoming values.
 define void @t23_phi_in_landingpad_compatible_incoming_values() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t23_phi_in_landingpad_compatible_incoming_values(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t23_phi_in_landingpad_compatible_incoming_values() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE0:%.*]]
-; CHECK:       lpad:
-; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ -1, [[IF_THEN2:%.*]] ], [ 0, [[IF_THEN1_INVOKE]] ]
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE0:.*]]
+; CHECK:       [[LPAD:.*]]:
+; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ -1, %[[IF_THEN2:.*]] ], [ 0, %[[IF_THEN1_INVOKE]] ]
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @consume(i32 [[PHI]])
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else0:
+; CHECK:       [[IF_ELSE0]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_ELSE1:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_ELSE1:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.else1:
+; CHECK:       [[IF_ELSE1]]:
 ; CHECK-NEXT:    [[C2:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C2]], label [[IF_THEN2]], label [[IF_END:%.*]]
-; CHECK:       if.then2:
+; CHECK-NEXT:    br i1 [[C2]], label %[[IF_THEN2]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN2]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT3:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont3:
+; CHECK-NEXT:            to label %[[INVOKE_CONT3:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT3]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1419,41 +1592,41 @@ if.end:
 ; landingpad has two PHI nodes, but depending on which PHI you look,
 ; the invoke sets would be 
diff erent, so we can't merge invokes here.
 define void @t24_phi_in_landingpad_semi_compatible_incoming_values() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t24_phi_in_landingpad_semi_compatible_incoming_values(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t24_phi_in_landingpad_semi_compatible_incoming_values() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE0:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE0:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
-; CHECK-NEXT:    [[PHI0:%.*]] = phi i32 [ 0, [[IF_THEN0]] ], [ 0, [[IF_THEN1:%.*]] ], [ -1, [[IF_THEN2:%.*]] ]
-; CHECK-NEXT:    [[PHI1:%.*]] = phi i32 [ 0, [[IF_THEN0]] ], [ 1, [[IF_THEN1]] ], [ 1, [[IF_THEN2]] ]
+; CHECK:       [[LPAD]]:
+; CHECK-NEXT:    [[PHI0:%.*]] = phi i32 [ 0, %[[IF_THEN0]] ], [ 0, %[[IF_THEN1:.*]] ], [ -1, %[[IF_THEN2:.*]] ]
+; CHECK-NEXT:    [[PHI1:%.*]] = phi i32 [ 0, %[[IF_THEN0]] ], [ 1, %[[IF_THEN1]] ], [ 1, %[[IF_THEN2]] ]
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @consume(i32 [[PHI0]])
 ; CHECK-NEXT:    call void @consume(i32 [[PHI1]])
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else0:
+; CHECK:       [[IF_ELSE0]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1]], label [[IF_ELSE1:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1]], label %[[IF_ELSE1:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.else1:
+; CHECK:       [[IF_ELSE1]]:
 ; CHECK-NEXT:    [[C2:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C2]], label [[IF_THEN2]], label [[IF_END:%.*]]
-; CHECK:       if.then2:
+; CHECK-NEXT:    br i1 [[C2]], label %[[IF_THEN2]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN2]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT3:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont3:
+; CHECK-NEXT:            to label %[[INVOKE_CONT3:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT3]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1503,30 +1676,30 @@ if.end:
 
 ; The normal destinations are shared, but the incoming values are incompatible.
 define void @t25_incompatible_phis_in_normal_destination() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t25_incompatible_phis_in_normal_destination(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t25_incompatible_phis_in_normal_destination() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont:
-; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ 0, [[IF_THEN0]] ], [ -1, [[IF_THEN1:%.*]] ]
+; CHECK-NEXT:            to label %[[INVOKE_CONT:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT]]:
+; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ 0, %[[IF_THEN0]] ], [ -1, %[[IF_THEN1:.*]] ]
 ; CHECK-NEXT:    call void @consume(i32 [[PHI]])
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT]] unwind label [[LPAD]]
-; CHECK:       if.end:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1562,33 +1735,33 @@ if.end:
 
 ; shared normal destination has PHI nodes, and out of three invokes, only two have compatible incoming values.
 define void @t26_phi_in_normal_dest_compatible_incoming_values() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t26_phi_in_normal_dest_compatible_incoming_values(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t26_phi_in_normal_dest_compatible_incoming_values() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE0:%.*]]
-; CHECK:       invoke.cont:
-; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ -1, [[IF_THEN2:%.*]] ], [ 0, [[IF_THEN1_INVOKE]] ]
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE0:.*]]
+; CHECK:       [[INVOKE_CONT:.*]]:
+; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ -1, %[[IF_THEN2:.*]] ], [ 0, %[[IF_THEN1_INVOKE]] ]
 ; CHECK-NEXT:    call void @consume(i32 [[PHI]])
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else0:
+; CHECK:       [[IF_ELSE0]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_ELSE1:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_ELSE1:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.else1:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_ELSE1]]:
 ; CHECK-NEXT:    [[C2:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C2]], label [[IF_THEN2]], label [[IF_END:%.*]]
-; CHECK:       if.then2:
+; CHECK-NEXT:    br i1 [[C2]], label %[[IF_THEN2]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN2]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT]] unwind label [[LPAD]]
-; CHECK:       if.end:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1631,25 +1804,25 @@ if.end:
 
 ; Invokes return values, but they are unused.
 define void @t27_invoke_ret_value_is_used() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t27_invoke_ret_value_is_used(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t27_invoke_ret_value_is_used() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       invoke.cont:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[INVOKE_CONT:.*]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    [[TMP0:%.*]] = invoke i32 @returning_maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.end:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1683,26 +1856,26 @@ if.end:
 
 ; Invokes return values, and they are used in a phi node, making the incoming values incompatible.
 define void @t28_invoke_ret_value_is_used_in_phi_node() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t28_invoke_ret_value_is_used_in_phi_node(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t28_invoke_ret_value_is_used_in_phi_node() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       invoke.cont:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[INVOKE_CONT:.*]]:
 ; CHECK-NEXT:    call void @consume(i32 [[TMP0:%.*]])
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    [[TMP0]] = invoke i32 @returning_maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.end:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1738,33 +1911,33 @@ if.end:
 
 ; out of three invokes, two share normal destination and another one has unreachable destination
 define void @t29_common_normal_destination_and_unreachable_normal_destination() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t29_common_normal_destination_and_unreachable_normal_destination(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t29_common_normal_destination_and_unreachable_normal_destination() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE0:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE0:.*]]
+; CHECK:       [[INVOKE_CONT0:.*]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else0:
+; CHECK:       [[IF_ELSE0]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_ELSE1:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_ELSE1:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.else1:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0]] unwind label %[[LPAD]]
+; CHECK:       [[IF_ELSE1]]:
 ; CHECK-NEXT:    [[C2:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C2]], label [[IF_THEN2:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then2:
+; CHECK-NEXT:    br i1 [[C2]], label %[[IF_THEN2:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN2]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1808,31 +1981,31 @@ if.end:
 
 ; normal destinations are not unreachable and 
diff erent but could be merged
 define void @t30_completely_
diff erent_normal_dests() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t30_completely_
diff erent_normal_dests(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t30_completely_
diff erent_normal_dests() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT0:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont0:
+; CHECK-NEXT:            to label %[[INVOKE_CONT0:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT0]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont2:
+; CHECK-NEXT:            to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT2]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1872,24 +2045,24 @@ if.end:
 ; they may have (dead) PHI nodes with incompatible incoming values,
 ; so we must cleanup them.
 define void @t31_incompatible_dead_phi_in_normal_dest() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t31_incompatible_dead_phi_in_normal_dest(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t31_incompatible_dead_phi_in_normal_dest() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    invoke void @maybe_throw()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1924,27 +2097,27 @@ if.end:
 ; Invokes return values, and they are used in a phi node, making the incoming values incompatible,
 ; second phi has compatible incoming values
 define void @t32_invoke_ret_value_is_used_in_phi_node_other_phi_is_fine() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t32_invoke_ret_value_is_used_in_phi_node_other_phi_is_fine(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t32_invoke_ret_value_is_used_in_phi_node_other_phi_is_fine() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       invoke.cont:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[INVOKE_CONT:.*]]:
 ; CHECK-NEXT:    call void @consume(i32 [[TMP0:%.*]])
 ; CHECK-NEXT:    call void @consume(i32 0)
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
 ; CHECK-NEXT:    [[TMP0]] = invoke i32 @returning_maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.end:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -1983,32 +2156,32 @@ if.end:
 ; Invokes return values, and they are used in a phi node, making the incoming values incompatible,
 ; second phi has incompatible incoming values.
 define void @t33_invoke_ret_value_is_used_in_phi_node_other_phi_is_bad() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t33_invoke_ret_value_is_used_in_phi_node_other_phi_is_bad(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t33_invoke_ret_value_is_used_in_phi_node_other_phi_is_bad() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    [[V0:%.*]] = invoke i32 @returning_maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont:
-; CHECK-NEXT:    [[PHI0:%.*]] = phi i32 [ [[V0]], [[IF_THEN0]] ], [ [[V1:%.*]], [[IF_THEN1:%.*]] ]
-; CHECK-NEXT:    [[PHI1:%.*]] = phi i32 [ 0, [[IF_THEN0]] ], [ -1, [[IF_THEN1]] ]
+; CHECK-NEXT:            to label %[[INVOKE_CONT:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT]]:
+; CHECK-NEXT:    [[PHI0:%.*]] = phi i32 [ [[V0]], %[[IF_THEN0]] ], [ [[V1:%.*]], %[[IF_THEN1:.*]] ]
+; CHECK-NEXT:    [[PHI1:%.*]] = phi i32 [ 0, %[[IF_THEN0]] ], [ -1, %[[IF_THEN1]] ]
 ; CHECK-NEXT:    call void @consume(i32 [[PHI0]])
 ; CHECK-NEXT:    call void @consume(i32 [[PHI1]])
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    [[V1]] = invoke i32 @returning_maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT]] unwind label [[LPAD]]
-; CHECK:       if.end:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -2047,32 +2220,32 @@ if.end:
 ; Invokes return values, and they are used in a phi node, but when coming from 
diff erent invokes,
 ; the incoming value isn't always the invoke, which is not okay.
 define void @t34_invoke_ret_value_maybe_incompatibly_used_in_phi_node() personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t34_invoke_ret_value_maybe_incompatibly_used_in_phi_node(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t34_invoke_ret_value_maybe_incompatibly_used_in_phi_node() personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN0:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       if.then0:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN0:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[IF_THEN0]]:
 ; CHECK-NEXT:    [[V0:%.*]] = invoke i32 @returning_maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       invoke.cont:
-; CHECK-NEXT:    [[PHI0:%.*]] = phi i32 [ [[V0]], [[IF_THEN0]] ], [ 0, [[IF_THEN1:%.*]] ]
-; CHECK-NEXT:    [[PHI1:%.*]] = phi i32 [ 0, [[IF_THEN0]] ], [ [[V1:%.*]], [[IF_THEN1]] ]
+; CHECK-NEXT:            to label %[[INVOKE_CONT:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[INVOKE_CONT]]:
+; CHECK-NEXT:    [[PHI0:%.*]] = phi i32 [ [[V0]], %[[IF_THEN0]] ], [ 0, %[[IF_THEN1:.*]] ]
+; CHECK-NEXT:    [[PHI1:%.*]] = phi i32 [ 0, %[[IF_THEN0]] ], [ [[V1:%.*]], %[[IF_THEN1]] ]
 ; CHECK-NEXT:    call void @consume(i32 [[PHI0]])
 ; CHECK-NEXT:    call void @consume(i32 [[PHI1]])
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1]], label [[IF_END:%.*]]
-; CHECK:       if.then1:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1]]:
 ; CHECK-NEXT:    [[V1]] = invoke i32 @returning_maybe_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT]] unwind label [[LPAD]]
-; CHECK:       if.end:
+; CHECK-NEXT:            to label %[[INVOKE_CONT]] unwind label %[[LPAD]]
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -2110,24 +2283,25 @@ if.end:
 
 ; Two mergeable indirect calls, with identical callees.
 define void @t35_identical_indirect_callees(ptr %callee) personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t35_identical_indirect_callees(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t35_identical_indirect_callees(
+; CHECK-SAME: ptr [[CALLEE:%.*]]) personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
-; CHECK-NEXT:    invoke void [[CALLEE:%.*]]()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
+; CHECK-NEXT:    invoke void [[CALLEE]]()
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -2163,25 +2337,26 @@ if.end:
 
 ; Two mergeable indirect calls, with 
diff erent callees.
 define void @t36_
diff erent_indirect_callees(ptr %callee0, ptr %callee1) personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t36_
diff erent_indirect_callees(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t36_
diff erent_indirect_callees(
+; CHECK-SAME: ptr [[CALLEE0:%.*]], ptr [[CALLEE1:%.*]]) personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*]]:
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
-; CHECK-NEXT:    [[TMP0:%.*]] = phi ptr [ [[CALLEE1:%.*]], [[IF_ELSE]] ], [ [[CALLEE0:%.*]], [[ENTRY:%.*]] ]
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
+; CHECK-NEXT:    [[TMP0:%.*]] = phi ptr [ [[CALLEE1]], %[[IF_ELSE]] ], [ [[CALLEE0]], %[[ENTRY]] ]
 ; CHECK-NEXT:    invoke void [[TMP0]]()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -2217,32 +2392,33 @@ if.end:
 
 ; Don't merge direct invoke with indirect ones.
 define void @t37_three_invokes_two_indirect_one_direct(ptr %callee) personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t37_three_invokes_two_indirect_one_direct(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t37_three_invokes_two_indirect_one_direct(
+; CHECK-SAME: ptr [[CALLEE:%.*]]) personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE0:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE0:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else0:
+; CHECK:       [[IF_ELSE0]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_ELSE1:%.*]]
-; CHECK:       if.then1.invoke:
-; CHECK-NEXT:    invoke void [[CALLEE:%.*]]()
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_ELSE1:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
+; CHECK-NEXT:    invoke void [[CALLEE]]()
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.else1:
+; CHECK:       [[IF_ELSE1]]:
 ; CHECK-NEXT:    [[C2:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C2]], label [[IF_THEN2:%.*]], label [[IF_END:%.*]]
-; CHECK:       if.then2:
+; CHECK-NEXT:    br i1 [[C2]], label %[[IF_THEN2:.*]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN2]]:
 ; CHECK-NEXT:    invoke void @simple_throw()
-; CHECK-NEXT:            to label [[INVOKE_CONT3:%.*]] unwind label [[LPAD]]
-; CHECK:       invoke.cont3:
+; CHECK-NEXT:            to label %[[INVOKE_CONT3:.*]] unwind label %[[LPAD]]
+; CHECK:       [[INVOKE_CONT3]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -2288,26 +2464,27 @@ if.end:
 
 ; For indirect invokes, 
diff erent arguments are fine.
 define void @t38_
diff erent_arguments_and_operand_bundes_are_fine(ptr %callee0, ptr %callee1) personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t38_
diff erent_arguments_and_operand_bundes_are_fine(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t38_
diff erent_arguments_and_operand_bundes_are_fine(
+; CHECK-SAME: ptr [[CALLEE0:%.*]], ptr [[CALLEE1:%.*]]) personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*]]:
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
-; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ 42, [[IF_ELSE]] ], [ 0, [[ENTRY:%.*]] ]
-; CHECK-NEXT:    [[TMP1:%.*]] = phi ptr [ [[CALLEE1:%.*]], [[IF_ELSE]] ], [ [[CALLEE0:%.*]], [[ENTRY]] ]
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
+; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ 42, %[[IF_ELSE]] ], [ 0, %[[ENTRY]] ]
+; CHECK-NEXT:    [[TMP1:%.*]] = phi ptr [ [[CALLEE1]], %[[IF_ELSE]] ], [ [[CALLEE0]], %[[ENTRY]] ]
 ; CHECK-NEXT:    invoke void [[TMP1]](i32 [[TMP0]])
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -2343,26 +2520,27 @@ if.end:
 
 ; For indirect invokes, 
diff erent operand bundle arguments are fine.
 define void @t39_
diff erent_arguments_and_operand_bundes_are_fine(ptr %callee0, ptr %callee1, i32 %a, i32 %b) personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t39_
diff erent_arguments_and_operand_bundes_are_fine(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t39_
diff erent_arguments_and_operand_bundes_are_fine(
+; CHECK-SAME: ptr [[CALLEE0:%.*]], ptr [[CALLEE1:%.*]], i32 [[A:%.*]], i32 [[B:%.*]]) personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*]]:
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
-; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ [[B:%.*]], [[IF_ELSE]] ], [ [[A:%.*]], [[ENTRY:%.*]] ]
-; CHECK-NEXT:    [[TMP1:%.*]] = phi ptr [ [[CALLEE1:%.*]], [[IF_ELSE]] ], [ [[CALLEE0:%.*]], [[ENTRY]] ]
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
+; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ [[B]], %[[IF_ELSE]] ], [ [[A]], %[[ENTRY]] ]
+; CHECK-NEXT:    [[TMP1:%.*]] = phi ptr [ [[CALLEE1]], %[[IF_ELSE]] ], [ [[CALLEE0]], %[[ENTRY]] ]
 ; CHECK-NEXT:    invoke void [[TMP1]]() [ "abc"(i32 [[TMP0]]) ]
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -2398,27 +2576,28 @@ if.end:
 
 ; For indirect invokes, both 
diff erent arguments and operand bundle arguments are fine.
 define void @t40_
diff erent_arguments_and_operand_bundes_are_fine(ptr %callee0, ptr %callee1, i32 %a, i32 %b) personality ptr @__gxx_personality_v0 {
-; CHECK-LABEL: @t40_
diff erent_arguments_and_operand_bundes_are_fine(
-; CHECK-NEXT:  entry:
+; CHECK-LABEL: define void @t40_
diff erent_arguments_and_operand_bundes_are_fine(
+; CHECK-SAME: ptr [[CALLEE0:%.*]], ptr [[CALLEE1:%.*]], i32 [[A:%.*]], i32 [[B:%.*]]) personality ptr @__gxx_personality_v0 {
+; CHECK-NEXT:  [[ENTRY:.*]]:
 ; CHECK-NEXT:    [[C0:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C0]], label [[IF_THEN1_INVOKE:%.*]], label [[IF_ELSE:%.*]]
-; CHECK:       lpad:
+; CHECK-NEXT:    br i1 [[C0]], label %[[IF_THEN1_INVOKE:.*]], label %[[IF_ELSE:.*]]
+; CHECK:       [[LPAD:.*]]:
 ; CHECK-NEXT:    [[EH:%.*]] = landingpad { ptr, i32 }
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    call void @destructor()
 ; CHECK-NEXT:    resume { ptr, i32 } [[EH]]
-; CHECK:       if.else:
+; CHECK:       [[IF_ELSE]]:
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
-; CHECK-NEXT:    br i1 [[C1]], label [[IF_THEN1_INVOKE]], label [[IF_END:%.*]]
-; CHECK:       if.then1.invoke:
-; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ 42, [[IF_ELSE]] ], [ 0, [[ENTRY:%.*]] ]
-; CHECK-NEXT:    [[TMP1:%.*]] = phi i32 [ [[B:%.*]], [[IF_ELSE]] ], [ [[A:%.*]], [[ENTRY]] ]
-; CHECK-NEXT:    [[TMP2:%.*]] = phi ptr [ [[CALLEE1:%.*]], [[IF_ELSE]] ], [ [[CALLEE0:%.*]], [[ENTRY]] ]
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF_THEN1_INVOKE]], label %[[IF_END:.*]]
+; CHECK:       [[IF_THEN1_INVOKE]]:
+; CHECK-NEXT:    [[TMP0:%.*]] = phi i32 [ 42, %[[IF_ELSE]] ], [ 0, %[[ENTRY]] ]
+; CHECK-NEXT:    [[TMP1:%.*]] = phi i32 [ [[B]], %[[IF_ELSE]] ], [ [[A]], %[[ENTRY]] ]
+; CHECK-NEXT:    [[TMP2:%.*]] = phi ptr [ [[CALLEE1]], %[[IF_ELSE]] ], [ [[CALLEE0]], %[[ENTRY]] ]
 ; CHECK-NEXT:    invoke void [[TMP2]](i32 [[TMP0]]) [ "abc"(i32 [[TMP1]]) ]
-; CHECK-NEXT:            to label [[IF_THEN1_CONT:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       if.then1.cont:
+; CHECK-NEXT:            to label %[[IF_THEN1_CONT:.*]] unwind label %[[LPAD]]
+; CHECK:       [[IF_THEN1_CONT]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       if.end:
+; CHECK:       [[IF_END]]:
 ; CHECK-NEXT:    call void @sideeffect()
 ; CHECK-NEXT:    ret void
 ;
@@ -2453,17 +2632,18 @@ if.end:
 }
 
 define void @dont_merge_
diff erent_immargs(i1 %c1) gc "statepoint-example" personality ptr null {
-; CHECK-LABEL: @dont_merge_
diff erent_immargs(
-; CHECK-NEXT:    br i1 [[C1:%.*]], label [[IF:%.*]], label [[ELSE:%.*]]
-; CHECK:       if:
+; CHECK-LABEL: define void @dont_merge_
diff erent_immargs(
+; CHECK-SAME: i1 [[C1:%.*]]) gc "statepoint-example" personality ptr null {
+; CHECK-NEXT:    br i1 [[C1]], label %[[IF:.*]], label %[[ELSE:.*]]
+; CHECK:       [[IF]]:
 ; CHECK-NEXT:    [[T1:%.*]] = invoke token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 1, i32 0, ptr elementtype(void (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i64 0, i64 0)
-; CHECK-NEXT:            to label [[UNREACHABLE:%.*]] unwind label [[LPAD:%.*]]
-; CHECK:       else:
+; CHECK-NEXT:            to label %[[UNREACHABLE:.*]] unwind label %[[LPAD:.*]]
+; CHECK:       [[ELSE]]:
 ; CHECK-NEXT:    [[T2:%.*]] = invoke token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i64 0, i64 0)
-; CHECK-NEXT:            to label [[UNREACHABLE]] unwind label [[LPAD]]
-; CHECK:       unreachable:
+; CHECK-NEXT:            to label %[[UNREACHABLE]] unwind label %[[LPAD]]
+; CHECK:       [[UNREACHABLE]]:
 ; CHECK-NEXT:    unreachable
-; CHECK:       lpad:
+; CHECK:       [[LPAD]]:
 ; CHECK-NEXT:    [[T3:%.*]] = landingpad token
 ; CHECK-NEXT:            cleanup
 ; CHECK-NEXT:    ret void
@@ -2513,4 +2693,6 @@ declare dso_local i32 @__gxx_personality_v0(...)
 ; CHECK: attributes #[[ATTR0:[0-9]+]] = { noreturn }
 ; CHECK: attributes #[[ATTR1]] = { nomerge }
 ; CHECK: attributes #[[ATTR2]] = { memory(none) }
+; CHECK: attributes #[[ATTR3]] = { cold memory(none) }
+; CHECK: attributes #[[ATTR4]] = { strictfp }
 ;.


        


More information about the llvm-commits mailing list