<div dir="ltr">Hi,<div><br></div><div>thanks for letting me know. I'll take a look ASAP.</div><div><br></div><div>Cheers,</div><div>Florian</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 5, 2021 at 9:23 AM <<a href="mailto:douglas.yung@sony.com">douglas.yung@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi Florian,<br>
<br>
One of our internal tests started to fail and I bisected it to your change and put the details in PR49022. Can you take a look?<br>
<br>
Douglas Yung<br>
<br>
-----Original Message-----<br>
From: llvm-commits <<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@lists.llvm.org</a>> On Behalf Of Florian Hahn via llvm-commits<br>
Sent: Saturday, January 23, 2021 8:07<br>
To: <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
Subject: [llvm] 2920770 - [Local] Treat calls that may not return as being alive.<br>
<br>
<br>
Author: Florian Hahn<br>
Date: 2021-01-23T16:05:14Z<br>
New Revision: 292077072ec1279d89d21873fe900061e55ef936<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/292077072ec1279d89d21873fe900061e55ef936" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/292077072ec1279d89d21873fe900061e55ef936</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/292077072ec1279d89d21873fe900061e55ef936.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/292077072ec1279d89d21873fe900061e55ef936.diff</a><br>
<br>
LOG: [Local] Treat calls that may not return as being alive.<br>
<br>
With the addition of the `willreturn` attribute, functions that may<br>
not return (e.g. due to an infinite loop) are well defined, if they are<br>
not marked as `willreturn`.<br>
<br>
This patch updates `wouldInstructionBeTriviallyDead` to not consider<br>
calls that may not return as dead.<br>
<br>
This patch still provides an escape hatch for intrinsics, which are<br>
still assumed as willreturn unconditionally. It will be removed once<br>
all intrinsics definitions have been reviewed and updated.<br>
<br>
Reviewed By: jdoerfert<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D94106" rel="noreferrer" target="_blank">https://reviews.llvm.org/D94106</a><br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/include/llvm/IR/InstrTypes.h<br>
    llvm/lib/Transforms/Utils/Local.cpp<br>
    llvm/test/Feature/OperandBundles/early-cse.ll<br>
    llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll<br>
    llvm/test/Transforms/Attributor/align.ll<br>
    llvm/test/Transforms/Attributor/nocapture-1.ll<br>
    llvm/test/Transforms/Attributor/nocapture-2.ll<br>
    llvm/test/Transforms/Attributor/nonnull.ll<br>
    llvm/test/Transforms/Attributor/norecurse.ll<br>
    llvm/test/Transforms/Attributor/range.ll<br>
    llvm/test/Transforms/Attributor/readattrs.ll<br>
    llvm/test/Transforms/BDCE/basic.ll<br>
    llvm/test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll<br>
    llvm/test/Transforms/Coroutines/coro-split-00.ll<br>
    llvm/test/Transforms/Coroutines/coro-split-hidden.ll<br>
    llvm/test/Transforms/Coroutines/no-suspend.ll<br>
    llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll<br>
    llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/DeleteThrowableInst.ll<br>
    llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/simple.ll<br>
    llvm/test/Transforms/Inline/dead-calls-willreturn.ll<br>
    llvm/test/Transforms/InstCombine/constant-fold-libfunc.ll<br>
    llvm/test/Transforms/InstCombine/nothrow.ll<br>
    llvm/test/Transforms/InstSimplify/ConstProp/rint.ll<br>
    llvm/test/Transforms/InstSimplify/remove-dead-call.ll<br>
    llvm/test/Transforms/InstSimplify/returned.ll<br>
    llvm/test/Transforms/MemCpyOpt/memcpy.ll<br>
    llvm/test/Transforms/NewGVN/eliminate-callsite-inline.ll<br>
    llvm/test/Transforms/OpenMP/parallel_deletion.ll<br>
    llvm/test/Transforms/Reassociate/erase_inst_made_change.ll<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h<br>
index 7b99cc96b149..f42ef48de6b3 100644<br>
--- a/llvm/include/llvm/IR/InstrTypes.h<br>
+++ b/llvm/include/llvm/IR/InstrTypes.h<br>
@@ -1756,6 +1756,10 @@ class CallBase : public Instruction {<br>
   bool onlyReadsMemory() const {<br>
     return doesNotAccessMemory() || hasFnAttr(Attribute::ReadOnly);<br>
   }<br>
+<br>
+  /// Returns true if this function is guaranteed to return.<br>
+  bool willReturn() const { return hasFnAttr(Attribute::WillReturn); }<br>
+<br>
   void setOnlyReadsMemory() {<br>
     addAttribute(AttributeList::FunctionIndex, Attribute::ReadOnly);<br>
   }<br>
<br>
diff  --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp<br>
index 1f94c6191554..477ea458c763 100644<br>
--- a/llvm/lib/Transforms/Utils/Local.cpp<br>
+++ b/llvm/lib/Transforms/Utils/Local.cpp<br>
@@ -420,6 +420,14 @@ bool llvm::wouldInstructionBeTriviallyDead(Instruction *I,<br>
     return true;<br>
   }<br>
<br>
+  if (auto *CB = dyn_cast<CallBase>(I)) {<br>
+    // Treat calls that may not return as alive.<br>
+    // TODO: Remove the intrinsic escape hatch once all intrinsics set<br>
+    // willreturn properly.<br>
+    if (!CB->willReturn() && !isa<IntrinsicInst>(I))<br>
+      return false;<br>
+  }<br>
+<br>
   if (!I->mayHaveSideEffects())<br>
     return true;<br>
<br>
<br>
diff  --git a/llvm/test/Feature/OperandBundles/early-cse.ll b/llvm/test/Feature/OperandBundles/early-cse.ll<br>
index cf06cd1e1f1d..1b93fe7312bf 100644<br>
--- a/llvm/test/Feature/OperandBundles/early-cse.ll<br>
+++ b/llvm/test/Feature/OperandBundles/early-cse.ll<br>
@@ -5,8 +5,8 @@<br>
 ; they're carrying unknown operand bundles since the presence of<br>
 ; unknown operand bundles implies arbitrary memory effects.<br>
<br>
-declare void @readonly_function() readonly nounwind<br>
-declare void @readnone_function() readnone nounwind<br>
+declare void @readonly_function() readonly nounwind willreturn<br>
+declare void @readnone_function() readnone nounwind willreturn<br>
<br>
 define i32 @test0(i32* %x) {<br>
 ; CHECK-LABEL: @test0(<br>
<br>
diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll<br>
index 47c5eba84b77..cafdba142cac 100644<br>
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll<br>
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll<br>
@@ -17,16 +17,32 @@ target triple = "x86_64-unknown-linux-gnu"<br>
 @a = internal global %struct.Foo { i32 1, i64 2 }, align 8<br>
<br>
 define void @run() {<br>
-; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@run<br>
-; NOT_CGSCC_NPM-SAME: () [[ATTR0:#.*]] {<br>
-; NOT_CGSCC_NPM-NEXT:  entry:<br>
-; NOT_CGSCC_NPM-NEXT:    unreachable<br>
+; IS________OPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
+; IS________OPM-LABEL: define {{[^@]+}}@run<br>
+; IS________OPM-SAME: () [[ATTR0:#.*]] {<br>
+; IS________OPM-NEXT:  entry:<br>
+; IS________OPM-NEXT:    [[TMP0:%.*]] = call i64 @CaptureAStruct(%struct.Foo* nocapture nofree noundef nonnull readonly align 8 dereferenceable(16) @a) [[ATTR0]]<br>
+; IS________OPM-NEXT:    unreachable<br>
+;<br>
+; IS__TUNIT_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@run<br>
+; IS__TUNIT_NPM-SAME: () [[ATTR0:#.*]] {<br>
+; IS__TUNIT_NPM-NEXT:  entry:<br>
+; IS__TUNIT_NPM-NEXT:    [[A_CAST:%.*]] = bitcast %struct.Foo* @a to i32*<br>
+; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[A_CAST]], align 8<br>
+; IS__TUNIT_NPM-NEXT:    [[A_0_1:%.*]] = getelementptr [[STRUCT_FOO:%.*]], %struct.Foo* @a, i32 0, i32 1<br>
+; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = load i64, i64* [[A_0_1]], align 8<br>
+; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = call i64 @CaptureAStruct(i32 [[TMP0]], i64 [[TMP1]]) [[ATTR0]]<br>
+; IS__TUNIT_NPM-NEXT:    unreachable<br>
 ;<br>
 ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readonly willreturn<br>
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@run<br>
 ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] {<br>
 ; IS__CGSCC____-NEXT:  entry:<br>
+; IS__CGSCC____-NEXT:    [[A_CAST:%.*]] = bitcast %struct.Foo* @a to i32*<br>
+; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = load i32, i32* [[A_CAST]], align 8<br>
+; IS__CGSCC____-NEXT:    [[A_0_1:%.*]] = getelementptr [[STRUCT_FOO:%.*]], %struct.Foo* @a, i32 0, i32 1<br>
+; IS__CGSCC____-NEXT:    [[TMP1:%.*]] = load i64, i64* [[A_0_1]], align 8<br>
 ; IS__CGSCC____-NEXT:    unreachable<br>
 ;<br>
 entry:<br>
@@ -86,6 +102,37 @@ define internal i64 @CaptureAStruct(%struct.Foo* byval(%struct.Foo) %a) {<br>
 ; IS__CGSCC_OPM-NEXT:    [[GEP]] = getelementptr [[STRUCT_FOO:%.*]], %struct.Foo* [[A]], i64 0<br>
 ; IS__CGSCC_OPM-NEXT:    br label [[LOOP]]<br>
 ;<br>
+; IS________OPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
+; IS________OPM-LABEL: define {{[^@]+}}@CaptureAStruct<br>
+; IS________OPM-SAME: (%struct.Foo* noalias nofree noundef nonnull byval(%struct.Foo) align 8 dereferenceable(16) [[A:%.*]]) [[ATTR0]] {<br>
+; IS________OPM-NEXT:  entry:<br>
+; IS________OPM-NEXT:    [[A_PTR:%.*]] = alloca %struct.Foo*, align 8<br>
+; IS________OPM-NEXT:    br label [[LOOP:%.*]]<br>
+; IS________OPM:       loop:<br>
+; IS________OPM-NEXT:    [[PHI:%.*]] = phi %struct.Foo* [ null, [[ENTRY:%.*]] ], [ [[GEP:%.*]], [[LOOP]] ]<br>
+; IS________OPM-NEXT:    [[TMP0:%.*]] = phi %struct.Foo* [ [[A]], [[ENTRY]] ], [ [[TMP0]], [[LOOP]] ]<br>
+; IS________OPM-NEXT:    store %struct.Foo* [[PHI]], %struct.Foo** [[A_PTR]], align 8<br>
+; IS________OPM-NEXT:    [[GEP]] = getelementptr [[STRUCT_FOO:%.*]], %struct.Foo* [[A]], i64 0<br>
+; IS________OPM-NEXT:    br label [[LOOP]]<br>
+;<br>
+; IS__TUNIT_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@CaptureAStruct<br>
+; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0]] {<br>
+; IS__TUNIT_NPM-NEXT:  entry:<br>
+; IS__TUNIT_NPM-NEXT:    [[A_PRIV:%.*]] = alloca [[STRUCT_FOO:%.*]], align 8<br>
+; IS__TUNIT_NPM-NEXT:    [[A_PRIV_CAST:%.*]] = bitcast %struct.Foo* [[A_PRIV]] to i32*<br>
+; IS__TUNIT_NPM-NEXT:    store i32 [[TMP0]], i32* [[A_PRIV_CAST]], align 4<br>
+; IS__TUNIT_NPM-NEXT:    [[A_PRIV_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i32 0, i32 1<br>
+; IS__TUNIT_NPM-NEXT:    store i64 [[TMP1]], i64* [[A_PRIV_0_1]], align 8<br>
+; IS__TUNIT_NPM-NEXT:    [[A_PTR:%.*]] = alloca %struct.Foo*, align 8<br>
+; IS__TUNIT_NPM-NEXT:    br label [[LOOP:%.*]]<br>
+; IS__TUNIT_NPM:       loop:<br>
+; IS__TUNIT_NPM-NEXT:    [[PHI:%.*]] = phi %struct.Foo* [ null, [[ENTRY:%.*]] ], [ [[GEP:%.*]], [[LOOP]] ]<br>
+; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = phi %struct.Foo* [ [[A_PRIV]], [[ENTRY]] ], [ [[TMP2]], [[LOOP]] ]<br>
+; IS__TUNIT_NPM-NEXT:    store %struct.Foo* [[PHI]], %struct.Foo** [[A_PTR]], align 8<br>
+; IS__TUNIT_NPM-NEXT:    [[GEP]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i64 0<br>
+; IS__TUNIT_NPM-NEXT:    br label [[LOOP]]<br>
+;<br>
 ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone<br>
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@CaptureAStruct<br>
 ; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR2:#.*]] {<br>
<br>
diff  --git a/llvm/test/Transforms/Attributor/align.ll b/llvm/test/Transforms/Attributor/align.ll<br>
index 5318a829a762..c210763ce3dd 100644<br>
--- a/llvm/test/Transforms/Attributor/align.ll<br>
+++ b/llvm/test/Transforms/Attributor/align.ll<br>
@@ -102,30 +102,34 @@ define i32* @test5_2() {<br>
 ; TEST 6<br>
 ; SCC<br>
 define i32* @test6_1() #0 {<br>
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable<br>
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6_1<br>
-; NOT_CGSCC_NPM-SAME: () [[ATTR1:#.*]] {<br>
-; NOT_CGSCC_NPM-NEXT:    unreachable<br>
-;<br>
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn<br>
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_1<br>
-; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] {<br>
-; IS__CGSCC_NPM-NEXT:    unreachable<br>
+; NOT_CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable<br>
+; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test6_1<br>
+; NOT_CGSCC_OPM-SAME: () [[ATTR1:#.*]] {<br>
+; NOT_CGSCC_OPM-NEXT:    [[RET:%.*]] = tail call i32* @test6_2() [[ATTR11:#.*]]<br>
+; NOT_CGSCC_OPM-NEXT:    unreachable<br>
+;<br>
+; IS__CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable<br>
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test6_1<br>
+; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] {<br>
+; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = tail call i32* @test6_2() [[ATTR12:#.*]]<br>
+; IS__CGSCC_OPM-NEXT:    unreachable<br>
 ;<br>
   %ret = tail call i32* @test6_2()<br>
   ret i32* %ret<br>
 }<br>
<br>
 define i32* @test6_2() #0 {<br>
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable<br>
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6_2<br>
-; NOT_CGSCC_NPM-SAME: () [[ATTR1]] {<br>
-; NOT_CGSCC_NPM-NEXT:    unreachable<br>
-;<br>
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn<br>
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_2<br>
-; IS__CGSCC_NPM-SAME: () [[ATTR1]] {<br>
-; IS__CGSCC_NPM-NEXT:    unreachable<br>
+; NOT_CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable<br>
+; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test6_2<br>
+; NOT_CGSCC_OPM-SAME: () [[ATTR1]] {<br>
+; NOT_CGSCC_OPM-NEXT:    [[RET:%.*]] = tail call i32* @test6_1() [[ATTR11]]<br>
+; NOT_CGSCC_OPM-NEXT:    unreachable<br>
+;<br>
+; IS__CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable<br>
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test6_2<br>
+; IS__CGSCC_OPM-SAME: () [[ATTR1]] {<br>
+; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = tail call i32* @test6_1() [[ATTR12]]<br>
+; IS__CGSCC_OPM-NEXT:    unreachable<br>
 ;<br>
   %ret = tail call i32* @test6_1()<br>
   ret i32* %ret<br>
@@ -967,7 +971,7 @@ define i32 @musttail_caller_1(i32* %p) {<br>
 ; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = load i1, i1* @cnd, align 1<br>
 ; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]<br>
 ; IS__CGSCC_OPM:       mt:<br>
-; IS__CGSCC_OPM-NEXT:    [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]]) [[ATTR12:#.*]]<br>
+; IS__CGSCC_OPM-NEXT:    [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]]) [[ATTR13:#.*]]<br>
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[V]]<br>
 ; IS__CGSCC_OPM:       exit:<br>
 ; IS__CGSCC_OPM-NEXT:    ret i32 0<br>
@@ -978,7 +982,7 @@ define i32 @musttail_caller_1(i32* %p) {<br>
 ; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = load i1, i1* @cnd, align 1<br>
 ; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]<br>
 ; IS__CGSCC_NPM:       mt:<br>
-; IS__CGSCC_NPM-NEXT:    [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]]) [[ATTR11:#.*]]<br>
+; IS__CGSCC_NPM-NEXT:    [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]]) [[ATTR12:#.*]]<br>
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[V]]<br>
 ; IS__CGSCC_NPM:       exit:<br>
 ; IS__CGSCC_NPM-NEXT:    ret i32 0<br>
<br>
diff  --git a/llvm/test/Transforms/Attributor/nocapture-1.ll b/llvm/test/Transforms/Attributor/nocapture-1.ll<br>
index d99f9a879a28..74b39d718501 100644<br>
--- a/llvm/test/Transforms/Attributor/nocapture-1.ll<br>
+++ b/llvm/test/Transforms/Attributor/nocapture-1.ll<br>
@@ -849,6 +849,8 @@ define void @ptr_uses(i8* %ptr, i8* %wptr) {<br>
 ; CHECK: Function Attrs: nounwind<br>
 ; CHECK-LABEL: define {{[^@]+}}@ptr_uses<br>
 ; CHECK-SAME: (i8* [[PTR:%.*]], i8* nocapture nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) [[ATTR13:#.*]] {<br>
+; CHECK-NEXT:    [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) [[ATTR4]]<br>
+; CHECK-NEXT:    [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) [[ATTR4]]<br>
 ; CHECK-NEXT:    store i8 0, i8* [[WPTR]], align 1<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
<br>
diff  --git a/llvm/test/Transforms/Attributor/nocapture-2.ll b/llvm/test/Transforms/Attributor/nocapture-2.ll<br>
index bb5ace7cce1c..c176a1c1ce0f 100644<br>
--- a/llvm/test/Transforms/Attributor/nocapture-2.ll<br>
+++ b/llvm/test/Transforms/Attributor/nocapture-2.ll<br>
@@ -728,7 +728,7 @@ define i32* @not_captured_by_readonly_call_not_returned_either3(i32* %b, i32* %r<br>
 ; CHECK-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either3<br>
 ; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) [[ATTR8]] {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) [[ATTR6]]<br>
+; CHECK-NEXT:    [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) [[ATTR8]]<br>
 ; CHECK-NEXT:    ret i32* [[CALL]]<br>
 ;<br>
 entry:<br>
<br>
diff  --git a/llvm/test/Transforms/Attributor/nonnull.ll b/llvm/test/Transforms/Attributor/nonnull.ll<br>
index 3c836e4e5c28..b54ab775d53a 100644<br>
--- a/llvm/test/Transforms/Attributor/nonnull.ll<br>
+++ b/llvm/test/Transforms/Attributor/nonnull.ll<br>
@@ -149,11 +149,13 @@ define i8* @test4_helper() {<br>
 ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test4_helper<br>
 ; NOT_CGSCC_NPM-SAME: () [[ATTR2:#.*]] {<br>
+; NOT_CGSCC_NPM-NEXT:    [[RET:%.*]] = call i8* @test4()<br>
 ; NOT_CGSCC_NPM-NEXT:    unreachable<br>
 ;<br>
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn<br>
+; IS__CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4_helper<br>
 ; IS__CGSCC_NPM-SAME: () [[ATTR2:#.*]] {<br>
+; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call i8* @test4()<br>
 ; IS__CGSCC_NPM-NEXT:    unreachable<br>
 ;<br>
   %ret = call i8* @test4()<br>
@@ -164,11 +166,13 @@ define i8* @test4() {<br>
 ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
 ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test4<br>
 ; NOT_CGSCC_NPM-SAME: () [[ATTR2]] {<br>
+; NOT_CGSCC_NPM-NEXT:    [[RET:%.*]] = call i8* @test4_helper()<br>
 ; NOT_CGSCC_NPM-NEXT:    unreachable<br>
 ;<br>
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn<br>
+; IS__CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4<br>
 ; IS__CGSCC_NPM-SAME: () [[ATTR2]] {<br>
+; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call i8* @test4_helper()<br>
 ; IS__CGSCC_NPM-NEXT:    unreachable<br>
 ;<br>
   %ret = call i8* @test4_helper()<br>
<br>
diff  --git a/llvm/test/Transforms/Attributor/norecurse.ll b/llvm/test/Transforms/Attributor/norecurse.ll<br>
index f5560abbfb35..0df8f9d6973a 100644<br>
--- a/llvm/test/Transforms/Attributor/norecurse.ll<br>
+++ b/llvm/test/Transforms/Attributor/norecurse.ll<br>
@@ -34,29 +34,21 @@ define i32 @self_rec() {<br>
 }<br>
<br>
 define i32 @indirect_rec() {<br>
-; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec<br>
-; NOT_CGSCC_NPM-SAME: () [[ATTR2:#.*]] {<br>
-; NOT_CGSCC_NPM-NEXT:    unreachable<br>
-;<br>
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn<br>
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec<br>
-; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] {<br>
-; IS__CGSCC_NPM-NEXT:    unreachable<br>
+; CHECK: Function Attrs: nofree noreturn nosync nounwind readnone<br>
+; CHECK-LABEL: define {{[^@]+}}@indirect_rec<br>
+; CHECK-SAME: () [[ATTR2:#.*]] {<br>
+; CHECK-NEXT:    [[A:%.*]] = call i32 @indirect_rec2() [[ATTR2]]<br>
+; CHECK-NEXT:    unreachable<br>
 ;<br>
   %a = call i32 @indirect_rec2()<br>
   ret i32 %a<br>
 }<br>
 define i32 @indirect_rec2() {<br>
-; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone<br>
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec2<br>
-; NOT_CGSCC_NPM-SAME: () [[ATTR2]] {<br>
-; NOT_CGSCC_NPM-NEXT:    unreachable<br>
-;<br>
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn<br>
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec2<br>
-; IS__CGSCC_NPM-SAME: () [[ATTR1]] {<br>
-; IS__CGSCC_NPM-NEXT:    unreachable<br>
+; CHECK: Function Attrs: nofree noreturn nosync nounwind readnone<br>
+; CHECK-LABEL: define {{[^@]+}}@indirect_rec2<br>
+; CHECK-SAME: () [[ATTR2]] {<br>
+; CHECK-NEXT:    [[A:%.*]] = call i32 @indirect_rec() [[ATTR2]]<br>
+; CHECK-NEXT:    unreachable<br>
 ;<br>
   %a = call i32 @indirect_rec()<br>
   ret i32 %a<br>
@@ -65,7 +57,7 @@ define i32 @indirect_rec2() {<br>
 define i32 @extern() {<br>
 ; CHECK: Function Attrs: nosync readnone<br>
 ; CHECK-LABEL: define {{[^@]+}}@extern<br>
-; CHECK-SAME: () [[ATTR2:#.*]] {<br>
+; CHECK-SAME: () [[ATTR3:#.*]] {<br>
 ; CHECK-NEXT:    [[A:%.*]] = call i32 @k()<br>
 ; CHECK-NEXT:    ret i32 [[A]]<br>
 ;<br>
@@ -78,17 +70,11 @@ define i32 @extern() {<br>
 declare i32 @k() readnone<br>
<br>
 define void @intrinsic(i8* %dest, i8* %src, i32 %len) {<br>
-; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn<br>
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@intrinsic<br>
-; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree writeonly [[DEST:%.*]], i8* nocapture nofree readonly [[SRC:%.*]], i32 [[LEN:%.*]]) [[ATTR5:#.*]] {<br>
-; NOT_CGSCC_NPM-NEXT:    call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[DEST]], i8* noalias nocapture nofree readonly [[SRC]], i32 [[LEN]], i1 noundef false) [[ATTR10:#.*]]<br>
-; NOT_CGSCC_NPM-NEXT:    ret void<br>
-;<br>
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn<br>
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@intrinsic<br>
-; IS__CGSCC_NPM-SAME: (i8* nocapture nofree writeonly [[DEST:%.*]], i8* nocapture nofree readonly [[SRC:%.*]], i32 [[LEN:%.*]]) [[ATTR4:#.*]] {<br>
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[DEST]], i8* noalias nocapture nofree readonly [[SRC]], i32 [[LEN]], i1 noundef false) [[ATTR7:#.*]]<br>
-; IS__CGSCC_NPM-NEXT:    ret void<br>
+; CHECK: Function Attrs: argmemonly nofree nosync nounwind willreturn<br>
+; CHECK-LABEL: define {{[^@]+}}@intrinsic<br>
+; CHECK-SAME: (i8* nocapture nofree writeonly [[DEST:%.*]], i8* nocapture nofree readonly [[SRC:%.*]], i32 [[LEN:%.*]]) [[ATTR5:#.*]] {<br>
+; CHECK-NEXT:    call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[DEST]], i8* noalias nocapture nofree readonly [[SRC]], i32 [[LEN]], i1 noundef false) [[ATTR10:#.*]]<br>
+; CHECK-NEXT:    ret void<br>
 ;<br>
   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 %len, i1 false)<br>
   ret void<br>
@@ -107,7 +93,7 @@ define internal i32 @called_by_norecurse() {<br>
 ;<br>
 ; IS__CGSCC____: Function Attrs: norecurse nosync readnone<br>
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@called_by_norecurse<br>
-; IS__CGSCC____-SAME: () [[ATTR5:#.*]] {<br>
+; IS__CGSCC____-SAME: () [[ATTR6:#.*]] {<br>
 ; IS__CGSCC____-NEXT:    [[A:%.*]] = call i32 @k()<br>
 ; IS__CGSCC____-NEXT:    ret i32 undef<br>
 ;<br>
@@ -123,7 +109,7 @@ define void @m() norecurse {<br>
 ;<br>
 ; IS__CGSCC____: Function Attrs: norecurse nosync readnone<br>
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@m<br>
-; IS__CGSCC____-SAME: () [[ATTR5]] {<br>
+; IS__CGSCC____-SAME: () [[ATTR6]] {<br>
 ; IS__CGSCC____-NEXT:    [[A:%.*]] = call i32 @called_by_norecurse()<br>
 ; IS__CGSCC____-NEXT:    ret void<br>
 ;<br>
@@ -134,7 +120,7 @@ define void @m() norecurse {<br>
 define internal i32 @called_by_norecurse_indirectly() {<br>
 ; CHECK: Function Attrs: nosync readnone<br>
 ; CHECK-LABEL: define {{[^@]+}}@called_by_norecurse_indirectly<br>
-; CHECK-SAME: () [[ATTR2]] {<br>
+; CHECK-SAME: () [[ATTR3]] {<br>
 ; CHECK-NEXT:    [[A:%.*]] = call i32 @k()<br>
 ; CHECK-NEXT:    ret i32 [[A]]<br>
 ;<br>
@@ -150,7 +136,7 @@ define internal i32 @o() {<br>
 ;<br>
 ; IS__CGSCC____: Function Attrs: norecurse nosync readnone<br>
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@o<br>
-; IS__CGSCC____-SAME: () [[ATTR5]] {<br>
+; IS__CGSCC____-SAME: () [[ATTR6]] {<br>
 ; IS__CGSCC____-NEXT:    [[A:%.*]] = call i32 @called_by_norecurse_indirectly()<br>
 ; IS__CGSCC____-NEXT:    ret i32 [[A]]<br>
 ;<br>
@@ -166,7 +152,7 @@ define i32 @p() norecurse {<br>
 ;<br>
 ; IS__CGSCC____: Function Attrs: norecurse nosync readnone<br>
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@p<br>
-; IS__CGSCC____-SAME: () [[ATTR5]] {<br>
+; IS__CGSCC____-SAME: () [[ATTR6]] {<br>
 ; IS__CGSCC____-NEXT:    [[A:%.*]] = call i32 @o()<br>
 ; IS__CGSCC____-NEXT:    ret i32 [[A]]<br>
 ;<br>
@@ -175,48 +161,20 @@ define i32 @p() norecurse {<br>
 }<br>
<br>
 define void @f(i32 %x)  {<br>
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone<br>
-; IS__TUNIT____-LABEL: define {{[^@]+}}@f<br>
-; IS__TUNIT____-SAME: (i32 [[X:%.*]]) [[ATTR7:#.*]] {<br>
-; IS__TUNIT____-NEXT:  entry:<br>
-; IS__TUNIT____-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4<br>
-; IS__TUNIT____-NEXT:    store i32 [[X]], i32* [[X_ADDR]], align 4<br>
-; IS__TUNIT____-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 4<br>
-; IS__TUNIT____-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0<br>
-; IS__TUNIT____-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]<br>
-; IS__TUNIT____:       if.then:<br>
-; IS__TUNIT____-NEXT:    call void @g() [[ATTR8:#.*]]<br>
-; IS__TUNIT____-NEXT:    br label [[IF_END]]<br>
-; IS__TUNIT____:       if.end:<br>
-; IS__TUNIT____-NEXT:    ret void<br>
-;<br>
-; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone<br>
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f<br>
-; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) [[ATTR7:#.*]] {<br>
-; IS__CGSCC_OPM-NEXT:  entry:<br>
-; IS__CGSCC_OPM-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4<br>
-; IS__CGSCC_OPM-NEXT:    store i32 [[X]], i32* [[X_ADDR]], align 4<br>
-; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 4<br>
-; IS__CGSCC_OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0<br>
-; IS__CGSCC_OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]<br>
-; IS__CGSCC_OPM:       if.then:<br>
-; IS__CGSCC_OPM-NEXT:    br label [[IF_END]]<br>
-; IS__CGSCC_OPM:       if.end:<br>
-; IS__CGSCC_OPM-NEXT:    ret void<br>
-;<br>
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn<br>
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f<br>
-; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) [[ATTR0:#.*]] {<br>
-; IS__CGSCC_NPM-NEXT:  entry:<br>
-; IS__CGSCC_NPM-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4<br>
-; IS__CGSCC_NPM-NEXT:    store i32 [[X]], i32* [[X_ADDR]], align 4<br>
-; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 4<br>
-; IS__CGSCC_NPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0<br>
-; IS__CGSCC_NPM-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]<br>
-; IS__CGSCC_NPM:       if.then:<br>
-; IS__CGSCC_NPM-NEXT:    br label [[IF_END]]<br>
-; IS__CGSCC_NPM:       if.end:<br>
-; IS__CGSCC_NPM-NEXT:    ret void<br>
+; CHECK: Function Attrs: nofree nosync nounwind readnone<br>
+; CHECK-LABEL: define {{[^@]+}}@f<br>
+; CHECK-SAME: (i32 [[X:%.*]]) [[ATTR7:#.*]] {<br>
+; CHECK-NEXT:  entry:<br>
+; CHECK-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4<br>
+; CHECK-NEXT:    store i32 [[X]], i32* [[X_ADDR]], align 4<br>
+; CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 4<br>
+; CHECK-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0<br>
+; CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]<br>
+; CHECK:       if.then:<br>
+; CHECK-NEXT:    call void @g() [[ATTR8:#.*]]<br>
+; CHECK-NEXT:    br label [[IF_END]]<br>
+; CHECK:       if.end:<br>
+; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
   %x.addr = alloca i32, align 4<br>
@@ -234,24 +192,12 @@ if.end:<br>
 }<br>
<br>
 define void @g() norecurse {<br>
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone<br>
-; IS__TUNIT____-LABEL: define {{[^@]+}}@g<br>
-; IS__TUNIT____-SAME: () [[ATTR8]] {<br>
-; IS__TUNIT____-NEXT:  entry:<br>
-; IS__TUNIT____-NEXT:    ret void<br>
-;<br>
-; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone<br>
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@g<br>
-; IS__CGSCC_OPM-SAME: () [[ATTR8:#.*]] {<br>
-; IS__CGSCC_OPM-NEXT:  entry:<br>
-; IS__CGSCC_OPM-NEXT:    call void @f(i32 noundef 0) [[ATTR7]]<br>
-; IS__CGSCC_OPM-NEXT:    ret void<br>
-;<br>
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn<br>
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@g<br>
-; IS__CGSCC_NPM-SAME: () [[ATTR0]] {<br>
-; IS__CGSCC_NPM-NEXT:  entry:<br>
-; IS__CGSCC_NPM-NEXT:    ret void<br>
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone<br>
+; CHECK-LABEL: define {{[^@]+}}@g<br>
+; CHECK-SAME: () [[ATTR8]] {<br>
+; CHECK-NEXT:  entry:<br>
+; CHECK-NEXT:    call void @f(i32 noundef 0) [[ATTR7]]<br>
+; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
   call void @f(i32 0)<br>
@@ -279,7 +225,7 @@ define i32 @eval_func1(i32 (i32)* , i32) local_unnamed_addr {<br>
 define i32 @eval_func2(i32 (i32)* , i32) local_unnamed_addr null_pointer_is_valid{<br>
 ; CHECK: Function Attrs: null_pointer_is_valid<br>
 ; CHECK-LABEL: define {{[^@]+}}@eval_func2<br>
-; CHECK-SAME: (i32 (i32)* nocapture nofree [[TMP0:%.*]], i32 [[TMP1:%.*]]) local_unnamed_addr [[ATTR6:#.*]] {<br>
+; CHECK-SAME: (i32 (i32)* nocapture nofree [[TMP0:%.*]], i32 [[TMP1:%.*]]) local_unnamed_addr [[ATTR9:#.*]] {<br>
 ; CHECK-NEXT:    [[TMP3:%.*]] = tail call i32 [[TMP0]](i32 [[TMP1]])<br>
 ; CHECK-NEXT:    ret i32 [[TMP3]]<br>
 ;<br>
<br>
diff  --git a/llvm/test/Transforms/Attributor/range.ll b/llvm/test/Transforms/Attributor/range.ll<br>
index a1ca947954f9..3d1bcfeb6f53 100644<br>
--- a/llvm/test/Transforms/Attributor/range.ll<br>
+++ b/llvm/test/Transforms/Attributor/range.ll<br>
@@ -600,7 +600,7 @@ define void @f1(i32){<br>
 ;<br>
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1<br>
 ; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]]) {<br>
-; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = tail call i32 @r1(), [[RNG3:!range !.*]]<br>
+; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = tail call i32 @r1() [[ATTR4:#.*]], [[RNG3:!range !.*]]<br>
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 15<br>
 ; IS__CGSCC_OPM-NEXT:    br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]]<br>
 ; IS__CGSCC_OPM:       4:<br>
@@ -698,7 +698,7 @@ define dso_local i32 @test4-g1(i32 %u) {<br>
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test4-g1<br>
 ; IS__CGSCC_OPM-SAME: (i32 [[U:%.*]]) [[ATTR2:#.*]] {<br>
 ; IS__CGSCC_OPM-NEXT:  entry:<br>
-; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) [[ATTR4:#.*]]<br>
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) [[ATTR5:#.*]]<br>
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[CALL]]<br>
 ;<br>
 ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn<br>
@@ -790,7 +790,7 @@ define dso_local i32 @test4-g2(i32 %u) {<br>
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test4-g2<br>
 ; IS__CGSCC_OPM-SAME: (i32 [[U:%.*]]) [[ATTR2]] {<br>
 ; IS__CGSCC_OPM-NEXT:  entry:<br>
-; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) [[ATTR4]]<br>
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) [[ATTR5]]<br>
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[CALL]]<br>
 ;<br>
 ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn<br>
@@ -1154,10 +1154,10 @@ define i1 @fcmp_caller(float %fa, float %fb, double %da, double %db, double* %dp<br>
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn<br>
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fcmp_caller<br>
 ; IS__CGSCC_OPM-SAME: (float [[FA:%.*]], float [[FB:%.*]], double [[DA:%.*]], double [[DB:%.*]], double* nofree readnone [[DPA:%.*]], double* nofree readnone [[DPB:%.*]], i8* nofree readnone [[IPA:%.*]], i8* nofree readnone [[IPB:%.*]]) [[ATTR2]] {<br>
-; IS__CGSCC_OPM-NEXT:    [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) [[ATTR4]]<br>
-; IS__CGSCC_OPM-NEXT:    [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) [[ATTR4]]<br>
-; IS__CGSCC_OPM-NEXT:    [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) [[ATTR4]]<br>
-; IS__CGSCC_OPM-NEXT:    [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) [[ATTR4]]<br>
+; IS__CGSCC_OPM-NEXT:    [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) [[ATTR5]]<br>
+; IS__CGSCC_OPM-NEXT:    [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) [[ATTR5]]<br>
+; IS__CGSCC_OPM-NEXT:    [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) [[ATTR5]]<br>
+; IS__CGSCC_OPM-NEXT:    [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) [[ATTR5]]<br>
 ; IS__CGSCC_OPM-NEXT:    [[O1:%.*]] = or i1 [[R1]], [[R2]]<br>
 ; IS__CGSCC_OPM-NEXT:    [[O2:%.*]] = or i1 [[R3]], [[R4]]<br>
 ; IS__CGSCC_OPM-NEXT:    [[O3:%.*]] = or i1 [[O1]], [[O2]]<br>
@@ -1329,8 +1329,8 @@ define i1 @callee_range_2(i1 %c1, i1 %c2) {<br>
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn<br>
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callee_range_2<br>
 ; IS__CGSCC_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) [[ATTR2]] {<br>
-; IS__CGSCC_OPM-NEXT:    [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) [[ATTR4]], [[RNG5:!range !.*]]<br>
-; IS__CGSCC_OPM-NEXT:    [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) [[ATTR4]], [[RNG5]]<br>
+; IS__CGSCC_OPM-NEXT:    [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) [[ATTR5]], [[RNG5:!range !.*]]<br>
+; IS__CGSCC_OPM-NEXT:    [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) [[ATTR5]], [[RNG5]]<br>
 ; IS__CGSCC_OPM-NEXT:    [[A:%.*]] = add i32 [[R1]], [[R2]]<br>
 ; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = icmp sle i32 [[A]], 3<br>
 ; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = icmp sge i32 [[A]], 2<br>
@@ -1488,10 +1488,10 @@ define i32 @simplify_callsite_argument(i1 %d) {<br>
 ; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = select i1 [[D]], i1 true, i1 false<br>
 ; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]<br>
 ; IS__CGSCC_OPM:       t:<br>
-; IS__CGSCC_OPM-NEXT:    [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) [[ATTR4]], [[RNG4:!range !.*]]<br>
+; IS__CGSCC_OPM-NEXT:    [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) [[ATTR5]], [[RNG4:!range !.*]]<br>
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[RET1]]<br>
 ; IS__CGSCC_OPM:       f:<br>
-; IS__CGSCC_OPM-NEXT:    [[RET2:%.*]] = call i32 @func(i1 noundef false) [[ATTR4]], [[RNG4]]<br>
+; IS__CGSCC_OPM-NEXT:    [[RET2:%.*]] = call i32 @func(i1 noundef false) [[ATTR5]], [[RNG4]]<br>
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[RET2]]<br>
 ;<br>
 ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn<br>
@@ -1575,10 +1575,10 @@ define i1 @check_divided_range(i32 %arg) {<br>
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn<br>
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@check_divided_range<br>
 ; IS__CGSCC_OPM-SAME: (i32 [[ARG:%.*]]) [[ATTR2]] {<br>
-; IS__CGSCC_OPM-NEXT:    [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) [[ATTR4]]<br>
-; IS__CGSCC_OPM-NEXT:    [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) [[ATTR4]]<br>
-; IS__CGSCC_OPM-NEXT:    [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) [[ATTR4]]<br>
-; IS__CGSCC_OPM-NEXT:    [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) [[ATTR4]]<br>
+; IS__CGSCC_OPM-NEXT:    [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) [[ATTR5]]<br>
+; IS__CGSCC_OPM-NEXT:    [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) [[ATTR5]]<br>
+; IS__CGSCC_OPM-NEXT:    [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) [[ATTR5]]<br>
+; IS__CGSCC_OPM-NEXT:    [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) [[ATTR5]]<br>
 ; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = and i1 [[TRUE1]], [[TRUE2]]<br>
 ; IS__CGSCC_OPM-NEXT:    ret i1 [[RET]]<br>
 ;<br>
@@ -1930,7 +1930,7 @@ define i1 @context(i8* %p) {<br>
 ; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp slt i8 0, [[L]]<br>
 ; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]<br>
 ; IS__CGSCC_OPM:       t:<br>
-; IS__CGSCC_OPM-NEXT:    [[R:%.*]] = call i1 @non_zero(i8 [[L]]) [[ATTR4]]<br>
+; IS__CGSCC_OPM-NEXT:    [[R:%.*]] = call i1 @non_zero(i8 [[L]]) [[ATTR5]]<br>
 ; IS__CGSCC_OPM-NEXT:    ret i1 [[R]]<br>
 ; IS__CGSCC_OPM:       f:<br>
 ; IS__CGSCC_OPM-NEXT:    ret i1 false<br>
<br>
diff  --git a/llvm/test/Transforms/Attributor/readattrs.ll b/llvm/test/Transforms/Attributor/readattrs.ll<br>
index e7e02c791b7e..829cb5d3b3dd 100644<br>
--- a/llvm/test/Transforms/Attributor/readattrs.ll<br>
+++ b/llvm/test/Transforms/Attributor/readattrs.ll<br>
@@ -204,7 +204,7 @@ define <4 x i32> @test11_2(<4 x i32*> %ptrs) {<br>
 ; CHECK: Function Attrs: argmemonly nounwind readonly<br>
 ; CHECK-LABEL: define {{[^@]+}}@test11_2<br>
 ; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR6:#.*]] {<br>
-; CHECK-NEXT:    [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) [[ATTR2]]<br>
+; CHECK-NEXT:    [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) [[ATTR9:#.*]]<br>
 ; CHECK-NEXT:    ret <4 x i32> [[RES]]<br>
 ;<br>
   %res = call <4 x i32> @test11_1(<4 x i32*> %ptrs)<br>
@@ -323,7 +323,7 @@ define void @byval_not_readonly_2(i8* byval(i8) %written) readonly {<br>
 define void @byval_not_readnone_1(i8* byval(i8) %written) readnone {<br>
 ; CHECK: Function Attrs: readnone<br>
 ; CHECK-LABEL: define {{[^@]+}}@byval_not_readnone_1<br>
-; CHECK-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR9:#.*]] {<br>
+; CHECK-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR8:#.*]] {<br>
 ; CHECK-NEXT:    call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]])<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
@@ -395,7 +395,9 @@ declare void @val_use(i8 %ptr) readonly nounwind<br>
 define void @ptr_uses(i8* %ptr) {<br>
 ; CHECK: Function Attrs: nounwind readonly<br>
 ; CHECK-LABEL: define {{[^@]+}}@ptr_uses<br>
-; CHECK-SAME: (i8* nocapture readonly [[PTR:%.*]]) [[ATTR10:#.*]] {<br>
+; CHECK-SAME: (i8* nocapture readonly [[PTR:%.*]]) [[ATTR9:#.*]] {<br>
+; CHECK-NEXT:    [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]])<br>
+; CHECK-NEXT:    [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]])<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
   %call_ptr = call i8* @maybe_returned_ptr(i8* %ptr)<br>
<br>
diff  --git a/llvm/test/Transforms/BDCE/basic.ll b/llvm/test/Transforms/BDCE/basic.ll<br>
index 1e4002541802..f724f89225fc 100644<br>
--- a/llvm/test/Transforms/BDCE/basic.ll<br>
+++ b/llvm/test/Transforms/BDCE/basic.ll<br>
@@ -392,6 +392,6 @@ entry:<br>
   ret i16 %cast<br>
 }<br>
<br>
-attributes #0 = { nounwind readnone }<br>
+attributes #0 = { nounwind readnone willreturn }<br>
 attributes #1 = { nounwind }<br>
<br>
<br>
diff  --git a/llvm/test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll b/llvm/test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll<br>
index 17e46b614609..54463d0d73a8 100644<br>
--- a/llvm/test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll<br>
+++ b/llvm/test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll<br>
@@ -21,7 +21,7 @@ entry:<br>
<br>
 if.end:<br>
   %gep = getelementptr i8, i8* %d, i32 42<br>
-  %call = call i64 @foo(i8* %gep) nounwind readonly<br>
+  %call = call i64 @foo(i8* %gep) nounwind readonly willreturn<br>
   %cmp2 = icmp ne i64 %call, 0<br>
   call void @llvm.assume(i1 %cmp2)<br>
   br label %exit<br>
@@ -31,5 +31,5 @@ exit:<br>
   ret i32 %conv<br>
 }<br>
<br>
-declare i64 @foo(i8*) nounwind readonly<br>
+declare i64 @foo(i8*) nounwind readonly willreturn<br>
 declare void @llvm.assume(i1 noundef) nounwind willreturn<br>
<br>
diff  --git a/llvm/test/Transforms/Coroutines/coro-split-00.ll b/llvm/test/Transforms/Coroutines/coro-split-00.ll<br>
index 539d515cf5e1..8671a3c07136 100644<br>
--- a/llvm/test/Transforms/Coroutines/coro-split-00.ll<br>
+++ b/llvm/test/Transforms/Coroutines/coro-split-00.ll<br>
@@ -77,4 +77,4 @@ declare i1 @llvm.coro.end(i8*, i1)<br>
<br>
 declare noalias i8* @malloc(i32)<br>
 declare void @print(i32)<br>
-declare void @free(i8*)<br>
+declare void @free(i8*) willreturn<br>
<br>
diff  --git a/llvm/test/Transforms/Coroutines/coro-split-hidden.ll b/llvm/test/Transforms/Coroutines/coro-split-hidden.ll<br>
index 9a306cbc2688..939f57462eda 100644<br>
--- a/llvm/test/Transforms/Coroutines/coro-split-hidden.ll<br>
+++ b/llvm/test/Transforms/Coroutines/coro-split-hidden.ll<br>
@@ -79,4 +79,4 @@ declare i1 @llvm.coro.end(i8*, i1)<br>
<br>
 declare noalias i8* @malloc(i32)<br>
 declare void @print(i32)<br>
-declare void @free(i8*)<br>
+declare void @free(i8*) willreturn<br>
<br>
diff  --git a/llvm/test/Transforms/Coroutines/no-suspend.ll b/llvm/test/Transforms/Coroutines/no-suspend.ll<br>
index 211e16c6ccdb..a9e2fe142556 100644<br>
--- a/llvm/test/Transforms/Coroutines/no-suspend.ll<br>
+++ b/llvm/test/Transforms/Coroutines/no-suspend.ll<br>
@@ -415,7 +415,7 @@ lpad:<br>
 }<br>
<br>
 declare i8* @malloc(i32)<br>
-declare void @free(i8*)<br>
+declare void @free(i8*) willreturn<br>
 declare void @print(i32)<br>
 declare void @foo()<br>
<br>
<br>
diff  --git a/llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll b/llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll<br>
index 8fe4155d487c..48a939c1228f 100644<br>
--- a/llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll<br>
+++ b/llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll<br>
@@ -234,8 +234,8 @@ define i32 addrspace(1)* @test13_addrspacecast() {<br>
 }<br>
<br>
<br>
-declare noalias i8* @malloc(i32)<br>
-declare noalias i8* @calloc(i32, i32)<br>
+declare noalias i8* @malloc(i32) willreturn<br>
+declare noalias i8* @calloc(i32, i32) willreturn<br>
<br>
 define void @test14(i32* %Q) {<br>
 ; CHECK-LABEL: @test14(<br>
<br>
diff  --git a/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/DeleteThrowableInst.ll b/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/DeleteThrowableInst.ll<br>
index 7e8c9ca3bd8a..768b3bb91daf 100644<br>
--- a/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/DeleteThrowableInst.ll<br>
+++ b/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/DeleteThrowableInst.ll<br>
@@ -1,8 +1,8 @@<br>
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py<br>
 ; RUN: opt < %s -basic-aa -dse -enable-dse-memoryssa=false -S | FileCheck %s<br>
<br>
-declare i8* @_Znwj(i32) local_unnamed_addr<br>
-declare void @foo() readnone<br>
+declare i8* @_Znwj(i32) willreturn<br>
+declare void @foo() readnone willreturn<br>
<br>
 define void @test1(i8** %ptr) {<br>
 ; CHECK-LABEL: @test1(<br>
<br>
diff  --git a/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/simple.ll b/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/simple.ll<br>
index 15caa6c898dc..1d6a9c691fc8 100644<br>
--- a/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/simple.ll<br>
+++ b/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/simple.ll<br>
@@ -267,8 +267,8 @@ define i32 addrspace(1)* @test13_addrspacecast() {<br>
   ret i32 addrspace(1)* %P<br>
 }<br>
<br>
-declare noalias i8* @malloc(i32)<br>
-declare noalias i8* @calloc(i32, i32)<br>
+declare noalias i8* @malloc(i32) willreturn<br>
+declare noalias i8* @calloc(i32, i32) willreturn<br>
 declare noalias i8* @aligned_alloc(i32, i32)<br>
 declare void @free(i8*)<br>
<br>
<br>
diff  --git a/llvm/test/Transforms/Inline/dead-calls-willreturn.ll b/llvm/test/Transforms/Inline/dead-calls-willreturn.ll<br>
index 463cc5894bb5..c36d044b1ac3 100644<br>
--- a/llvm/test/Transforms/Inline/dead-calls-willreturn.ll<br>
+++ b/llvm/test/Transforms/Inline/dead-calls-willreturn.ll<br>
@@ -31,6 +31,10 @@ entry:<br>
 define void @caller_may_not_return() ssp {<br>
 ; CHECK-LABEL: @caller_may_not_return(<br>
 ; CHECK-NEXT:  entry:<br>
+; CHECK-NEXT:    br label [[WHILE_BODY_I:%.*]]<br>
+; CHECK:       while.body.i:<br>
+; CHECK-NEXT:    br label [[WHILE_BODY_I]]<br>
+; CHECK:       readnone_may_not_return.exit:<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
@@ -41,13 +45,13 @@ entry:<br>
<br>
 ; @caller_willreturn is marked as willreturn, so all called functions also must<br>
 ; return. All calls are dead.<br>
-define void @caller_willreturn() ssp willreturn {<br>
+define void @caller_willreturn() ssp {<br>
 ; CHECK-LABEL: @caller_willreturn(<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
-  call void @readnone_may_not_return()<br>
+  call void @readnone_may_not_return() willreturn<br>
   call void @readnone_willreturn()<br>
   ret void<br>
 }<br>
<br>
diff  --git a/llvm/test/Transforms/InstCombine/constant-fold-libfunc.ll b/llvm/test/Transforms/InstCombine/constant-fold-libfunc.ll<br>
index af33d9895447..6af77f17f934 100644<br>
--- a/llvm/test/Transforms/InstCombine/constant-fold-libfunc.ll<br>
+++ b/llvm/test/Transforms/InstCombine/constant-fold-libfunc.ll<br>
@@ -1,6 +1,6 @@<br>
 ; RUN: opt < %s -instcombine -S | FileCheck %s<br>
<br>
-declare double @acos(double)<br>
+declare double @acos(double) willreturn<br>
<br>
 ; Check that functions without any function attributes are simplified.<br>
<br>
<br>
diff  --git a/llvm/test/Transforms/InstCombine/nothrow.ll b/llvm/test/Transforms/InstCombine/nothrow.ll<br>
index 08d90bfbd7d4..476b63a6b27f 100644<br>
--- a/llvm/test/Transforms/InstCombine/nothrow.ll<br>
+++ b/llvm/test/Transforms/InstCombine/nothrow.ll<br>
@@ -1,6 +1,6 @@<br>
 ; RUN: opt < %s -instcombine -S | not grep call<br>
 ; rdar://6880732<br>
-declare double @t1(i32) readonly<br>
+declare double @t1(i32) readonly willreturn<br>
<br>
 define void @t2() nounwind {<br>
   call double @t1(i32 42)  ;; dead call even though callee is not nothrow.<br>
<br>
diff  --git a/llvm/test/Transforms/InstSimplify/ConstProp/rint.ll b/llvm/test/Transforms/InstSimplify/ConstProp/rint.ll<br>
index 72a2abdbcf91..3b7b0ea57278 100644<br>
--- a/llvm/test/Transforms/InstSimplify/ConstProp/rint.ll<br>
+++ b/llvm/test/Transforms/InstSimplify/ConstProp/rint.ll<br>
@@ -2,13 +2,13 @@<br>
 ; RUN: opt -S -early-cse -earlycse-debug-hash < %s | FileCheck %s<br>
<br>
 declare float @nearbyintf(float) #0<br>
-declare float @llvm.nearbyint.f32(float) #0<br>
+declare float @llvm.nearbyint.f32(float)<br>
 declare double @nearbyint(double) #0<br>
-declare double @llvm.nearbyint.f64(double) #0<br>
+declare double @llvm.nearbyint.f64(double)<br>
 declare float @rintf(float) #0<br>
-declare float @llvm.rint.f32(float) #0<br>
+declare float @llvm.rint.f32(float)<br>
 declare double @rint(double) #0<br>
-declare double @llvm.rint.f64(double) #0<br>
+declare double @llvm.rint.f64(double)<br>
<br>
 define float @constant_fold_rint_f32_01() #0 {<br>
 ; CHECK-LABEL: @constant_fold_rint_f32_01(<br>
@@ -106,4 +106,4 @@ define double @constant_fold_rint_f64_06() #0 {<br>
   ret double %x<br>
 }<br>
<br>
-attributes #0 = { nounwind readnone }<br>
+attributes #0 = { nounwind readnone willreturn }<br>
<br>
diff  --git a/llvm/test/Transforms/InstSimplify/remove-dead-call.ll b/llvm/test/Transforms/InstSimplify/remove-dead-call.ll<br>
index 2b149f51c456..724d3573002d 100755<br>
--- a/llvm/test/Transforms/InstSimplify/remove-dead-call.ll<br>
+++ b/llvm/test/Transforms/InstSimplify/remove-dead-call.ll<br>
@@ -9,9 +9,9 @@<br>
<br>
 define internal void @func_1(i64* nocapture readnone %0) #0 {<br>
 ; CHECK-LABEL: @func_1(<br>
-; CHECK-NEXT:    unreachable<br>
+; CHECK-NEXT:    ret void<br>
 ;<br>
-  unreachable<br>
+  ret void<br>
 }<br>
<br>
 define i16 @main(i16 %0, i16** nocapture readnone %1) #1 {<br>
@@ -24,5 +24,5 @@ bb1:<br>
   unreachable<br>
 }<br>
<br>
-attributes #0 = { noinline norecurse nounwind readnone }<br>
+attributes #0 = { noinline norecurse nounwind readnone willreturn }<br>
 attributes #1 = { norecurse nounwind readnone }<br>
<br>
diff  --git a/llvm/test/Transforms/InstSimplify/returned.ll b/llvm/test/Transforms/InstSimplify/returned.ll<br>
index 0e89e91085dc..a34f52b0910e 100644<br>
--- a/llvm/test/Transforms/InstSimplify/returned.ll<br>
+++ b/llvm/test/Transforms/InstSimplify/returned.ll<br>
@@ -25,6 +25,6 @@ define i1 @gep3() {<br>
 ; CHECK-NEXT: ret i1 false<br>
 }<br>
<br>
-declare i8* @func1(i8* returned) nounwind readnone<br>
-declare %gept* @func2(%gept* returned) nounwind readnone<br>
+declare i8* @func1(i8* returned) nounwind readnone willreturn<br>
+declare %gept* @func2(%gept* returned) nounwind readnone willreturn<br>
<br>
<br>
diff  --git a/llvm/test/Transforms/MemCpyOpt/memcpy.ll b/llvm/test/Transforms/MemCpyOpt/memcpy.ll<br>
index 97be3e2fa9ed..096d5d9ea7f8 100644<br>
--- a/llvm/test/Transforms/MemCpyOpt/memcpy.ll<br>
+++ b/llvm/test/Transforms/MemCpyOpt/memcpy.ll<br>
@@ -285,7 +285,7 @@ define void @test8() {<br>
   ret void<br>
 }<br>
<br>
-declare noalias i8* @malloc(i32)<br>
+declare noalias i8* @malloc(i32) willreturn<br>
<br>
 ; rdar://11341081<br>
 %struct.big = type { [50 x i32] }<br>
@@ -384,5 +384,6 @@ declare void @f2(%struct.big*)<br>
 ; CHECK: attributes [[ATTR0]] = { nounwind }<br>
 ; CHECK: attributes #1 = { argmemonly nofree nosync nounwind willreturn }<br>
 ; CHECK: attributes #2 = { nounwind ssp }<br>
-; CHECK: attributes #3 = { nounwind ssp uwtable }<br>
-; CHECK: attributes #4 = { argmemonly nofree nosync nounwind willreturn writeonly }<br>
+; CHECK: attributes #3 = { willreturn }<br>
+; CHECK: attributes #4 = { nounwind ssp uwtable }<br>
+; CHECK: attributes #5 = { argmemonly nofree nosync nounwind willreturn writeonly }<br>
<br>
diff  --git a/llvm/test/Transforms/NewGVN/eliminate-callsite-inline.ll b/llvm/test/Transforms/NewGVN/eliminate-callsite-inline.ll<br>
index 4cbeef19711b..5d863ccdd6a0 100644<br>
--- a/llvm/test/Transforms/NewGVN/eliminate-callsite-inline.ll<br>
+++ b/llvm/test/Transforms/NewGVN/eliminate-callsite-inline.ll<br>
@@ -14,4 +14,4 @@ entry:<br>
   ret void<br>
 }<br>
<br>
-attributes #1 = { noinline nounwind readnone }<br>
+attributes #1 = { noinline nounwind readnone willreturn }<br>
<br>
diff  --git a/llvm/test/Transforms/OpenMP/parallel_deletion.ll b/llvm/test/Transforms/OpenMP/parallel_deletion.ll<br>
index 627026d8da70..1a6d1587a8c8 100644<br>
--- a/llvm/test/Transforms/OpenMP/parallel_deletion.ll<br>
+++ b/llvm/test/Transforms/OpenMP/parallel_deletion.ll<br>
@@ -25,9 +25,9 @@ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16<br>
 ;<br>
 ; We delete all but the first of the parallel regions in this test.<br>
 define void @delete_parallel_0() {<br>
-; CHECK-LABEL: define {{[^@]+}}@delete_parallel_0()<br>
+; CHECK-LABEL: define {{[^@]+}}@delete_parallel_0() {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @0, i32 noundef 0, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*)* @.omp_outlined.willreturn to void (i32*, i32*, ...)*))<br>
+; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0:@.*]], i32 noundef 0, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*)* @.omp_outlined.willreturn to void (i32*, i32*, ...)*))<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
@@ -40,9 +40,9 @@ entry:<br>
<br>
 define internal void @.omp_outlined.willreturn(i32* noalias %.global_tid., i32* noalias %.bound_tid.) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.willreturn<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) #0<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) [[ATTR0:#.*]] {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    call void @unknown() #0<br>
+; CHECK-NEXT:    call void @unknown() [[ATTR0]]<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
@@ -52,9 +52,9 @@ entry:<br>
<br>
 define internal void @.omp_outlined.willreturn.0(i32* noalias %.global_tid., i32* noalias %.bound_tid.) willreturn {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.willreturn.0<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) #1<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) [[ATTR1:#.*]] {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    call void @readonly() #4<br>
+; CHECK-NEXT:    call void @readonly() [[ATTR4:#.*]]<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
@@ -64,9 +64,9 @@ entry:<br>
<br>
 define internal void @.omp_outlined.willreturn.1(i32* noalias %.global_tid., i32* noalias %.bound_tid.) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.willreturn.1<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) #2<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) [[ATTR2:#.*]] {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    call void @readnone() #0<br>
+; CHECK-NEXT:    call void @readnone() [[ATTR0]]<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
@@ -76,7 +76,7 @@ entry:<br>
<br>
 define internal void @.omp_outlined.willreturn.2(i32* noalias %.global_tid., i32* noalias %.bound_tid.) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.willreturn.2<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) #3<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) [[ATTR3:#.*]] {<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
@@ -97,11 +97,11 @@ entry:<br>
 ;<br>
 ; We delete only the last parallel regions in this test because the others might not return.<br>
 define void @delete_parallel_1() {<br>
-; CHECK-LABEL: define {{[^@]+}}@delete_parallel_1()<br>
+; CHECK-LABEL: define {{[^@]+}}@delete_parallel_1() {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @0, i32 noundef 0, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))<br>
-; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @0, i32 noundef 0, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*)* @.omp_outlined..0 to void (i32*, i32*, ...)*))<br>
-; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @0, i32 noundef 0, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*))<br>
+; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 noundef 0, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))<br>
+; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 noundef 0, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*)* @.omp_outlined..0 to void (i32*, i32*, ...)*))<br>
+; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 noundef 0, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*))<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
@@ -114,7 +114,7 @@ entry:<br>
<br>
 define internal void @.omp_outlined.(i32* noalias %.global_tid., i32* noalias %.bound_tid.) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]])<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) {<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    call void @unknown()<br>
 ; CHECK-NEXT:    ret void<br>
@@ -126,9 +126,9 @@ entry:<br>
<br>
 define internal void @.omp_outlined..0(i32* noalias %.global_tid., i32* noalias %.bound_tid.) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..0<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) #4<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) [[ATTR4]] {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    call void @readonly() #4<br>
+; CHECK-NEXT:    call void @readonly() [[ATTR4]]<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
@@ -138,7 +138,7 @@ entry:<br>
<br>
 define internal void @.omp_outlined..1(i32* noalias %.global_tid., i32* noalias %.bound_tid.) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..1<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) #5<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) [[ATTR5:#.*]] {<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    call void @readnone()<br>
 ; CHECK-NEXT:    ret void<br>
@@ -150,7 +150,7 @@ entry:<br>
<br>
 define internal void @.omp_outlined..2(i32* noalias %.global_tid., i32* noalias %.bound_tid.) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..2<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) #3<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]]) [[ATTR3]] {<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
@@ -184,16 +184,16 @@ entry:<br>
 ; FIXME: We do not realize that `a` is dead and all accesses to it can be removed<br>
 ;        making the parallel regions readonly and deletable.<br>
 define void @delete_parallel_2() {<br>
-; CHECK-LABEL: define {{[^@]+}}@delete_parallel_2()<br>
+; CHECK-LABEL: define {{[^@]+}}@delete_parallel_2() {<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    [[A:%.*]] = alloca i32, align 4<br>
 ; CHECK-NEXT:    [[TMP:%.*]] = bitcast i32* [[A]] to i8*<br>
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull align 4 dereferenceable(4) [[TMP]]) #0<br>
+; CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull align 4 dereferenceable(4) [[TMP]]) [[ATTR0]]<br>
 ; CHECK-NEXT:    store i32 0, i32* [[A]], align 4<br>
-; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @0, i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A]])<br>
-; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @0, i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A]])<br>
-; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @0, i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A]])<br>
-; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @0, i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A]])<br>
+; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A]])<br>
+; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A]])<br>
+; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A]])<br>
+; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A]])<br>
 ; CHECK-NEXT:    [[TMP1:%.*]] = bitcast i32* [[A]] to i8*<br>
 ; CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP1]])<br>
 ; CHECK-NEXT:    ret void<br>
@@ -214,9 +214,9 @@ entry:<br>
<br>
 define internal void @.omp_outlined..3(i32* noalias %.global_tid., i32* noalias %.bound_tid., i32* dereferenceable(4) %a) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..3<br>
-; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #6<br>
+; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) [[ATTR6:#.*]] {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @omp_get_thread_num() #4<br>
+; CHECK-NEXT:    [[CALL:%.*]] = call i32 @omp_get_thread_num() [[ATTR12:#.*]]<br>
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[CALL]], 0<br>
 ; CHECK-NEXT:    br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]<br>
 ; CHECK:       if.then:<br>
@@ -244,17 +244,17 @@ if.end:                                           ; preds = %if.then, %entry<br>
<br>
 define internal void @.omp_outlined..4(i32* noalias %.global_tid., i32* noalias %.bound_tid., i32* dereferenceable(4) %a) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..4<br>
-; CHECK-SAME: (i32* noalias nocapture nonnull readonly align 4 dereferenceable(4) [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A:%.*]])<br>
+; CHECK-SAME: (i32* noalias nocapture nonnull readonly align 4 dereferenceable(4) [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) {<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    [[TMP:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4<br>
-; CHECK-NEXT:    [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* noundef nonnull @0, i32 [[TMP]])<br>
+; CHECK-NEXT:    [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* noundef nonnull [[GLOB0]], i32 [[TMP]])<br>
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP1]], 0<br>
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[OMP_IF_END:%.*]], label [[OMP_IF_THEN:%.*]]<br>
 ; CHECK:       omp_if.then:<br>
 ; CHECK-NEXT:    [[TMP3:%.*]] = load i32, i32* [[A]], align 4<br>
 ; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP3]], 1<br>
 ; CHECK-NEXT:    store i32 [[INC]], i32* [[A]], align 4<br>
-; CHECK-NEXT:    call void @__kmpc_end_master(%struct.ident_t* noundef nonnull @0, i32 [[TMP]])<br>
+; CHECK-NEXT:    call void @__kmpc_end_master(%struct.ident_t* noundef nonnull [[GLOB0]], i32 [[TMP]])<br>
 ; CHECK-NEXT:    br label [[OMP_IF_END]]<br>
 ; CHECK:       omp_if.end:<br>
 ; CHECK-NEXT:    ret void<br>
@@ -286,21 +286,21 @@ declare void @__kmpc_end_master(%struct.ident_t*, i32)<br>
<br>
 define internal void @.omp_outlined..5(i32* noalias %.global_tid., i32* noalias %.bound_tid., i32* dereferenceable(4) %a) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..5<br>
-; CHECK-SAME: (i32* noalias nocapture nonnull readonly align 4 dereferenceable(4) [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A:%.*]])<br>
+; CHECK-SAME: (i32* noalias nocapture nonnull readonly align 4 dereferenceable(4) [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) {<br>
 ; CHECK-NEXT:  entry:<br>
-; CHECK-NEXT:    [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull @0)<br>
+; CHECK-NEXT:    [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull [[GLOB0]]) [[ATTR12]]<br>
 ; CHECK-NEXT:    [[TMP:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4<br>
-; CHECK-NEXT:    [[TMP1:%.*]] = call i32 @__kmpc_single(%struct.ident_t* noundef nonnull @0, i32 [[TMP]])<br>
+; CHECK-NEXT:    [[TMP1:%.*]] = call i32 @__kmpc_single(%struct.ident_t* noundef nonnull [[GLOB0]], i32 [[TMP]])<br>
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP1]], 0<br>
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[OMP_IF_END:%.*]], label [[OMP_IF_THEN:%.*]]<br>
 ; CHECK:       omp_if.then:<br>
 ; CHECK-NEXT:    [[TMP3:%.*]] = load i32, i32* [[A]], align 4<br>
 ; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP3]], 1<br>
 ; CHECK-NEXT:    store i32 [[INC]], i32* [[A]], align 4<br>
-; CHECK-NEXT:    call void @__kmpc_end_single(%struct.ident_t* noundef nonnull @0, i32 [[TMP]])<br>
+; CHECK-NEXT:    call void @__kmpc_end_single(%struct.ident_t* noundef nonnull [[GLOB0]], i32 [[TMP]])<br>
 ; CHECK-NEXT:    br label [[OMP_IF_END]]<br>
 ; CHECK:       omp_if.end:<br>
-; CHECK-NEXT:    call void @__kmpc_barrier(%struct.ident_t* noundef nonnull @1, i32 [[OMP_GLOBAL_THREAD_NUM]])<br>
+; CHECK-NEXT:    call void @__kmpc_barrier(%struct.ident_t* noundef nonnull [[GLOB1:@.*]], i32 [[OMP_GLOBAL_THREAD_NUM]])<br>
 ; CHECK-NEXT:    ret void<br>
 ;<br>
 entry:<br>
@@ -324,18 +324,18 @@ omp_if.end:                                       ; preds = %entry, %omp_if.then<br>
<br>
 define internal void @.omp_outlined..6(i32* noalias %.global_tid., i32* noalias %.bound_tid., i32* dereferenceable(4) %a) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..6<br>
-; CHECK-SAME: (i32* noalias nocapture nonnull readonly align 4 dereferenceable(4) [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A:%.*]])<br>
+; CHECK-SAME: (i32* noalias nocapture nonnull readonly align 4 dereferenceable(4) [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) {<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    [[A1:%.*]] = alloca i32, align 4<br>
 ; CHECK-NEXT:    [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x i8*], align 8<br>
 ; CHECK-NEXT:    [[TMP:%.*]] = bitcast i32* [[A1]] to i8*<br>
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull align 4 [[TMP]]) #0<br>
+; CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull align 4 [[TMP]]) [[ATTR0]]<br>
 ; CHECK-NEXT:    store i32 1, i32* [[A1]], align 4<br>
 ; CHECK-NEXT:    [[TMP1:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i32**<br>
 ; CHECK-NEXT:    store i32* [[A1]], i32** [[TMP1]], align 8<br>
 ; CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4<br>
 ; CHECK-NEXT:    [[TMP3:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*<br>
-; CHECK-NEXT:    [[TMP4:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* noundef nonnull @2, i32 [[TMP2]], i32 noundef 1, i64 noundef 8, i8* noundef nonnull align 8 [[TMP3]], void (i8*, i8*)* noundef nonnull @.omp.reduction.reduction_func, [8 x i32]* noundef nonnull @.gomp_critical_user_.reduction.var)<br>
+; CHECK-NEXT:    [[TMP4:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* noundef nonnull [[GLOB2:@.*]], i32 [[TMP2]], i32 noundef 1, i64 noundef 8, i8* noundef nonnull align 8 [[TMP3]], void (i8*, i8*)* noundef nonnull @.omp.reduction.reduction_func, [8 x i32]* noundef nonnull @.gomp_critical_user_.reduction.var)<br>
 ; CHECK-NEXT:    switch i32 [[TMP4]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [<br>
 ; CHECK-NEXT:    i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]<br>
 ; CHECK-NEXT:    i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]<br>
@@ -345,7 +345,7 @@ define internal void @.omp_outlined..6(i32* noalias %.global_tid., i32* noalias<br>
 ; CHECK-NEXT:    [[TMP6:%.*]] = load i32, i32* [[A1]], align 4<br>
 ; CHECK-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP5]], [[TMP6]]<br>
 ; CHECK-NEXT:    store i32 [[ADD]], i32* [[A]], align 4<br>
-; CHECK-NEXT:    call void @__kmpc_end_reduce_nowait(%struct.ident_t* noundef nonnull @2, i32 [[TMP2]], [8 x i32]* noundef nonnull @.gomp_critical_user_.reduction.var)<br>
+; CHECK-NEXT:    call void @__kmpc_end_reduce_nowait(%struct.ident_t* noundef nonnull [[GLOB2]], i32 [[TMP2]], [8 x i32]* noundef nonnull @.gomp_critical_user_.reduction.var)<br>
 ; CHECK-NEXT:    br label [[DOTOMP_REDUCTION_DEFAULT]]<br>
 ; CHECK:       .omp.reduction.case2:<br>
 ; CHECK-NEXT:    [[TMP7:%.*]] = load i32, i32* [[A1]], align 4<br>
@@ -393,7 +393,7 @@ entry:<br>
<br>
 define internal void @.omp.reduction.reduction_func(i8* %arg, i8* %arg1) {<br>
 ; CHECK-LABEL: define {{[^@]+}}@.omp.reduction.reduction_func<br>
-; CHECK-SAME: (i8* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[ARG:%.*]], i8* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[ARG1:%.*]]) #{{[0-9]+}}<br>
+; CHECK-SAME: (i8* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[ARG:%.*]], i8* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[ARG1:%.*]]) [[ATTR9:#.*]] {<br>
 ; CHECK-NEXT:  entry:<br>
 ; CHECK-NEXT:    [[TMP:%.*]] = bitcast i8* [[ARG1]] to i32**<br>
 ; CHECK-NEXT:    [[TMP2:%.*]] = load i32*, i32** [[TMP]], align 8<br>
<br>
diff  --git a/llvm/test/Transforms/Reassociate/erase_inst_made_change.ll b/llvm/test/Transforms/Reassociate/erase_inst_made_change.ll<br>
index 0bb926f207ae..5c743b291126 100644<br>
--- a/llvm/test/Transforms/Reassociate/erase_inst_made_change.ll<br>
+++ b/llvm/test/Transforms/Reassociate/erase_inst_made_change.ll<br>
@@ -20,7 +20,7 @@ entry:<br>
   ret void<br>
 }<br>
<br>
-define internal void @bar() noinline nounwind readnone {<br>
+define internal void @bar() noinline nounwind readnone willreturn {<br>
 entry:<br>
   ret void<br>
 }<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><br><a href="http://www.fhahn.com/" target="_blank">http://www.fhahn.com/</a><br></div>