diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h --- a/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -2492,6 +2492,38 @@ static const char ID; }; +/// An abstract interface for all nonnull attributes. +struct AAMustProgress + : public IRAttribute> { + AAMustProgress(const IRPosition &IRP, Attributor &A) : IRAttribute(IRP) {} + + /// Return true if we assume that the underlying value is nonnull. + bool isAssumedMustProgress() const { return getAssumed(); } + + /// Return true if we know that underlying value is nonnull. + bool isKnownMustProgress() const { return getKnown(); } + + /// Create an abstract attribute view for the position \p IRP. + static AAMustProgress &createForPosition(const IRPosition &IRP, + Attributor &A); + + /// See AbstractAttribute::getName() + const std::string getName() const override { return "AAMustProgress"; } + + /// See AbstractAttribute::getIdAddr() + const char *getIdAddr() const override { return &ID; } + + /// This function should return true if the type of the \p AA is + /// AAMustProgress + static bool classof(const AbstractAttribute *AA) { + return (AA->getIdAddr() == &ID); + } + + /// Unique ID (due to the unique address) + static const char ID; +}; + /// An abstract interface for all nonnull attributes. struct AANonNull : public IRAttribute(FPos); + // Every function might be "must-progress". + getOrCreateAAFor(FPos); + // Every function might contain instructions that cause "undefined behavior". getOrCreateAAFor(FPos); diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -25,6 +25,7 @@ #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/Analysis/ValueTracking.h" +#include "llvm/IR/AbstractCallSite.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/IntrinsicInst.h" @@ -119,6 +120,7 @@ PIPE_OPERATOR(AANoReturn) PIPE_OPERATOR(AAReturnedValues) PIPE_OPERATOR(AANonNull) +PIPE_OPERATOR(AAMustProgress) PIPE_OPERATOR(AANoAlias) PIPE_OPERATOR(AADereferenceable) PIPE_OPERATOR(AAAlign) @@ -2348,6 +2350,83 @@ void trackStatistics() const override { STATS_DECLTRACK_CS_ATTR(willreturn); } }; +/// ------------------------ Must-Progress Attributes -------------------------- + +struct AAMustProgressImpl : public AAMustProgress { + AAMustProgressImpl(const IRPosition &IRP, Attributor &A) + : AAMustProgress(IRP, A) {} + + /// See AbstractAttribute::initialize(...). + void initialize(Attributor &A) override { + AAMustProgress::initialize(A); + + Function *F = getAnchorScope(); + if (!F) + indicatePessimisticFixpoint(); + else if (F->mustProgress()) + indicateOptimisticFixpoint(); + } + + /// See AbstractAttribute::getAsStr() + const std::string getAsStr() const override { + return getAssumed() ? "mustprogress" : "may-not-progress"; + } +}; + +struct AAMustProgressFunction final : AAMustProgressImpl { + AAMustProgressFunction(const IRPosition &IRP, Attributor &A) + : AAMustProgressImpl(IRP, A) {} + + /// See AbstractAttribute::updateImpl(...). + ChangeStatus updateImpl(Attributor &A) override { + auto &WillReturnAA = A.getAAFor(*this, getIRPosition(), + /* TrackDependence */ false); + if (WillReturnAA.isKnownWillReturn()) + return indicateOptimisticFixpoint(); + + auto CheckForMustProgress = [&](AbstractCallSite ACS) { + IRPosition IPos = IRPosition::callsite_function(*ACS.getInstruction()); + const auto &MustProgressAA = A.getAAFor(*this, IPos); + return MustProgressAA.isAssumedMustProgress(); + }; + + bool AllCallSitesKnown; + if (!A.checkForAllCallSites(CheckForMustProgress, *this, + /* RequireAllCallSites */ true, + AllCallSitesKnown)) + return indicatePessimisticFixpoint(); + + return ChangeStatus::UNCHANGED; + } + + /// See AbstractAttribute::trackStatistics() + void trackStatistics() const override { + STATS_DECLTRACK_FN_ATTR(mustprogress) + } +}; + +/// MustProgress attribute deduction for a call sites. +struct AAMustProgressCallSite final : AAMustProgressImpl { + AAMustProgressCallSite(const IRPosition &IRP, Attributor &A) + : AAMustProgressImpl(IRP, A) {} + + /// See AbstractAttribute::updateImpl(...). + ChangeStatus updateImpl(Attributor &A) override { + // TODO: Once we have call site specific value information we can provide + // call site specific liveness information and then it makes + // sense to specialize attributes for call sites arguments instead of + // redirecting requests to the callee argument. + const IRPosition &FnPos = IRPosition::function(*getAnchorScope()); + auto &FnAA = A.getAAFor(*this, FnPos); + return clampStateAndIndicateChange(getState(), FnAA.getState()); + } + + /// See AbstractAttribute::trackStatistics() + void trackStatistics() const override { + STATS_DECLTRACK_CS_ATTR(mustprogress); + } +}; + /// -------------------AAReachability Attribute-------------------------- struct AAReachabilityImpl : AAReachability { @@ -8033,6 +8112,7 @@ const char AANoSync::ID = 0; const char AANoFree::ID = 0; const char AANonNull::ID = 0; +const char AAMustProgress::ID = 0; const char AANoRecurse::ID = 0; const char AAWillReturn::ID = 0; const char AAUndefinedBehavior::ID = 0; @@ -8152,6 +8232,7 @@ CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION(AANoReturn) CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAReturnedValues) CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAMemoryLocation) +CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAMustProgress) CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AANonNull) CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AANoAlias) diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll @@ -5,14 +5,14 @@ ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM define internal i32 @deref(i32* %x) nounwind { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@deref ; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4 ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP2]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@deref ; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -21,14 +21,14 @@ ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@deref ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4 ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@deref ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -62,7 +62,7 @@ ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]]) [[ATTR2:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP1]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -71,7 +71,7 @@ ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X_ADDR]]) [[ATTR2:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll @@ -9,7 +9,7 @@ ; because there is a load of %A in the entry block define internal i32 @callee(i1 %C, i32* %A) { ; -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@callee ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -22,7 +22,7 @@ ; IS__TUNIT____-NEXT: [[R:%.*]] = load i32, i32* [[A_2]], align 4 ; IS__TUNIT____-NEXT: ret i32 [[R]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -50,13 +50,13 @@ } define i32 @foo(i32* %A) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[A:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree readonly align 4 [[A]]) [[ATTR1:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[X]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A]]) [[ATTR1:#.*]] diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-07-CGUpdate.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-07-CGUpdate.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-07-CGUpdate.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-07-CGUpdate.ll @@ -5,7 +5,7 @@ ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM define internal fastcc i32 @hash(i32* %ts, i32 %mod) nounwind { -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@hash ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -16,13 +16,13 @@ } define void @encode(i32* %m, i32* %ts, i32* %new) nounwind { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@encode ; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@encode ; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-08-CGUpdateSelfEdge.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-08-CGUpdateSelfEdge.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-08-CGUpdateSelfEdge.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-08-CGUpdateSelfEdge.ll @@ -5,7 +5,7 @@ ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM define internal fastcc i32 @term_SharingList(i32* %Term, i32* %List) nounwind { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@term_SharingList ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -27,7 +27,7 @@ } define i32 @term_Sharing(i32* %Term) nounwind { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@term_Sharing ; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[TERM:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -37,7 +37,7 @@ ; IS__TUNIT____: bb14: ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@term_Sharing ; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TERM:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll @@ -9,7 +9,7 @@ target triple = "x86_64-unknown-linux-gnu" define internal fastcc void @no_promote_avx2(<4 x i64>* %arg, <4 x i64>* readonly %arg1) #0 { -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@no_promote_avx2 ; IS________OPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[ARG:%.*]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[ARG1:%.*]]) [[ATTR0:#.*]] { ; IS________OPM-NEXT: bb: @@ -17,7 +17,7 @@ ; IS________OPM-NEXT: store <4 x i64> [[TMP]], <4 x i64>* [[ARG]], align 32 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@no_promote_avx2 ; IS________NPM-SAME: (<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[ARG:%.*]], <4 x i64>* noalias nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[ARG1:%.*]]) [[ATTR0:#.*]] { ; IS________NPM-NEXT: bb: @@ -32,7 +32,7 @@ } define void @no_promote(<4 x i64>* %arg) #1 { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@no_promote ; IS__TUNIT_OPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -45,7 +45,7 @@ ; IS__TUNIT_OPM-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@no_promote ; IS__TUNIT_NPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -58,7 +58,7 @@ ; IS__TUNIT_NPM-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@no_promote ; IS__CGSCC_OPM-SAME: (<4 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -71,7 +71,7 @@ ; IS__CGSCC_OPM-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@no_promote ; IS__CGSCC_NPM-SAME: (<4 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: bb: @@ -96,7 +96,7 @@ } define internal fastcc void @promote_avx2(<4 x i64>* %arg, <4 x i64>* readonly %arg1) #0 { -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@promote_avx2 ; IS________OPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[ARG:%.*]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[ARG1:%.*]]) [[ATTR0]] { ; IS________OPM-NEXT: bb: @@ -104,7 +104,7 @@ ; IS________OPM-NEXT: store <4 x i64> [[TMP]], <4 x i64>* [[ARG]], align 32 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@promote_avx2 ; IS________NPM-SAME: (<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[ARG:%.*]], <4 x i64> [[TMP0:%.*]]) [[ATTR0]] { ; IS________NPM-NEXT: bb: @@ -121,7 +121,7 @@ } define void @promote(<4 x i64>* %arg) #0 { -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@promote ; IS__TUNIT_OPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -134,7 +134,7 @@ ; IS__TUNIT_OPM-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@promote ; IS__TUNIT_NPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -148,7 +148,7 @@ ; IS__TUNIT_NPM-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@promote ; IS__CGSCC_OPM-SAME: (<4 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -161,7 +161,7 @@ ; IS__CGSCC_OPM-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@promote ; IS__CGSCC_NPM-SAME: (<4 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: bb: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll @@ -11,7 +11,7 @@ ; This should promote define internal fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #0 { ; -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512 ; IS________OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR0:#.*]] { ; IS________OPM-NEXT: bb: @@ -19,7 +19,7 @@ ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512 ; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) [[ATTR0:#.*]] { ; IS________NPM-NEXT: bb: @@ -37,7 +37,7 @@ define void @avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* %arg) #0 { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512 ; IS__TUNIT_OPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -50,7 +50,7 @@ ; IS__TUNIT_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512 ; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -64,7 +64,7 @@ ; IS__TUNIT_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512 ; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -77,7 +77,7 @@ ; IS__CGSCC_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512 ; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: bb: @@ -105,7 +105,7 @@ ; This should promote define internal fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #1 { ; -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256 ; IS________OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR1:#.*]] { ; IS________OPM-NEXT: bb: @@ -113,7 +113,7 @@ ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256 ; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) [[ATTR1:#.*]] { ; IS________NPM-NEXT: bb: @@ -131,7 +131,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* %arg) #1 { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256 ; IS__TUNIT_OPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -144,7 +144,7 @@ ; IS__TUNIT_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256 ; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -158,7 +158,7 @@ ; IS__TUNIT_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256 ; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -171,7 +171,7 @@ ; IS__CGSCC_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256 ; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: bb: @@ -199,7 +199,7 @@ ; This should promote define internal fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #1 { ; -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256 ; IS________OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR1]] { ; IS________OPM-NEXT: bb: @@ -207,7 +207,7 @@ ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256 ; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) [[ATTR1]] { ; IS________NPM-NEXT: bb: @@ -225,7 +225,7 @@ define void @avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* %arg) #0 { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256 ; IS__TUNIT_OPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -238,7 +238,7 @@ ; IS__TUNIT_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256 ; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -252,7 +252,7 @@ ; IS__TUNIT_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256 ; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -265,7 +265,7 @@ ; IS__CGSCC_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256 ; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: bb: @@ -293,7 +293,7 @@ ; This should promote define internal fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #0 { ; -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512 ; IS________OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR0]] { ; IS________OPM-NEXT: bb: @@ -301,7 +301,7 @@ ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512 ; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) [[ATTR0]] { ; IS________NPM-NEXT: bb: @@ -319,7 +319,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* %arg) #1 { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512 ; IS__TUNIT_OPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -332,7 +332,7 @@ ; IS__TUNIT_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512 ; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -346,7 +346,7 @@ ; IS__TUNIT_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512 ; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -359,7 +359,7 @@ ; IS__CGSCC_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512 ; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1]] { ; IS__CGSCC_NPM-NEXT: bb: @@ -387,7 +387,7 @@ ; This should not promote define internal fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #1 { ; -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256 ; IS________OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR1]] { ; IS________OPM-NEXT: bb: @@ -395,7 +395,7 @@ ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256 ; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR1]] { ; IS________NPM-NEXT: bb: @@ -411,7 +411,7 @@ define void @avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* %arg) #2 { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256 ; IS__TUNIT_OPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR2:#.*]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -424,7 +424,7 @@ ; IS__TUNIT_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256 ; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR2:#.*]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -437,7 +437,7 @@ ; IS__TUNIT_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256 ; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -450,7 +450,7 @@ ; IS__CGSCC_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256 ; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC_NPM-NEXT: bb: @@ -477,7 +477,7 @@ ; This should not promote define internal fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #2 { ; -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256 ; IS________OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR2:#.*]] { ; IS________OPM-NEXT: bb: @@ -485,7 +485,7 @@ ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256 ; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR2:#.*]] { ; IS________NPM-NEXT: bb: @@ -501,7 +501,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* %arg) #1 { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256 ; IS__TUNIT_OPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -514,7 +514,7 @@ ; IS__TUNIT_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256 ; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -527,7 +527,7 @@ ; IS__TUNIT_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256 ; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -540,7 +540,7 @@ ; IS__CGSCC_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256 ; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1]] { ; IS__CGSCC_NPM-NEXT: bb: @@ -567,7 +567,7 @@ ; This should promote define internal fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #3 { ; -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256 ; IS________OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR3:#.*]] { ; IS________OPM-NEXT: bb: @@ -575,7 +575,7 @@ ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256 ; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) [[ATTR3:#.*]] { ; IS________NPM-NEXT: bb: @@ -593,7 +593,7 @@ define void @avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* %arg) #4 { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256 ; IS__TUNIT_OPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -606,7 +606,7 @@ ; IS__TUNIT_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256 ; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -620,7 +620,7 @@ ; IS__TUNIT_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256 ; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -633,7 +633,7 @@ ; IS__CGSCC_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256 ; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC_NPM-NEXT: bb: @@ -661,7 +661,7 @@ ; This should promote define internal fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #4 { ; -; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256 ; IS________OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) [[ATTR4:#.*]] { ; IS________OPM-NEXT: bb: @@ -669,7 +669,7 @@ ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 ; IS________OPM-NEXT: ret void ; -; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256 ; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) [[ATTR4:#.*]] { ; IS________NPM-NEXT: bb: @@ -687,7 +687,7 @@ define void @avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* %arg) #3 { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256 ; IS__TUNIT_OPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR3:#.*]] { ; IS__TUNIT_OPM-NEXT: bb: @@ -700,7 +700,7 @@ ; IS__TUNIT_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256 ; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR3:#.*]] { ; IS__TUNIT_NPM-NEXT: bb: @@ -714,7 +714,7 @@ ; IS__TUNIT_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256 ; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC_OPM-NEXT: bb: @@ -727,7 +727,7 @@ ; IS__CGSCC_OPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256 ; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC_NPM-NEXT: bb: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll @@ -8,7 +8,7 @@ @G = constant %T { i32 0, i32 0, i32 17, i32 25 } define internal i32 @test(%T* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -19,7 +19,7 @@ ; IS__TUNIT____-NEXT: [[V:%.*]] = add i32 [[A]], [[B]] ; IS__TUNIT____-NEXT: ret i32 [[V]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -40,14 +40,14 @@ } define i32 @caller() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test() [[ATTR0]] +; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test() [[ATTR1:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[V]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll @@ -57,7 +57,7 @@ ; Test2 ; Different alignemnt privatizable arguments define internal i32 @test(i32* %X, i64* %Y) { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test ; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]], i64* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[Y:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4 @@ -71,7 +71,7 @@ ; IS__TUNIT_OPM: Return2: ; IS__TUNIT_OPM-NEXT: ret i32 [[A]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test ; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i64, align 8 @@ -89,7 +89,7 @@ ; IS__TUNIT_NPM: Return2: ; IS__TUNIT_NPM-NEXT: ret i32 [[A]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]], i64* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[Y:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4 @@ -103,7 +103,7 @@ ; IS__CGSCC_OPM: Return2: ; IS__CGSCC_OPM-NEXT: ret i32 [[A]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i64, align 8 @@ -154,7 +154,7 @@ ; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i64 [[TMP3]]) [[ATTR3:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[C]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@caller ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i64, align 8 @@ -162,7 +162,7 @@ ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i64* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B]]) [[ATTR3:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[C]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4 @@ -198,7 +198,7 @@ ; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) [[ATTR4:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[X]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callercaller ; IS__CGSCC_OPM-SAME: () [[ATTR2:#.*]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 @@ -206,7 +206,7 @@ ; IS__CGSCC_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[X]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll @@ -9,7 +9,7 @@ ; Don't drop 'byval' on %X here. define internal i32 @f(%struct.ss* byval(%struct.ss) %b, i32* byval(i32) %X, i32 %i) nounwind { ; -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f ; IS__TUNIT_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval(%struct.ss) align 8 dereferenceable(12) [[B:%.*]], i32* noalias nocapture nofree nonnull byval(i32) align 4 dereferenceable(4) [[X:%.*]], i32 noundef [[I:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: @@ -22,7 +22,7 @@ ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = add i32 [[L]], [[TMP2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[A]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f ; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]], i32 noundef [[I:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -42,7 +42,7 @@ ; IS__TUNIT_NPM-NEXT: [[A:%.*]] = add i32 [[L]], [[TMP2]] ; IS__TUNIT_NPM-NEXT: ret i32 [[A]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval(%struct.ss) align 8 dereferenceable(12) [[B:%.*]], i32* noalias nocapture nofree nonnull byval(i32) align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -55,7 +55,7 @@ ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = add i32 [[L]], [[TMP2]] ; IS__CGSCC_OPM-NEXT: ret i32 [[A]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -91,7 +91,7 @@ ; Also make sure we don't drop the call zeroext attribute. define i32 @test(i32* %X) { ; -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test ; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) [[ATTR0]] { ; IS__TUNIT_OPM-NEXT: entry: @@ -100,10 +100,10 @@ ; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[TMP1]], align 8 ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__TUNIT_OPM-NEXT: store i64 2, i64* [[TMP4]], align 4 -; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval(%struct.ss) align 8 dereferenceable(12) [[S]], i32* nocapture nofree readonly byval(i32) align 4 [[X]], i32 noundef zeroext 0) [[ATTR0]] +; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval(%struct.ss) align 8 dereferenceable(12) [[S]], i32* nocapture nofree readonly byval(i32) align 4 [[X]], i32 noundef zeroext 0) [[ATTR1:#.*]] ; IS__TUNIT_OPM-NEXT: ret i32 [[C]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test ; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) [[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -117,10 +117,10 @@ ; IS__TUNIT_NPM-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i64, i64* [[S_0_1]], align 8 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4 -; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]], i32 [[TMP2]], i32 noundef zeroext 0) [[ATTR0]] +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]], i32 [[TMP2]], i32 noundef zeroext 0) [[ATTR1:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[C]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -132,7 +132,7 @@ ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readnone byval(%struct.ss) align 8 dereferenceable(12) [[S]], i32* noalias nocapture nofree nonnull readnone byval(i32) align 4 dereferenceable(4) [[X]]) [[ATTR1:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[C]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll @@ -6,7 +6,7 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define internal i32 @test(i32* %X, i32* %Y) { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test ; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[Y:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4 @@ -14,7 +14,7 @@ ; IS__TUNIT_OPM-NEXT: [[C:%.*]] = add i32 [[A]], [[B]] ; IS__TUNIT_OPM-NEXT: ret i32 [[C]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test ; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i32, align 4 @@ -26,7 +26,7 @@ ; IS__TUNIT_NPM-NEXT: [[C:%.*]] = add i32 [[A]], [[B]] ; IS__TUNIT_NPM-NEXT: ret i32 [[C]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[Y:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4 @@ -34,7 +34,7 @@ ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = add i32 [[A]], [[B]] ; IS__CGSCC_OPM-NEXT: ret i32 [[C]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i32, align 4 @@ -73,7 +73,7 @@ ; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i32 [[TMP3]]) [[ATTR3:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[C]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@caller ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 @@ -81,7 +81,7 @@ ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR3:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[C]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 @@ -117,7 +117,7 @@ ; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) [[ATTR4:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[X]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callercaller ; IS__CGSCC_OPM-SAME: () [[ATTR2:#.*]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 @@ -125,7 +125,7 @@ ; IS__CGSCC_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[X]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll @@ -7,7 +7,7 @@ %struct.ss = type { i32, i64 } define internal void @f(%struct.ss* byval(%struct.ss) %b, i32* byval(i32) %X) nounwind { -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval(%struct.ss) align 8 dereferenceable(12) [[B:%.*]], i32* noalias nocapture nofree nonnull writeonly byval(i32) align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -18,7 +18,7 @@ ; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[X]], align 4 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -48,7 +48,7 @@ define i32 @test(i32* %X) { ; -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test ; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -59,7 +59,7 @@ ; IS__TUNIT____-NEXT: store i64 2, i64* [[TMP4]], align 4 ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -70,7 +70,7 @@ ; IS__CGSCC_OPM-NEXT: store i64 2, i64* [[TMP4]], align 4 ; IS__CGSCC_OPM-NEXT: ret i32 0 ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll @@ -9,7 +9,7 @@ %struct.ss = type { i32, i64 } define internal i32 @f(%struct.ss* byval(%struct.ss) %b) nounwind { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f ; IS__TUNIT_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval(%struct.ss) align 8 dereferenceable(12) [[B:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: @@ -19,7 +19,7 @@ ; IS__TUNIT_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8 ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f ; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -34,7 +34,7 @@ ; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8 ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP1]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval(%struct.ss) align 32 dereferenceable(12) [[B:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -44,7 +44,7 @@ ; IS__CGSCC_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32 ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -69,7 +69,7 @@ define internal i32 @g(%struct.ss* byval(%struct.ss) align 32 %b) nounwind { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@g ; IS__TUNIT_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval(%struct.ss) align 32 dereferenceable(12) [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT_OPM-NEXT: entry: @@ -79,7 +79,7 @@ ; IS__TUNIT_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32 ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP2]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@g ; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -94,7 +94,7 @@ ; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32 ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@g ; IS__CGSCC_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval(%struct.ss) align 32 dereferenceable(12) [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -104,7 +104,7 @@ ; IS__CGSCC_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32 ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@g ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -129,7 +129,7 @@ define i32 @main() nounwind { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@main ; IS__TUNIT_OPM-SAME: () [[ATTR0]] { ; IS__TUNIT_OPM-NEXT: entry: @@ -138,12 +138,12 @@ ; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[TMP1]], align 8 ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__TUNIT_OPM-NEXT: store i64 2, i64* [[TMP4]], align 4 -; IS__TUNIT_OPM-NEXT: [[C0:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval(%struct.ss) align 8 dereferenceable(12) [[S]]) [[ATTR0]] -; IS__TUNIT_OPM-NEXT: [[C1:%.*]] = call i32 @g(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval(%struct.ss) align 32 dereferenceable(12) [[S]]) [[ATTR0]] +; IS__TUNIT_OPM-NEXT: [[C0:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval(%struct.ss) align 8 dereferenceable(12) [[S]]) [[ATTR1:#.*]] +; IS__TUNIT_OPM-NEXT: [[C1:%.*]] = call i32 @g(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval(%struct.ss) align 32 dereferenceable(12) [[S]]) [[ATTR1]] ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = add i32 [[C0]], [[C1]] ; IS__TUNIT_OPM-NEXT: ret i32 [[A]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@main ; IS__TUNIT_NPM-SAME: () [[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -152,20 +152,20 @@ ; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[TMP1]], align 8 ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__TUNIT_NPM-NEXT: store i64 2, i64* [[TMP4]], align 4 -; IS__TUNIT_NPM-NEXT: [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32* -; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[S_CAST]], align 8 -; IS__TUNIT_NPM-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 -; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i64, i64* [[S_0_1]], align 8 -; IS__TUNIT_NPM-NEXT: [[C0:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]]) [[ATTR0]] ; IS__TUNIT_NPM-NEXT: [[S_CAST1:%.*]] = bitcast %struct.ss* [[S]] to i32* -; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[S_CAST1]], align 32 +; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[S_CAST1]], align 8 ; IS__TUNIT_NPM-NEXT: [[S_0_12:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 -; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i64, i64* [[S_0_12]], align 32 -; IS__TUNIT_NPM-NEXT: [[C1:%.*]] = call i32 @g(i32 [[TMP2]], i64 [[TMP3]]) [[ATTR0]] +; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i64, i64* [[S_0_12]], align 8 +; IS__TUNIT_NPM-NEXT: [[C0:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]]) [[ATTR1:#.*]] +; IS__TUNIT_NPM-NEXT: [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32* +; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[S_CAST]], align 32 +; IS__TUNIT_NPM-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 +; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i64, i64* [[S_0_1]], align 32 +; IS__TUNIT_NPM-NEXT: [[C1:%.*]] = call i32 @g(i32 [[TMP2]], i64 [[TMP3]]) [[ATTR1]] ; IS__TUNIT_NPM-NEXT: [[A:%.*]] = add i32 [[C0]], [[C1]] ; IS__TUNIT_NPM-NEXT: ret i32 [[A]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@main ; IS__CGSCC_OPM-SAME: () [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -179,7 +179,7 @@ ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = add i32 [[C0]], [[C1]] ; IS__CGSCC_OPM-NEXT: ret i32 [[A]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@main ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll @@ -9,7 +9,7 @@ define internal i32 @test(i32** %x) { ; -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -17,7 +17,7 @@ ; IS__TUNIT____-NEXT: [[Z:%.*]] = load i32, i32* [[Y]], align 4 ; IS__TUNIT____-NEXT: ret i32 [[Z]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -32,14 +32,14 @@ } define i32 @caller() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @test() [[ATTR0]] +; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @test() [[ATTR1:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[X]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll @@ -6,7 +6,7 @@ ; Don't promote around control flow. define internal i32 @callee(i1 %C, i32* %P) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@callee ; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -17,7 +17,7 @@ ; IS__TUNIT____-NEXT: [[X:%.*]] = load i32, i32* [[P]], align 4 ; IS__TUNIT____-NEXT: ret i32 [[X]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee ; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -40,14 +40,14 @@ } define i32 @foo(i1 %C, i32* %P) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) [[ATTR1:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[X]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll @@ -7,7 +7,7 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define internal i32 @callee(i1 %C, i32* %P) { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@callee ; IS__TUNIT_OPM-SAME: (i1 noundef [[C:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: br label [[F:%.*]] @@ -17,7 +17,7 @@ ; IS__TUNIT_OPM-NEXT: [[X:%.*]] = load i32, i32* [[P]], align 4 ; IS__TUNIT_OPM-NEXT: ret i32 [[X]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@callee ; IS__TUNIT_NPM-SAME: (i1 noundef [[C:%.*]], i32 [[TMP0:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: [[P_PRIV:%.*]] = alloca i32, align 4 @@ -29,7 +29,7 @@ ; IS__TUNIT_NPM-NEXT: [[X:%.*]] = load i32, i32* [[P_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: ret i32 [[X]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callee ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: br label [[F:%.*]] @@ -39,7 +39,7 @@ ; IS__CGSCC_OPM-NEXT: [[X:%.*]] = load i32, i32* [[P]], align 4 ; IS__CGSCC_OPM-NEXT: ret i32 [[X]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callee ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: [[P_PRIV:%.*]] = alloca i32, align 4 @@ -79,7 +79,7 @@ ; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @callee(i1 noundef false, i32 [[TMP1]]) [[ATTR2:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[X]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@foo ; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 @@ -87,7 +87,7 @@ ; IS__CGSCC_OPM-NEXT: [[X:%.*]] = call i32 @callee(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]]) [[ATTR2:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[X]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll @@ -9,18 +9,18 @@ ; Inlining should nuke the invoke (and any inlined calls) here even with ; argument promotion running along with it. define void @zot() personality i32 (...)* @wibble { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@zot ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] personality i32 (...)* @wibble { ; IS__TUNIT____-NEXT: bb: -; IS__TUNIT____-NEXT: call void @hoge() [[ATTR1:#.*]] +; IS__TUNIT____-NEXT: call void @hoge() [[ATTR2:#.*]] ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: bb1: ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: bb2: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@zot ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] personality i32 (...)* @wibble { ; IS__CGSCC____-NEXT: bb: @@ -45,13 +45,13 @@ } define internal void @hoge() { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@hoge ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: bb: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@hoge ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: bb: @@ -64,7 +64,7 @@ } define internal fastcc i8* @spam(i1 (i8*)* %arg) { -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@spam ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: bb: @@ -81,7 +81,7 @@ } define internal i1 @barney(i8* %arg) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@barney ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: bb: @@ -94,17 +94,15 @@ define i32 @test_inf_promote_caller(i32 %arg) { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_inf_promote_caller -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: bb: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inf_promote_caller -; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: bb: -; IS__CGSCC____-NEXT: [[TMP:%.*]] = alloca [[S:%.*]], align 8 -; IS__CGSCC____-NEXT: [[TMP1:%.*]] = alloca [[S]], align 8 -; IS__CGSCC____-NEXT: unreachable +; IS__CGSCC____-NEXT: ret i32 0 ; bb: %tmp = alloca %S @@ -115,12 +113,6 @@ } define internal i32 @test_inf_promote_callee(%S* %arg, %S* %arg1) { -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inf_promote_callee -; IS__CGSCC____-SAME: () [[ATTR0]] { -; IS__CGSCC____-NEXT: bb: -; IS__CGSCC____-NEXT: unreachable -; bb: %tmp = getelementptr %S, %S* %arg1, i32 0, i32 0 %tmp2 = load %S*, %S** %tmp diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll @@ -23,7 +23,7 @@ ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@run ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -38,7 +38,7 @@ } define internal i8 @UseLongDoubleUnsafely(%union.u* byval(%union.u) align 16 %arg) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@UseLongDoubleUnsafely ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -52,7 +52,7 @@ } define internal x86_fp80 @UseLongDoubleSafely(%union.u* byval(%union.u) align 16 %arg) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@UseLongDoubleSafely ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret x86_fp80 undef @@ -63,7 +63,7 @@ } define internal i64 @AccessPaddingOfStruct(%struct.Foo* byval(%struct.Foo) %a) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@AccessPaddingOfStruct ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i64 undef @@ -86,7 +86,7 @@ ; IS__CGSCC_OPM-NEXT: [[GEP]] = getelementptr [[STRUCT_FOO:%.*]], %struct.Foo* [[A]], i64 0 ; IS__CGSCC_OPM-NEXT: br label [[LOOP]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@CaptureAStruct ; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/inalloca.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/inalloca.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/inalloca.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/inalloca.ll @@ -10,7 +10,7 @@ ; Argpromote + sroa should change this to passing the two integers by value. define internal i32 @f(%struct.ss* inalloca %s) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@f ; IS__TUNIT____-SAME: (%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -21,7 +21,7 @@ ; IS__TUNIT____-NEXT: [[R:%.*]] = add i32 [[A]], [[B]] ; IS__TUNIT____-NEXT: ret i32 [[R]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@f ; IS__CGSCC____-SAME: (%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -51,10 +51,10 @@ ; IS__TUNIT____-NEXT: [[F1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__TUNIT____-NEXT: store i32 1, i32* [[F0]], align 4 ; IS__TUNIT____-NEXT: store i32 2, i32* [[F1]], align 4 -; IS__TUNIT____-NEXT: [[R:%.*]] = call i32 @f(%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S]]) [[ATTR2:#.*]] +; IS__TUNIT____-NEXT: [[R:%.*]] = call i32 @f(%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S]]) [[ATTR3:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[R]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@main ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -78,7 +78,7 @@ ; Argpromote can't promote %a because of the icmp use. define internal i1 @g(%struct.ss* %a, %struct.ss* inalloca %b) nounwind { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@g ; IS__CGSCC____-SAME: (%struct.ss* noalias nocapture nofree nonnull readnone align 4 dereferenceable(8) [[A:%.*]], %struct.ss* inalloca noalias nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[B:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: entry: @@ -90,13 +90,13 @@ } define i32 @test() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/invalidation.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/invalidation.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/invalidation.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/invalidation.ll @@ -12,7 +12,7 @@ @G = constant i32 0 define internal i32 @a(i32* %x) { -; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn +; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@a ; CHECK-SAME: () [[ATTR0:#.*]] { ; CHECK-NEXT: entry: @@ -25,11 +25,11 @@ } define i32 @b() { -; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn +; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@b ; CHECK-SAME: () [[ATTR0]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[V:%.*]] = call i32 @a() [[ATTR0]] +; CHECK-NEXT: [[V:%.*]] = call i32 @a() [[ATTR1:#.*]] ; CHECK-NEXT: ret i32 [[V]] ; entry: @@ -40,10 +40,10 @@ define i32 @c() { ; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn ; CHECK-LABEL: define {{[^@]+}}@c -; CHECK-SAME: () [[ATTR0]] { +; CHECK-SAME: () [[ATTR1]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[V1:%.*]] = call i32 @a() [[ATTR0]] -; CHECK-NEXT: [[V2:%.*]] = call i32 @b() [[ATTR0]] +; CHECK-NEXT: [[V1:%.*]] = call i32 @a() [[ATTR1]] +; CHECK-NEXT: [[V2:%.*]] = call i32 @b() [[ATTR1]] ; CHECK-NEXT: [[RESULT:%.*]] = add i32 [[V1]], [[V2]] ; CHECK-NEXT: ret i32 [[RESULT]] ; diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll @@ -11,7 +11,7 @@ } define internal i32 @test(i32* %X, i32* %Y) { -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] @@ -21,7 +21,7 @@ ; IS__CGSCC_OPM: dead: ; IS__CGSCC_OPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] @@ -42,7 +42,7 @@ } define internal i32 @caller(i32* %B) { -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@caller ; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 @@ -50,7 +50,7 @@ ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) [[ATTR3:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 undef ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller ; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 @@ -65,14 +65,14 @@ } define i32 @callercaller() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: store i32 2, i32* [[B]], align 4 ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@callercaller ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4 diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll @@ -11,7 +11,7 @@ } define internal i32 @test(i32* %X, i32* %Y) { -; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test ; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) [[ATTR0:#.*]] { ; NOT_CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] @@ -21,7 +21,7 @@ ; NOT_CGSCC_NPM: dead: ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test ; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] @@ -42,7 +42,7 @@ } define internal i32 @caller(i32* %B) { -; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@caller ; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { ; NOT_CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 @@ -50,7 +50,7 @@ ; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR2:#.*]] ; NOT_CGSCC_NPM-NEXT: ret i32 undef ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller ; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 @@ -65,7 +65,7 @@ } define i32 @callercaller() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller ; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 @@ -73,7 +73,7 @@ ; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR2:#.*]] ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callercaller ; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 @@ -81,7 +81,7 @@ ; IS__CGSCC_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR3:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 0 ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller ; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll @@ -10,7 +10,7 @@ %T = type { i32, i32, i32, i32 } define internal i32 @test(%T* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test ; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3 @@ -20,7 +20,7 @@ ; IS__TUNIT____-NEXT: [[V:%.*]] = add i32 [[A]], [[B]] ; IS__TUNIT____-NEXT: ret i32 [[V]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test ; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3 @@ -39,13 +39,13 @@ } define i32 @caller(%T* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller ; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[V:%.*]] = musttail call i32 @test(%T* nocapture nofree readonly [[P]]) [[ATTR4:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[V]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller ; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[V:%.*]] = musttail call i32 @test(%T* nocapture nofree readonly [[P]]) [[ATTR4:#.*]] @@ -58,12 +58,12 @@ ; Don't promote arguments of musttail caller define i32 @foo(%T* %p, i32 %v) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: ret i32 0 @@ -72,7 +72,7 @@ } define internal i32 @test2(%T* %p, i32 %p2) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 ; IS__CGSCC____-SAME: (%T* noalias nocapture nofree readnone [[P:%.*]], i32 [[P2:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 undef @@ -87,12 +87,12 @@ } define i32 @caller2(%T* %g) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2 ; IS__TUNIT____-SAME: (%T* nocapture nofree readnone [[G:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2 ; IS__CGSCC____-SAME: (%T* nocapture nofree readnone [[G:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 0 @@ -106,14 +106,14 @@ ; is kept as well. define i32 @bar(%T* %p, i32 %v) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar ; IS__TUNIT____-SAME: (%T* nocapture nofree nonnull writeonly dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) [[ATTR2:#.*]] { ; IS__TUNIT____-NEXT: [[I32PTR:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 0 ; IS__TUNIT____-NEXT: store i32 [[V]], i32* [[I32PTR]], align 4 ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar ; IS__CGSCC____-SAME: (%T* nocapture nofree nonnull writeonly dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC____-NEXT: [[I32PTR:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 0 @@ -126,7 +126,7 @@ } define internal i32 @test2b(%T* %p, i32 %p2) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2b ; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) [[ATTR3:#.*]] { ; IS__TUNIT____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3 @@ -137,7 +137,7 @@ ; IS__TUNIT____-NEXT: [[CA:%.*]] = musttail call i32 @bar(%T* undef, i32 [[V]]) [[ATTR5:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[CA]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2b ; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3 @@ -158,13 +158,13 @@ } define i32 @caller2b(%T* %g) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2b ; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[G:%.*]]) [[ATTR3]] { ; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) [[ATTR6:#.*]] ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2b ; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[G:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: [[V:%.*]] = call i32 @test2b(%T* nocapture nofree readonly [[G]], i32 noundef undef) [[ATTR6:#.*]] diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/pr32917.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/pr32917.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/pr32917.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/pr32917.ll @@ -9,16 +9,16 @@ @a = common local_unnamed_addr global i32 0, align 4 define i32 @fn2() local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2 ; IS__TUNIT____-SAME: () local_unnamed_addr [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* @b, align 4 ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = sext i32 [[TMP1]] to i64 ; IS__TUNIT____-NEXT: [[TMP3:%.*]] = inttoptr i64 [[TMP2]] to i32* -; IS__TUNIT____-NEXT: call fastcc void @fn1(i32* nocapture nofree readonly align 4 [[TMP3]]) [[ATTR0]] +; IS__TUNIT____-NEXT: call fastcc void @fn1(i32* nocapture nofree readonly align 4 [[TMP3]]) [[ATTR1:#.*]] ; IS__TUNIT____-NEXT: ret i32 undef ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2 ; IS__CGSCC____-SAME: () local_unnamed_addr [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* @b, align 4 @@ -35,7 +35,7 @@ } define internal fastcc void @fn1(i32* nocapture readonly) unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn1 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 [[TMP0:%.*]]) unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 -1 @@ -43,7 +43,7 @@ ; IS__TUNIT____-NEXT: store i32 [[TMP3]], i32* @a, align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 [[TMP0:%.*]]) unnamed_addr [[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 -1 diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll @@ -14,14 +14,14 @@ %fun_t = type void (%p_t)* define void @foo() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = alloca void (i16*)*, align 8 ; IS__TUNIT____-NEXT: store void (i16*)* @bar, void (i16*)** [[TMP]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = alloca void (i16*)*, align 8 @@ -34,13 +34,13 @@ } define internal void @bar(%p_t %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar ; IS__TUNIT____-SAME: (i16* nocapture nofree readnone [[P:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], [[META3:metadata !.*]], metadata !DIExpression()) [[ATTR2:#.*]], [[DBG5:!dbg !.*]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar ; IS__CGSCC____-SAME: (i16* nocapture nofree readnone [[P:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], [[META3:metadata !.*]], metadata !DIExpression()) [[ATTR3:#.*]], [[DBG5:!dbg !.*]] diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/reserve-tbaa.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/reserve-tbaa.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/reserve-tbaa.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/reserve-tbaa.ll @@ -17,7 +17,7 @@ @d = global i8 0, align 1 define internal fastcc void @fn(i32* nocapture readonly %p1, i64* nocapture readonly %p2) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn ; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P1:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -26,7 +26,7 @@ ; IS__TUNIT____-NEXT: store i8 [[CONV1]], i8* @d, align 1, [[TBAA4:!tbaa !.*]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -45,7 +45,7 @@ } define i32 @main() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@main ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -53,10 +53,10 @@ ; IS__TUNIT____-NEXT: store i32* @g, i32** [[TMP0]], align 8, [[TBAA5]] ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32*, i32** @a, align 8, [[TBAA5]] ; IS__TUNIT____-NEXT: store i32 1, i32* [[TMP1]], align 4, [[TBAA0]] -; IS__TUNIT____-NEXT: call fastcc void @fn(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) @g) [[ATTR0]] +; IS__TUNIT____-NEXT: call fastcc void @fn(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) @g) [[ATTR1:#.*]] ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@main ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll @@ -9,7 +9,7 @@ define internal void @add({i32, i32}* %this, i32* sret(i32) %r) { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@add ; IS__TUNIT_OPM-SAME: ({ i32, i32 }* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[THIS:%.*]], i32* nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0 @@ -20,7 +20,7 @@ ; IS__TUNIT_OPM-NEXT: store i32 [[AB]], i32* [[R]], align 4 ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@add ; IS__TUNIT_NPM-SAME: ({ i32, i32 }* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0 @@ -31,7 +31,7 @@ ; IS__TUNIT_NPM-NEXT: store i32 [[AB]], i32* [[R]], align 4 ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@add ; IS__CGSCC_OPM-SAME: ({ i32, i32 }* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[THIS:%.*]], i32* nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0 @@ -42,7 +42,7 @@ ; IS__CGSCC_OPM-NEXT: store i32 [[AB]], i32* [[R]], align 4 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@add ; IS__CGSCC_NPM-SAME: ({ i32, i32 }* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0 @@ -63,7 +63,7 @@ } define void @f() { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f ; IS__TUNIT_OPM-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT_OPM-NEXT: [[R:%.*]] = alloca i32, align 4 @@ -71,7 +71,7 @@ ; IS__TUNIT_OPM-NEXT: call void @add({ i32, i32 }* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[PAIR]], i32* nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R]]) [[ATTR2:#.*]] ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f ; IS__TUNIT_NPM-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT_NPM-NEXT: [[R:%.*]] = alloca i32, align 4 @@ -79,7 +79,7 @@ ; IS__TUNIT_NPM-NEXT: call void @add({ i32, i32 }* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[PAIR]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R]]) [[ATTR2:#.*]] ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: [[R:%.*]] = alloca i32, align 4 @@ -87,7 +87,7 @@ ; IS__CGSCC_OPM-NEXT: call void @add({ i32, i32 }* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[PAIR]], i32* nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R]]) [[ATTR2:#.*]] ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f ; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: [[R:%.*]] = alloca i32, align 4 diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll b/llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll @@ -9,7 +9,7 @@ %struct.MYstr = type { i8, i32 } @mystr = internal global %struct.MYstr zeroinitializer ; <%struct.MYstr*> [#uses=3] define internal void @vfu1(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounwind { -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@vfu1 ; IS__CGSCC_OPM-SAME: (%struct.MYstr* noalias nocapture nofree noundef nonnull writeonly byval(%struct.MYstr) align 8 dereferenceable(8) [[U:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -21,7 +21,7 @@ ; IS__CGSCC_OPM: return: ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vfu1 ; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -50,7 +50,7 @@ } define internal i32 @vfu2(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounwind readonly { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@vfu2 ; IS__TUNIT_OPM-SAME: (%struct.MYstr* noalias nocapture nofree noundef nonnull readonly byval(%struct.MYstr) align 8 dereferenceable(8) [[U:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: @@ -62,7 +62,7 @@ ; IS__TUNIT_OPM-NEXT: [[TMP5:%.*]] = add i32 [[TMP4]], [[TMP1]] ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP5]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@vfu2 ; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -79,7 +79,7 @@ ; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]] ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP7]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@vfu2 ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -102,14 +102,14 @@ } define i32 @unions() nounwind { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@unions ; IS__TUNIT_OPM-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(%struct.MYstr* nocapture nofree noundef nonnull readonly byval(%struct.MYstr) align 8 dereferenceable(8) @mystr) [[ATTR0]] +; IS__TUNIT_OPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(%struct.MYstr* nocapture nofree noundef nonnull readonly byval(%struct.MYstr) align 8 dereferenceable(8) @mystr) [[ATTR3:#.*]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RESULT]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions ; IS__TUNIT_NPM-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -117,10 +117,10 @@ ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8 ; IS__TUNIT_NPM-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i32 0, i32 1 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8 -; IS__TUNIT_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP0]], i32 [[TMP1]]) [[ATTR0]] +; IS__TUNIT_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP0]], i32 [[TMP1]]) [[ATTR3:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RESULT]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@unions ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: entry: @@ -134,7 +134,7 @@ } define internal i32 @vfu2_v2(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounwind readonly { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@vfu2_v2 ; IS__TUNIT_OPM-SAME: (%struct.MYstr* noalias nocapture nofree noundef nonnull byval(%struct.MYstr) align 8 dereferenceable(8) [[U:%.*]]) [[ATTR2:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: @@ -148,7 +148,7 @@ ; IS__TUNIT_OPM-NEXT: [[TMP5:%.*]] = add i32 [[TMP4]], [[TMP1]] ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP5]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@vfu2_v2 ; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR2:#.*]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -167,7 +167,7 @@ ; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]] ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP7]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@vfu2_v2 ; IS__CGSCC_OPM-SAME: (%struct.MYstr* noalias nocapture nofree noundef nonnull byval(%struct.MYstr) align 8 dereferenceable(8) [[U:%.*]]) [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -181,7 +181,7 @@ ; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = add i32 [[TMP4]], [[TMP1]] ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP5]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vfu2_v2 ; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -213,14 +213,14 @@ } define i32 @unions_v2() nounwind { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@unions_v2 ; IS__TUNIT_OPM-SAME: () [[ATTR2]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(%struct.MYstr* nocapture nofree noundef nonnull readonly byval(%struct.MYstr) align 8 dereferenceable(8) @mystr) [[ATTR2]] +; IS__TUNIT_OPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(%struct.MYstr* nocapture nofree noundef nonnull readonly byval(%struct.MYstr) align 8 dereferenceable(8) @mystr) [[ATTR4:#.*]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RESULT]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions_v2 ; IS__TUNIT_NPM-SAME: () [[ATTR2]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -228,17 +228,17 @@ ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8 ; IS__TUNIT_NPM-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i32 0, i32 1 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8 -; IS__TUNIT_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 [[TMP0]], i32 [[TMP1]]) [[ATTR2]] +; IS__TUNIT_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 [[TMP0]], i32 [[TMP1]]) [[ATTR4:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RESULT]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@unions_v2 ; IS__CGSCC_OPM-SAME: () [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(%struct.MYstr* noalias nocapture nofree noundef nonnull readnone byval(%struct.MYstr) align 8 dereferenceable(8) @mystr) [[ATTR3:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RESULT]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@unions_v2 ; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll b/llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll @@ -8,25 +8,25 @@ target triple = "x86_64-unknown-linux-gnu" define i64 @fn2() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2 ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 undef) [[ATTR0]], [[RNG0:!range !.*]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 undef) [[ATTR1:#.*]], [[RNG0:!range !.*]] ; IS__TUNIT____-NEXT: ret i64 [[CALL2]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fn2 ; IS__CGSCC_OPM-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 undef) [[ATTR1:#.*]] +; IS__CGSCC_OPM-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 undef) [[ATTR2:#.*]] ; IS__CGSCC_OPM-NEXT: ret i64 [[CALL2]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fn2 ; IS__CGSCC_NPM-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: -; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 undef) [[ATTR1:#.*]], [[RNG0:!range !.*]] +; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 undef) [[ATTR2:#.*]], [[RNG0:!range !.*]] ; IS__CGSCC_NPM-NEXT: ret i64 [[CALL2]] ; entry: @@ -37,22 +37,22 @@ } define i64 @fn2b(i32 %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2b ; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64 ; IS__TUNIT____-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]] -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]]) [[ATTR0]], [[RNG0]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]]) [[ATTR1]], [[RNG0]] ; IS__TUNIT____-NEXT: ret i64 [[CALL2]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2b -; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64 ; IS__CGSCC____-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]] -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]]) [[ATTR1:#.*]], [[RNG0:!range !.*]] +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]]) [[ATTR2:#.*]], [[RNG0:!range !.*]] ; IS__CGSCC____-NEXT: ret i64 [[CALL2]] ; entry: @@ -63,18 +63,18 @@ } define i64 @fn2c() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2c ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 noundef 42) [[ATTR0]], [[RNG0]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 noundef 42) [[ATTR1]], [[RNG0]] ; IS__TUNIT____-NEXT: ret i64 [[CALL2]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2c -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 noundef 42) [[ATTR1]] +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 noundef 42) [[ATTR2]] ; IS__CGSCC____-NEXT: ret i64 [[CALL2]] ; entry: @@ -85,7 +85,7 @@ } define internal i64 @fn1(i64 %p1) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn1 ; IS__TUNIT____-SAME: (i64 returned [[P1:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -93,7 +93,7 @@ ; IS__TUNIT____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i64 [[P1]], i64 [[P1]] ; IS__TUNIT____-NEXT: ret i64 [[COND]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1 ; IS__CGSCC____-SAME: (i64 returned [[P1:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll b/llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll @@ -57,7 +57,7 @@ } define internal i32 @fn1(i32 %p1) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn1 ; IS__TUNIT____-SAME: (i32 returned [[P1:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -65,7 +65,7 @@ ; IS__TUNIT____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i32 [[P1]], i32 [[P1]] ; IS__TUNIT____-NEXT: ret i32 [[COND]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1 ; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -130,7 +130,7 @@ } define internal i32 @fn0(i32 %p1) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn0 ; IS__TUNIT____-SAME: (i32 returned [[P1:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: entry: @@ -138,7 +138,7 @@ ; IS__TUNIT____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i32 [[P1]], i32 [[P1]] ; IS__TUNIT____-NEXT: ret i32 [[COND]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn0 ; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll b/llvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll @@ -10,13 +10,13 @@ declare dso_local fastcc float @bar(%struct.wobble* noalias, <8 x i32>) unnamed_addr define %struct.zot @widget(<8 x i32> %arg) local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@widget ; IS__TUNIT____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: bb: ; IS__TUNIT____-NEXT: ret [[STRUCT_ZOT:%.*]] undef ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@widget ; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: bb: @@ -27,13 +27,13 @@ } define void @baz(<8 x i32> %arg) local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@baz ; IS__TUNIT____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: bb: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@baz ; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__CGSCC____-NEXT: bb: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll b/llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll @@ -41,7 +41,7 @@ ; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i16 @bar() ; NOT_CGSCC_NPM-NEXT: ret i16 [[CALL]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo ; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: ret i16 0 @@ -51,17 +51,17 @@ } define internal i16 @bar(i16 %p1, i16 %p2) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i16 0 ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar ; IS__CGSCC_OPM-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: ret i16 0 ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: ret i16 undef @@ -80,13 +80,13 @@ } define internal i16 @bar2(i16 %p1, i16 %p2) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar2 ; IS__TUNIT____-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = add i16 [[P1]], [[P2]] ; IS__TUNIT____-NEXT: ret i16 [[A]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar2 ; IS__CGSCC____-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = add i16 [[P1]], [[P2]] @@ -116,7 +116,7 @@ } define internal i16 @vararg_prop(i16 %p1, ...) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@vararg_prop ; IS__CGSCC____-SAME: (i16 returned [[P1:%.*]], ...) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i16 7 @@ -125,12 +125,12 @@ } define internal i16 @vararg_no_prop(i16 %p1, i16 %p2, ...) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@vararg_no_prop ; IS__TUNIT____-SAME: (i16 returned [[P1:%.*]], i16 [[P2:%.*]], ...) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i16 7 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@vararg_no_prop ; IS__CGSCC____-SAME: (i16 returned [[P1:%.*]], i16 [[P2:%.*]], ...) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i16 7 diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll b/llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll @@ -18,12 +18,12 @@ } define internal i16 @bar(i16 %p1, i16 %p2) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar ; IS__TUNIT____-SAME: (i16 [[P1:%.*]], i16 returned [[P2:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i16 [[P2]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar ; IS__CGSCC____-SAME: (i16 [[P1:%.*]], i16 returned [[P2:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret i16 [[P2]] diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/comdat-ipo.ll b/llvm/test/Transforms/Attributor/IPConstantProp/comdat-ipo.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/comdat-ipo.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/comdat-ipo.ll @@ -7,12 +7,12 @@ ; See PR26774 define i32 @baz() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@baz ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i32 10 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@baz ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret i32 10 diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll b/llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll @@ -68,13 +68,13 @@ } define i32 @main() nounwind readnone { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@main ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@main ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/deadarg.ll b/llvm/test/Transforms/Attributor/IPConstantProp/deadarg.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/deadarg.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/deadarg.ll @@ -14,12 +14,12 @@ } define void @bar() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret void diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/global.ll b/llvm/test/Transforms/Attributor/IPConstantProp/global.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/global.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/global.ll @@ -7,7 +7,7 @@ @_ZL6test1g = internal global i32 42, align 4 define void @_Z7test1f1v() nounwind { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@_Z7test1f1v ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -20,7 +20,7 @@ ; IS__TUNIT____: if.end: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@_Z7test1f1v ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -47,14 +47,14 @@ } define i32 @_Z7test1f2v() nounwind { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@_Z7test1f2v ; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP:%.*]] = load i32, i32* @_ZL6test1g, align 4 ; IS__TUNIT____-NEXT: ret i32 [[TMP]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@_Z7test1f2v ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll b/llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll @@ -40,13 +40,13 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" define internal i32 @cb0(i32 %zero) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb0 ; IS__TUNIT____-SAME: (i32 returned [[ZERO:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cb0 ; IS__CGSCC____-SAME: (i32 returned [[ZERO:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -57,13 +57,13 @@ } define internal i32 @cb1(i32 %unknown) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb1 ; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 [[UNKNOWN]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cb1 ; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -74,13 +74,13 @@ } define internal i32 @cb2(i32 %unknown) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb2 ; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 [[UNKNOWN]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cb2 ; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -92,13 +92,13 @@ } define internal i32 @cb3(i32 %unknown) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb3 ; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 [[UNKNOWN]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cb3 ; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -109,13 +109,13 @@ } define internal i32 @cb4(i32 %unknown) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb4 ; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 [[UNKNOWN]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cb4 ; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll b/llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll @@ -80,7 +80,7 @@ } define internal i8* @no_side_effects(i8 %v) readonly nounwind { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@no_side_effects ; IS__CGSCC____-SAME: (i8 [[V:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret i8* undef diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll b/llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll @@ -67,13 +67,13 @@ declare !callback !0 dso_local i32 @pthread_create(i64*, %union.pthread_attr_t*, i8* (i8*)*, i8*) define internal i8* @foo(i8* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (i8* noalias nofree readnone returned align 536870912 "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i8* null ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (i8* noalias nofree readnone returned align 536870912 "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -84,13 +84,13 @@ } define internal i8* @bar(i8* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar ; IS__TUNIT____-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(8) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i8* bitcast (i8** @GlobalVPtr to i8*) ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar ; IS__CGSCC____-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(8) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -101,13 +101,13 @@ } define internal i8* @baz(i8* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@baz ; IS__TUNIT____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i8* [[ARG]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@baz ; IS__CGSCC____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -118,13 +118,13 @@ } define internal i8* @buz(i8* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@buz ; IS__TUNIT____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i8* [[ARG]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@buz ; IS__CGSCC____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/recursion.ll b/llvm/test/Transforms/Attributor/IPConstantProp/recursion.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/recursion.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/recursion.ll @@ -7,11 +7,6 @@ ; CHECK-NOT: %X define internal i32 @foo(i32 %X) { -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { -; IS__CGSCC____-NEXT: unreachable -; %Y = call i32 @foo( i32 %X ) ; [#uses=1] %Z = add i32 %Y, 1 ; [#uses=1] ret i32 %Z @@ -23,10 +18,10 @@ ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: () [[ATTR0]] { -; IS__CGSCC____-NEXT: unreachable +; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-NEXT: ret void ; call i32 @foo( i32 17 ) ; :1 [#uses=0] ret void diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/remove-call-inst.ll b/llvm/test/Transforms/Attributor/IPConstantProp/remove-call-inst.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/remove-call-inst.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/remove-call-inst.ll @@ -11,13 +11,13 @@ ; FIXME: Remove obsolete calls/instructions define i32 @main() noreturn nounwind { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@main ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 123 ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@main ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -29,7 +29,7 @@ } define internal i32 @wwrite(i64 %i) nounwind readnone { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@wwrite ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll b/llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll @@ -6,7 +6,7 @@ ;; This function returns its second argument on all return statements define internal i32* @incdec(i1 %C, i32* %V) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@incdec ; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4 @@ -20,7 +20,7 @@ ; IS__TUNIT____-NEXT: store i32 [[X2]], i32* [[V]], align 4 ; IS__TUNIT____-NEXT: ret i32* [[V]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@incdec ; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4 @@ -51,7 +51,7 @@ ;; This function returns its first argument as a part of a multiple return ;; value define internal { i32, i32 } @foo(i32 %A, i32 %B) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (i32 noundef [[A:%.*]], i32 noundef [[B:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: [[X:%.*]] = add i32 [[A]], [[B]] @@ -59,7 +59,7 @@ ; IS__TUNIT____-NEXT: [[Z:%.*]] = insertvalue { i32, i32 } [[Y]], i32 [[X]], 1 ; IS__TUNIT____-NEXT: ret { i32, i32 } [[Z]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (i32 noundef [[A:%.*]], i32 noundef [[B:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: [[X:%.*]] = add i32 [[A]], [[B]] @@ -79,9 +79,9 @@ ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR2:#.*]] personality i32 (...)* @__gxx_personality_v0 { ; IS__TUNIT____-NEXT: [[Q:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) [[ATTR1]] +; IS__TUNIT____-NEXT: [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) [[ATTR3:#.*]] ; IS__TUNIT____-NEXT: [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0 -; IS__TUNIT____-NEXT: [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) [[ATTR1]] +; IS__TUNIT____-NEXT: [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) [[ATTR3]] ; IS__TUNIT____-NEXT: br label [[OK:%.*]] ; IS__TUNIT____: OK: ; IS__TUNIT____-NEXT: [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0 @@ -93,7 +93,7 @@ ; IS__TUNIT____: RET: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] personality i32 (...)* @__gxx_personality_v0 { ; IS__CGSCC____-NEXT: [[Q:%.*]] = alloca i32, align 4 diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll b/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll @@ -7,7 +7,7 @@ ; FIXME: icmp folding is missing define i1 @invokecaller(i1 %C) personality i32 (...)* @__gxx_personality_v0 { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@invokecaller ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] personality i32 (...)* @__gxx_personality_v0 { ; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) [[ATTR1:#.*]] @@ -17,7 +17,7 @@ ; IS__TUNIT____: FAIL: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@invokecaller ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] personality i32 (...)* @__gxx_personality_v0 { ; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) [[ATTR1:#.*]] @@ -38,7 +38,7 @@ } define internal i32 @foo(i1 %C) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -47,7 +47,7 @@ ; IS__TUNIT____: F: ; IS__TUNIT____-NEXT: ret i32 undef ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -66,12 +66,12 @@ } define i1 @caller(i1 %C) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 true diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll b/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll @@ -9,7 +9,7 @@ %0 = type { i32, i32 } define internal %0 @foo(i1 %Q) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] @@ -22,7 +22,7 @@ ; IS__TUNIT____-NEXT: [[MRV3:%.*]] = insertvalue [[TMP0]] [[MRV2]], i32 23, 1 ; IS__TUNIT____-NEXT: ret [[TMP0]] [[MRV3]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] @@ -49,7 +49,7 @@ } define internal %0 @bar(i1 %Q) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar ; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 @@ -61,7 +61,7 @@ ; IS__TUNIT____-NEXT: [[C:%.*]] = insertvalue [[TMP0]] [[A]], i32 23, 1 ; IS__TUNIT____-NEXT: ret [[TMP0]] [[C]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar ; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 @@ -88,14 +88,14 @@ define %0 @caller(i1 %Q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller -; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { -; IS__TUNIT____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR0]] +; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR1]] ; IS__TUNIT____-NEXT: ret [[TMP0]] [[X]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller ; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { -; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR1:#.*]] +; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR2:#.*]] ; IS__CGSCC____-NEXT: ret [[TMP0]] [[X]] ; %X = call %0 @foo(i1 %Q) @@ -113,11 +113,11 @@ define i32 @caller2(i1 %Q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2 -; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { -; IS__TUNIT____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR0]] +; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) [[ATTR1]] { +; IS__TUNIT____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR1]] ; IS__TUNIT____-NEXT: [[A:%.*]] = extractvalue [[TMP0]] [[X]], 0 ; IS__TUNIT____-NEXT: [[B:%.*]] = extractvalue [[TMP0]] [[X]], 1 -; IS__TUNIT____-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) [[ATTR0]] +; IS__TUNIT____-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) [[ATTR1]] ; IS__TUNIT____-NEXT: [[C:%.*]] = extractvalue [[TMP0]] [[Y]], 0 ; IS__TUNIT____-NEXT: [[D:%.*]] = extractvalue [[TMP0]] [[Y]], 1 ; IS__TUNIT____-NEXT: [[M:%.*]] = add i32 [[A]], [[C]] @@ -127,11 +127,11 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2 -; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { -; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR1]] +; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR2]] ; IS__CGSCC____-NEXT: [[A:%.*]] = extractvalue [[TMP0]] [[X]], 0 ; IS__CGSCC____-NEXT: [[B:%.*]] = extractvalue [[TMP0]] [[X]], 1 -; IS__CGSCC____-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) [[ATTR1]] +; IS__CGSCC____-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) [[ATTR2]] ; IS__CGSCC____-NEXT: [[C:%.*]] = extractvalue [[TMP0]] [[Y]], 0 ; IS__CGSCC____-NEXT: [[D:%.*]] = extractvalue [[TMP0]] [[Y]], 1 ; IS__CGSCC____-NEXT: [[M:%.*]] = add i32 [[A]], [[C]] diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll b/llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll @@ -5,7 +5,7 @@ ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM define internal i32 @testf(i1 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@testf ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -31,7 +31,7 @@ } define internal i32 @test1(i1 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test1 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -64,7 +64,7 @@ ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i32 99 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@main ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 99 diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll b/llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll @@ -24,7 +24,7 @@ @gsh = dso_local global i32 0, align 4 define internal i32 @callee(i32* %thread_local_ptr, i32* %shared_ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@callee ; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[THREAD_LOCAL_PTR:%.*]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[SHARED_PTR:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -33,7 +33,7 @@ ; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP]], [[TMP1]] ; IS__TUNIT____-NEXT: ret i32 [[ADD]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee ; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[THREAD_LOCAL_PTR:%.*]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[SHARED_PTR:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/align.ll b/llvm/test/Transforms/Attributor/align.ll --- a/llvm/test/Transforms/Attributor/align.ll +++ b/llvm/test/Transforms/Attributor/align.ll @@ -12,12 +12,12 @@ ; TEST 1 define i32* @test1(i32* align 8 %0) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1 ; IS__TUNIT____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i32* [[TMP0]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test1 ; IS__CGSCC____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret i32* [[TMP0]] @@ -27,12 +27,12 @@ ; TEST 2 define i32* @test2(i32* %0) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 ; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32* [[TMP0]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 ; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[TMP0]] @@ -42,13 +42,13 @@ ; TEST 3 define i32* @test3(i32* align 8 %0, i32* align 4 %1, i1 %2) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test3 ; IS__TUNIT____-SAME: (i32* nofree readnone align 8 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 4 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]] ; IS__TUNIT____-NEXT: ret i32* [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test3 ; IS__CGSCC____-SAME: (i32* nofree readnone align 8 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 4 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]] @@ -60,13 +60,13 @@ ; TEST 4 define i32* @test4(i32* align 32 %0, i32* align 32 %1, i1 %2) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test4 ; IS__TUNIT____-SAME: (i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]] ; IS__TUNIT____-NEXT: ret i32* [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test4 ; IS__CGSCC____-SAME: (i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]] @@ -107,7 +107,7 @@ ; NOT_CGSCC_NPM-SAME: () [[ATTR1:#.*]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_1 ; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: unreachable @@ -122,7 +122,7 @@ ; NOT_CGSCC_NPM-SAME: () [[ATTR1]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_2 ; IS__CGSCC_NPM-SAME: () [[ATTR1]] { ; IS__CGSCC_NPM-NEXT: unreachable @@ -151,7 +151,7 @@ ; Function Attrs: nounwind readnone ssp uwtable define internal i8* @f1(i8* readnone %0) local_unnamed_addr #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@f1 ; IS__TUNIT____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: br label [[TMP3:%.*]] @@ -160,7 +160,7 @@ ; IS__TUNIT____: 3: ; IS__TUNIT____-NEXT: ret i8* [[TMP0]] ; -; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1 ; IS__CGSCC_OPM-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR2:#.*]] { ; IS__CGSCC_OPM-NEXT: br label [[TMP3:%.*]] @@ -169,7 +169,7 @@ ; IS__CGSCC_OPM: 3: ; IS__CGSCC_OPM-NEXT: ret i8* undef ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1 ; IS__CGSCC_NPM-SAME: () local_unnamed_addr [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]] @@ -227,13 +227,13 @@ ; TEST 7 ; Better than IR information define align 4 i8* @test7() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7 ; IS__TUNIT____-SAME: () [[ATTR0]] { -; IS__TUNIT____-NEXT: [[C:%.*]] = tail call i8* @f1(i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1) [[ATTR9:#.*]] +; IS__TUNIT____-NEXT: [[C:%.*]] = tail call i8* @f1(i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1) [[ATTR12:#.*]] ; IS__TUNIT____-NEXT: ret i8* [[C]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test7 ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i8* @a1 @@ -245,7 +245,7 @@ ; TEST 7b ; Function Attrs: nounwind readnone ssp uwtable define internal i8* @f1b(i8* readnone %0) local_unnamed_addr #0 { -; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1b ; IS__CGSCC_OPM-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR2]] { ; IS__CGSCC_OPM-NEXT: br label [[TMP3:%.*]] @@ -254,7 +254,7 @@ ; IS__CGSCC_OPM: 3: ; IS__CGSCC_OPM-NEXT: ret i8* undef ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1b ; IS__CGSCC_NPM-SAME: () local_unnamed_addr [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]] @@ -313,12 +313,12 @@ } define align 4 i32* @test7b(i32* align 32 %p) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7b ; IS__TUNIT____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32* [[P]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test7b ; IS__CGSCC____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[P]] @@ -520,14 +520,14 @@ define i64 @test11(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test11 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8 ; IS__TUNIT____-NEXT: ret i64 [[RET]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test11 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -544,7 +544,7 @@ ; FXIME: %p should have nonnull define i64 @test12-1(i32* align 4 %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-1 ; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -553,7 +553,7 @@ ; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16 ; IS__TUNIT____-NEXT: ret i64 [[RET]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-1 ; IS__CGSCC____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -570,7 +570,7 @@ } define i64 @test12-2(i32* align 4 %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-2 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -578,7 +578,7 @@ ; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16 ; IS__TUNIT____-NEXT: ret i64 [[RET]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-2 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -594,7 +594,7 @@ ; FXIME: %p should have nonnull define void @test12-3(i32* align 4 %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-3 ; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) [[ATTR5:#.*]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -603,7 +603,7 @@ ; IS__TUNIT____-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-3 ; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) [[ATTR5:#.*]] { ; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -620,7 +620,7 @@ } define void @test12-4(i32* align 4 %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-4 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR5]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -628,7 +628,7 @@ ; IS__TUNIT____-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-4 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR5]] { ; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* @@ -645,22 +645,22 @@ declare void @use(i64*) willreturn nounwind define void @test12-5(i32* align 4 %p) { -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn +; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn mustprogress ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test12-5 -; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR6:#.*]] { +; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR7:#.*]] { ; NOT_CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; NOT_CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 ; NOT_CGSCC_OPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 -; NOT_CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) [[ATTR6]] +; NOT_CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) [[ATTR6:#.*]] ; NOT_CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: nounwind willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-5 -; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR8:#.*]] { ; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 ; IS__CGSCC_OPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 -; IS__CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) [[ATTR7:#.*]] ; IS__CGSCC_OPM-NEXT: ret void ; %p-cast = bitcast i32* %p to i64* @@ -671,17 +671,17 @@ } define void @test12-6(i32* align 4 %p) { -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn +; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn mustprogress ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test12-6 -; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR6]] { +; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR7]] { ; NOT_CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; NOT_CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 ; NOT_CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) [[ATTR6]] ; NOT_CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: nounwind willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-6 -; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR7]] { +; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR8]] { ; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 ; IS__CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) [[ATTR7]] @@ -694,9 +694,9 @@ } define void @test13(i1 %c, i32* align 32 %dst) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR7:#.*]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8:#.*]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -707,9 +707,9 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test13 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8:#.*]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC____: truebb: ; IS__CGSCC____-NEXT: br label [[END:%.*]] @@ -732,9 +732,9 @@ } define void @test13-1(i1 %c, i32* align 32 %dst) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8:#.*]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR9:#.*]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -745,9 +745,9 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 16 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR9:#.*]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC____: truebb: ; IS__CGSCC____-NEXT: br label [[END:%.*]] @@ -770,9 +770,9 @@ } define void @test13-2(i1 %c, i32* align 32 %dst) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR9]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -783,9 +783,9 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR9]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC____: truebb: ; IS__CGSCC____-NEXT: br label [[END:%.*]] @@ -808,9 +808,9 @@ } define void @test13-3(i1 %c, i32* align 32 %dst) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-3 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR9]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -821,9 +821,9 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-3 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR9]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC____: truebb: ; IS__CGSCC____-NEXT: br label [[END:%.*]] @@ -847,15 +847,15 @@ ; Don't crash on ptr2int/int2ptr uses. define i64 @ptr2int(i32* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr2int -; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR10:#.*]] { ; IS__TUNIT____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 ; IS__TUNIT____-NEXT: ret i64 [[P2I]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr2int -; IS__CGSCC____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR9:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR10:#.*]] { ; IS__CGSCC____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 ; IS__CGSCC____-NEXT: ret i64 [[P2I]] ; @@ -863,15 +863,15 @@ ret i64 %p2i } define i64* @int2ptr(i64 %i) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@int2ptr -; IS__TUNIT____-SAME: (i64 [[I:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i64 [[I:%.*]]) [[ATTR10]] { ; IS__TUNIT____-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* ; IS__TUNIT____-NEXT: ret i64* [[I2P]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@int2ptr -; IS__CGSCC____-SAME: (i64 [[I:%.*]]) [[ATTR9]] { +; IS__CGSCC____-SAME: (i64 [[I:%.*]]) [[ATTR10]] { ; IS__CGSCC____-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* ; IS__CGSCC____-NEXT: ret i64* [[I2P]] ; @@ -881,13 +881,13 @@ ; Use the store alignment only for the pointer operand. define void @aligned_store(i8* %Value, i8** %Ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@aligned_store ; IS__TUNIT____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) [[ATTR5]] { ; IS__TUNIT____-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@aligned_store ; IS__CGSCC____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) [[ATTR5]] { ; IS__CGSCC____-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 @@ -911,14 +911,14 @@ } define void @align_store_after_bc(i32* align 2048 %arg) { ; -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@align_store_after_bc ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) [[ATTR5]] { ; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8* ; IS__TUNIT____-NEXT: store i8 0, i8* [[BC]], align 2048 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@align_store_after_bc ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) [[ATTR5]] { ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8* @@ -934,13 +934,13 @@ ; we cannot also put on the caller. @cnd = external global i1 define i32 @musttail_callee_1(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_callee_1 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[P:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 ; IS__TUNIT____-NEXT: ret i32 [[V]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@musttail_callee_1 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[P:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 @@ -950,35 +950,35 @@ ret i32 %v } define i32 @musttail_caller_1(i32* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR10:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR11:#.*]] { ; IS__TUNIT____-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: mt: -; IS__TUNIT____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree readonly [[P]]) [[ATTR10]] +; IS__TUNIT____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree readonly [[P]]) [[ATTR13:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[V]] ; IS__TUNIT____: exit: ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR11:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR12:#.*]] { ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1 ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]] ; IS__CGSCC_OPM: mt: -; IS__CGSCC_OPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]]) [[ATTR12:#.*]] +; IS__CGSCC_OPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]]) [[ATTR13:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[V]] ; IS__CGSCC_OPM: exit: ; IS__CGSCC_OPM-NEXT: ret i32 0 ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR10:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR11:#.*]] { ; IS__CGSCC_NPM-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1 ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]] ; IS__CGSCC_NPM: mt: -; IS__CGSCC_NPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]]) [[ATTR11:#.*]] +; IS__CGSCC_NPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]]) [[ATTR12:#.*]] ; IS__CGSCC_NPM-NEXT: ret i32 [[V]] ; IS__CGSCC_NPM: exit: ; IS__CGSCC_NPM-NEXT: ret i32 0 diff --git a/llvm/test/Transforms/Attributor/alwaysinline.ll b/llvm/test/Transforms/Attributor/alwaysinline.ll --- a/llvm/test/Transforms/Attributor/alwaysinline.ll +++ b/llvm/test/Transforms/Attributor/alwaysinline.ll @@ -10,13 +10,13 @@ ; the function is not exactly defined, and marked alwaysinline and can be inlined, ; so the function can be analyzed define linkonce void @inner1() alwaysinline { -; IS__TUNIT____: Function Attrs: alwaysinline nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: alwaysinline nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@inner1 ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: alwaysinline nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: alwaysinline nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@inner1 ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -27,13 +27,13 @@ } define void @outer1() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@outer1 ; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@outer1 ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/depgraph.ll b/llvm/test/Transforms/Attributor/depgraph.ll --- a/llvm/test/Transforms/Attributor/depgraph.ll +++ b/llvm/test/Transforms/Attributor/depgraph.ll @@ -57,6 +57,8 @@ ; GRAPH-EMPTY: ; GRAPH-NEXT: [AAWillReturn] for CtxI ' %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance@-1]} with state may-noreturn ; GRAPH-EMPTY: +; GRAPH-NEXT: [AAMustProgress] for CtxI ' %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance@-1]} with state may-not-progress +; GRAPH-EMPTY: ; GRAPH-NEXT: [AAUndefinedBehavior] for CtxI ' %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance@-1]} with state undefined-behavior ; GRAPH-EMPTY: ; GRAPH-NEXT: [AAValueSimplify] for CtxI ' %2 = load i32, i32* %0, align 4' at position {arg: [@0]} with state simplified diff --git a/llvm/test/Transforms/Attributor/dereferenceable-1.ll b/llvm/test/Transforms/Attributor/dereferenceable-1.ll --- a/llvm/test/Transforms/Attributor/dereferenceable-1.ll +++ b/llvm/test/Transforms/Attributor/dereferenceable-1.ll @@ -11,14 +11,14 @@ ; take mininimum of return values ; define i32* @test1(i32* dereferenceable(4) %0, double* dereferenceable(8) %1, i1 zeroext %2) local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1 ; IS__TUNIT____-SAME: (i32* nofree nonnull readnone dereferenceable(4) "no-capture-maybe-returned" [[TMP0:%.*]], double* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP1:%.*]], i1 zeroext [[TMP2:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: [[TMP4:%.*]] = bitcast double* [[TMP1]] to i32* ; IS__TUNIT____-NEXT: [[TMP5:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP4]] ; IS__TUNIT____-NEXT: ret i32* [[TMP5]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test1 ; IS__CGSCC____-SAME: (i32* nofree nonnull readnone dereferenceable(4) "no-capture-maybe-returned" [[TMP0:%.*]], double* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP1:%.*]], i1 zeroext [[TMP2:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: [[TMP4:%.*]] = bitcast double* [[TMP1]] to i32* @@ -32,14 +32,14 @@ ; TEST 2 define i32* @test2(i32* dereferenceable_or_null(4) %0, double* dereferenceable(8) %1, i1 zeroext %2) local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 ; IS__TUNIT____-SAME: (i32* nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP0:%.*]], double* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP1:%.*]], i1 zeroext [[TMP2:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP4:%.*]] = bitcast double* [[TMP1]] to i32* ; IS__TUNIT____-NEXT: [[TMP5:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP4]] ; IS__TUNIT____-NEXT: ret i32* [[TMP5]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 ; IS__CGSCC____-SAME: (i32* nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP0:%.*]], double* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP1:%.*]], i1 zeroext [[TMP2:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP4:%.*]] = bitcast double* [[TMP1]] to i32* @@ -54,13 +54,13 @@ ; TEST 3 ; GEP inbounds define i32* @test3_1(i32* dereferenceable(8) %0) local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test3_1 ; IS__TUNIT____-SAME: (i32* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: [[RET:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 1 ; IS__TUNIT____-NEXT: ret i32* [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test3_1 ; IS__CGSCC____-SAME: (i32* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 1 @@ -71,13 +71,13 @@ } define i32* @test3_2(i32* dereferenceable_or_null(32) %0) local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test3_2 ; IS__TUNIT____-SAME: (i32* nofree readnone dereferenceable_or_null(32) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: [[RET:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 4 ; IS__TUNIT____-NEXT: ret i32* [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test3_2 ; IS__CGSCC____-SAME: (i32* nofree readnone dereferenceable_or_null(32) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 4 @@ -88,7 +88,7 @@ } define i32* @test3_3(i32* dereferenceable(8) %0, i32* dereferenceable(16) %1, i1 %2) local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test3_3 ; IS__TUNIT____-SAME: (i32* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree nonnull readnone dereferenceable(16) "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: [[RET1:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 1 @@ -96,7 +96,7 @@ ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[RET1]], i32* [[RET2]] ; IS__TUNIT____-NEXT: ret i32* [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test3_3 ; IS__CGSCC____-SAME: (i32* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree nonnull readnone dereferenceable(16) "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET1:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 1 @@ -114,12 +114,12 @@ ; Better than known in IR. define dereferenceable(4) i32* @test4(i32* dereferenceable(8) %0) local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test4 ; IS__TUNIT____-SAME: (i32* nofree nonnull readnone returned dereferenceable(8) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32* [[TMP0]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test4 ; IS__CGSCC____-SAME: (i32* nofree nonnull readnone returned dereferenceable(8) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[TMP0]] @@ -234,10 +234,10 @@ declare i32* @unkown_ptr() willreturn nounwind declare i32 @unkown_f(i32*) willreturn nounwind define i32* @f7_0(i32* %ptr) { -; CHECK: Function Attrs: nounwind willreturn +; CHECK: Function Attrs: nounwind willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@f7_0 -; CHECK-SAME: (i32* nonnull returned dereferenceable(8) [[PTR:%.*]]) [[ATTR1:#.*]] { -; CHECK-NEXT: [[T:%.*]] = tail call i32 @unkown_f(i32* nonnull dereferenceable(8) [[PTR]]) [[ATTR1]] +; CHECK-SAME: (i32* nonnull returned dereferenceable(8) [[PTR:%.*]]) [[ATTR2:#.*]] { +; CHECK-NEXT: [[T:%.*]] = tail call i32 @unkown_f(i32* nonnull dereferenceable(8) [[PTR]]) [[ATTR1:#.*]] ; CHECK-NEXT: ret i32* [[PTR]] ; %T = tail call i32 @unkown_f(i32* dereferenceable(8) %ptr) @@ -245,9 +245,9 @@ } define void @f7_1(i32* %ptr, i1 %c) { -; CHECK: Function Attrs: nounwind willreturn +; CHECK: Function Attrs: nounwind willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@f7_1 -; CHECK-SAME: (i32* nonnull align 4 dereferenceable(4) [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i32* nonnull align 4 dereferenceable(4) [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR2]] { ; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* nonnull align 4 dereferenceable(4) [[PTR]]) [[ATTR1]] ; CHECK-NEXT: [[B:%.*]] = tail call i32 @unkown_f(i32* nonnull align 4 dereferenceable(4) [[PTR]]) [[ATTR1]] ; CHECK-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] @@ -275,9 +275,9 @@ } define void @f7_2(i1 %c) { -; CHECK: Function Attrs: nounwind willreturn +; CHECK: Function Attrs: nounwind willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@f7_2 -; CHECK-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i1 [[C:%.*]]) [[ATTR2]] { ; CHECK-NEXT: [[PTR:%.*]] = tail call nonnull align 4 dereferenceable(4) i32* @unkown_ptr() [[ATTR1]] ; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* nonnull align 4 dereferenceable(4) [[PTR]]) [[ATTR1]] ; CHECK-NEXT: [[ARG_A_0:%.*]] = load i32, i32* [[PTR]], align 4 @@ -307,9 +307,9 @@ } define i32* @f7_3() { -; CHECK: Function Attrs: nounwind willreturn +; CHECK: Function Attrs: nounwind willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@f7_3 -; CHECK-SAME: () [[ATTR1]] { +; CHECK-SAME: () [[ATTR2]] { ; CHECK-NEXT: [[PTR:%.*]] = tail call nonnull align 16 dereferenceable(4) i32* @unkown_ptr() [[ATTR1]] ; CHECK-NEXT: store i32 10, i32* [[PTR]], align 16 ; CHECK-NEXT: ret i32* [[PTR]] @@ -321,16 +321,16 @@ ; FIXME: This should have a return dereferenceable(8) but we need to make sure it will work in loops as well. define i32* @test_for_minus_index(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_for_minus_index -; IS__TUNIT____-SAME: (i32* nofree nonnull writeonly align 4 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree nonnull writeonly align 4 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR3:#.*]] { ; IS__TUNIT____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 -2 ; IS__TUNIT____-NEXT: store i32 1, i32* [[Q]], align 4 ; IS__TUNIT____-NEXT: ret i32* [[Q]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_for_minus_index -; IS__CGSCC____-SAME: (i32* nofree nonnull writeonly align 4 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree nonnull writeonly align 4 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 -2 ; IS__CGSCC____-NEXT: store i32 1, i32* [[Q]], align 4 ; IS__CGSCC____-NEXT: ret i32* [[Q]] @@ -341,15 +341,15 @@ } define void @deref_or_null_and_nonnull(i32* dereferenceable_or_null(100) %0) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@deref_or_null_and_nonnull -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(100) [[TMP0:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(100) [[TMP0:%.*]]) [[ATTR3]] { ; IS__TUNIT____-NEXT: store i32 1, i32* [[TMP0]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@deref_or_null_and_nonnull -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(100) [[TMP0:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(100) [[TMP0:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: store i32 1, i32* [[TMP0]], align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -368,7 +368,7 @@ define void @test8(i8* %ptr) #0 { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test8 -; IS__TUNIT_OPM-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT_OPM-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT_OPM-NEXT: br label [[TMP1:%.*]] ; IS__TUNIT_OPM: 1: ; IS__TUNIT_OPM-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ] @@ -383,9 +383,9 @@ ; IS__TUNIT_OPM: 7: ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test8 -; IS__TUNIT_NPM-SAME: (i8* nocapture nofree nonnull writeonly dereferenceable(21) [[PTR:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT_NPM-SAME: (i8* nocapture nofree nonnull writeonly dereferenceable(21) [[PTR:%.*]]) [[ATTR3:#.*]] { ; IS__TUNIT_NPM-NEXT: br label [[TMP1:%.*]] ; IS__TUNIT_NPM: 1: ; IS__TUNIT_NPM-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ] @@ -402,7 +402,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test8 -; IS__CGSCC_OPM-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC_OPM-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC_OPM-NEXT: br label [[TMP1:%.*]] ; IS__CGSCC_OPM: 1: ; IS__CGSCC_OPM-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ] @@ -417,9 +417,9 @@ ; IS__CGSCC_OPM: 7: ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test8 -; IS__CGSCC_NPM-SAME: (i8* nocapture nofree nonnull writeonly dereferenceable(21) [[PTR:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC_NPM-SAME: (i8* nocapture nofree nonnull writeonly dereferenceable(21) [[PTR:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP1:%.*]] ; IS__CGSCC_NPM: 1: ; IS__CGSCC_NPM-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ] @@ -452,17 +452,17 @@ ; 8.2 (negative case) define void @test8_neg(i32 %i, i8* %ptr) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test8_neg -; IS__TUNIT____-SAME: (i32 [[I:%.*]], i8* nocapture nofree nonnull writeonly [[PTR:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i32 [[I:%.*]], i8* nocapture nofree nonnull writeonly [[PTR:%.*]]) [[ATTR3]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = sext i32 [[I]] to i64 ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = getelementptr inbounds i8, i8* [[PTR]], i64 [[TMP1]] ; IS__TUNIT____-NEXT: store i8 65, i8* [[TMP2]], align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test8_neg -; IS__CGSCC____-SAME: (i32 [[I:%.*]], i8* nocapture nofree nonnull writeonly [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32 [[I:%.*]], i8* nocapture nofree nonnull writeonly [[PTR:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = sext i32 [[I]] to i64 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = getelementptr inbounds i8, i8* [[PTR]], i64 [[TMP1]] ; IS__CGSCC____-NEXT: store i8 65, i8* [[TMP2]], align 1 @@ -485,7 +485,7 @@ define internal void @fill_range_not_inbounds(i32* %p, i64 %start){ ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@fill_range_not_inbounds -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR3]] { +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR4]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__TUNIT_OPM-NEXT: br label [[FOR_BODY:%.*]] @@ -500,9 +500,9 @@ ; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i64 [[I_06]], [[TMP0]] ; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@fill_range_not_inbounds -; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR2]] { +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR3]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__TUNIT_NPM-NEXT: br label [[FOR_BODY:%.*]] @@ -519,7 +519,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fill_range_not_inbounds -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR3]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR4]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__CGSCC_OPM-NEXT: br label [[FOR_BODY:%.*]] @@ -534,9 +534,9 @@ ; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp slt i64 [[I_06]], [[TMP0]] ; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fill_range_not_inbounds -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR2]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR3]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__CGSCC_NPM-NEXT: br label [[FOR_BODY:%.*]] @@ -572,7 +572,7 @@ define internal void @fill_range_inbounds(i32* %p, i64 %start){ ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@fill_range_inbounds -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR3]] { +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR4]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__TUNIT_OPM-NEXT: br label [[FOR_BODY:%.*]] @@ -587,9 +587,9 @@ ; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i64 [[I_06]], [[TMP0]] ; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@fill_range_inbounds -; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR2]] { +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR3]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__TUNIT_NPM-NEXT: br label [[FOR_BODY:%.*]] @@ -606,7 +606,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fill_range_inbounds -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR3]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR4]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__CGSCC_OPM-NEXT: br label [[FOR_BODY:%.*]] @@ -621,9 +621,9 @@ ; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp slt i64 [[I_06]], [[TMP0]] ; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fill_range_inbounds -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR2]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) [[ATTR3]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__CGSCC_NPM-NEXT: br label [[FOR_BODY:%.*]] @@ -658,38 +658,38 @@ define void @call_fill_range(i32* nocapture %p, i64* nocapture readonly %range) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@call_fill_range -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR5:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, [[RNG0:!range !.*]] -; IS__TUNIT_OPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR6:#.*]] -; IS__TUNIT_OPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR6]] +; IS__TUNIT_OPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR7:#.*]] +; IS__TUNIT_OPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR7]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@call_fill_range -; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, [[RNG0:!range !.*]] -; IS__TUNIT_NPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR6:#.*]] -; IS__TUNIT_NPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR6]] +; IS__TUNIT_NPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR7:#.*]] +; IS__TUNIT_NPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR7]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@call_fill_range -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR5:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, [[RNG0:!range !.*]] -; IS__CGSCC_OPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR7:#.*]] -; IS__CGSCC_OPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR8:#.*]] +; IS__CGSCC_OPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR8]] ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@call_fill_range -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, [[RNG0:!range !.*]] -; IS__CGSCC_NPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR6:#.*]] -; IS__CGSCC_NPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR6]] +; IS__CGSCC_NPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR7:#.*]] +; IS__CGSCC_NPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) [[ATTR7]] ; IS__CGSCC_NPM-NEXT: ret void ; entry: @@ -711,9 +711,9 @@ ; fun2(dereferenceable(4) %a, %b) ; We can say that %a is dereferenceable(4) but %b is not. define void @simple-path(i8* %a, i8 * %b, i8 %c) { -; CHECK: Function Attrs: nounwind willreturn +; CHECK: Function Attrs: nounwind willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@simple-path -; CHECK-SAME: (i8* nonnull dereferenceable(4) [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i8* nonnull dereferenceable(4) [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR2]] { ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 ; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; CHECK: if.then: @@ -746,9 +746,9 @@ ; } ; %a is dereferenceable(12) define void @complex-path(i8* %a, i8* %b, i8 %c) { -; CHECK: Function Attrs: nounwind willreturn +; CHECK: Function Attrs: nounwind willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@complex-path -; CHECK-SAME: (i8* nonnull dereferenceable(12) [[A:%.*]], i8* nocapture nofree readnone [[B:%.*]], i8 [[C:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i8* nonnull dereferenceable(12) [[A:%.*]], i8* nocapture nofree readnone [[B:%.*]], i8 [[C:%.*]]) [[ATTR2]] { ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 ; CHECK-NEXT: tail call void @use1(i8* nonnull dereferenceable(12) [[A]]) [[ATTR1]] ; CHECK-NEXT: br i1 [[CMP]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]] @@ -792,9 +792,9 @@ ; ; FIXME: %ptr should be dereferenceable(4) define dso_local void @rec-branch-1(i32 %a, i32 %b, i32 %c, i32* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@rec-branch-1 -; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR3]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[A]], 0 ; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_ELSE3:%.*]], label [[IF_THEN:%.*]] @@ -819,9 +819,9 @@ ; IS__TUNIT____: if.end8: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@rec-branch-1 -; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[A]], 0 ; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_ELSE3:%.*]], label [[IF_THEN:%.*]] @@ -895,7 +895,7 @@ define dso_local void @rec-branch-2(i32 %a, i32 %b, i32 %c, i32* %ptr) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@rec-branch-2 -; IS__TUNIT_OPM-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR3]] { +; IS__TUNIT_OPM-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR4]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[A]], 0 ; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_ELSE3:%.*]], label [[IF_THEN:%.*]] @@ -915,14 +915,14 @@ ; IS__TUNIT_OPM-NEXT: store i32 3, i32* [[PTR]], align 4 ; IS__TUNIT_OPM-NEXT: br label [[IF_END8]] ; IS__TUNIT_OPM: if.else6: -; IS__TUNIT_OPM-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, i32* nocapture nofree writeonly [[PTR]]) [[ATTR6]] +; IS__TUNIT_OPM-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, i32* nocapture nofree writeonly [[PTR]]) [[ATTR7]] ; IS__TUNIT_OPM-NEXT: br label [[IF_END8]] ; IS__TUNIT_OPM: if.end8: ; IS__TUNIT_OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: argmemonly nofree nosync nounwind writeonly ; IS________NPM-LABEL: define {{[^@]+}}@rec-branch-2 -; IS________NPM-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR4:#.*]] { +; IS________NPM-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR5:#.*]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[A]], 0 ; IS________NPM-NEXT: br i1 [[TOBOOL]], label [[IF_ELSE3:%.*]], label [[IF_THEN:%.*]] @@ -942,14 +942,14 @@ ; IS________NPM-NEXT: store i32 3, i32* [[PTR]], align 4 ; IS________NPM-NEXT: br label [[IF_END8]] ; IS________NPM: if.else6: -; IS________NPM-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, i32* nocapture nofree writeonly [[PTR]]) [[ATTR7:#.*]] +; IS________NPM-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, i32* nocapture nofree writeonly [[PTR]]) [[ATTR8:#.*]] ; IS________NPM-NEXT: br label [[IF_END8]] ; IS________NPM: if.end8: ; IS________NPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@rec-branch-2 -; IS__CGSCC_OPM-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR5:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) [[ATTR6:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[A]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_ELSE3:%.*]], label [[IF_THEN:%.*]] @@ -969,7 +969,7 @@ ; IS__CGSCC_OPM-NEXT: store i32 3, i32* [[PTR]], align 4 ; IS__CGSCC_OPM-NEXT: br label [[IF_END8]] ; IS__CGSCC_OPM: if.else6: -; IS__CGSCC_OPM-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, i32* nocapture nofree writeonly [[PTR]]) [[ATTR8:#.*]] +; IS__CGSCC_OPM-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, i32* nocapture nofree writeonly [[PTR]]) [[ATTR9:#.*]] ; IS__CGSCC_OPM-NEXT: br label [[IF_END8]] ; IS__CGSCC_OPM: if.end8: ; IS__CGSCC_OPM-NEXT: ret void @@ -1016,19 +1016,19 @@ ; ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@nonnull_assume_pos ; IS__TUNIT_OPM-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(101) [[ARG1:%.*]], i8* nocapture nofree readnone dereferenceable_or_null(31) [[ARG2:%.*]], i8* nocapture nofree nonnull readnone [[ARG3:%.*]], i8* nocapture nofree readnone dereferenceable_or_null(42) [[ARG4:%.*]]) { -; IS__TUNIT_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR7:#.*]] [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i8* [[ARG1]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] +; IS__TUNIT_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR8:#.*]] [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i8* [[ARG1]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] ; IS__TUNIT_OPM-NEXT: call void @unknown() ; IS__TUNIT_OPM-NEXT: ret void ; ; IS________NPM-LABEL: define {{[^@]+}}@nonnull_assume_pos ; IS________NPM-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(101) [[ARG1:%.*]], i8* nocapture nofree readnone dereferenceable_or_null(31) [[ARG2:%.*]], i8* nocapture nofree nonnull readnone [[ARG3:%.*]], i8* nocapture nofree readnone dereferenceable_or_null(42) [[ARG4:%.*]]) { -; IS________NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR8:#.*]] [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i8* [[ARG1]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] +; IS________NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR9:#.*]] [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i8* [[ARG1]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] ; IS________NPM-NEXT: call void @unknown() ; IS________NPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_assume_pos ; IS__CGSCC_OPM-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(101) [[ARG1:%.*]], i8* nocapture nofree readnone dereferenceable_or_null(31) [[ARG2:%.*]], i8* nocapture nofree nonnull readnone [[ARG3:%.*]], i8* nocapture nofree readnone dereferenceable_or_null(42) [[ARG4:%.*]]) { -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR9:#.*]] [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i8* [[ARG1]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] +; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR10:#.*]] [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i8* [[ARG1]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] ; IS__CGSCC_OPM-NEXT: call void @unknown() ; IS__CGSCC_OPM-NEXT: ret void ; @@ -1075,54 +1075,54 @@ ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@nonnull_assume_call ; IS__TUNIT_OPM-SAME: (i8* [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* [[ARG3:%.*]], i8* [[ARG4:%.*]]) { ; IS__TUNIT_OPM-NEXT: call void @unknown() -; IS__TUNIT_OPM-NEXT: [[P:%.*]] = call nonnull dereferenceable(101) i32* @unkown_ptr() [[ATTR8:#.*]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR8]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR8]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR8]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR8]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR8]] +; IS__TUNIT_OPM-NEXT: [[P:%.*]] = call nonnull dereferenceable(101) i32* @unkown_ptr() [[ATTR9:#.*]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR9]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR9]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR9]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR9]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR9]] ; IS__TUNIT_OPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i32* [[P]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] -; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR8]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR8]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR8]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR8]] -; IS__TUNIT_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR8]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR9]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR9]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR9]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR9]] +; IS__TUNIT_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR9]] ; IS__TUNIT_OPM-NEXT: call void @unknown() ; IS__TUNIT_OPM-NEXT: ret void ; ; IS________NPM-LABEL: define {{[^@]+}}@nonnull_assume_call ; IS________NPM-SAME: (i8* [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* [[ARG3:%.*]], i8* [[ARG4:%.*]]) { ; IS________NPM-NEXT: call void @unknown() -; IS________NPM-NEXT: [[P:%.*]] = call nonnull dereferenceable(101) i32* @unkown_ptr() [[ATTR9:#.*]] -; IS________NPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR9]] -; IS________NPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR9]] -; IS________NPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR9]] -; IS________NPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR9]] -; IS________NPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR9]] +; IS________NPM-NEXT: [[P:%.*]] = call nonnull dereferenceable(101) i32* @unkown_ptr() [[ATTR10:#.*]] +; IS________NPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR10]] +; IS________NPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR10]] +; IS________NPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR10]] +; IS________NPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR10]] +; IS________NPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR10]] ; IS________NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i32* [[P]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] -; IS________NPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR9]] -; IS________NPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR9]] -; IS________NPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR9]] -; IS________NPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR9]] -; IS________NPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR9]] +; IS________NPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR10]] +; IS________NPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR10]] +; IS________NPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR10]] +; IS________NPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR10]] +; IS________NPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR10]] ; IS________NPM-NEXT: call void @unknown() ; IS________NPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_assume_call ; IS__CGSCC_OPM-SAME: (i8* [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* [[ARG3:%.*]], i8* [[ARG4:%.*]]) { ; IS__CGSCC_OPM-NEXT: call void @unknown() -; IS__CGSCC_OPM-NEXT: [[P:%.*]] = call nonnull dereferenceable(101) i32* @unkown_ptr() [[ATTR10:#.*]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR10]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR10]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR10]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR10]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR10]] +; IS__CGSCC_OPM-NEXT: [[P:%.*]] = call nonnull dereferenceable(101) i32* @unkown_ptr() [[ATTR11:#.*]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR11]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR11]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR11]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR11]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR11]] ; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG3]]), "dereferenceable"(i8* [[ARG1]], i64 1), "dereferenceable"(i8* [[ARG1]], i64 2), "dereferenceable"(i32* [[P]], i64 101), "dereferenceable_or_null"(i8* [[ARG2]], i64 31), "dereferenceable_or_null"(i8* [[ARG4]], i64 42) ] -; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR10]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR10]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR10]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR10]] -; IS__CGSCC_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR10]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) [[ATTR11]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) [[ATTR11]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) [[ATTR11]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) [[ATTR11]] +; IS__CGSCC_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) [[ATTR11]] ; IS__CGSCC_OPM-NEXT: call void @unknown() ; IS__CGSCC_OPM-NEXT: ret void ; diff --git a/llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll b/llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll --- a/llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll +++ b/llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll @@ -8,7 +8,7 @@ ; https://bugs.llvm.org/show_bug.cgi?id=21780 define <4 x double> @PR21780(double* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780 ; IS__TUNIT____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 1 @@ -25,7 +25,7 @@ ; IS__TUNIT____-NEXT: [[SHUFFLE:%.*]] = shufflevector <4 x double> [[VECINIT3]], <4 x double> [[VECINIT3]], <4 x i32> ; IS__TUNIT____-NEXT: ret <4 x double> [[SHUFFLE]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780 ; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 1 @@ -63,14 +63,14 @@ define double @PR21780_only_access3_with_inbounds(double* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_only_access3_with_inbounds ; IS__TUNIT____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 3 ; IS__TUNIT____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__TUNIT____-NEXT: ret double [[T3]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780_only_access3_with_inbounds ; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 3 @@ -84,14 +84,14 @@ } define double @PR21780_only_access3_without_inbounds(double* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_only_access3_without_inbounds ; IS__TUNIT____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 ; IS__TUNIT____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__TUNIT____-NEXT: ret double [[T3]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780_only_access3_without_inbounds ; IS__CGSCC____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 @@ -104,14 +104,14 @@ } define double @PR21780_without_inbounds(double* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_without_inbounds ; IS__TUNIT____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 ; IS__TUNIT____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__TUNIT____-NEXT: ret double [[T3]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780_without_inbounds ; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 @@ -134,7 +134,7 @@ ; Unsimplified, but still valid. Also, throw in some bogus arguments. define void @gep0(i8* %unused, i8* %other, i8* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep0 ; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr i8, i8* [[PTR]], i64 2 @@ -142,7 +142,7 @@ ; IS__TUNIT____-NEXT: store i8 [[T2]], i8* [[OTHER]], align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@gep0 ; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr i8, i8* [[PTR]], i64 2 @@ -164,12 +164,12 @@ ; Multiple arguments may be dereferenceable. define void @ordering(i8* %ptr1, i32* %ptr2) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ordering ; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR1:%.*]], i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) [[ATTR2:#.*]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ordering ; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR1:%.*]], i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC____-NEXT: ret void @@ -190,7 +190,7 @@ ; Not in entry block. define void @not_entry_but_guaranteed_to_execute(i8* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_but_guaranteed_to_execute ; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: entry: @@ -198,7 +198,7 @@ ; IS__TUNIT____: exit: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_but_guaranteed_to_execute ; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: entry: @@ -221,7 +221,7 @@ ; Not in entry block and not guaranteed to execute. define void @not_entry_not_guaranteed_to_execute(i8* %ptr, i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute ; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: entry: @@ -231,7 +231,7 @@ ; IS__TUNIT____: exit: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute ; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: entry: @@ -258,7 +258,7 @@ ; The last load may not execute, so derefenceable bytes only covers the 1st two loads. define void @partial_in_entry(i16* %ptr, i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@partial_in_entry ; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: entry: @@ -268,7 +268,7 @@ ; IS__TUNIT____: exit: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@partial_in_entry ; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: entry: @@ -296,14 +296,14 @@ ; The 2nd and 3rd loads may never execute. define void @volatile_is_not_dereferenceable(i16* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@volatile_is_not_dereferenceable ; IS__TUNIT____-SAME: (i16* nofree align 2 [[PTR:%.*]]) [[ATTR3:#.*]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i16, i16* [[PTR]], i64 0 ; IS__TUNIT____-NEXT: [[T0:%.*]] = load volatile i16, i16* [[ARRAYIDX0]], align 2 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@volatile_is_not_dereferenceable ; IS__CGSCC____-SAME: (i16* nofree align 2 [[PTR:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i16, i16* [[PTR]], i64 0 @@ -322,12 +322,12 @@ ; TODO: We should allow inference for atomic (but not volatile) ops. define void @atomic_is_alright(i16* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomic_is_alright ; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomic_is_alright ; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -362,12 +362,12 @@ ; We must have consecutive accesses. define void @variable_gep_index(i8* %unused, i8* %ptr, i64 %variable_index) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@variable_gep_index ; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]], i64 [[VARIABLE_INDEX:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@variable_gep_index ; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]], i64 [[VARIABLE_INDEX:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -384,12 +384,12 @@ define void @multi_index_gep(<4 x i8>* %ptr) { ; FIXME: %ptr should be dereferenceable(4) -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@multi_index_gep ; IS__TUNIT____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@multi_index_gep ; IS__CGSCC____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -402,12 +402,12 @@ ; Could round weird bitwidths down? define void @not_byte_multiple(i9* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_byte_multiple ; IS__TUNIT____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_byte_multiple ; IS__CGSCC____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -420,12 +420,12 @@ ; Missing direct access from the pointer. define void @no_pointer_deref(i16* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@no_pointer_deref ; IS__TUNIT____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@no_pointer_deref ; IS__CGSCC____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -440,12 +440,12 @@ ; Out-of-order is ok, but missing access concludes dereferenceable range. define void @non_consecutive(i32* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@non_consecutive ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_consecutive ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -462,12 +462,12 @@ ; Improve on existing dereferenceable attribute. define void @more_bytes(i32* dereferenceable(8) %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@more_bytes ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@more_bytes ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -486,12 +486,12 @@ ; Improve on existing dereferenceable_or_null attribute. define void @more_bytes_and_not_null(i32* dereferenceable_or_null(8) %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@more_bytes_and_not_null ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@more_bytes_and_not_null ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -510,12 +510,12 @@ ; But don't pessimize existing dereferenceable attribute. define void @better_bytes(i32* dereferenceable(100) %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@better_bytes ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@better_bytes ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -532,12 +532,12 @@ } define void @bitcast(i32* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcast ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bitcast ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -551,12 +551,12 @@ } define void @bitcast_different_sizes(double* %arg1, i8* %arg2) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcast_different_sizes ; IS__TUNIT____-SAME: (double* nocapture nofree nonnull readnone align 4 dereferenceable(12) [[ARG1:%.*]], i8* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[ARG2:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bitcast_different_sizes ; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readnone align 4 dereferenceable(12) [[ARG1:%.*]], i8* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[ARG2:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -578,12 +578,12 @@ } define void @negative_offset(i32* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_offset ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_offset ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -597,7 +597,7 @@ } define void @stores(i32* %arg) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@stores ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* @@ -607,7 +607,7 @@ ; IS__TUNIT____-NEXT: store float 2.000000e+00, float* [[ARRAYIDX1]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@stores ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* @@ -626,7 +626,7 @@ } define void @load_store(i32* %arg) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_store ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* @@ -634,7 +634,7 @@ ; IS__TUNIT____-NEXT: store float 2.000000e+00, float* [[ARRAYIDX1]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_store ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* @@ -651,7 +651,7 @@ } define void @different_size1(i32* %arg) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@different_size1 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* @@ -659,7 +659,7 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[ARG]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@different_size1 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* @@ -674,7 +674,7 @@ } define void @different_size2(i32* %arg) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@different_size2 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: store i32 0, i32* [[ARG]], align 8 @@ -682,7 +682,7 @@ ; IS__TUNIT____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@different_size2 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[ARG]], align 8 @@ -715,7 +715,7 @@ ; ; ATTRIBUTOR_CGSCC_NPM-LABEL: define i32 @require_cfg_analysis(i32 %c, i32* {{.*}} dereferenceable(4) %p) define i32 @require_cfg_analysis(i32 %c, i32* %p) { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@require_cfg_analysis ; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT_OPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 @@ -742,7 +742,7 @@ ; IS__TUNIT_OPM: end: ; IS__TUNIT_OPM-NEXT: ret i32 1 ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@require_cfg_analysis ; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 @@ -768,7 +768,7 @@ ; IS__TUNIT_NPM: end: ; IS__TUNIT_NPM-NEXT: ret i32 1 ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@require_cfg_analysis ; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC_OPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 @@ -795,7 +795,7 @@ ; IS__CGSCC_OPM: end: ; IS__CGSCC_OPM-NEXT: ret i32 1 ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@require_cfg_analysis ; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 diff --git a/llvm/test/Transforms/Attributor/dereferenceable-2.ll b/llvm/test/Transforms/Attributor/dereferenceable-2.ll --- a/llvm/test/Transforms/Attributor/dereferenceable-2.ll +++ b/llvm/test/Transforms/Attributor/dereferenceable-2.ll @@ -8,7 +8,7 @@ ; https://bugs.llvm.org/show_bug.cgi?id=21780 define <4 x double> @PR21780(double* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780 ; IS__TUNIT____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 1 @@ -25,7 +25,7 @@ ; IS__TUNIT____-NEXT: [[SHUFFLE:%.*]] = shufflevector <4 x double> [[VECINIT3]], <4 x double> [[VECINIT3]], <4 x i32> ; IS__TUNIT____-NEXT: ret <4 x double> [[SHUFFLE]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780 ; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 1 @@ -63,14 +63,14 @@ define double @PR21780_only_access3_with_inbounds(double* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_only_access3_with_inbounds ; IS__TUNIT____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 3 ; IS__TUNIT____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__TUNIT____-NEXT: ret double [[T3]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780_only_access3_with_inbounds ; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 3 @@ -84,14 +84,14 @@ } define double @PR21780_only_access3_without_inbounds(double* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_only_access3_without_inbounds ; IS__TUNIT____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 ; IS__TUNIT____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__TUNIT____-NEXT: ret double [[T3]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780_only_access3_without_inbounds ; IS__CGSCC____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 @@ -104,14 +104,14 @@ } define double @PR21780_without_inbounds(double* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_without_inbounds ; IS__TUNIT____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 ; IS__TUNIT____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__TUNIT____-NEXT: ret double [[T3]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780_without_inbounds ; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 @@ -134,7 +134,7 @@ ; Unsimplified, but still valid. Also, throw in some bogus arguments. define void @gep0(i8* %unused, i8* %other, i8* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep0 ; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr i8, i8* [[PTR]], i64 2 @@ -142,7 +142,7 @@ ; IS__TUNIT____-NEXT: store i8 [[T2]], i8* [[OTHER]], align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@gep0 ; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr i8, i8* [[PTR]], i64 2 @@ -164,12 +164,12 @@ ; Multiple arguments may be dereferenceable. define void @ordering(i8* %ptr1, i32* %ptr2) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ordering ; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR1:%.*]], i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) [[ATTR2:#.*]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ordering ; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR1:%.*]], i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC____-NEXT: ret void @@ -190,7 +190,7 @@ ; Not in entry block. define void @not_entry_but_guaranteed_to_execute(i8* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_but_guaranteed_to_execute ; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: entry: @@ -198,7 +198,7 @@ ; IS__TUNIT____: exit: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_but_guaranteed_to_execute ; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: entry: @@ -221,7 +221,7 @@ ; Not in entry block and not guaranteed to execute. define void @not_entry_not_guaranteed_to_execute(i8* %ptr, i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute ; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: entry: @@ -231,7 +231,7 @@ ; IS__TUNIT____: exit: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute ; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: entry: @@ -258,7 +258,7 @@ ; The last load may not execute, so derefenceable bytes only covers the 1st two loads. define void @partial_in_entry(i16* %ptr, i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@partial_in_entry ; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: entry: @@ -268,7 +268,7 @@ ; IS__TUNIT____: exit: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@partial_in_entry ; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: entry: @@ -296,14 +296,14 @@ ; The 2nd and 3rd loads may never execute. define void @volatile_is_not_dereferenceable(i16* %ptr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@volatile_is_not_dereferenceable ; IS__TUNIT____-SAME: (i16* nofree align 2 [[PTR:%.*]]) [[ATTR3:#.*]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i16, i16* [[PTR]], i64 0 ; IS__TUNIT____-NEXT: [[T0:%.*]] = load volatile i16, i16* [[ARRAYIDX0]], align 2 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@volatile_is_not_dereferenceable ; IS__CGSCC____-SAME: (i16* nofree align 2 [[PTR:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i16, i16* [[PTR]], i64 0 @@ -322,12 +322,12 @@ ; TODO: We should allow inference for atomic (but not volatile) ops. define void @atomic_is_alright(i16* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomic_is_alright ; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomic_is_alright ; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -362,12 +362,12 @@ ; We must have consecutive accesses. define void @variable_gep_index(i8* %unused, i8* %ptr, i64 %variable_index) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@variable_gep_index ; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]], i64 [[VARIABLE_INDEX:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@variable_gep_index ; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]], i64 [[VARIABLE_INDEX:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -384,12 +384,12 @@ define void @multi_index_gep(<4 x i8>* %ptr) { ; FIXME: %ptr should be dereferenceable(4) -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@multi_index_gep ; IS__TUNIT____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@multi_index_gep ; IS__CGSCC____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -402,12 +402,12 @@ ; Could round weird bitwidths down? define void @not_byte_multiple(i9* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_byte_multiple ; IS__TUNIT____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_byte_multiple ; IS__CGSCC____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -420,12 +420,12 @@ ; Missing direct access from the pointer. define void @no_pointer_deref(i16* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@no_pointer_deref ; IS__TUNIT____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@no_pointer_deref ; IS__CGSCC____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -440,12 +440,12 @@ ; Out-of-order is ok, but missing access concludes dereferenceable range. define void @non_consecutive(i32* %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@non_consecutive ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_consecutive ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -462,12 +462,12 @@ ; Improve on existing dereferenceable attribute. define void @more_bytes(i32* dereferenceable(8) %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@more_bytes ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@more_bytes ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -486,12 +486,12 @@ ; Improve on existing dereferenceable_or_null attribute. define void @more_bytes_and_not_null(i32* dereferenceable_or_null(8) %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@more_bytes_and_not_null ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@more_bytes_and_not_null ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -510,12 +510,12 @@ ; But don't pessimize existing dereferenceable attribute. define void @better_bytes(i32* dereferenceable(100) %ptr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@better_bytes ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@better_bytes ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -532,12 +532,12 @@ } define void @bitcast(i32* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcast ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bitcast ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -551,12 +551,12 @@ } define void @bitcast_different_sizes(double* %arg1, i8* %arg2) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcast_different_sizes ; IS__TUNIT____-SAME: (double* nocapture nofree nonnull readnone align 4 dereferenceable(12) [[ARG1:%.*]], i8* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[ARG2:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bitcast_different_sizes ; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readnone align 4 dereferenceable(12) [[ARG1:%.*]], i8* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[ARG2:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -578,12 +578,12 @@ } define void @negative_offset(i32* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_offset ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR2]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_offset ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: ret void @@ -597,7 +597,7 @@ } define void @stores(i32* %arg) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@stores ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* @@ -607,7 +607,7 @@ ; IS__TUNIT____-NEXT: store float 2.000000e+00, float* [[ARRAYIDX1]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@stores ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* @@ -626,7 +626,7 @@ } define void @load_store(i32* %arg) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_store ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* @@ -634,7 +634,7 @@ ; IS__TUNIT____-NEXT: store float 2.000000e+00, float* [[ARRAYIDX1]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_store ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* @@ -651,7 +651,7 @@ } define void @different_size1(i32* %arg) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@different_size1 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* @@ -659,7 +659,7 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[ARG]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@different_size1 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* @@ -674,7 +674,7 @@ } define void @different_size2(i32* %arg) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@different_size2 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: store i32 0, i32* [[ARG]], align 8 @@ -682,7 +682,7 @@ ; IS__TUNIT____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@different_size2 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[ARG]], align 8 @@ -715,7 +715,7 @@ ; ; ATTRIBUTOR_CGSCC_NPM-LABEL: define i32 @require_cfg_analysis(i32 %c, i32* {{.*}} dereferenceable(4) %p) define i32 @require_cfg_analysis(i32 %c, i32* %p) { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@require_cfg_analysis ; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT_OPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 @@ -742,7 +742,7 @@ ; IS__TUNIT_OPM: end: ; IS__TUNIT_OPM-NEXT: ret i32 1 ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@require_cfg_analysis ; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 @@ -768,7 +768,7 @@ ; IS__TUNIT_NPM: end: ; IS__TUNIT_NPM-NEXT: ret i32 1 ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@require_cfg_analysis ; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC_OPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 @@ -795,7 +795,7 @@ ; IS__CGSCC_OPM: end: ; IS__CGSCC_OPM-NEXT: ret i32 1 ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@require_cfg_analysis ; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 diff --git a/llvm/test/Transforms/Attributor/internal-noalias.ll b/llvm/test/Transforms/Attributor/internal-noalias.ll --- a/llvm/test/Transforms/Attributor/internal-noalias.ll +++ b/llvm/test/Transforms/Attributor/internal-noalias.ll @@ -5,16 +5,16 @@ ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM define dso_local i32 @visible(i32* noalias %A, i32* noalias %B) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@visible ; IS__TUNIT____-SAME: (i32* noalias nocapture nofree readonly [[A:%.*]], i32* noalias nocapture nofree readonly [[B:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* noalias nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree readonly align 4 [[B]]) [[ATTR3:#.*]] -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* noalias nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree readonly align 4 [[B]]) [[ATTR3]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* noalias nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree readonly align 4 [[B]]) [[ATTR4:#.*]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* noalias nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree readonly align 4 [[B]]) [[ATTR4]] ; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] ; IS__TUNIT____-NEXT: ret i32 [[ADD]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -23,7 +23,7 @@ ; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ADD]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible ; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -40,18 +40,18 @@ } define private i32 @noalias_args(i32* %A, i32* %B) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 ; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR3]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4]] ; IS__TUNIT____-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]] ; IS__TUNIT____-NEXT: ret i32 [[ADD2]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_args ; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -62,7 +62,7 @@ ; IS__CGSCC_OPM-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ADD2]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_args ; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -84,7 +84,7 @@ define internal i32 @noalias_args_argmem(i32* %A, i32* %B) #1 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args_argmem ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -93,7 +93,7 @@ ; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] ; IS__TUNIT____-NEXT: ret i32 [[ADD]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -110,18 +110,18 @@ } define dso_local i32 @visible_local(i32* %A) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local ; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[A:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: store i32 5, i32* [[B]], align 4 -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR3]] -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR3]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4]] ; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] ; IS__TUNIT____-NEXT: ret i32 [[ADD]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible_local ; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: @@ -132,7 +132,7 @@ ; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ADD]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local ; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -153,7 +153,7 @@ } define internal i32 @noalias_args_argmem_ro(i32* %A, i32* %B) #1 { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro ; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_OPM-NEXT: [[T0:%.*]] = load i32, i32* [[A]], align 4 @@ -161,7 +161,7 @@ ; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]] ; IS__TUNIT_OPM-NEXT: ret i32 [[ADD]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro ; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 @@ -173,7 +173,7 @@ ; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]] ; IS__TUNIT_NPM-NEXT: ret i32 [[ADD]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro ; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: [[T0:%.*]] = load i32, i32* [[A]], align 4 @@ -181,7 +181,7 @@ ; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ADD]] ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 @@ -205,7 +205,7 @@ ; IS__TUNIT_OPM-SAME: () [[ATTR2:#.*]] { ; IS__TUNIT_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: store i32 5, i32* [[B]], align 4 -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4:#.*]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR5:#.*]] ; IS__TUNIT_OPM-NEXT: ret i32 [[CALL]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn @@ -215,10 +215,10 @@ ; IS__TUNIT_NPM-NEXT: store i32 5, i32* [[B]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[B]], align 4 -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 [[TMP1]], i32 [[TMP2]]) [[ATTR4:#.*]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 [[TMP1]], i32 [[TMP2]]) [[ATTR5:#.*]] ; IS__TUNIT_NPM-NEXT: ret i32 [[CALL]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible_local_2 ; IS__CGSCC_OPM-SAME: () [[ATTR2:#.*]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 @@ -226,7 +226,7 @@ ; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR5:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local_2 ; IS__CGSCC_NPM-SAME: () [[ATTR3:#.*]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 @@ -243,14 +243,14 @@ } define internal i32 @noalias_args_argmem_rn(i32* %A, i32* %B) #1 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn ; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4 ; IS__TUNIT____-NEXT: store i32 0, i32* [[B]], align 4 ; IS__TUNIT____-NEXT: ret i32 [[T0]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn ; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4 @@ -263,15 +263,15 @@ } define i32 @visible_local_3() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local_3 -; IS__TUNIT____-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: () [[ATTR3:#.*]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: store i32 5, i32* [[B]], align 4 -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) [[ATTR5:#.*]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) [[ATTR6:#.*]] ; IS__TUNIT____-NEXT: ret i32 [[CALL]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible_local_3 ; IS__CGSCC_OPM-SAME: () [[ATTR2]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 @@ -279,7 +279,7 @@ ; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) [[ATTR6:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local_3 ; IS__CGSCC_NPM-SAME: () [[ATTR3]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 diff --git a/llvm/test/Transforms/Attributor/internalize.ll b/llvm/test/Transforms/Attributor/internalize.ll --- a/llvm/test/Transforms/Attributor/internalize.ll +++ b/llvm/test/Transforms/Attributor/internalize.ll @@ -135,12 +135,12 @@ ; CHECK_DISABLED-NEXT: call void @unused_arg(i8 noundef 0) ; CHECK_DISABLED-NEXT: ret void ; -; IS__TUNIT_____ENABLED: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT_____ENABLED: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_____ENABLED-LABEL: define {{[^@]+}}@unused_arg_caller ; IS__TUNIT_____ENABLED-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT_____ENABLED-NEXT: unreachable ; -; IS__CGSCC_____ENABLED: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC_____ENABLED: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_____ENABLED-LABEL: define {{[^@]+}}@unused_arg_caller ; IS__CGSCC_____ENABLED-SAME: () [[ATTR2:#.*]] { ; IS__CGSCC_____ENABLED-NEXT: unreachable diff --git a/llvm/test/Transforms/Attributor/liveness.ll b/llvm/test/Transforms/Attributor/liveness.ll --- a/llvm/test/Transforms/Attributor/liveness.ll +++ b/llvm/test/Transforms/Attributor/liveness.ll @@ -27,7 +27,7 @@ ; and nothing should be deduced for it. define internal i32 @dead_internal_func(i32 %0) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_internal_func ; IS__CGSCC____-SAME: () [[ATTR6:#.*]] { ; IS__CGSCC____-NEXT: br label [[TMP2:%.*]] @@ -58,7 +58,7 @@ } define i32 @volatile_load(i32*) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@volatile_load ; CHECK-SAME: (i32* nofree align 4 [[TMP0:%.*]]) [[ATTR7:#.*]] { ; CHECK-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4 @@ -69,7 +69,7 @@ } define internal i32 @internal_load(i32*) norecurse nounwind uwtable { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_load ; IS__CGSCC____-SAME: () [[ATTR8:#.*]] { ; IS__CGSCC____-NEXT: ret i32 undef @@ -483,7 +483,7 @@ ; FIXME: Should be able to detect undefined behavior. define void @ub(i32* %0) { -; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@ub ; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) [[ATTR8:#.*]] { ; NOT_CGSCC_NPM-NEXT: [[POISON:%.*]] = sub nuw i32 0, 1 @@ -492,7 +492,7 @@ ; NOT_CGSCC_NPM-NEXT: store i32 0, i32* [[POISON_YET_AGAIN]], align 4 ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ub ; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) [[ATTR10:#.*]] { ; IS__CGSCC____-NEXT: [[POISON:%.*]] = sub nuw i32 0, 1 @@ -608,9 +608,9 @@ ; NOT_CGSCC_NPM: cond.end: ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test6 -; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR12]] { +; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR13:#.*]] { ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: cond.if: ; IS__CGSCC____-NEXT: unreachable @@ -789,14 +789,14 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test_unreachable ; NOT_CGSCC_NPM-SAME: () [[ATTR0:#.*]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14:#.*]] +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15:#.*]] ; NOT_CGSCC_NPM-NEXT: call void @test_unreachable() [[ATTR0]] ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree noreturn nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_unreachable ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16:#.*]] +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18:#.*]] ; IS__CGSCC____-NEXT: call void @test_unreachable() [[ATTR0]] ; IS__CGSCC____-NEXT: unreachable ; @@ -877,28 +877,28 @@ ; ; IS__CGSCC____-LABEL: define {{[^@]+}}@middle() { ; IS__CGSCC____-NEXT: bb0: -; IS__CGSCC____-NEXT: call void @non_dead_b0() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b1() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b2() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b3() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @non_dead_b0() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b1() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b2() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b3() [[ATTR18]] ; IS__CGSCC____-NEXT: br label [[BB1:%.*]] ; IS__CGSCC____: bb1: -; IS__CGSCC____-NEXT: call void @non_dead_b4() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b5() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b6() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b7() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @non_dead_b4() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b5() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b6() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b7() [[ATTR18]] ; IS__CGSCC____-NEXT: br label [[BB2:%.*]] ; IS__CGSCC____: bb2: -; IS__CGSCC____-NEXT: call void @non_dead_b8() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b9() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b10() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b11() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @non_dead_b8() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b9() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b10() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b11() [[ATTR18]] ; IS__CGSCC____-NEXT: br label [[BB3:%.*]] ; IS__CGSCC____: bb3: -; IS__CGSCC____-NEXT: call void @non_dead_b12() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b13() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b14() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b15() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @non_dead_b12() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b13() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b14() [[ATTR18]] +; IS__CGSCC____-NEXT: call void @non_dead_b15() [[ATTR18]] ; IS__CGSCC____-NEXT: br label [[BB4:%.*]] ; IS__CGSCC____: bb4: ; IS__CGSCC____-NEXT: call void @non_exact2() @@ -1015,1024 +1015,1024 @@ } define internal void @non_dead_a0() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a0 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12:#.*]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a0 -; IS__CGSCC____-SAME: () [[ATTR13:#.*]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15:#.*]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a1() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a1 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a2() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a2 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a3() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a3 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a4() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a4 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a5() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a5 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a6() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a6 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a7() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a7 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a8() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a8 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a9() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a9 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a10() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a10 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a11() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a11 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a12() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a12 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a13() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a13 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a14() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a14 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_a15() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a15 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b0() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b0 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b1() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b1 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b2() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b2 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b3() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b3 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b4() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b4 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b5() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b5 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b6() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b6 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b7() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b7 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b8() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b8 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b9() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b9 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b10() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b10 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b11() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b11 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b12() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b12 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b13() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b13 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b14() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b14 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_b15() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b15 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c0() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c0 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c1() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c1 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c2() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c2 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c3() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c3 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c4() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c4 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c5() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c5 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c6() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c6 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c7() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c7 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c8() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c8 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c9() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c9 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c10() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c10 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c11() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c11 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c12() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c12 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c13() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c13 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c14() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c14 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_c15() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c15 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d0() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d0 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d1() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d1 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d2() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d2 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d3() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d3 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d4() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d4 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d5() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d5 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d6() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d6 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d7() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d7 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d8() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d8 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d9() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d9 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d10() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d10 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d11() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d11 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d12() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d12 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d13() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d13 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d14() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d14 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() ret void } define internal void @non_dead_d15() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d15 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2095,16 +2095,16 @@ } define internal void @useless_arg_sink(i32* %a) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_sink -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_sink -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2112,16 +2112,16 @@ } define internal void @useless_arg_almost_sink(i32* %a) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_almost_sink -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { ; NOT_CGSCC_NPM-NEXT: call void @useless_arg_sink() [[ATTR11]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_almost_sink -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @useless_arg_sink() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: call void @useless_arg_sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; call void @useless_arg_sink(i32* %a) @@ -2162,30 +2162,30 @@ ; FIXME: We should fold terminators. define internal i32 @switch_default(i64 %i) nounwind { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [ ; NOT_CGSCC_NPM-NEXT: i64 3, label [[RETURN:%.*]] ; NOT_CGSCC_NPM-NEXT: i64 10, label [[RETURN]] ; NOT_CGSCC_NPM-NEXT: ] ; NOT_CGSCC_NPM: sw.default: -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret i32 undef ; NOT_CGSCC_NPM: return: ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default -; IS__CGSCC____-SAME: () [[ATTR13]] { +; IS__CGSCC____-SAME: () [[ATTR15]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i64 3, label [[RETURN:%.*]] ; IS__CGSCC____-NEXT: i64 10, label [[RETURN]] ; IS__CGSCC____-NEXT: ] ; IS__CGSCC____: sw.default: -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @sink() [[ATTR18]] ; IS__CGSCC____-NEXT: ret i32 undef ; IS__CGSCC____: return: ; IS__CGSCC____-NEXT: unreachable @@ -2205,16 +2205,16 @@ } define i32 @switch_default_caller() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_caller -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { +; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { ; NOT_CGSCC_NPM-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() [[ATTR11]] ; NOT_CGSCC_NPM-NEXT: ret i32 123 ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_caller -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() [[ATTR16]] +; IS__CGSCC____-SAME: () [[ATTR15]] { +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() [[ATTR18]] ; IS__CGSCC____-NEXT: ret i32 123 ; %call2 = tail call i32 @switch_default(i64 0) @@ -2222,7 +2222,7 @@ } define internal i32 @switch_default_dead(i64 %i) nounwind { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead ; IS__CGSCC____-SAME: () [[ATTR6]] { ; IS__CGSCC____-NEXT: entry: @@ -2249,12 +2249,12 @@ } define i32 @switch_default_dead_caller() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_dead_caller -; NOT_CGSCC_NPM-SAME: () [[ATTR12:#.*]] { +; NOT_CGSCC_NPM-SAME: () [[ATTR13:#.*]] { ; NOT_CGSCC_NPM-NEXT: ret i32 123 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead_caller ; IS__CGSCC____-SAME: () [[ATTR6]] { ; IS__CGSCC____-NEXT: ret i32 123 @@ -2490,12 +2490,12 @@ declare noalias i8* @malloc(i64) define i32 @h(i32 %i) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@h -; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) [[ATTR12]] { +; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) [[ATTR13]] { ; NOT_CGSCC_NPM-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@h ; IS__CGSCC____-SAME: (i32 [[I:%.*]]) [[ATTR6]] { ; IS__CGSCC____-NEXT: ret i32 0 @@ -2509,13 +2509,13 @@ @p = global i8 0 define void @bad_gep() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@bad_gep -; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-SAME: () [[ATTR13]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: [[N:%.*]] = alloca i8, align 1 ; NOT_CGSCC_NPM-NEXT: [[M:%.*]] = alloca i8, align 1 -; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR15:#.*]] +; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR16:#.*]] ; NOT_CGSCC_NPM-NEXT: br label [[EXIT:%.*]] ; NOT_CGSCC_NPM: while.body: ; NOT_CGSCC_NPM-NEXT: unreachable @@ -2524,16 +2524,16 @@ ; NOT_CGSCC_NPM: if.end: ; NOT_CGSCC_NPM-NEXT: unreachable ; NOT_CGSCC_NPM: exit: -; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR15]] +; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR16]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bad_gep -; IS__CGSCC____-SAME: () [[ATTR14:#.*]] { +; IS__CGSCC____-SAME: () [[ATTR16:#.*]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[N:%.*]] = alloca i8, align 1 ; IS__CGSCC____-NEXT: [[M:%.*]] = alloca i8, align 1 -; IS__CGSCC____-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR17:#.*]] +; IS__CGSCC____-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR19:#.*]] ; IS__CGSCC____-NEXT: br label [[EXIT:%.*]] ; IS__CGSCC____: while.body: ; IS__CGSCC____-NEXT: unreachable @@ -2542,7 +2542,7 @@ ; IS__CGSCC____: if.end: ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: exit: -; IS__CGSCC____-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR17]] +; IS__CGSCC____-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR19]] ; IS__CGSCC____-NEXT: ret void ; entry: diff --git a/llvm/test/Transforms/Attributor/liveness_chains.ll b/llvm/test/Transforms/Attributor/liveness_chains.ll --- a/llvm/test/Transforms/Attributor/liveness_chains.ll +++ b/llvm/test/Transforms/Attributor/liveness_chains.ll @@ -9,12 +9,12 @@ declare i32 @source() nounwind readonly define i32 @chain_dead(i32 %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@chain_dead ; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@chain_dead ; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: ret i32 0 diff --git a/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll b/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll --- a/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll +++ b/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll @@ -21,7 +21,7 @@ ; IS__TUNIT_OPM: exit: ; IS__TUNIT_OPM-NEXT: ret i8 0 ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test1 ; IS__TUNIT_NPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -52,7 +52,7 @@ ; IS__CGSCC_OPM: exit: ; IS__CGSCC_OPM-NEXT: ret i8 0 ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test1 ; IS__CGSCC_NPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -107,7 +107,7 @@ ; IS__TUNIT_OPM: exit: ; IS__TUNIT_OPM-NEXT: ret i8 0 ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test2 ; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) [[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -151,7 +151,7 @@ ; IS__CGSCC_OPM: exit: ; IS__CGSCC_OPM-NEXT: ret i8 0 ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test2 ; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/lvi-for-ashr.ll b/llvm/test/Transforms/Attributor/lvi-for-ashr.ll --- a/llvm/test/Transforms/Attributor/lvi-for-ashr.ll +++ b/llvm/test/Transforms/Attributor/lvi-for-ashr.ll @@ -7,7 +7,7 @@ ; FIXME: DOT should be replaced with 3 define i32 @test-ashr(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test-ashr ; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: chk65: @@ -28,7 +28,7 @@ ; IS__TUNIT____-NEXT: [[RETVAL:%.*]] = phi i32 [ 0, [[CHK65:%.*]] ], [ 1, [[CHK0]] ], [ [[DOT]], [[BB_THEN]] ], [ 4, [[BB_IF]] ] ; IS__TUNIT____-NEXT: ret i32 [[RETVAL]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test-ashr ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: chk65: diff --git a/llvm/test/Transforms/Attributor/memory_locations.ll b/llvm/test/Transforms/Attributor/memory_locations.ll --- a/llvm/test/Transforms/Attributor/memory_locations.ll +++ b/llvm/test/Transforms/Attributor/memory_locations.ll @@ -389,12 +389,12 @@ } define void @callerE(i8* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@callerE ; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) [[ATTR5:#.*]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@callerE ; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) [[ATTR5:#.*]] { ; IS__CGSCC____-NEXT: ret void @@ -405,13 +405,13 @@ define void @write_global() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@write_global ; IS__TUNIT____-SAME: () [[ATTR6:#.*]] { ; IS__TUNIT____-NEXT: store i32 0, i32* @G, align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@write_global ; IS__CGSCC____-SAME: () [[ATTR6:#.*]] { ; IS__CGSCC____-NEXT: store i32 0, i32* @G, align 4 @@ -421,13 +421,13 @@ ret void } define void @write_global_via_arg(i32* %GPtr) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@write_global_via_arg ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[GPTR:%.*]]) [[ATTR7:#.*]] { ; IS__TUNIT____-NEXT: store i32 0, i32* [[GPTR]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@write_global_via_arg ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[GPTR:%.*]]) [[ATTR7:#.*]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[GPTR]], align 4 @@ -437,13 +437,13 @@ ret void } define internal void @write_global_via_arg_internal(i32* %GPtr) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@write_global_via_arg_internal ; IS__TUNIT____-SAME: () [[ATTR6]] { ; IS__TUNIT____-NEXT: store i32 0, i32* @G, align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@write_global_via_arg_internal ; IS__CGSCC____-SAME: () [[ATTR6]] { ; IS__CGSCC____-NEXT: store i32 0, i32* @G, align 4 @@ -454,13 +454,13 @@ } define void @writeonly_global() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@writeonly_global ; IS__TUNIT____-SAME: () [[ATTR6]] { -; IS__TUNIT____-NEXT: call void @write_global() [[ATTR6]] +; IS__TUNIT____-NEXT: call void @write_global() [[ATTR10:#.*]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@writeonly_global ; IS__CGSCC____-SAME: () [[ATTR6]] { ; IS__CGSCC____-NEXT: call void @write_global() [[ATTR10:#.*]] @@ -470,13 +470,13 @@ ret void } define void @writeonly_global_via_arg() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@writeonly_global_via_arg ; IS__TUNIT____-SAME: () [[ATTR6]] { -; IS__TUNIT____-NEXT: call void @write_global_via_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) @G) [[ATTR6]] +; IS__TUNIT____-NEXT: call void @write_global_via_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) @G) [[ATTR10]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@writeonly_global_via_arg ; IS__CGSCC____-SAME: () [[ATTR6]] { ; IS__CGSCC____-NEXT: call void @write_global_via_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) @G) [[ATTR10]] @@ -488,13 +488,13 @@ define void @writeonly_global_via_arg_internal() { ; -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@writeonly_global_via_arg_internal ; IS__TUNIT____-SAME: () [[ATTR6]] { -; IS__TUNIT____-NEXT: call void @write_global_via_arg_internal() [[ATTR6]] +; IS__TUNIT____-NEXT: call void @write_global_via_arg_internal() [[ATTR10]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@writeonly_global_via_arg_internal ; IS__CGSCC____-SAME: () [[ATTR6]] { ; IS__CGSCC____-NEXT: call void @write_global_via_arg_internal() [[ATTR10]] @@ -505,31 +505,18 @@ } define i8 @recursive_not_readnone(i8* %ptr, i1 %c) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind -; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone -; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8:#.*]] { -; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 -; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS__TUNIT____: t: -; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR10:#.*]] -; IS__TUNIT____-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 -; IS__TUNIT____-NEXT: ret i8 [[R]] -; IS__TUNIT____: f: -; IS__TUNIT____-NEXT: store i8 1, i8* [[PTR]], align 1 -; IS__TUNIT____-NEXT: ret i8 0 -; -; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind -; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone -; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8:#.*]] { -; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 -; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS__CGSCC____: t: -; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR11:#.*]] -; IS__CGSCC____-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 -; IS__CGSCC____-NEXT: ret i8 [[R]] -; IS__CGSCC____: f: -; IS__CGSCC____-NEXT: store i8 1, i8* [[PTR]], align 1 -; IS__CGSCC____-NEXT: ret i8 0 +; CHECK: Function Attrs: argmemonly nofree nosync nounwind +; CHECK-LABEL: define {{[^@]+}}@recursive_not_readnone +; CHECK-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8:#.*]] { +; CHECK-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 +; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; CHECK: t: +; CHECK-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR11:#.*]] +; CHECK-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 +; CHECK-NEXT: ret i8 [[R]] +; CHECK: f: +; CHECK-NEXT: store i8 1, i8* [[PTR]], align 1 +; CHECK-NEXT: ret i8 0 ; %alloc = alloca i8 br i1 %c, label %t, label %f @@ -543,31 +530,18 @@ } define internal i8 @recursive_not_readnone_internal(i8* %ptr, i1 %c) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind -; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal -; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8]] { -; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 -; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS__TUNIT____: t: -; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR10]] -; IS__TUNIT____-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 -; IS__TUNIT____-NEXT: ret i8 [[R]] -; IS__TUNIT____: f: -; IS__TUNIT____-NEXT: store i8 1, i8* [[PTR]], align 1 -; IS__TUNIT____-NEXT: ret i8 0 -; -; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind -; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal -; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8]] { -; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 -; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS__CGSCC____: t: -; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR11]] -; IS__CGSCC____-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 -; IS__CGSCC____-NEXT: ret i8 [[R]] -; IS__CGSCC____: f: -; IS__CGSCC____-NEXT: store i8 1, i8* [[PTR]], align 1 -; IS__CGSCC____-NEXT: ret i8 0 +; CHECK: Function Attrs: argmemonly nofree nosync nounwind +; CHECK-LABEL: define {{[^@]+}}@recursive_not_readnone_internal +; CHECK-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8]] { +; CHECK-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 +; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; CHECK: t: +; CHECK-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR11]] +; CHECK-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 +; CHECK-NEXT: ret i8 [[R]] +; CHECK: f: +; CHECK-NEXT: store i8 1, i8* [[PTR]], align 1 +; CHECK-NEXT: ret i8 0 ; %alloc = alloca i8 br i1 %c, label %t, label %f @@ -585,7 +559,7 @@ ; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR9:#.*]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i8, align 1 -; IS__TUNIT____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) [[ATTR10]] +; IS__TUNIT____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) [[ATTR11:#.*]] ; IS__TUNIT____-NEXT: ret i8 [[R]] ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone @@ -601,31 +575,18 @@ } define internal i8 @recursive_not_readnone_internal2(i8* %ptr, i1 %c) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind -; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal2 -; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8]] { -; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 -; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS__TUNIT____: t: -; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR10]] -; IS__TUNIT____-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 -; IS__TUNIT____-NEXT: ret i8 [[R]] -; IS__TUNIT____: f: -; IS__TUNIT____-NEXT: store i8 1, i8* [[PTR]], align 1 -; IS__TUNIT____-NEXT: ret i8 0 -; -; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind -; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal2 -; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8]] { -; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 -; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS__CGSCC____: t: -; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR11]] -; IS__CGSCC____-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 -; IS__CGSCC____-NEXT: ret i8 [[R]] -; IS__CGSCC____: f: -; IS__CGSCC____-NEXT: store i8 1, i8* [[PTR]], align 1 -; IS__CGSCC____-NEXT: ret i8 0 +; CHECK: Function Attrs: argmemonly nofree nosync nounwind +; CHECK-LABEL: define {{[^@]+}}@recursive_not_readnone_internal2 +; CHECK-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR8]] { +; CHECK-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 +; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; CHECK: t: +; CHECK-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) [[ATTR11]] +; CHECK-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 +; CHECK-NEXT: ret i8 [[R]] +; CHECK: f: +; CHECK-NEXT: store i8 1, i8* [[PTR]], align 1 +; CHECK-NEXT: ret i8 0 ; %alloc = alloca i8 br i1 %c, label %t, label %f @@ -642,7 +603,7 @@ ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller2 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR9]] { -; IS__TUNIT____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal2(i8* undef, i1 [[C]]) [[ATTR10]] +; IS__TUNIT____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal2(i8* undef, i1 [[C]]) [[ATTR11]] ; IS__TUNIT____-NEXT: ret i8 [[R]] ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone @@ -656,13 +617,13 @@ } define internal void @argmemonly_before_ipconstprop(i32* %p) argmemonly { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@argmemonly_before_ipconstprop ; IS__TUNIT____-SAME: () [[ATTR6]] { ; IS__TUNIT____-NEXT: store i32 0, i32* @G, align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@argmemonly_before_ipconstprop ; IS__CGSCC____-SAME: () [[ATTR6]] { ; IS__CGSCC____-NEXT: store i32 0, i32* @G, align 4 @@ -673,13 +634,13 @@ } define void @argmemonky_caller() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@argmemonky_caller ; IS__TUNIT____-SAME: () [[ATTR6]] { -; IS__TUNIT____-NEXT: call void @argmemonly_before_ipconstprop() [[ATTR6]] +; IS__TUNIT____-NEXT: call void @argmemonly_before_ipconstprop() [[ATTR10]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@argmemonky_caller ; IS__CGSCC____-SAME: () [[ATTR6]] { ; IS__CGSCC____-NEXT: call void @argmemonly_before_ipconstprop() [[ATTR10]] diff --git a/llvm/test/Transforms/Attributor/misc.ll b/llvm/test/Transforms/Attributor/misc.ll --- a/llvm/test/Transforms/Attributor/misc.ll +++ b/llvm/test/Transforms/Attributor/misc.ll @@ -68,14 +68,14 @@ define internal void @foo(i32* %a) { ; -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: store i32 0, i32* [[A]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/misc_crash.ll b/llvm/test/Transforms/Attributor/misc_crash.ll --- a/llvm/test/Transforms/Attributor/misc_crash.ll +++ b/llvm/test/Transforms/Attributor/misc_crash.ll @@ -6,7 +6,7 @@ @var2 = internal global i32 0 define i32 addrspace(1)* @foo(i32 addrspace(4)* %arg) { -; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn +; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@foo ; CHECK-SAME: (i32 addrspace(4)* nofree readnone [[ARG:%.*]]) [[ATTR0:#.*]] { ; CHECK-NEXT: entry: @@ -19,10 +19,10 @@ } define i32* @func1() { -; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn +; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@func1 ; CHECK-SAME: () [[ATTR0]] { -; CHECK-NEXT: [[PTR:%.*]] = call i32* @func1a() [[ATTR0]] +; CHECK-NEXT: [[PTR:%.*]] = call i32* @func1a() [[ATTR2:#.*]] ; CHECK-NEXT: ret i32* [[PTR]] ; %ptr = call i32* @func1a([1 x i32]* @var1) @@ -39,7 +39,7 @@ ; UTC_ARGS: --enable define internal void @func2a(i32* %0) { -; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly +; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; CHECK-LABEL: define {{[^@]+}}@func2a ; CHECK-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]]) [[ATTR1:#.*]] { ; CHECK-NEXT: store i32 0, i32* @var2, align 4 diff --git a/llvm/test/Transforms/Attributor/mustprogress.ll b/llvm/test/Transforms/Attributor/mustprogress.ll new file mode 100644 --- /dev/null +++ b/llvm/test/Transforms/Attributor/mustprogress.ll @@ -0,0 +1,47 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM +; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM +; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM +; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM + +target datalayout = "e-m:e-i54:64-f80:128-n8:16:32:64-S128" + +declare void @sink() nounwind willreturn nosync nofree + +define internal void @callee(i1 %a) { +; CHECK: Function Attrs: nofree nosync nounwind mustprogress +; CHECK-LABEL: define {{[^@]+}}@callee +; CHECK-SAME: (i1 [[A:%.*]]) [[ATTR1:#.*]] { +; CHECK-NEXT: call void @sink() [[ATTR2:#.*]] +; CHECK-NEXT: br i1 [[A]], label [[T:%.*]], label [[F:%.*]] +; CHECK: t: +; CHECK-NEXT: call void @callee(i1 noundef false) [[ATTR1]] +; CHECK-NEXT: br label [[F]] +; CHECK: f: +; CHECK-NEXT: ret void +; + call void @sink() + br i1 %a, label %t, label %f +t: + call void @callee(i1 false) + br label %f +f: + ret void +} + +define void @caller(i1 %a) mustprogress { +; IS__TUNIT____: Function Attrs: nofree nosync nounwind mustprogress +; IS__TUNIT____-LABEL: define {{[^@]+}}@caller +; IS__TUNIT____-SAME: (i1 [[A:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-NEXT: call void @callee(i1 [[A]]) [[ATTR1]] +; IS__TUNIT____-NEXT: ret void +; +; IS__CGSCC____: Function Attrs: nofree nosync nounwind mustprogress +; IS__CGSCC____-LABEL: define {{[^@]+}}@caller +; IS__CGSCC____-SAME: (i1 [[A:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-NEXT: call void @callee(i1 [[A]]) [[ATTR3:#.*]] +; IS__CGSCC____-NEXT: ret void +; + call void @callee(i1 %a) + ret void +} diff --git a/llvm/test/Transforms/Attributor/noalias.ll b/llvm/test/Transforms/Attributor/noalias.ll --- a/llvm/test/Transforms/Attributor/noalias.ll +++ b/llvm/test/Transforms/Attributor/noalias.ll @@ -42,12 +42,12 @@ } define void @nocapture(i8* %a){ -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nocapture ; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree readnone [[A:%.*]]) [[ATTR0:#.*]] { ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocapture ; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[A:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret void @@ -145,12 +145,12 @@ ; Returning global pointer. Should not be noalias. define i8** @getter() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@getter ; NOT_CGSCC_NPM-SAME: () [[ATTR0]] { ; NOT_CGSCC_NPM-NEXT: ret i8** @G ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@getter ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i8** @G @@ -160,12 +160,12 @@ ; Returning global pointer. Should not be noalias. define i8** @calle1(){ -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@calle1 ; NOT_CGSCC_NPM-SAME: () [[ATTR0]] { ; NOT_CGSCC_NPM-NEXT: ret i8** @G ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@calle1 ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i8** @G @@ -504,13 +504,13 @@ ; TEST 14 i2p casts define internal i32 @p2i(i32* %arg) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@p2i ; NOT_CGSCC_NPM-SAME: (i32* noalias nofree readnone [[ARG:%.*]]) [[ATTR0]] { ; NOT_CGSCC_NPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[ARG]] to i32 ; NOT_CGSCC_NPM-NEXT: ret i32 [[P2I]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@p2i ; IS__CGSCC____-SAME: (i32* noalias nofree readnone [[ARG:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[ARG]] to i32 @@ -524,7 +524,7 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readonly willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@i2p ; NOT_CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR4:#.*]] { -; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) [[ATTR0]] +; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) [[ATTR11:#.*]] ; NOT_CGSCC_NPM-NEXT: [[I2P:%.*]] = inttoptr i32 [[C]] to i8* ; NOT_CGSCC_NPM-NEXT: [[BC:%.*]] = bitcast i8* [[I2P]] to i32* ; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @ret(i32* nocapture nofree readonly align 4 [[BC]]) [[ATTR4]] @@ -546,13 +546,13 @@ ret i32 %call } define internal i32 @ret(i32* %arg) { -; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@ret ; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR5:#.*]] { ; NOT_CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[ARG]], align 4 ; NOT_CGSCC_NPM-NEXT: ret i32 [[L]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR5:#.*]] { ; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* [[ARG]], align 4 @@ -572,17 +572,29 @@ ; Function Attrs: nounwind optsize define internal fastcc double @strtox(i8* %s, i8** %p, i32 %prec) unnamed_addr { -; CHECK-LABEL: define {{[^@]+}}@strtox -; CHECK-SAME: (i8* [[S:%.*]]) unnamed_addr { -; CHECK-NEXT: entry: -; CHECK-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8 -; CHECK-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8* -; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) [[ATTR10:#.*]] -; CHECK-NEXT: [[CALL:%.*]] = call i32 bitcast (i32 (...)* @sh_fromstring to i32 (%struct._IO_FILE*, i8*)*)(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i8* [[S]]) -; CHECK-NEXT: call void @__shlim(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i64 noundef 0) -; CHECK-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i32 noundef 1, i32 noundef 1) -; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) -; CHECK-NEXT: ret double [[CALL1]] +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@strtox +; NOT_CGSCC_NPM-SAME: (i8* [[S:%.*]]) unnamed_addr { +; NOT_CGSCC_NPM-NEXT: entry: +; NOT_CGSCC_NPM-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8 +; NOT_CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8* +; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) [[ATTR12:#.*]] +; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 bitcast (i32 (...)* @sh_fromstring to i32 (%struct._IO_FILE*, i8*)*)(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i8* [[S]]) +; NOT_CGSCC_NPM-NEXT: call void @__shlim(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i64 noundef 0) +; NOT_CGSCC_NPM-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i32 noundef 1, i32 noundef 1) +; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) +; NOT_CGSCC_NPM-NEXT: ret double [[CALL1]] +; +; IS__CGSCC____-LABEL: define {{[^@]+}}@strtox +; IS__CGSCC____-SAME: (i8* [[S:%.*]]) unnamed_addr { +; IS__CGSCC____-NEXT: entry: +; IS__CGSCC____-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8 +; IS__CGSCC____-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8* +; IS__CGSCC____-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) [[ATTR10]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 bitcast (i32 (...)* @sh_fromstring to i32 (%struct._IO_FILE*, i8*)*)(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i8* [[S]]) +; IS__CGSCC____-NEXT: call void @__shlim(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i64 noundef 0) +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i32 noundef 1, i32 noundef 1) +; IS__CGSCC____-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) +; IS__CGSCC____-NEXT: ret double [[CALL1]] ; entry: %f = alloca %struct._IO_FILE, align 8 @@ -630,13 +642,13 @@ @alias_of_p = external global i32* define void @make_alias(i32* %p) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@make_alias ; NOT_CGSCC_NPM-SAME: (i32* nofree writeonly [[P:%.*]]) [[ATTR7:#.*]] { ; NOT_CGSCC_NPM-NEXT: store i32* [[P]], i32** @alias_of_p, align 8 ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@make_alias ; IS__CGSCC____-SAME: (i32* nofree writeonly [[P:%.*]]) [[ATTR7:#.*]] { ; IS__CGSCC____-NEXT: store i32* [[P]], i32** @alias_of_p, align 8 @@ -647,13 +659,13 @@ } define void @only_store(i32* %p) { -; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@only_store ; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR8:#.*]] { ; NOT_CGSCC_NPM-NEXT: store i32 0, i32* [[P]], align 4 ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@only_store ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR8:#.*]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[P]], align 4 @@ -664,19 +676,19 @@ } define void @test15_caller(i32* noalias %p, i32 %c) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test15_caller ; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { ; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0 ; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] ; NOT_CGSCC_NPM: if.then: -; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]]) [[ATTR10:#.*]] ; NOT_CGSCC_NPM-NEXT: br label [[IF_END]] ; NOT_CGSCC_NPM: if.end: -; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) [[ATTR10]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test15_caller ; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0 @@ -721,25 +733,25 @@ ; Therefore, only one of the two conditions of if statementes will be fulfilled. define internal void @test16_sub(i32* noalias %p, i32 %c1, i32 %c2) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test16_sub ; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]]) [[ATTR7]] { ; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C1]], 0 ; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] ; NOT_CGSCC_NPM: if.then: -; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]]) [[ATTR7]] -; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly align 4 [[P]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]]) [[ATTR10]] +; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly align 4 [[P]]) [[ATTR10]] ; NOT_CGSCC_NPM-NEXT: br label [[IF_END]] ; NOT_CGSCC_NPM: if.end: ; NOT_CGSCC_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C2]], 0 ; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]] ; NOT_CGSCC_NPM: if.then2: -; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) [[ATTR10]] ; NOT_CGSCC_NPM-NEXT: br label [[IF_END3]] ; NOT_CGSCC_NPM: if.end3: ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test16_sub ; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]]) [[ATTR7]] { ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C1]], 0 @@ -778,13 +790,13 @@ } define void @test16_caller(i32* %p, i32 %c) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test16_caller ; NOT_CGSCC_NPM-SAME: (i32* nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { -; NOT_CGSCC_NPM-NEXT: tail call void @test16_sub(i32* noalias nofree writeonly [[P]], i32 [[C]], i32 [[C]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @test16_sub(i32* noalias nofree writeonly [[P]], i32 [[C]], i32 [[C]]) [[ATTR10]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test16_caller ; IS__CGSCC____-SAME: (i32* nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { ; IS__CGSCC____-NEXT: tail call void @test16_sub(i32* noalias nofree writeonly [[P]], i32 [[C]], i32 [[C]]) [[ATTR12]] @@ -814,22 +826,22 @@ ; } define void @test17_caller(i32* noalias %p, i32 %c) { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test17_caller ; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0 ; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[L1:%.*]], label [[L2:%.*]] ; NOT_CGSCC_NPM: l1: -; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) [[ATTR10]] ; NOT_CGSCC_NPM-NEXT: br label [[L3:%.*]] ; NOT_CGSCC_NPM: l2: -; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) [[ATTR10]] ; NOT_CGSCC_NPM-NEXT: br label [[L3]] ; NOT_CGSCC_NPM: l3: ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test17_caller ; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { ; IS__CGSCC____-NEXT: entry: @@ -889,18 +901,18 @@ define void @test18_caller(i32* noalias %p, i32 %c) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test18_caller -; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { +; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR10]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0 ; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[L1:%.*]], label [[L2:%.*]] ; NOT_CGSCC_NPM: l1: -; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) [[ATTR10]] ; NOT_CGSCC_NPM-NEXT: unreachable ; NOT_CGSCC_NPM: l2: -; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) [[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) [[ATTR10]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test18_caller ; IS__CGSCC____-SAME: (i32* noalias nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/nocapture-1.ll b/llvm/test/Transforms/Attributor/nocapture-1.ll --- a/llvm/test/Transforms/Attributor/nocapture-1.ll +++ b/llvm/test/Transforms/Attributor/nocapture-1.ll @@ -7,12 +7,12 @@ @g = global i32* null ; [#uses=1] define i32* @c1(i32* %q) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@c1 ; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[Q:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i32* [[Q]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@c1 ; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[Q:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret i32* [[Q]] @@ -22,13 +22,13 @@ ; It would also be acceptable to mark %q as readnone. Update @c3 too. define void @c2(i32* %q) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@c2 ; IS__TUNIT____-SAME: (i32* nofree writeonly [[Q:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: store i32* [[Q]], i32** @g, align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@c2 ; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: store i32* [[Q]], i32** @g, align 8 @@ -39,13 +39,13 @@ } define void @c3(i32* %q) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@c3 ; IS__TUNIT____-SAME: (i32* nofree writeonly [[Q:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) [[ATTR1]] +; IS__TUNIT____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) [[ATTR14:#.*]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@c3 ; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) [[ATTR16:#.*]] @@ -56,7 +56,7 @@ } define i1 @c4(i32* %q, i32 %bitno) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@c4 ; IS__TUNIT____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 @@ -68,7 +68,7 @@ ; IS__TUNIT____: l1: ; IS__TUNIT____-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@c4 ; IS__CGSCC____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 @@ -92,7 +92,7 @@ ; c4b is c4 but without the escaping part define i1 @c4b(i32* %q, i32 %bitno) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@c4b ; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 @@ -104,7 +104,7 @@ ; IS__TUNIT____: l1: ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@c4b ; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 @@ -129,7 +129,7 @@ @lookup_table = global [2 x i1] [ i1 0, i1 1 ] define i1 @c5(i32* %q, i32 %bitno) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@c5 ; IS__TUNIT____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR2:#.*]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 @@ -139,7 +139,7 @@ ; IS__TUNIT____-NEXT: [[VAL:%.*]] = load i1, i1* [[LOOKUP]], align 1 ; IS__TUNIT____-NEXT: ret i1 [[VAL]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@c5 ; IS__CGSCC____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 @@ -186,7 +186,7 @@ declare i32 @__gxx_personality_v0(...) define i1* @lookup_bit(i32* %q, i32 %bitno) readnone nounwind { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@lookup_bit ; IS__TUNIT____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 @@ -195,7 +195,7 @@ ; IS__TUNIT____-NEXT: [[LOOKUP:%.*]] = getelementptr [2 x i1], [2 x i1]* @lookup_table, i32 0, i32 [[BIT]] ; IS__TUNIT____-NEXT: ret i1* [[LOOKUP]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@lookup_bit ; IS__CGSCC____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 @@ -212,14 +212,14 @@ } define i1 @c7(i32* %q, i32 %bitno) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@c7 ; IS__TUNIT____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR2]] { -; IS__TUNIT____-NEXT: [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) [[ATTR14:#.*]] +; IS__TUNIT____-NEXT: [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) [[ATTR15:#.*]] ; IS__TUNIT____-NEXT: [[VAL:%.*]] = load i1, i1* [[PTR]], align 1 ; IS__TUNIT____-NEXT: ret i1 [[VAL]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@c7 ; IS__CGSCC____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR2]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) [[ATTR17:#.*]] @@ -233,7 +233,7 @@ define i32 @nc1(i32* %q, i32* %p, i1 %b) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc1 ; IS__TUNIT____-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) [[ATTR5:#.*]] { ; IS__TUNIT____-NEXT: e: @@ -248,7 +248,7 @@ ; IS__TUNIT____-NEXT: store i32* [[Y]], i32** @g, align 8 ; IS__TUNIT____-NEXT: ret i32 [[VAL]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc1 ; IS__CGSCC____-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) [[ATTR5:#.*]] { ; IS__CGSCC____-NEXT: e: @@ -277,7 +277,7 @@ } define i32 @nc1_addrspace(i32* %q, i32 addrspace(1)* %p, i1 %b) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc1_addrspace ; IS__TUNIT____-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) [[ATTR5]] { ; IS__TUNIT____-NEXT: e: @@ -292,7 +292,7 @@ ; IS__TUNIT____-NEXT: store i32* [[Y]], i32** @g, align 8 ; IS__TUNIT____-NEXT: ret i32 [[VAL]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc1_addrspace ; IS__CGSCC____-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) [[ATTR5]] { ; IS__CGSCC____-NEXT: e: @@ -321,13 +321,13 @@ } define void @nc2(i32* %p, i32* %q) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc2 ; IS__TUNIT____-SAME: (i32* nocapture nofree [[P:%.*]], i32* nofree [[Q:%.*]]) [[ATTR5]] { -; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree [[P]], i1 noundef false) [[ATTR5]] +; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree [[P]], i1 noundef false) [[ATTR16:#.*]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc2 ; IS__CGSCC____-SAME: (i32* nocapture nofree [[P:%.*]], i32* nofree [[Q:%.*]]) [[ATTR5]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree [[P]], i1 noundef false) [[ATTR18:#.*]] @@ -531,13 +531,13 @@ } define void @test_cmpxchg(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_cmpxchg ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull dereferenceable(4) [[P:%.*]]) [[ATTR9:#.*]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = cmpxchg i32* [[P]], i32 0, i32 1 acquire monotonic ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_cmpxchg ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull dereferenceable(4) [[P:%.*]]) [[ATTR9:#.*]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = cmpxchg i32* [[P]], i32 0, i32 1 acquire monotonic @@ -548,13 +548,13 @@ } define void @test_cmpxchg_ptr(i32** %p, i32* %q) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_cmpxchg_ptr ; IS__TUNIT____-SAME: (i32** nocapture nofree nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) [[ATTR9]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = cmpxchg i32** [[P]], i32* null, i32* [[Q]] acquire monotonic ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_cmpxchg_ptr ; IS__CGSCC____-SAME: (i32** nocapture nofree nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) [[ATTR9]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = cmpxchg i32** [[P]], i32* null, i32* [[Q]] acquire monotonic @@ -565,13 +565,13 @@ } define void @test_atomicrmw(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_atomicrmw ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull dereferenceable(4) [[P:%.*]]) [[ATTR9]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = atomicrmw add i32* [[P]], i32 1 seq_cst ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_atomicrmw ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull dereferenceable(4) [[P:%.*]]) [[ATTR9]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = atomicrmw add i32* [[P]], i32 1 seq_cst @@ -582,7 +582,7 @@ } define void @test_volatile(i32* %x) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_volatile ; IS__TUNIT____-SAME: (i32* nofree align 4 [[X:%.*]]) [[ATTR9]] { ; IS__TUNIT____-NEXT: entry: @@ -590,7 +590,7 @@ ; IS__TUNIT____-NEXT: store volatile i32 0, i32* [[GEP]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_volatile ; IS__CGSCC____-SAME: (i32* nofree align 4 [[X:%.*]]) [[ATTR9]] { ; IS__CGSCC____-NEXT: entry: @@ -605,21 +605,13 @@ } define void @nocaptureLaunder(i8* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureLaunder -; IS__TUNIT____-SAME: (i8* nocapture nofree [[P:%.*]]) [[ATTR5]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) [[ATTR15:#.*]] -; IS__TUNIT____-NEXT: store i8 42, i8* [[B]], align 1 -; IS__TUNIT____-NEXT: ret void -; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureLaunder -; IS__CGSCC____-SAME: (i8* nocapture nofree [[P:%.*]]) [[ATTR10:#.*]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) [[ATTR17]] -; IS__CGSCC____-NEXT: store i8 42, i8* [[B]], align 1 -; IS__CGSCC____-NEXT: ret void +; CHECK: Function Attrs: nofree nosync nounwind willreturn mustprogress +; CHECK-LABEL: define {{[^@]+}}@nocaptureLaunder +; CHECK-SAME: (i8* nocapture nofree [[P:%.*]]) [[ATTR10:#.*]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) [[ATTR17:#.*]] +; CHECK-NEXT: store i8 42, i8* [[B]], align 1 +; CHECK-NEXT: ret void ; entry: %b = call i8* @llvm.launder.invariant.group.p0i8(i8* %p) @@ -629,19 +621,12 @@ @g2 = global i8* null define void @captureLaunder(i8* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@captureLaunder -; IS__TUNIT____-SAME: (i8* nofree [[P:%.*]]) [[ATTR5]] { -; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) [[ATTR15]] -; IS__TUNIT____-NEXT: store i8* [[B]], i8** @g2, align 8 -; IS__TUNIT____-NEXT: ret void -; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@captureLaunder -; IS__CGSCC____-SAME: (i8* nofree [[P:%.*]]) [[ATTR10]] { -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) [[ATTR17]] -; IS__CGSCC____-NEXT: store i8* [[B]], i8** @g2, align 8 -; IS__CGSCC____-NEXT: ret void +; CHECK: Function Attrs: nofree nosync nounwind willreturn mustprogress +; CHECK-LABEL: define {{[^@]+}}@captureLaunder +; CHECK-SAME: (i8* nofree [[P:%.*]]) [[ATTR10]] { +; CHECK-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) [[ATTR17]] +; CHECK-NEXT: store i8* [[B]], i8** @g2, align 8 +; CHECK-NEXT: ret void ; %b = call i8* @llvm.launder.invariant.group.p0i8(i8* %p) store i8* %b, i8** @g2 @@ -649,21 +634,13 @@ } define void @nocaptureStrip(i8* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly -; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureStrip -; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) [[ATTR15]] -; IS__TUNIT____-NEXT: store i8 42, i8* [[B]], align 1 -; IS__TUNIT____-NEXT: ret void -; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureStrip -; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) [[ATTR11:#.*]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) [[ATTR17]] -; IS__CGSCC____-NEXT: store i8 42, i8* [[B]], align 1 -; IS__CGSCC____-NEXT: ret void +; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress +; CHECK-LABEL: define {{[^@]+}}@nocaptureStrip +; CHECK-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) [[ATTR11:#.*]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) [[ATTR17]] +; CHECK-NEXT: store i8 42, i8* [[B]], align 1 +; CHECK-NEXT: ret void ; entry: %b = call i8* @llvm.strip.invariant.group.p0i8(i8* %p) @@ -673,19 +650,12 @@ @g3 = global i8* null define void @captureStrip(i8* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly -; IS__TUNIT____-LABEL: define {{[^@]+}}@captureStrip -; IS__TUNIT____-SAME: (i8* nofree writeonly [[P:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) [[ATTR15]] -; IS__TUNIT____-NEXT: store i8* [[B]], i8** @g3, align 8 -; IS__TUNIT____-NEXT: ret void -; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@captureStrip -; IS__CGSCC____-SAME: (i8* nofree writeonly [[P:%.*]]) [[ATTR11]] { -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) [[ATTR17]] -; IS__CGSCC____-NEXT: store i8* [[B]], i8** @g3, align 8 -; IS__CGSCC____-NEXT: ret void +; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress +; CHECK-LABEL: define {{[^@]+}}@captureStrip +; CHECK-SAME: (i8* nofree writeonly [[P:%.*]]) [[ATTR11]] { +; CHECK-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) [[ATTR17]] +; CHECK-NEXT: store i8* [[B]], i8** @g3, align 8 +; CHECK-NEXT: ret void ; %b = call i8* @llvm.strip.invariant.group.p0i8(i8* %p) store i8* %b, i8** @g3 @@ -693,13 +663,13 @@ } define i1 @captureICmp(i32* %x) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureICmp ; IS__TUNIT____-SAME: (i32* nofree readnone [[X:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = icmp eq i32* [[X]], null ; IS__TUNIT____-NEXT: ret i1 [[TMP1]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@captureICmp ; IS__CGSCC____-SAME: (i32* nofree readnone [[X:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = icmp eq i32* [[X]], null @@ -710,13 +680,13 @@ } define i1 @captureICmpRev(i32* %x) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureICmpRev ; IS__TUNIT____-SAME: (i32* nofree readnone [[X:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = icmp eq i32* null, [[X]] ; IS__TUNIT____-NEXT: ret i1 [[TMP1]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@captureICmpRev ; IS__CGSCC____-SAME: (i32* nofree readnone [[X:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = icmp eq i32* null, [[X]] @@ -727,12 +697,12 @@ } define i1 @nocaptureInboundsGEPICmp(i32* %x) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureInboundsGEPICmp ; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureInboundsGEPICmp ; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false @@ -744,12 +714,12 @@ } define i1 @nocaptureInboundsGEPICmpRev(i32* %x) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureInboundsGEPICmpRev ; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureInboundsGEPICmpRev ; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 true @@ -761,14 +731,14 @@ } define i1 @nocaptureDereferenceableOrNullICmp(i32* dereferenceable_or_null(4) %x) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureDereferenceableOrNullICmp ; IS__TUNIT____-SAME: (i32* nocapture nofree readnone dereferenceable_or_null(4) [[X:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8* ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null ; IS__TUNIT____-NEXT: ret i1 [[TMP2]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureDereferenceableOrNullICmp ; IS__CGSCC____-SAME: (i32* nocapture nofree readnone dereferenceable_or_null(4) [[X:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8* @@ -781,14 +751,14 @@ } define i1 @captureDereferenceableOrNullICmp(i32* dereferenceable_or_null(4) %x) null_pointer_is_valid { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp ; IS__TUNIT____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) [[ATTR10:#.*]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8* ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null ; IS__TUNIT____-NEXT: ret i1 [[TMP2]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp ; IS__CGSCC____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) [[ATTR12:#.*]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8* diff --git a/llvm/test/Transforms/Attributor/nocapture-2.ll b/llvm/test/Transforms/Attributor/nocapture-2.ll --- a/llvm/test/Transforms/Attributor/nocapture-2.ll +++ b/llvm/test/Transforms/Attributor/nocapture-2.ll @@ -18,7 +18,7 @@ ; ; no-capture is missing on %p because it is not dereferenceable define i32 @is_null_return(i32* %p) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@is_null_return ; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -26,7 +26,7 @@ ; IS__TUNIT____-NEXT: [[CONV:%.*]] = zext i1 [[CMP]] to i32 ; IS__TUNIT____-NEXT: ret i32 [[CONV]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@is_null_return ; IS__CGSCC____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -52,7 +52,7 @@ ; ; no-capture is missing on %p because it is not dereferenceable define i32 @is_null_control(i32* %p) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@is_null_control ; IS__TUNIT____-SAME: (i32* nofree [[P:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -75,7 +75,7 @@ ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[RETVAL]], align 4 ; IS__TUNIT____-NEXT: ret i32 [[TMP0]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@is_null_control ; IS__CGSCC____-SAME: (i32* nofree [[P:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -404,14 +404,14 @@ ; ; There should *not* be a no-capture attribute on %a define i64* @not_captured_but_returned_0(i64* %a) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_but_returned_0 ; IS__TUNIT____-SAME: (i64* nofree nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: store i64 0, i64* [[A]], align 8 ; IS__TUNIT____-NEXT: ret i64* [[A]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_but_returned_0 ; IS__CGSCC____-SAME: (i64* nofree nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -432,7 +432,7 @@ ; ; There should *not* be a no-capture attribute on %a define i64* @not_captured_but_returned_1(i64* %a) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_but_returned_1 ; IS__TUNIT____-SAME: (i64* nofree nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: entry: @@ -440,7 +440,7 @@ ; IS__TUNIT____-NEXT: store i64 1, i64* [[ADD_PTR]], align 8 ; IS__TUNIT____-NEXT: ret i64* [[ADD_PTR]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_but_returned_1 ; IS__CGSCC____-SAME: (i64* nofree nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: entry: @@ -462,7 +462,7 @@ ; } ; define void @test_not_captured_but_returned_calls(i64* %a) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_not_captured_but_returned_calls ; IS__TUNIT____-SAME: (i64* nocapture nofree writeonly align 8 [[A:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: entry: @@ -470,7 +470,7 @@ ; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i64* @not_captured_but_returned_1(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) [[ATTR9]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_not_captured_but_returned_calls ; IS__CGSCC____-SAME: (i64* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: entry: @@ -492,14 +492,14 @@ ; ; There should *not* be a no-capture attribute on %a define i64* @negative_test_not_captured_but_returned_call_0a(i64* %a) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0a ; IS__TUNIT____-SAME: (i64* nofree returned writeonly align 8 "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) [[ATTR9]] ; IS__TUNIT____-NEXT: ret i64* [[CALL]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0a ; IS__CGSCC____-SAME: (i64* nofree nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: entry: @@ -519,7 +519,7 @@ ; ; There should *not* be a no-capture attribute on %a define void @negative_test_not_captured_but_returned_call_0b(i64* %a) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0b ; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 [[A:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: entry: @@ -528,7 +528,7 @@ ; IS__TUNIT____-NEXT: store i64 [[TMP0]], i64* [[A]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0b ; IS__CGSCC____-SAME: (i64* nofree nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: entry: @@ -552,14 +552,14 @@ ; ; There should *not* be a no-capture attribute on %a define i64* @negative_test_not_captured_but_returned_call_1a(i64* %a) #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1a ; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CALL:%.*]] = call nonnull align 8 dereferenceable(8) i64* @not_captured_but_returned_1(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) [[ATTR9]] ; IS__TUNIT____-NEXT: ret i64* [[CALL]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1a ; IS__CGSCC____-SAME: (i64* nofree nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4]] { ; IS__CGSCC____-NEXT: entry: @@ -579,7 +579,7 @@ ; ; There should *not* be a no-capture attribute on %a define void @negative_test_not_captured_but_returned_call_1b(i64* %a) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind uwtable willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind uwtable willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1b ; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 [[A:%.*]]) [[ATTR5:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -588,7 +588,7 @@ ; IS__TUNIT____-NEXT: store i64 [[TMP0]], i64* [[CALL]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind uwtable willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1b ; IS__CGSCC____-SAME: (i64* nofree nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) [[ATTR5:#.*]] { ; IS__CGSCC____-NEXT: entry: diff --git a/llvm/test/Transforms/Attributor/nofree.ll b/llvm/test/Transforms/Attributor/nofree.ll --- a/llvm/test/Transforms/Attributor/nofree.ll +++ b/llvm/test/Transforms/Attributor/nofree.ll @@ -17,12 +17,12 @@ ; TEST 1 (positive case) define void @only_return() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@only_return ; IS__TUNIT____-SAME: () [[ATTR3:#.*]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@only_return ; IS__CGSCC____-SAME: () [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: ret void @@ -116,7 +116,7 @@ ; NOT_CGSCC_NPM-SAME: () [[ATTR4:#.*]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion1 ; IS__CGSCC_NPM-SAME: () [[ATTR4:#.*]] { ; IS__CGSCC_NPM-NEXT: unreachable @@ -131,7 +131,7 @@ ; NOT_CGSCC_NPM-SAME: () [[ATTR4]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion2 ; IS__CGSCC_NPM-SAME: () [[ATTR4]] { ; IS__CGSCC_NPM-NEXT: unreachable @@ -194,12 +194,12 @@ declare void @nofree_function() nofree readnone #0 define void @call_nofree_function() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_nofree_function ; IS__TUNIT____-SAME: () [[ATTR3]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_nofree_function ; IS__CGSCC____-SAME: () [[ATTR3]] { ; IS__CGSCC____-NEXT: ret void @@ -252,12 +252,12 @@ declare float @llvm.floor.f32(float) define void @call_floor(float %a) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_floor ; IS__TUNIT____-SAME: (float [[A:%.*]]) [[ATTR3]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_floor ; IS__CGSCC____-SAME: (float [[A:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: ret void @@ -267,13 +267,13 @@ } define float @call_floor2(float %a) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_floor2 ; IS__TUNIT____-SAME: (float [[A:%.*]]) [[ATTR3]] { ; IS__TUNIT____-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) [[ATTR11:#.*]] ; IS__TUNIT____-NEXT: ret float [[C]] ; -; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_floor2 ; IS__CGSCC____-SAME: (float [[A:%.*]]) [[ATTR7:#.*]] { ; IS__CGSCC____-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) [[ATTR12:#.*]] @@ -287,12 +287,12 @@ ; Check propagation. define void @f1() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@f1 ; IS__TUNIT____-SAME: () [[ATTR3]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@f1 ; IS__CGSCC____-SAME: () [[ATTR3]] { ; IS__CGSCC____-NEXT: ret void @@ -302,12 +302,12 @@ } define void @f2() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@f2 ; IS__TUNIT____-SAME: () [[ATTR3]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@f2 ; IS__CGSCC____-SAME: () [[ATTR3]] { ; IS__CGSCC____-NEXT: ret void diff --git a/llvm/test/Transforms/Attributor/nonnull.ll b/llvm/test/Transforms/Attributor/nonnull.ll --- a/llvm/test/Transforms/Attributor/nonnull.ll +++ b/llvm/test/Transforms/Attributor/nonnull.ll @@ -22,12 +22,12 @@ ; Return a pointer trivially nonnull (argument attribute) define i8* @test2(i8* nonnull %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 ; IS__TUNIT____-SAME: (i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: ret i8* [[P]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 ; IS__CGSCC____-SAME: (i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: ret i8* [[P]] @@ -37,27 +37,27 @@ define i8* @test2A(i1 %c, i8* %ret) { ; ATTRIBUTOR: define nonnull i8* @test2A(i1 %c, i8* nofree nonnull readnone returned %ret) -; NOT_CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test2A -; NOT_CGSCC_OPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) [[ATTR0:#.*]] { -; NOT_CGSCC_OPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] -; NOT_CGSCC_OPM: A: -; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR12:#.*]] [ "nonnull"(i8* [[RET]]) ] -; NOT_CGSCC_OPM-NEXT: ret i8* [[RET]] -; NOT_CGSCC_OPM: B: -; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR12]] [ "nonnull"(i8* [[RET]]) ] -; NOT_CGSCC_OPM-NEXT: ret i8* [[RET]] -; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test2A -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) [[ATTR0:#.*]] { -; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] -; IS__CGSCC_OPM: A: -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR13:#.*]] [ "nonnull"(i8* [[RET]]) ] -; IS__CGSCC_OPM-NEXT: ret i8* [[RET]] -; IS__CGSCC_OPM: B: -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR13]] [ "nonnull"(i8* [[RET]]) ] -; IS__CGSCC_OPM-NEXT: ret i8* [[RET]] +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test2A +; NOT_CGSCC_NPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) [[ATTR2:#.*]] { +; NOT_CGSCC_NPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] +; NOT_CGSCC_NPM: A: +; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR15:#.*]] [ "nonnull"(i8* [[RET]]) ] +; NOT_CGSCC_NPM-NEXT: ret i8* [[RET]] +; NOT_CGSCC_NPM: B: +; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR15]] [ "nonnull"(i8* [[RET]]) ] +; NOT_CGSCC_NPM-NEXT: ret i8* [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test2A +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] +; IS__CGSCC_NPM: A: +; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR14:#.*]] [ "nonnull"(i8* [[RET]]) ] +; IS__CGSCC_NPM-NEXT: ret i8* [[RET]] +; IS__CGSCC_NPM: B: +; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR14]] [ "nonnull"(i8* [[RET]]) ] +; IS__CGSCC_NPM-NEXT: ret i8* [[RET]] ; br i1 %c, label %A, label %B A: @@ -70,27 +70,27 @@ define i8* @test2B(i1 %c, i8* %ret) { ; ATTRIBUTOR: define nonnull dereferenceable(4) i8* @test2B(i1 %c, i8* nofree nonnull readnone returned dereferenceable(4) %ret) -; NOT_CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test2B -; NOT_CGSCC_OPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) [[ATTR0]] { -; NOT_CGSCC_OPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] -; NOT_CGSCC_OPM: A: -; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR12]] [ "dereferenceable"(i8* [[RET]], i32 4) ] -; NOT_CGSCC_OPM-NEXT: ret i8* [[RET]] -; NOT_CGSCC_OPM: B: -; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR12]] [ "dereferenceable"(i8* [[RET]], i32 4) ] -; NOT_CGSCC_OPM-NEXT: ret i8* [[RET]] -; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test2B -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] -; IS__CGSCC_OPM: A: -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR13]] [ "dereferenceable"(i8* [[RET]], i32 4) ] -; IS__CGSCC_OPM-NEXT: ret i8* [[RET]] -; IS__CGSCC_OPM: B: -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR13]] [ "dereferenceable"(i8* [[RET]], i32 4) ] -; IS__CGSCC_OPM-NEXT: ret i8* [[RET]] +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test2B +; NOT_CGSCC_NPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) [[ATTR2]] { +; NOT_CGSCC_NPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] +; NOT_CGSCC_NPM: A: +; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR15]] [ "dereferenceable"(i8* [[RET]], i32 4) ] +; NOT_CGSCC_NPM-NEXT: ret i8* [[RET]] +; NOT_CGSCC_NPM: B: +; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR15]] [ "dereferenceable"(i8* [[RET]], i32 4) ] +; NOT_CGSCC_NPM-NEXT: ret i8* [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test2B +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) [[ATTR2]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] +; IS__CGSCC_NPM: A: +; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR14]] [ "dereferenceable"(i8* [[RET]], i32 4) ] +; IS__CGSCC_NPM-NEXT: ret i8* [[RET]] +; IS__CGSCC_NPM: B: +; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR14]] [ "dereferenceable"(i8* [[RET]], i32 4) ] +; IS__CGSCC_NPM-NEXT: ret i8* [[RET]] ; br i1 %c, label %A, label %B A: @@ -148,12 +148,12 @@ define i8* @test4_helper() { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test4_helper -; NOT_CGSCC_NPM-SAME: () [[ATTR2:#.*]] { +; NOT_CGSCC_NPM-SAME: () [[ATTR3:#.*]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4_helper -; IS__CGSCC_NPM-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC_NPM-SAME: () [[ATTR3:#.*]] { ; IS__CGSCC_NPM-NEXT: unreachable ; %ret = call i8* @test4() @@ -163,12 +163,12 @@ define i8* @test4() { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test4 -; NOT_CGSCC_NPM-SAME: () [[ATTR2]] { +; NOT_CGSCC_NPM-SAME: () [[ATTR3]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4 -; IS__CGSCC_NPM-SAME: () [[ATTR2]] { +; IS__CGSCC_NPM-SAME: () [[ATTR3]] { ; IS__CGSCC_NPM-NEXT: unreachable ; %ret = call i8* @test4_helper() @@ -180,14 +180,14 @@ define i8* @test5_helper(i1 %c) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test5_helper -; NOT_CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR3:#.*]] { +; NOT_CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR4:#.*]] { ; NOT_CGSCC_NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; NOT_CGSCC_NPM: rec: ; NOT_CGSCC_NPM-NEXT: br label [[END]] ; NOT_CGSCC_NPM: end: ; NOT_CGSCC_NPM-NEXT: ret i8* null ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test5_helper ; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] @@ -207,10 +207,10 @@ define i8* @test5(i1 %c) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test5 -; NOT_CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR3]] { +; NOT_CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR4]] { ; NOT_CGSCC_NPM-NEXT: ret i8* null ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test5 ; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR1]] { ; IS__CGSCC_NPM-NEXT: ret i8* null @@ -223,7 +223,7 @@ define i8* @test6a() { ; CHECK: Function Attrs: noreturn ; CHECK-LABEL: define {{[^@]+}}@test6a -; CHECK-SAME: () [[ATTR3:#.*]] { +; CHECK-SAME: () [[ATTR4:#.*]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[RET:%.*]] = call i8* @ret_nonnull() ; CHECK-NEXT: br label [[LOOP:%.*]] @@ -265,13 +265,13 @@ } define i8* @test7(i8* %a) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7 ; IS__TUNIT____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 0 ; IS__TUNIT____-NEXT: ret i8* [[B]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test7 ; IS__CGSCC____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 0 @@ -282,13 +282,13 @@ } define i8* @test8(i8* %a) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test8 ; IS__TUNIT____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 1 ; IS__TUNIT____-NEXT: ret i8* [[B]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test8 ; IS__CGSCC____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 1 @@ -299,13 +299,13 @@ } define i8* @test9(i8* %a, i64 %n) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test9 ; IS__TUNIT____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 [[N]] ; IS__TUNIT____-NEXT: ret i8* [[B]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test9 ; IS__CGSCC____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 [[N]] @@ -318,19 +318,19 @@ ; ATTRIBUTOR_OPM: define i8* @test10 ; ATTRIBUTOR_NPM: define nonnull i8* @test10 define i8* @test10(i8* %a, i64 %n) { -; NOT_CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test10 -; NOT_CGSCC_OPM-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) [[ATTR0]] { -; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR12]] -; NOT_CGSCC_OPM-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 [[N]] -; NOT_CGSCC_OPM-NEXT: ret i8* [[B]] -; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test10 -; IS__CGSCC_OPM-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR13]] -; IS__CGSCC_OPM-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 [[N]] -; IS__CGSCC_OPM-NEXT: ret i8* [[B]] +; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test10 +; NOT_CGSCC_NPM-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) [[ATTR2]] { +; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR15]] +; NOT_CGSCC_NPM-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 [[N]] +; NOT_CGSCC_NPM-NEXT: ret i8* [[B]] +; +; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test10 +; IS__CGSCC_NPM-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) [[ATTR2]] { +; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR14]] +; IS__CGSCC_NPM-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 [[N]] +; IS__CGSCC_NPM-NEXT: ret i8* [[B]] ; %cmp = icmp ne i64 %n, 0 call void @llvm.assume(i1 %cmp) @@ -384,19 +384,19 @@ ; Simple Argument Tests declare i8* @unknown() define void @test13_helper() { -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test13_helper() { -; NOT_CGSCC_OPM-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull() -; NOT_CGSCC_OPM-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown() -; NOT_CGSCC_OPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]]) [[ATTR4:#.*]] -; NOT_CGSCC_OPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13_helper() { -; IS__CGSCC_OPM-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull() -; IS__CGSCC_OPM-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown() -; IS__CGSCC_OPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]]) [[ATTR5:#.*]] -; IS__CGSCC_OPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test13_helper() { +; NOT_CGSCC_NPM-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull() +; NOT_CGSCC_NPM-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown() +; NOT_CGSCC_NPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]]) [[ATTR6:#.*]] +; NOT_CGSCC_NPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13_helper() { +; IS__CGSCC_NPM-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull() +; IS__CGSCC_NPM-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown() +; IS__CGSCC_NPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]]) [[ATTR5:#.*]] +; IS__CGSCC_NPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret void ; %nonnullptr = tail call i8* @ret_nonnull() %maybenullptr = tail call i8* @unknown() @@ -405,21 +405,21 @@ ret void } define internal void @test13(i8* %a, i8* %b, i8* %c) { -; NOT_CGSCC_OPM: Function Attrs: nounwind -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test13 -; NOT_CGSCC_OPM-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) [[ATTR4]] { -; NOT_CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM: Function Attrs: nounwind -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13 -; IS__CGSCC_OPM-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) [[ATTR5]] { -; IS__CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM: Function Attrs: nounwind +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test13 +; NOT_CGSCC_NPM-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) [[ATTR6]] { +; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13 +; IS__CGSCC_NPM-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) [[ATTR5]] { +; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret void ; call void @use_i8_ptr(i8* %a) call void @use_i8_ptr(i8* %b) @@ -443,49 +443,49 @@ define internal i32* @f1(i32* %arg) { ; FIXME: missing nonnull It should be nonnull @f1(i32* nonnull readonly %arg) -; NOT_CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@f1 -; NOT_CGSCC_OPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR5:#.*]] { -; NOT_CGSCC_OPM-NEXT: bb: -; NOT_CGSCC_OPM-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null -; NOT_CGSCC_OPM-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]] -; NOT_CGSCC_OPM: bb1: -; NOT_CGSCC_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4 -; NOT_CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]] -; NOT_CGSCC_OPM: bb4: -; NOT_CGSCC_OPM-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1 -; NOT_CGSCC_OPM-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) [[ATTR13:#.*]] -; NOT_CGSCC_OPM-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1 -; NOT_CGSCC_OPM-NEXT: br label [[BB9]] -; NOT_CGSCC_OPM: bb6: -; NOT_CGSCC_OPM-NEXT: [[TMP7:%.*]] = tail call nonnull i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) [[ATTR13]] -; NOT_CGSCC_OPM-NEXT: ret i32* [[TMP7]] -; NOT_CGSCC_OPM: bb9: -; NOT_CGSCC_OPM-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ] -; NOT_CGSCC_OPM-NEXT: ret i32* [[TMP10]] -; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC_OPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR6:#.*]] { -; IS__CGSCC_OPM-NEXT: bb: -; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null -; IS__CGSCC_OPM-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]] -; IS__CGSCC_OPM: bb1: -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]] -; IS__CGSCC_OPM: bb4: -; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1 -; IS__CGSCC_OPM-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) [[ATTR14:#.*]] -; IS__CGSCC_OPM-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1 -; IS__CGSCC_OPM-NEXT: br label [[BB9]] -; IS__CGSCC_OPM: bb6: -; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = tail call nonnull i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) [[ATTR14]] -; IS__CGSCC_OPM-NEXT: ret i32* [[TMP7]] -; IS__CGSCC_OPM: bb9: -; IS__CGSCC_OPM-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ] -; IS__CGSCC_OPM-NEXT: ret i32* [[TMP10]] +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f1 +; NOT_CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR7:#.*]] { +; NOT_CGSCC_NPM-NEXT: bb: +; NOT_CGSCC_NPM-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null +; NOT_CGSCC_NPM-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]] +; NOT_CGSCC_NPM: bb1: +; NOT_CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4 +; NOT_CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]] +; NOT_CGSCC_NPM: bb4: +; NOT_CGSCC_NPM-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1 +; NOT_CGSCC_NPM-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) [[ATTR16:#.*]] +; NOT_CGSCC_NPM-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1 +; NOT_CGSCC_NPM-NEXT: br label [[BB9]] +; NOT_CGSCC_NPM: bb6: +; NOT_CGSCC_NPM-NEXT: [[TMP7:%.*]] = tail call nonnull i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) [[ATTR16]] +; NOT_CGSCC_NPM-NEXT: ret i32* [[TMP7]] +; NOT_CGSCC_NPM: bb9: +; NOT_CGSCC_NPM-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ] +; NOT_CGSCC_NPM-NEXT: ret i32* [[TMP10]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1 +; IS__CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR6:#.*]] { +; IS__CGSCC_NPM-NEXT: bb: +; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null +; IS__CGSCC_NPM-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]] +; IS__CGSCC_NPM: bb1: +; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4 +; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]] +; IS__CGSCC_NPM: bb4: +; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1 +; IS__CGSCC_NPM-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) [[ATTR15:#.*]] +; IS__CGSCC_NPM-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1 +; IS__CGSCC_NPM-NEXT: br label [[BB9]] +; IS__CGSCC_NPM: bb6: +; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = tail call nonnull i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) [[ATTR15]] +; IS__CGSCC_NPM-NEXT: ret i32* [[TMP7]] +; IS__CGSCC_NPM: bb9: +; IS__CGSCC_NPM-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ] +; IS__CGSCC_NPM-NEXT: ret i32* [[TMP10]] ; bb: @@ -513,19 +513,19 @@ } define internal i32* @f2(i32* %arg) { -; NOT_CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@f2 -; NOT_CGSCC_OPM-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR5]] { -; NOT_CGSCC_OPM-NEXT: bb: -; NOT_CGSCC_OPM-NEXT: [[TMP:%.*]] = tail call nonnull i32* @f1(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) [[ATTR13]] -; NOT_CGSCC_OPM-NEXT: ret i32* [[TMP]] -; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f2 -; IS__CGSCC_OPM-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR6]] { -; IS__CGSCC_OPM-NEXT: bb: -; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = tail call nonnull i32* @f1(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) [[ATTR14]] -; IS__CGSCC_OPM-NEXT: ret i32* [[TMP]] +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f2 +; NOT_CGSCC_NPM-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR7]] { +; NOT_CGSCC_NPM-NEXT: bb: +; NOT_CGSCC_NPM-NEXT: [[TMP:%.*]] = tail call nonnull i32* @f1(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) [[ATTR16]] +; NOT_CGSCC_NPM-NEXT: ret i32* [[TMP]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2 +; IS__CGSCC_NPM-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR6]] { +; IS__CGSCC_NPM-NEXT: bb: +; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = tail call nonnull i32* @f1(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) [[ATTR15]] +; IS__CGSCC_NPM-NEXT: ret i32* [[TMP]] ; bb: %tmp = tail call i32* @f1(i32* %arg) @@ -534,19 +534,19 @@ define dso_local noalias i32* @f3(i32* %arg) { ; FIXME: missing nonnull. It should be nonnull @f3(i32* nonnull readonly %arg) -; NOT_CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@f3 -; NOT_CGSCC_OPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR5]] { -; NOT_CGSCC_OPM-NEXT: bb: -; NOT_CGSCC_OPM-NEXT: [[TMP:%.*]] = call nonnull i32* @f1(i32* nofree readonly [[ARG]]) [[ATTR13]] -; NOT_CGSCC_OPM-NEXT: ret i32* [[TMP]] -; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f3 -; IS__CGSCC_OPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR6]] { -; IS__CGSCC_OPM-NEXT: bb: -; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = call nonnull i32* @f1(i32* nofree readonly [[ARG]]) [[ATTR14]] -; IS__CGSCC_OPM-NEXT: ret i32* [[TMP]] +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f3 +; NOT_CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR7]] { +; NOT_CGSCC_NPM-NEXT: bb: +; NOT_CGSCC_NPM-NEXT: [[TMP:%.*]] = call nonnull i32* @f1(i32* nofree readonly [[ARG]]) [[ATTR16]] +; NOT_CGSCC_NPM-NEXT: ret i32* [[TMP]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3 +; IS__CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR6]] { +; IS__CGSCC_NPM-NEXT: bb: +; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = call nonnull i32* @f1(i32* nofree readonly [[ARG]]) [[ATTR15]] +; IS__CGSCC_NPM-NEXT: ret i32* [[TMP]] ; bb: ; FIXME: missing nonnull. It should be @f1(i32* nonnull readonly %arg) @@ -577,29 +577,29 @@ ; fun2(nonnull %a, %b) ; We can say that %a is nonnull but %b is not. define void @f16(i8* %a, i8 * %b, i8 %c) { -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@f16 -; NOT_CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR6:#.*]] { -; NOT_CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] -; NOT_CGSCC_OPM: if.then: -; NOT_CGSCC_OPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: ret void -; NOT_CGSCC_OPM: if.else: -; NOT_CGSCC_OPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM: Function Attrs: nounwind willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f16 -; IS__CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR7:#.*]] { -; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] -; IS__CGSCC_OPM: if.then: -; IS__CGSCC_OPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) [[ATTR7]] -; IS__CGSCC_OPM-NEXT: ret void -; IS__CGSCC_OPM: if.else: -; IS__CGSCC_OPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) [[ATTR7]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f16 +; NOT_CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR9:#.*]] { +; NOT_CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; NOT_CGSCC_NPM: if.then: +; NOT_CGSCC_NPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) [[ATTR8:#.*]] +; NOT_CGSCC_NPM-NEXT: ret void +; NOT_CGSCC_NPM: if.else: +; NOT_CGSCC_NPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f16 +; IS__CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR8:#.*]] { +; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__CGSCC_NPM: if.then: +; IS__CGSCC_NPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) [[ATTR7:#.*]] +; IS__CGSCC_NPM-NEXT: ret void +; IS__CGSCC_NPM: if.else: +; IS__CGSCC_NPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: ret void ; %cmp = icmp eq i8 %c, 0 br i1 %cmp, label %if.then, label %if.else @@ -618,35 +618,35 @@ ; fun1(nonnull %a) ; We can say that %a is nonnull define void @f17(i8* %a, i8 %c) { -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@f17 -; NOT_CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) [[ATTR6]] { -; NOT_CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] -; NOT_CGSCC_OPM: if.then: -; NOT_CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: br label [[CONT:%.*]] -; NOT_CGSCC_OPM: if.else: -; NOT_CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: br label [[CONT]] -; NOT_CGSCC_OPM: cont: -; NOT_CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM: Function Attrs: nounwind willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f17 -; IS__CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) [[ATTR7]] { -; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] -; IS__CGSCC_OPM: if.then: -; IS__CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR7]] -; IS__CGSCC_OPM-NEXT: br label [[CONT:%.*]] -; IS__CGSCC_OPM: if.else: -; IS__CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR7]] -; IS__CGSCC_OPM-NEXT: br label [[CONT]] -; IS__CGSCC_OPM: cont: -; IS__CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR7]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f17 +; NOT_CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) [[ATTR9]] { +; NOT_CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; NOT_CGSCC_NPM: if.then: +; NOT_CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: br label [[CONT:%.*]] +; NOT_CGSCC_NPM: if.else: +; NOT_CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: br label [[CONT]] +; NOT_CGSCC_NPM: cont: +; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f17 +; IS__CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) [[ATTR8]] { +; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__CGSCC_NPM: if.then: +; IS__CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR7]] +; IS__CGSCC_NPM-NEXT: br label [[CONT:%.*]] +; IS__CGSCC_NPM: if.else: +; IS__CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR7]] +; IS__CGSCC_NPM-NEXT: br label [[CONT]] +; IS__CGSCC_NPM: cont: +; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: ret void ; %cmp = icmp eq i8 %c, 0 br i1 %cmp, label %if.then, label %if.else @@ -672,53 +672,53 @@ ; fun1(nonnull %a) define void @f18(i8* %a, i8* %b, i8 %c) { -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@f18 -; NOT_CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR6]] { -; NOT_CGSCC_OPM-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] -; NOT_CGSCC_OPM: if.then: -; NOT_CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: br label [[CONT:%.*]] -; NOT_CGSCC_OPM: if.else: -; NOT_CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: br label [[CONT]] -; NOT_CGSCC_OPM: cont: -; NOT_CGSCC_OPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1 -; NOT_CGSCC_OPM-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]] -; NOT_CGSCC_OPM: cont.then: -; NOT_CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: br label [[CONT2:%.*]] -; NOT_CGSCC_OPM: cont.else: -; NOT_CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: br label [[CONT2]] -; NOT_CGSCC_OPM: cont2: -; NOT_CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM: Function Attrs: nounwind willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f18 -; IS__CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR7]] { -; IS__CGSCC_OPM-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] -; IS__CGSCC_OPM: if.then: -; IS__CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR7]] -; IS__CGSCC_OPM-NEXT: br label [[CONT:%.*]] -; IS__CGSCC_OPM: if.else: -; IS__CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR7]] -; IS__CGSCC_OPM-NEXT: br label [[CONT]] -; IS__CGSCC_OPM: cont: -; IS__CGSCC_OPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1 -; IS__CGSCC_OPM-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]] -; IS__CGSCC_OPM: cont.then: -; IS__CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR7]] -; IS__CGSCC_OPM-NEXT: br label [[CONT2:%.*]] -; IS__CGSCC_OPM: cont.else: -; IS__CGSCC_OPM-NEXT: tail call void @fun0() [[ATTR7]] -; IS__CGSCC_OPM-NEXT: br label [[CONT2]] -; IS__CGSCC_OPM: cont2: -; IS__CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR7]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f18 +; NOT_CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR9]] { +; NOT_CGSCC_NPM-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; NOT_CGSCC_NPM: if.then: +; NOT_CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: br label [[CONT:%.*]] +; NOT_CGSCC_NPM: if.else: +; NOT_CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: br label [[CONT]] +; NOT_CGSCC_NPM: cont: +; NOT_CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1 +; NOT_CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]] +; NOT_CGSCC_NPM: cont.then: +; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: br label [[CONT2:%.*]] +; NOT_CGSCC_NPM: cont.else: +; NOT_CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: br label [[CONT2]] +; NOT_CGSCC_NPM: cont2: +; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR8]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f18 +; IS__CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) [[ATTR8]] { +; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__CGSCC_NPM: if.then: +; IS__CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR7]] +; IS__CGSCC_NPM-NEXT: br label [[CONT:%.*]] +; IS__CGSCC_NPM: if.else: +; IS__CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR7]] +; IS__CGSCC_NPM-NEXT: br label [[CONT]] +; IS__CGSCC_NPM: cont: +; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]] +; IS__CGSCC_NPM: cont.then: +; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: br label [[CONT2:%.*]] +; IS__CGSCC_NPM: cont.else: +; IS__CGSCC_NPM-NEXT: tail call void @fun0() [[ATTR7]] +; IS__CGSCC_NPM-NEXT: br label [[CONT2]] +; IS__CGSCC_NPM: cont2: +; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: ret void ; %cmp1 = icmp eq i8 %c, 0 br i1 %cmp1, label %if.then, label %if.else @@ -745,35 +745,35 @@ ; TEST 19: Loop define void @f19(i8* %a, i8* %b, i8 %c) { -; NOT_CGSCC_OPM: Function Attrs: nounwind -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@f19 -; NOT_CGSCC_OPM-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) [[ATTR4]] { -; NOT_CGSCC_OPM-NEXT: br label [[LOOP_HEADER:%.*]] -; NOT_CGSCC_OPM: loop.header: -; NOT_CGSCC_OPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]] -; NOT_CGSCC_OPM: loop.body: -; NOT_CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: br label [[LOOP_HEADER]] -; NOT_CGSCC_OPM: loop.exit: -; NOT_CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM: Function Attrs: nounwind -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f19 -; IS__CGSCC_OPM-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) [[ATTR5]] { -; IS__CGSCC_OPM-NEXT: br label [[LOOP_HEADER:%.*]] -; IS__CGSCC_OPM: loop.header: -; IS__CGSCC_OPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]] -; IS__CGSCC_OPM: loop.body: -; IS__CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: br label [[LOOP_HEADER]] -; IS__CGSCC_OPM: loop.exit: -; IS__CGSCC_OPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM: Function Attrs: nounwind +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f19 +; NOT_CGSCC_NPM-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) [[ATTR6]] { +; NOT_CGSCC_NPM-NEXT: br label [[LOOP_HEADER:%.*]] +; NOT_CGSCC_NPM: loop.header: +; NOT_CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]] +; NOT_CGSCC_NPM: loop.body: +; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: br label [[LOOP_HEADER]] +; NOT_CGSCC_NPM: loop.exit: +; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f19 +; IS__CGSCC_NPM-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) [[ATTR5]] { +; IS__CGSCC_NPM-NEXT: br label [[LOOP_HEADER:%.*]] +; IS__CGSCC_NPM: loop.header: +; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]] +; IS__CGSCC_NPM: loop.body: +; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: br label [[LOOP_HEADER]] +; IS__CGSCC_NPM: loop.exit: +; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret void ; br label %loop.header loop.header: @@ -906,17 +906,17 @@ ; The nonnull callsite is guaranteed to execute, so the argument must be nonnull throughout the parent. define i8 @parent7(i8* %a) { -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@parent7 -; NOT_CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]]) { -; NOT_CGSCC_OPM-NEXT: [[RET:%.*]] = call i8 @use1safecall(i8* nonnull readonly [[A]]) [[ATTR14:#.*]] -; NOT_CGSCC_OPM-NEXT: call void @use1nonnull(i8* nonnull [[A]]) -; NOT_CGSCC_OPM-NEXT: ret i8 [[RET]] +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@parent7 +; NOT_CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]]) { +; NOT_CGSCC_NPM-NEXT: [[RET:%.*]] = call i8 @use1safecall(i8* nonnull readonly [[A]]) [[ATTR17:#.*]] +; NOT_CGSCC_NPM-NEXT: call void @use1nonnull(i8* nonnull [[A]]) +; NOT_CGSCC_NPM-NEXT: ret i8 [[RET]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@parent7 -; IS__CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]]) { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i8 @use1safecall(i8* nonnull readonly [[A]]) [[ATTR15:#.*]] -; IS__CGSCC_OPM-NEXT: call void @use1nonnull(i8* nonnull [[A]]) -; IS__CGSCC_OPM-NEXT: ret i8 [[RET]] +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@parent7 +; IS__CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]]) { +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i8 @use1safecall(i8* nonnull readonly [[A]]) [[ATTR16:#.*]] +; IS__CGSCC_NPM-NEXT: call void @use1nonnull(i8* nonnull [[A]]) +; IS__CGSCC_NPM-NEXT: ret i8 [[RET]] ; @@ -932,7 +932,7 @@ define i1 @parent8(i8* %a, i8* %bogus1, i8* %b) personality i8* bitcast (i32 (...)* @esfp to i8*){ ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@parent8 -; CHECK-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) [[ATTR4:#.*]] personality i8* bitcast (i32 (...)* @esfp to i8*) { +; CHECK-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) [[ATTR5:#.*]] personality i8* bitcast (i32 (...)* @esfp to i8*) { ; CHECK-NEXT: entry: ; CHECK-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]]) ; CHECK-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]] @@ -959,13 +959,13 @@ } define i32* @gep1(i32* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep1 ; IS__TUNIT____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 ; IS__TUNIT____-NEXT: ret i32* [[Q]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@gep1 ; IS__CGSCC____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 @@ -977,15 +977,15 @@ define i32* @gep1_no_null_opt(i32* %p) #0 { ; Should't be able to derive nonnull based on gep. -; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep1_no_null_opt -; IS__TUNIT____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR8:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR11:#.*]] { ; IS__TUNIT____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 ; IS__TUNIT____-NEXT: ret i32* [[Q]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@gep1_no_null_opt -; IS__CGSCC____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR10:#.*]] { ; IS__CGSCC____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 ; IS__CGSCC____-NEXT: ret i32* [[Q]] ; @@ -994,13 +994,13 @@ } define i32 addrspace(3)* @gep2(i32 addrspace(3)* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep2 ; IS__TUNIT____-SAME: (i32 addrspace(3)* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32 addrspace(3)* [[P]], i32 1 ; IS__TUNIT____-NEXT: ret i32 addrspace(3)* [[Q]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@gep2 ; IS__CGSCC____-SAME: (i32 addrspace(3)* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32 addrspace(3)* [[P]], i32 1 @@ -1012,12 +1012,12 @@ ; FIXME: We should propagate dereferenceable here but *not* nonnull define i32 addrspace(3)* @as(i32 addrspace(3)* dereferenceable(4) %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@as ; IS__TUNIT____-SAME: (i32 addrspace(3)* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 addrspace(3)* [[P]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@as ; IS__CGSCC____-SAME: (i32 addrspace(3)* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 addrspace(3)* [[P]] @@ -1027,7 +1027,7 @@ ; CHECK-NOT: @g2() define internal i32* @g2() { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@g2 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32* undef @@ -1036,12 +1036,12 @@ } define i32* @g1() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@g1 ; IS__TUNIT____-SAME: () [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32* inttoptr (i64 4 to i32*) ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@g1 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32* inttoptr (i64 4 to i32*) @@ -1052,17 +1052,17 @@ declare void @use_i32_ptr(i32* readnone nocapture) nounwind define internal void @called_by_weak(i32* %a) { -; NOT_CGSCC_OPM: Function Attrs: nounwind -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@called_by_weak -; NOT_CGSCC_OPM-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) [[ATTR4]] { -; NOT_CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM: Function Attrs: nounwind -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@called_by_weak -; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) [[ATTR5]] { -; IS__CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM: Function Attrs: nounwind +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@called_by_weak +; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) [[ATTR6]] { +; NOT_CGSCC_NPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@called_by_weak +; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) [[ATTR5]] { +; IS__CGSCC_NPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret void ; call void @use_i32_ptr(i32* %a) ret void @@ -1070,15 +1070,15 @@ ; Check we do not annotate the function interface of this weak function. define weak_odr void @weak_caller(i32* nonnull %a) { -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@weak_caller -; NOT_CGSCC_OPM-SAME: (i32* nonnull [[A:%.*]]) { -; NOT_CGSCC_OPM-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@weak_caller +; NOT_CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]]) { +; NOT_CGSCC_NPM-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@weak_caller -; IS__CGSCC_OPM-SAME: (i32* nonnull [[A:%.*]]) { -; IS__CGSCC_OPM-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret void +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@weak_caller +; IS__CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]]) { +; IS__CGSCC_NPM-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret void ; call void @called_by_weak(i32* %a) ret void @@ -1086,17 +1086,17 @@ ; Expect nonnull define internal void @control(i32* dereferenceable(4) %a) { -; NOT_CGSCC_OPM: Function Attrs: nounwind -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@control -; NOT_CGSCC_OPM-SAME: (i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) [[ATTR4]] { -; NOT_CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM: Function Attrs: nounwind -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@control -; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) [[ATTR5]] { -; IS__CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM: Function Attrs: nounwind +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@control +; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) [[ATTR6]] { +; NOT_CGSCC_NPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@control +; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) [[ATTR5]] { +; IS__CGSCC_NPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret void ; call void @use_i32_ptr(i32* %a) ret void @@ -1105,7 +1105,7 @@ define internal void @naked(i32* dereferenceable(4) %a) naked { ; CHECK: Function Attrs: naked ; CHECK-LABEL: define {{[^@]+}}@naked -; CHECK-SAME: (i32* dereferenceable(4) [[A:%.*]]) [[ATTR9:#.*]] { +; CHECK-SAME: (i32* dereferenceable(4) [[A:%.*]]) [[ATTR11:#.*]] { ; CHECK-NEXT: call void @use_i32_ptr(i32* [[A]]) ; CHECK-NEXT: ret void ; @@ -1116,7 +1116,7 @@ define internal void @optnone(i32* dereferenceable(4) %a) optnone noinline { ; CHECK: Function Attrs: noinline optnone ; CHECK-LABEL: define {{[^@]+}}@optnone -; CHECK-SAME: (i32* dereferenceable(4) [[A:%.*]]) [[ATTR10:#.*]] { +; CHECK-SAME: (i32* dereferenceable(4) [[A:%.*]]) [[ATTR12:#.*]] { ; CHECK-NEXT: call void @use_i32_ptr(i32* [[A]]) ; CHECK-NEXT: ret void ; @@ -1124,19 +1124,19 @@ ret void } define void @make_live(i32* nonnull dereferenceable(8) %a) { -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@make_live -; NOT_CGSCC_OPM-SAME: (i32* nonnull align 16 dereferenceable(8) [[A:%.*]]) { -; NOT_CGSCC_OPM-NEXT: call void @naked(i32* nonnull align 16 dereferenceable(8) [[A]]) -; NOT_CGSCC_OPM-NEXT: call void @control(i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: call void @optnone(i32* nonnull align 16 dereferenceable(8) [[A]]) -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@make_live -; IS__CGSCC_OPM-SAME: (i32* nonnull align 16 dereferenceable(8) [[A:%.*]]) { -; IS__CGSCC_OPM-NEXT: call void @naked(i32* nonnull align 16 dereferenceable(8) [[A]]) -; IS__CGSCC_OPM-NEXT: call void @control(i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: call void @optnone(i32* nonnull align 16 dereferenceable(8) [[A]]) -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@make_live +; NOT_CGSCC_NPM-SAME: (i32* nonnull align 16 dereferenceable(8) [[A:%.*]]) { +; NOT_CGSCC_NPM-NEXT: call void @naked(i32* nonnull align 16 dereferenceable(8) [[A]]) +; NOT_CGSCC_NPM-NEXT: call void @control(i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: call void @optnone(i32* nonnull align 16 dereferenceable(8) [[A]]) +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@make_live +; IS__CGSCC_NPM-SAME: (i32* nonnull align 16 dereferenceable(8) [[A:%.*]]) { +; IS__CGSCC_NPM-NEXT: call void @naked(i32* nonnull align 16 dereferenceable(8) [[A]]) +; IS__CGSCC_NPM-NEXT: call void @control(i32* noalias nocapture nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: call void @optnone(i32* nonnull align 16 dereferenceable(8) [[A]]) +; IS__CGSCC_NPM-NEXT: ret void ; call void @naked(i32* nonnull dereferenceable(8) align 16 %a) call void @control(i32* nonnull dereferenceable(8) align 16 %a) @@ -1155,53 +1155,53 @@ declare i32 @g(i32*) willreturn nounwind define i32 @nonnull_exec_ctx_1(i32* %a, i32 %b) { ; -; IS__TUNIT_OPM: Function Attrs: nounwind -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1 -; IS__TUNIT_OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR4:#.*]] { -; IS__TUNIT_OPM-NEXT: en: -; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; IS__TUNIT_OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; IS__TUNIT_OPM: ex: -; IS__TUNIT_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR4]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP5]] -; IS__TUNIT_OPM: hd: -; IS__TUNIT_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] -; IS__TUNIT_OPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR4]] -; IS__TUNIT_OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; IS__TUNIT_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; IS__TUNIT_OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] -; -; IS________NPM: Function Attrs: nounwind willreturn -; IS________NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1 -; IS________NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR6:#.*]] { -; IS________NPM-NEXT: en: -; IS________NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; IS________NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; IS________NPM: ex: -; IS________NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR6]] -; IS________NPM-NEXT: ret i32 [[TMP5]] -; IS________NPM: hd: -; IS________NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] -; IS________NPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR6]] -; IS________NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; IS________NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; IS________NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] -; -; IS__CGSCC_OPM: Function Attrs: nounwind -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1 -; IS__CGSCC_OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR5]] { -; IS__CGSCC_OPM-NEXT: en: -; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; IS__CGSCC_OPM: ex: -; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP5]] -; IS__CGSCC_OPM: hd: -; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] -; IS__CGSCC_OPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; IS__CGSCC_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; IS__CGSCC_OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; IS________OPM: Function Attrs: nounwind +; IS________OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1 +; IS________OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR6:#.*]] { +; IS________OPM-NEXT: en: +; IS________OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; IS________OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; IS________OPM: ex: +; IS________OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR6]] +; IS________OPM-NEXT: ret i32 [[TMP5]] +; IS________OPM: hd: +; IS________OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] +; IS________OPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR6]] +; IS________OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; IS________OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; IS________OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; +; IS__TUNIT_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1 +; IS__TUNIT_NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR9:#.*]] { +; IS__TUNIT_NPM-NEXT: en: +; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; IS__TUNIT_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; IS__TUNIT_NPM: ex: +; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR8:#.*]] +; IS__TUNIT_NPM-NEXT: ret i32 [[TMP5]] +; IS__TUNIT_NPM: hd: +; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] +; IS__TUNIT_NPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR8]] +; IS__TUNIT_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; IS__TUNIT_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; IS__TUNIT_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1 +; IS__CGSCC_NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR8]] { +; IS__CGSCC_NPM-NEXT: en: +; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; IS__CGSCC_NPM: ex: +; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: ret i32 [[TMP5]] +; IS__CGSCC_NPM: hd: +; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] +; IS__CGSCC_NPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] ; en: %tmp3 = icmp eq i32 %b, 0 @@ -1221,59 +1221,59 @@ define i32 @nonnull_exec_ctx_1b(i32* %a, i32 %b) { ; -; IS__TUNIT_OPM: Function Attrs: nounwind -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b -; IS__TUNIT_OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR4]] { -; IS__TUNIT_OPM-NEXT: en: -; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; IS__TUNIT_OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; IS__TUNIT_OPM: ex: -; IS__TUNIT_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR4]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP5]] -; IS__TUNIT_OPM: hd: -; IS__TUNIT_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] -; IS__TUNIT_OPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR4]] -; IS__TUNIT_OPM-NEXT: br label [[HD2]] -; IS__TUNIT_OPM: hd2: -; IS__TUNIT_OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; IS__TUNIT_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; IS__TUNIT_OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] -; -; IS________NPM: Function Attrs: nounwind willreturn -; IS________NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b -; IS________NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR6]] { -; IS________NPM-NEXT: en: -; IS________NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; IS________NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; IS________NPM: ex: -; IS________NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR6]] -; IS________NPM-NEXT: ret i32 [[TMP5]] -; IS________NPM: hd: -; IS________NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] -; IS________NPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR6]] -; IS________NPM-NEXT: br label [[HD2]] -; IS________NPM: hd2: -; IS________NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; IS________NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; IS________NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] -; -; IS__CGSCC_OPM: Function Attrs: nounwind -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b -; IS__CGSCC_OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR5]] { -; IS__CGSCC_OPM-NEXT: en: -; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; IS__CGSCC_OPM: ex: -; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP5]] -; IS__CGSCC_OPM: hd: -; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] -; IS__CGSCC_OPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: br label [[HD2]] -; IS__CGSCC_OPM: hd2: -; IS__CGSCC_OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; IS__CGSCC_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; IS__CGSCC_OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; IS________OPM: Function Attrs: nounwind +; IS________OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b +; IS________OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR6]] { +; IS________OPM-NEXT: en: +; IS________OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; IS________OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; IS________OPM: ex: +; IS________OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR6]] +; IS________OPM-NEXT: ret i32 [[TMP5]] +; IS________OPM: hd: +; IS________OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] +; IS________OPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR6]] +; IS________OPM-NEXT: br label [[HD2]] +; IS________OPM: hd2: +; IS________OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; IS________OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; IS________OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; +; IS__TUNIT_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b +; IS__TUNIT_NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR9]] { +; IS__TUNIT_NPM-NEXT: en: +; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; IS__TUNIT_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; IS__TUNIT_NPM: ex: +; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR8]] +; IS__TUNIT_NPM-NEXT: ret i32 [[TMP5]] +; IS__TUNIT_NPM: hd: +; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] +; IS__TUNIT_NPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR8]] +; IS__TUNIT_NPM-NEXT: br label [[HD2]] +; IS__TUNIT_NPM: hd2: +; IS__TUNIT_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; IS__TUNIT_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; IS__TUNIT_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b +; IS__CGSCC_NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR8]] { +; IS__CGSCC_NPM-NEXT: en: +; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; IS__CGSCC_NPM: ex: +; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: ret i32 [[TMP5]] +; IS__CGSCC_NPM: hd: +; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] +; IS__CGSCC_NPM-NEXT: tail call void @h(i32* [[A]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: br label [[HD2]] +; IS__CGSCC_NPM: hd2: +; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] ; en: %tmp3 = icmp eq i32 %b, 0 @@ -1296,37 +1296,37 @@ define i32 @nonnull_exec_ctx_2(i32* %a, i32 %b) willreturn nounwind { ; -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2 -; NOT_CGSCC_OPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) [[ATTR6]] { -; NOT_CGSCC_OPM-NEXT: en: -; NOT_CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; NOT_CGSCC_OPM: ex: -; NOT_CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret i32 [[TMP5]] -; NOT_CGSCC_OPM: hd: -; NOT_CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] -; NOT_CGSCC_OPM-NEXT: tail call void @h(i32* nonnull [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; NOT_CGSCC_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; NOT_CGSCC_OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] -; -; IS__CGSCC_OPM: Function Attrs: nounwind willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2 -; IS__CGSCC_OPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) [[ATTR7]] { -; IS__CGSCC_OPM-NEXT: en: -; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; IS__CGSCC_OPM: ex: -; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP5]] -; IS__CGSCC_OPM: hd: -; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] -; IS__CGSCC_OPM-NEXT: tail call void @h(i32* nonnull [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; IS__CGSCC_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; IS__CGSCC_OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2 +; NOT_CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) [[ATTR9]] { +; NOT_CGSCC_NPM-NEXT: en: +; NOT_CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; NOT_CGSCC_NPM: ex: +; NOT_CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret i32 [[TMP5]] +; NOT_CGSCC_NPM: hd: +; NOT_CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] +; NOT_CGSCC_NPM-NEXT: tail call void @h(i32* nonnull [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; NOT_CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; NOT_CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2 +; IS__CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) [[ATTR8]] { +; IS__CGSCC_NPM-NEXT: en: +; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; IS__CGSCC_NPM: ex: +; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret i32 [[TMP5]] +; IS__CGSCC_NPM: hd: +; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] +; IS__CGSCC_NPM-NEXT: tail call void @h(i32* nonnull [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] ; en: %tmp3 = icmp eq i32 %b, 0 @@ -1346,41 +1346,41 @@ define i32 @nonnull_exec_ctx_2b(i32* %a, i32 %b) willreturn nounwind { ; -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b -; NOT_CGSCC_OPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) [[ATTR6]] { -; NOT_CGSCC_OPM-NEXT: en: -; NOT_CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; NOT_CGSCC_OPM: ex: -; NOT_CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret i32 [[TMP5]] -; NOT_CGSCC_OPM: hd: -; NOT_CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] -; NOT_CGSCC_OPM-NEXT: tail call void @h(i32* nonnull [[A]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: br label [[HD2]] -; NOT_CGSCC_OPM: hd2: -; NOT_CGSCC_OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; NOT_CGSCC_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; NOT_CGSCC_OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] -; -; IS__CGSCC_OPM: Function Attrs: nounwind willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b -; IS__CGSCC_OPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) [[ATTR7]] { -; IS__CGSCC_OPM-NEXT: en: -; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] -; IS__CGSCC_OPM: ex: -; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP5]] -; IS__CGSCC_OPM: hd: -; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] -; IS__CGSCC_OPM-NEXT: tail call void @h(i32* nonnull [[A]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: br label [[HD2]] -; IS__CGSCC_OPM: hd2: -; IS__CGSCC_OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 -; IS__CGSCC_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] -; IS__CGSCC_OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b +; NOT_CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) [[ATTR9]] { +; NOT_CGSCC_NPM-NEXT: en: +; NOT_CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; NOT_CGSCC_NPM: ex: +; NOT_CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret i32 [[TMP5]] +; NOT_CGSCC_NPM: hd: +; NOT_CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] +; NOT_CGSCC_NPM-NEXT: tail call void @h(i32* nonnull [[A]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: br label [[HD2]] +; NOT_CGSCC_NPM: hd2: +; NOT_CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; NOT_CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; NOT_CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b +; IS__CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) [[ATTR8]] { +; IS__CGSCC_NPM-NEXT: en: +; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] +; IS__CGSCC_NPM: ex: +; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret i32 [[TMP5]] +; IS__CGSCC_NPM: hd: +; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] +; IS__CGSCC_NPM-NEXT: tail call void @h(i32* nonnull [[A]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: br label [[HD2]] +; IS__CGSCC_NPM: hd2: +; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 +; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] +; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] ; en: %tmp3 = icmp eq i32 %b, 0 @@ -1517,23 +1517,23 @@ ; We should not mark the return of @strrchr as `nonnull`, it may well be NULL! define i8* @mybasename(i8* nofree readonly %str) { -; NOT_CGSCC_OPM: Function Attrs: nofree nounwind readonly -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@mybasename -; NOT_CGSCC_OPM-SAME: (i8* nofree readonly [[STR:%.*]]) [[ATTR11:#.*]] { -; NOT_CGSCC_OPM-NEXT: [[CALL:%.*]] = call i8* @strrchr(i8* nofree readonly [[STR]], i32 noundef 47) [[ATTR14]] -; NOT_CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i8* [[CALL]], null -; NOT_CGSCC_OPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 1 -; NOT_CGSCC_OPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i8* [[ADD_PTR]], i8* [[STR]] -; NOT_CGSCC_OPM-NEXT: ret i8* [[COND]] -; -; IS__CGSCC_OPM: Function Attrs: nofree nounwind readonly -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@mybasename -; IS__CGSCC_OPM-SAME: (i8* nofree readonly [[STR:%.*]]) [[ATTR12:#.*]] { -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i8* @strrchr(i8* nofree readonly [[STR]], i32 noundef 47) [[ATTR15]] -; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i8* [[CALL]], null -; IS__CGSCC_OPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 1 -; IS__CGSCC_OPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i8* [[ADD_PTR]], i8* [[STR]] -; IS__CGSCC_OPM-NEXT: ret i8* [[COND]] +; NOT_CGSCC_NPM: Function Attrs: nofree nounwind readonly +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@mybasename +; NOT_CGSCC_NPM-SAME: (i8* nofree readonly [[STR:%.*]]) [[ATTR14:#.*]] { +; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i8* @strrchr(i8* nofree readonly [[STR]], i32 noundef 47) [[ATTR17]] +; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i8* [[CALL]], null +; NOT_CGSCC_NPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 1 +; NOT_CGSCC_NPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i8* [[ADD_PTR]], i8* [[STR]] +; NOT_CGSCC_NPM-NEXT: ret i8* [[COND]] +; +; IS__CGSCC_NPM: Function Attrs: nofree nounwind readonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mybasename +; IS__CGSCC_NPM-SAME: (i8* nofree readonly [[STR:%.*]]) [[ATTR13:#.*]] { +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i8* @strrchr(i8* nofree readonly [[STR]], i32 noundef 47) [[ATTR16]] +; IS__CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i8* [[CALL]], null +; IS__CGSCC_NPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 1 +; IS__CGSCC_NPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i8* [[ADD_PTR]], i8* [[STR]] +; IS__CGSCC_NPM-NEXT: ret i8* [[COND]] ; %call = call i8* @strrchr(i8* %str, i32 47) %tobool = icmp ne i8* %call, null @@ -1550,19 +1550,19 @@ ; ATTRIBUTOR-NEXT: [[TMP1:%.*]] = call i8* @unknown() ; ATTRIBUTOR-NEXT: ret void ; -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_assume_pos -; NOT_CGSCC_OPM-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) { -; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR12]] [ "nonnull"(i8* [[ARG]]) ] -; NOT_CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: [[TMP1:%.*]] = call i8* @unknown() -; NOT_CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_assume_pos +; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) { +; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR15]] [ "nonnull"(i8* [[ARG]]) ] +; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i8* @unknown() +; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_assume_pos -; IS__CGSCC_OPM-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) { -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR13]] [ "nonnull"(i8* [[ARG]]) ] -; IS__CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = call i8* @unknown() -; IS__CGSCC_OPM-NEXT: ret void +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_assume_pos +; IS__CGSCC_NPM-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) { +; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR14]] [ "nonnull"(i8* [[ARG]]) ] +; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i8* @unknown() +; IS__CGSCC_NPM-NEXT: ret void ; call void @llvm.assume(i1 true) ["nonnull"(i8* %arg)] call void @use_i8_ptr(i8* %arg) @@ -1582,29 +1582,29 @@ ; ATTRIBUTOR-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) ; ATTRIBUTOR-NEXT: ret void ; -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_assume_neg -; NOT_CGSCC_OPM-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) { -; NOT_CGSCC_OPM-NEXT: [[TMP1:%.*]] = call i8* @unknown() -; NOT_CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] -; NOT_CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: [[TMP2:%.*]] = call i8* @unknown() -; NOT_CGSCC_OPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] -; NOT_CGSCC_OPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR4]] -; NOT_CGSCC_OPM-NEXT: ret void -; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_assume_neg -; IS__CGSCC_OPM-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) { -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = call i8* @unknown() -; IS__CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] -; IS__CGSCC_OPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = call i8* @unknown() -; IS__CGSCC_OPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] -; IS__CGSCC_OPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: ret void +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_assume_neg +; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) { +; NOT_CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i8* @unknown() +; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] +; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: [[TMP2:%.*]] = call i8* @unknown() +; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] +; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR6]] +; NOT_CGSCC_NPM-NEXT: ret void +; +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_assume_neg +; IS__CGSCC_NPM-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) { +; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i8* @unknown() +; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] +; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = call i8* @unknown() +; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] +; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: ret void ; call i8* @unknown() call void @use_i8_ptr(i8* %arg) @@ -1620,13 +1620,13 @@ declare void @use_i8_ptr_ret(i8* nofree nocapture readnone) nounwind willreturn define i8* @nonnull_function_ptr_1() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@nonnull_function_ptr_1 ; IS__TUNIT____-SAME: () [[ATTR1]] { ; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast i8* ()* @nonnull_function_ptr_1 to i8* ; IS__TUNIT____-NEXT: ret i8* [[BC]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nonnull_function_ptr_1 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i8* ()* @nonnull_function_ptr_1 to i8* @@ -1638,13 +1638,13 @@ declare i8* @function_decl() define i8* @nonnull_function_ptr_2() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@nonnull_function_ptr_2 ; IS__TUNIT____-SAME: () [[ATTR1]] { ; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast i8* ()* @function_decl to i8* ; IS__TUNIT____-NEXT: ret i8* [[BC]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@nonnull_function_ptr_2 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i8* ()* @function_decl to i8* diff --git a/llvm/test/Transforms/Attributor/norecurse.ll b/llvm/test/Transforms/Attributor/norecurse.ll --- a/llvm/test/Transforms/Attributor/norecurse.ll +++ b/llvm/test/Transforms/Attributor/norecurse.ll @@ -5,12 +5,12 @@ ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM define i32 @leaf() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@leaf ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i32 1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@leaf ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret i32 1 @@ -39,9 +39,9 @@ ; NOT_CGSCC_NPM-SAME: () [[ATTR2:#.*]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec -; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () [[ATTR2:#.*]] { ; IS__CGSCC_NPM-NEXT: unreachable ; %a = call i32 @indirect_rec2() @@ -53,9 +53,9 @@ ; NOT_CGSCC_NPM-SAME: () [[ATTR2]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec2 -; IS__CGSCC_NPM-SAME: () [[ATTR1]] { +; IS__CGSCC_NPM-SAME: () [[ATTR2]] { ; IS__CGSCC_NPM-NEXT: unreachable ; %a = call i32 @indirect_rec() @@ -65,7 +65,7 @@ define i32 @extern() { ; CHECK: Function Attrs: nosync readnone ; CHECK-LABEL: define {{[^@]+}}@extern -; CHECK-SAME: () [[ATTR2:#.*]] { +; CHECK-SAME: () [[ATTR3:#.*]] { ; CHECK-NEXT: [[A:%.*]] = call i32 @k() ; CHECK-NEXT: ret i32 [[A]] ; @@ -78,16 +78,16 @@ declare i32 @k() readnone define void @intrinsic(i8* %dest, i8* %src, i32 %len) { -; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@intrinsic ; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree writeonly [[DEST:%.*]], i8* nocapture nofree readonly [[SRC:%.*]], i32 [[LEN:%.*]]) [[ATTR5:#.*]] { -; 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:#.*]] +; 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) [[ATTR11:#.*]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@intrinsic -; IS__CGSCC_NPM-SAME: (i8* nocapture nofree writeonly [[DEST:%.*]], i8* nocapture nofree readonly [[SRC:%.*]], i32 [[LEN:%.*]]) [[ATTR4:#.*]] { -; 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:#.*]] +; IS__CGSCC_NPM-SAME: (i8* nocapture nofree writeonly [[DEST:%.*]], i8* nocapture nofree readonly [[SRC:%.*]], i32 [[LEN:%.*]]) [[ATTR5:#.*]] { +; 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) [[ATTR10:#.*]] ; IS__CGSCC_NPM-NEXT: ret void ; call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 %len, i1 false) @@ -107,7 +107,7 @@ ; ; IS__CGSCC____: Function Attrs: norecurse nosync readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@called_by_norecurse -; IS__CGSCC____-SAME: () [[ATTR5:#.*]] { +; IS__CGSCC____-SAME: () [[ATTR7:#.*]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @k() ; IS__CGSCC____-NEXT: ret i32 undef ; @@ -117,13 +117,13 @@ define void @m() norecurse { ; IS__TUNIT____: Function Attrs: norecurse nosync readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@m -; IS__TUNIT____-SAME: () [[ATTR6:#.*]] { +; IS__TUNIT____-SAME: () [[ATTR7:#.*]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse() [[ATTR3]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: norecurse nosync readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@m -; IS__CGSCC____-SAME: () [[ATTR5]] { +; IS__CGSCC____-SAME: () [[ATTR7]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse() ; IS__CGSCC____-NEXT: ret void ; @@ -134,7 +134,7 @@ define internal i32 @called_by_norecurse_indirectly() { ; CHECK: Function Attrs: nosync readnone ; CHECK-LABEL: define {{[^@]+}}@called_by_norecurse_indirectly -; CHECK-SAME: () [[ATTR2]] { +; CHECK-SAME: () [[ATTR3]] { ; CHECK-NEXT: [[A:%.*]] = call i32 @k() ; CHECK-NEXT: ret i32 [[A]] ; @@ -150,7 +150,7 @@ ; ; IS__CGSCC____: Function Attrs: norecurse nosync readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@o -; IS__CGSCC____-SAME: () [[ATTR5]] { +; IS__CGSCC____-SAME: () [[ATTR7]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse_indirectly() ; IS__CGSCC____-NEXT: ret i32 [[A]] ; @@ -160,13 +160,13 @@ define i32 @p() norecurse { ; IS__TUNIT____: Function Attrs: norecurse nosync readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@p -; IS__TUNIT____-SAME: () [[ATTR6]] { +; IS__TUNIT____-SAME: () [[ATTR7]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @o() [[ATTR3]] ; IS__TUNIT____-NEXT: ret i32 [[A]] ; ; IS__CGSCC____: Function Attrs: norecurse nosync readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@p -; IS__CGSCC____-SAME: () [[ATTR5]] { +; IS__CGSCC____-SAME: () [[ATTR7]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @o() ; IS__CGSCC____-NEXT: ret i32 [[A]] ; @@ -177,7 +177,7 @@ define void @f(i32 %x) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@f -; IS__TUNIT____-SAME: (i32 [[X:%.*]]) [[ATTR7:#.*]] { +; IS__TUNIT____-SAME: (i32 [[X:%.*]]) [[ATTR8:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 @@ -185,14 +185,14 @@ ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0 ; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] ; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: call void @g() [[ATTR8:#.*]] +; IS__TUNIT____-NEXT: call void @g() [[ATTR9:#.*]] ; IS__TUNIT____-NEXT: br label [[IF_END]] ; IS__TUNIT____: if.end: ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) [[ATTR8:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 @@ -206,7 +206,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f -; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) [[ATTR8:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 @@ -236,20 +236,20 @@ define void @g() norecurse { ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@g -; IS__TUNIT____-SAME: () [[ATTR8]] { +; IS__TUNIT____-SAME: () [[ATTR9]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@g -; IS__CGSCC_OPM-SAME: () [[ATTR8:#.*]] { +; IS__CGSCC_OPM-SAME: () [[ATTR9:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: call void @f(i32 noundef 0) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: call void @f(i32 noundef 0) [[ATTR8]] ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@g -; IS__CGSCC_NPM-SAME: () [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: ret void ; @@ -279,7 +279,7 @@ define i32 @eval_func2(i32 (i32)* , i32) local_unnamed_addr null_pointer_is_valid{ ; CHECK: Function Attrs: null_pointer_is_valid ; CHECK-LABEL: define {{[^@]+}}@eval_func2 -; CHECK-SAME: (i32 (i32)* nocapture nofree [[TMP0:%.*]], i32 [[TMP1:%.*]]) local_unnamed_addr [[ATTR6:#.*]] { +; CHECK-SAME: (i32 (i32)* nocapture nofree [[TMP0:%.*]], i32 [[TMP1:%.*]]) local_unnamed_addr [[ATTR9:#.*]] { ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 [[TMP0]](i32 [[TMP1]]) ; CHECK-NEXT: ret i32 [[TMP3]] ; @@ -290,14 +290,14 @@ ; Call an unknown function in a dead block. declare void @unknown() define i32 @call_unknown_in_dead_block() local_unnamed_addr { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_unknown_in_dead_block ; IS__TUNIT____-SAME: () local_unnamed_addr [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32 0 ; IS__TUNIT____: Dead: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_unknown_in_dead_block ; IS__CGSCC____-SAME: () local_unnamed_addr [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 0 diff --git a/llvm/test/Transforms/Attributor/noreturn.ll b/llvm/test/Transforms/Attributor/noreturn.ll --- a/llvm/test/Transforms/Attributor/noreturn.ll +++ b/llvm/test/Transforms/Attributor/noreturn.ll @@ -173,9 +173,9 @@ ; IS__TUNIT____: cond.end: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@multiple_noreturn_calls -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]]) [[ATTR2:#.*]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 ; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] @@ -208,7 +208,7 @@ ; FIXME: we should derive "UB" as an argument and report it to the user on request. define i32 @endless_loop_but_willreturn() willreturn { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@endless_loop_but_willreturn ; IS__TUNIT____-SAME: () [[ATTR2:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -216,9 +216,9 @@ ; IS__TUNIT____: while.body: ; IS__TUNIT____-NEXT: br label [[WHILE_BODY]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@endless_loop_but_willreturn -; IS__CGSCC____-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: () [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__CGSCC____: while.body: @@ -233,15 +233,15 @@ ; TEST 6b: willreturn means *not* no-return or UB define i32 @UB_and_willreturn() willreturn { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@UB_and_willreturn ; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@UB_and_willreturn -; IS__CGSCC____-SAME: () [[ATTR2]] { +; IS__CGSCC____-SAME: () [[ATTR3]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; diff --git a/llvm/test/Transforms/Attributor/nosync.ll b/llvm/test/Transforms/Attributor/nosync.ll --- a/llvm/test/Transforms/Attributor/nosync.ll +++ b/llvm/test/Transforms/Attributor/nosync.ll @@ -29,14 +29,14 @@ %struct.ST = type { i32, double, %struct.RT } define i32* @foo(%struct.ST* %s) nounwind uwtable readnone optsize ssp { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind optsize readnone ssp uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind optsize readnone ssp uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: (%struct.ST* nofree readnone "no-capture-maybe-returned" [[S:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.ST* [[S]], i64 1, i32 2, i32 1, i64 5, i64 13 ; IS__TUNIT____-NEXT: ret i32* [[ARRAYIDX]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind optsize readnone ssp uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind optsize readnone ssp uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: (%struct.ST* nofree readnone "no-capture-maybe-returned" [[S:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -56,7 +56,7 @@ ; } define i32 @load_monotonic(i32* nocapture readonly %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind uwtable willreturn +; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind uwtable willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@load_monotonic ; CHECK-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[TMP0:%.*]]) [[ATTR1:#.*]] { ; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0]] monotonic, align 4 @@ -74,7 +74,7 @@ ; } define void @store_monotonic(i32* nocapture %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind uwtable willreturn +; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind uwtable willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@store_monotonic ; CHECK-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]]) [[ATTR1]] { ; CHECK-NEXT: store atomic i32 10, i32* [[TMP0]] monotonic, align 4 @@ -92,7 +92,7 @@ ; } define i32 @load_acquire(i32* nocapture readonly %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@load_acquire ; CHECK-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[TMP0:%.*]]) [[ATTR2:#.*]] { ; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0]] acquire, align 4 @@ -109,7 +109,7 @@ ; } define void @load_release(i32* nocapture %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@load_release ; CHECK-SAME: (i32* nocapture nofree writeonly align 4 [[TMP0:%.*]]) [[ATTR2]] { ; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0]] release, align 4 @@ -122,7 +122,7 @@ ; TEST 6 - negative volatile, relaxed atomic define void @load_volatile_release(i32* nocapture %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@load_volatile_release ; CHECK-SAME: (i32* nocapture nofree writeonly align 4 [[TMP0:%.*]]) [[ATTR2]] { ; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0]] release, align 4 @@ -139,7 +139,7 @@ ; } define void @volatile_store(i32* %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@volatile_store ; CHECK-SAME: (i32* nofree align 4 [[TMP0:%.*]]) [[ATTR2]] { ; CHECK-NEXT: store volatile i32 14, i32* [[TMP0]], align 4 @@ -157,7 +157,7 @@ ; } define i32 @volatile_load(i32* %0) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn mustprogress ; CHECK-LABEL: define {{[^@]+}}@volatile_load ; CHECK-SAME: (i32* nofree align 4 [[TMP0:%.*]]) [[ATTR2]] { ; CHECK-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4 @@ -210,7 +210,7 @@ ; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) [[ATTR5:#.*]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1 ; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) [[ATTR5:#.*]] { ; IS__CGSCC_NPM-NEXT: unreachable @@ -226,7 +226,7 @@ ; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) [[ATTR5]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc2 ; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) [[ATTR5]] { ; IS__CGSCC_NPM-NEXT: unreachable @@ -255,7 +255,7 @@ %"struct.std::__atomic_base" = type { i8 } define void @foo1(i32* %0, %"struct.std::atomic"* %1) { -; IS__TUNIT____: Function Attrs: nofree nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo1 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR6:#.*]] { ; IS__TUNIT____-NEXT: store i32 100, i32* [[TMP0]], align 4 @@ -264,7 +264,7 @@ ; IS__TUNIT____-NEXT: store atomic i8 1, i8* [[TMP3]] monotonic, align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo1 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR6:#.*]] { ; IS__CGSCC____-NEXT: store i32 100, i32* [[TMP0]], align 4 @@ -325,7 +325,7 @@ ; TEST 13 - Fence syncscope("singlethread") seq_cst define void @foo1_singlethread(i32* %0, %"struct.std::atomic"* %1) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo1_singlethread ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR8:#.*]] { ; IS__TUNIT____-NEXT: store i32 100, i32* [[TMP0]], align 4 @@ -334,7 +334,7 @@ ; IS__TUNIT____-NEXT: store atomic i8 1, i8* [[TMP3]] monotonic, align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo1_singlethread ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR8:#.*]] { ; IS__CGSCC____-NEXT: store i32 100, i32* [[TMP0]], align 4 @@ -401,16 +401,16 @@ ; It is odd to add nocapture but a result of the llvm.memcpy nocapture. ; define i32 @memcpy_volatile(i8* %ptr1, i8* %ptr2) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@memcpy_volatile ; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8* nocapture nofree readonly [[PTR2:%.*]]) [[ATTR10:#.*]] { -; IS__TUNIT____-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) [[ATTR17:#.*]] +; IS__TUNIT____-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) [[ATTR19:#.*]] ; IS__TUNIT____-NEXT: ret i32 4 ; -; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@memcpy_volatile ; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8* nocapture nofree readonly [[PTR2:%.*]]) [[ATTR10:#.*]] { -; IS__CGSCC____-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) [[ATTR18:#.*]] +; IS__CGSCC____-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) [[ATTR20:#.*]] ; IS__CGSCC____-NEXT: ret i32 4 ; call void @llvm.memcpy(i8* %ptr1, i8* %ptr2, i32 8, i1 1) @@ -422,16 +422,16 @@ ; It is odd to add nocapture but a result of the llvm.memset nocapture. ; define i32 @memset_non_volatile(i8* %ptr1, i8 %val) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@memset_non_volatile ; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8 [[VAL:%.*]]) [[ATTR11:#.*]] { -; IS__TUNIT____-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) [[ATTR18:#.*]] +; IS__TUNIT____-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) [[ATTR20:#.*]] ; IS__TUNIT____-NEXT: ret i32 4 ; -; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@memset_non_volatile ; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8 [[VAL:%.*]]) [[ATTR11:#.*]] { -; IS__CGSCC____-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) [[ATTR19:#.*]] +; IS__CGSCC____-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) [[ATTR21:#.*]] ; IS__CGSCC____-NEXT: ret i32 4 ; call void @llvm.memset(i8* %ptr1, i8 %val, i32 8, i1 0) @@ -487,12 +487,12 @@ ; TEST 19 - positive, readnone & non-convergent intrinsic. define i32 @cos_test(float %x) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cos_test ; IS__TUNIT____-SAME: (float [[X:%.*]]) [[ATTR15:#.*]] { ; IS__TUNIT____-NEXT: ret i32 4 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cos_test ; IS__CGSCC____-SAME: (float [[X:%.*]]) [[ATTR15:#.*]] { ; IS__CGSCC____-NEXT: ret i32 4 @@ -502,16 +502,16 @@ } define float @cos_test2(float %x) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cos_test2 ; IS__TUNIT____-SAME: (float [[X:%.*]]) [[ATTR15]] { -; IS__TUNIT____-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) [[ATTR17]] +; IS__TUNIT____-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) [[ATTR19]] ; IS__TUNIT____-NEXT: ret float [[C]] ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cos_test2 ; IS__CGSCC____-SAME: (float [[X:%.*]]) [[ATTR16:#.*]] { -; IS__CGSCC____-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) [[ATTR18]] +; IS__CGSCC____-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) [[ATTR20]] ; IS__CGSCC____-NEXT: ret float [[C]] ; %c = call float @llvm.cos(float %x) diff --git a/llvm/test/Transforms/Attributor/nounwind.ll b/llvm/test/Transforms/Attributor/nounwind.ll --- a/llvm/test/Transforms/Attributor/nounwind.ll +++ b/llvm/test/Transforms/Attributor/nounwind.ll @@ -6,12 +6,12 @@ ; TEST 1 define i32 @foo1() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo1 ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i32 1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo1 ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret i32 1 @@ -26,7 +26,7 @@ ; NOT_CGSCC_NPM-SAME: () [[ATTR1:#.*]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_foo ; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC_NPM-NEXT: unreachable @@ -43,7 +43,7 @@ ; NOT_CGSCC_NPM-SAME: () [[ATTR1]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_bar ; IS__CGSCC_NPM-SAME: () [[ATTR1]] { ; IS__CGSCC_NPM-NEXT: unreachable diff --git a/llvm/test/Transforms/Attributor/potential.ll b/llvm/test/Transforms/Attributor/potential.ll --- a/llvm/test/Transforms/Attributor/potential.ll +++ b/llvm/test/Transforms/Attributor/potential.ll @@ -11,7 +11,7 @@ ; bool potential_test1(bool c) { return iszero(c ? 1 : -1); } define internal i1 @iszero1(i32 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero1 ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: ret i1 undef @@ -21,12 +21,12 @@ } define i1 @potential_test1(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test1 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test1 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false @@ -46,7 +46,7 @@ ; int potential_test2(int x) { return call_with_two_values(1) + call_with_two_values(-1); } define internal i32 @iszero2(i32 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero2 ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 undef @@ -57,7 +57,7 @@ } define internal i32 @call_with_two_values(i32 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_with_two_values ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 undef @@ -72,10 +72,10 @@ define i32 @potential_test2(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test2 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 0 @@ -98,14 +98,14 @@ ; int potential_test3() { return zero_or_one(iszero(0))+zero_or_one(iszero(1)); } define internal i32 @iszero3(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@iszero3 ; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 ; IS__TUNIT____-NEXT: [[RET:%.*]] = zext i1 [[CMP]] to i32 ; IS__TUNIT____-NEXT: ret i32 [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero3 ; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 @@ -118,14 +118,14 @@ } define internal i32 @less_than_two(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@less_than_two ; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 2 ; IS__TUNIT____-NEXT: [[RET:%.*]] = zext i1 [[CMP]] to i32 ; IS__TUNIT____-NEXT: ret i32 [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@less_than_two ; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 2 @@ -140,41 +140,41 @@ define i32 @potential_test3() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test3 -; IS__TUNIT_OPM-SAME: () [[ATTR0:#.*]] { -; IS__TUNIT_OPM-NEXT: [[CMP1:%.*]] = call i32 @iszero3(i32 noundef 0) [[ATTR0]] -; IS__TUNIT_OPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 [[CMP1]]) [[ATTR0]] -; IS__TUNIT_OPM-NEXT: [[CMP2:%.*]] = call i32 @iszero3(i32 noundef 1) [[ATTR0]] -; IS__TUNIT_OPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 [[CMP2]]) [[ATTR0]] +; IS__TUNIT_OPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_OPM-NEXT: [[CMP1:%.*]] = call i32 @iszero3(i32 noundef 0) [[ATTR1]] +; IS__TUNIT_OPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 [[CMP1]]) [[ATTR1]] +; IS__TUNIT_OPM-NEXT: [[CMP2:%.*]] = call i32 @iszero3(i32 noundef 1) [[ATTR1]] +; IS__TUNIT_OPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 [[CMP2]]) [[ATTR1]] ; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = add i32 [[TRUE1]], [[TRUE2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test3 -; IS__TUNIT_NPM-SAME: () [[ATTR0:#.*]] { -; IS__TUNIT_NPM-NEXT: [[CMP1:%.*]] = call i32 @iszero3(i32 noundef 0) [[ATTR0]], [[RNG0:!range !.*]] -; IS__TUNIT_NPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 [[CMP1]]) [[ATTR0]], [[RNG0]] -; IS__TUNIT_NPM-NEXT: [[CMP2:%.*]] = call i32 @iszero3(i32 noundef 1) [[ATTR0]], [[RNG0]] -; IS__TUNIT_NPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 [[CMP2]]) [[ATTR0]], [[RNG0]] +; IS__TUNIT_NPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_NPM-NEXT: [[CMP1:%.*]] = call i32 @iszero3(i32 noundef 0) [[ATTR1]], [[RNG0:!range !.*]] +; IS__TUNIT_NPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 [[CMP1]]) [[ATTR1]], [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[CMP2:%.*]] = call i32 @iszero3(i32 noundef 1) [[ATTR1]], [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 [[CMP2]]) [[ATTR1]], [[RNG0]] ; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = add i32 [[TRUE1]], [[TRUE2]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test3 -; IS__CGSCC_OPM-SAME: () [[ATTR0:#.*]] { -; IS__CGSCC_OPM-NEXT: [[CMP1:%.*]] = call noundef i32 @iszero3(i32 noundef 0) [[ATTR2:#.*]] -; IS__CGSCC_OPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 noundef [[CMP1]]) [[ATTR2]], [[RNG0:!range !.*]] -; IS__CGSCC_OPM-NEXT: [[CMP2:%.*]] = call noundef i32 @iszero3(i32 noundef 1) [[ATTR2]] -; IS__CGSCC_OPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 noundef [[CMP2]]) [[ATTR2]], [[RNG0]] +; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_OPM-NEXT: [[CMP1:%.*]] = call noundef i32 @iszero3(i32 noundef 0) [[ATTR3:#.*]] +; IS__CGSCC_OPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 noundef [[CMP1]]) [[ATTR3]], [[RNG0:!range !.*]] +; IS__CGSCC_OPM-NEXT: [[CMP2:%.*]] = call noundef i32 @iszero3(i32 noundef 1) [[ATTR3]] +; IS__CGSCC_OPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 noundef [[CMP2]]) [[ATTR3]], [[RNG0]] ; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = add i32 [[TRUE1]], [[TRUE2]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test3 -; IS__CGSCC_NPM-SAME: () [[ATTR0:#.*]] { -; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = call noundef i32 @iszero3(i32 noundef 0) [[ATTR1:#.*]], [[RNG0:!range !.*]] -; IS__CGSCC_NPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 noundef [[CMP1]]) [[ATTR1]], [[RNG0]] -; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = call noundef i32 @iszero3(i32 noundef 1) [[ATTR1]], [[RNG0]] -; IS__CGSCC_NPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 noundef [[CMP2]]) [[ATTR1]], [[RNG0]] +; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = call noundef i32 @iszero3(i32 noundef 0) [[ATTR2:#.*]], [[RNG0:!range !.*]] +; IS__CGSCC_NPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 noundef [[CMP1]]) [[ATTR2]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = call noundef i32 @iszero3(i32 noundef 1) [[ATTR2]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 noundef [[CMP2]]) [[ATTR2]], [[RNG0]] ; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = add i32 [[TRUE1]], [[TRUE2]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET]] ; @@ -200,12 +200,12 @@ define i32 @potential_test4(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test4 -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test4 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: ret i32 0 ; %csret = call i32 @return1or3(i32 %c) @@ -217,12 +217,12 @@ define i32 @potential_test5(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test5 -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test5 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 0 ; %csret1 = call i32 @return1or3(i32 %c) @@ -233,31 +233,31 @@ } define i1 @potential_test6(i32 %c) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test6 -; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) [[ATTR0]] { -; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR0]], [[RNG0:!range !.*]] +; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR1]], [[RNG0:!range !.*]] ; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3 ; IS__TUNIT_OPM-NEXT: ret i1 [[RET]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test6 -; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) [[ATTR0]] { -; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR0]], [[RNG1:!range !.*]] +; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR1]], [[RNG1:!range !.*]] ; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3 ; IS__TUNIT_NPM-NEXT: ret i1 [[RET]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test6 -; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR2]], [[RNG1:!range !.*]] +; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR3]], [[RNG1:!range !.*]] ; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3 ; IS__CGSCC_OPM-NEXT: ret i1 [[RET]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test6 -; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) [[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR1]], [[RNG1:!range !.*]] +; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR2]], [[RNG1:!range !.*]] ; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3 ; IS__CGSCC_NPM-NEXT: ret i1 [[RET]] ; @@ -267,35 +267,35 @@ } define i1 @potential_test7(i32 %c) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test7 ; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) [[ATTR0]] { -; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR0]], [[RNG0]] -; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) [[ATTR0]], [[RNG1:!range !.*]] +; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR1]], [[RNG0]] +; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) [[ATTR1]], [[RNG1:!range !.*]] ; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]] ; IS__TUNIT_OPM-NEXT: ret i1 [[RET]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test7 ; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) [[ATTR0]] { -; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR0]], [[RNG1]] -; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) [[ATTR0]], [[RNG2:!range !.*]] +; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR1]], [[RNG1]] +; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) [[ATTR1]], [[RNG2:!range !.*]] ; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]] ; IS__TUNIT_NPM-NEXT: ret i1 [[RET]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test7 -; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR2]], [[RNG1]] -; IS__CGSCC_OPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) [[ATTR2]], [[RNG2:!range !.*]] +; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) [[ATTR1]] { +; IS__CGSCC_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR3]], [[RNG1]] +; IS__CGSCC_OPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) [[ATTR3]], [[RNG2:!range !.*]] ; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]] ; IS__CGSCC_OPM-NEXT: ret i1 [[RET]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test7 -; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) [[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR1]], [[RNG1]] -; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) [[ATTR1]], [[RNG2:!range !.*]] +; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) [[ATTR2]], [[RNG1]] +; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) [[ATTR2]], [[RNG2:!range !.*]] ; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]] ; IS__CGSCC_NPM-NEXT: ret i1 [[RET]] ; @@ -306,14 +306,14 @@ } define internal i32 @return1or3(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@return1or3 ; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[CMP]], i32 1, i32 3 ; IS__TUNIT____-NEXT: ret i32 [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@return1or3 ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 @@ -326,7 +326,7 @@ } define internal i32 @return2or4(i32 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@return2or4 ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 undef @@ -337,14 +337,14 @@ } define internal i32 @return3or4(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@return3or4 ; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[CMP]], i32 3, i32 4 ; IS__TUNIT____-NEXT: ret i32 [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@return3or4 ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 @@ -361,7 +361,7 @@ ; propagate argument to callsite argument define internal i1 @cmp_with_four(i32 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cmp_with_four ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 undef @@ -371,7 +371,7 @@ } define internal i1 @wrapper(i32 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@wrapper ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 undef @@ -383,10 +383,10 @@ define i1 @potential_test8() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test8 -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test8 ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false @@ -402,7 +402,7 @@ define i1 @potential_test9() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test9 -; IS__TUNIT_OPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: () [[ATTR2:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[COND:%.*]] ; IS__TUNIT_OPM: cond: @@ -419,7 +419,7 @@ ; IS__TUNIT_OPM: end: ; IS__TUNIT_OPM-NEXT: ret i1 false ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test9 ; IS__TUNIT_NPM-SAME: () [[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: @@ -440,7 +440,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test9 -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: () [[ATTR2:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[COND:%.*]] ; IS__CGSCC_OPM: cond: @@ -457,7 +457,7 @@ ; IS__CGSCC_OPM: end: ; IS__CGSCC_OPM-NEXT: ret i1 false ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test9 ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: @@ -512,10 +512,10 @@ define i1 @potential_test10(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test10 -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test10 ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false @@ -526,7 +526,7 @@ } define i32 @optimize_undef_1(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_1 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -535,7 +535,7 @@ ; IS__TUNIT____: f: ; IS__TUNIT____-NEXT: ret i32 1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_1 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -553,7 +553,7 @@ } define i32 @optimize_undef_2(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_2 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -562,7 +562,7 @@ ; IS__TUNIT____: f: ; IS__TUNIT____-NEXT: ret i32 -1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_2 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -580,7 +580,7 @@ } define i32 @optimize_undef_3(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_3 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -589,7 +589,7 @@ ; IS__TUNIT____: f: ; IS__TUNIT____-NEXT: ret i32 1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_3 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -612,38 +612,38 @@ define i32 @potential_test11(i1 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test11 -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { -; IS__TUNIT_OPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) [[ATTR0]], [[RNG2:!range !.*]] -; IS__TUNIT_OPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) [[ATTR0]], [[RNG3:!range !.*]] +; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT_OPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) [[ATTR1]], [[RNG2:!range !.*]] +; IS__TUNIT_OPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) [[ATTR1]], [[RNG3:!range !.*]] ; IS__TUNIT_OPM-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]] ; IS__TUNIT_OPM-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], 0 ; IS__TUNIT_OPM-NEXT: ret i32 [[ACC2]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test11 -; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { -; IS__TUNIT_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) [[ATTR0]], [[RNG0]] -; IS__TUNIT_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) [[ATTR0]], [[RNG3:!range !.*]] +; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) [[ATTR1]], [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) [[ATTR1]], [[RNG3:!range !.*]] ; IS__TUNIT_NPM-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]] ; IS__TUNIT_NPM-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], 0 ; IS__TUNIT_NPM-NEXT: ret i32 [[ACC2]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test11 ; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) [[ATTR2]], [[RNG0]] -; IS__CGSCC_OPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) [[ATTR2]], [[RNG3:!range !.*]] -; IS__CGSCC_OPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) [[ATTR2]], [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) [[ATTR3]], [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) [[ATTR3]], [[RNG3:!range !.*]] +; IS__CGSCC_OPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) [[ATTR3]], [[RNG0]] ; IS__CGSCC_OPM-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]] ; IS__CGSCC_OPM-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ACC2]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test11 ; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) [[ATTR1]], [[RNG0]] -; IS__CGSCC_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) [[ATTR1]], [[RNG3:!range !.*]] -; IS__CGSCC_NPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) [[ATTR1]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) [[ATTR2]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) [[ATTR2]], [[RNG3:!range !.*]] +; IS__CGSCC_NPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) [[ATTR2]], [[RNG0]] ; IS__CGSCC_NPM-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]] ; IS__CGSCC_NPM-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]] ; IS__CGSCC_NPM-NEXT: ret i32 [[ACC2]] @@ -657,7 +657,7 @@ } define i32 @optimize_poison_1(i1 %c) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@optimize_poison_1 ; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -666,7 +666,7 @@ ; IS__TUNIT_OPM: f: ; IS__TUNIT_OPM-NEXT: ret i32 -1 ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@optimize_poison_1 ; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -675,7 +675,7 @@ ; IS__TUNIT_NPM: f: ; IS__TUNIT_NPM-NEXT: ret i32 undef ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@optimize_poison_1 ; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -684,7 +684,7 @@ ; IS__CGSCC_OPM: f: ; IS__CGSCC_OPM-NEXT: ret i32 -1 ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@optimize_poison_1 ; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -703,24 +703,24 @@ ; FIXME: returned value can be simplified to 0 define i32 @potential_test12(i1 %c) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test12 ; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { -; IS__TUNIT_OPM-NEXT: [[ZERO:%.*]] = call noundef i32 @optimize_poison_1(i1 [[C]]) [[ATTR0]], [[RNG3]] +; IS__TUNIT_OPM-NEXT: [[ZERO:%.*]] = call noundef i32 @optimize_poison_1(i1 [[C]]) [[ATTR1]], [[RNG3]] ; IS__TUNIT_OPM-NEXT: ret i32 [[ZERO]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test12 -; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR1]] { ; IS__TUNIT_NPM-NEXT: ret i32 0 ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test12 ; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[ZERO:%.*]] = call i32 @optimize_poison_1(i1 [[C]]) [[ATTR2]], [[RNG3]] +; IS__CGSCC_OPM-NEXT: [[ZERO:%.*]] = call i32 @optimize_poison_1(i1 [[C]]) [[ATTR3]], [[RNG3]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ZERO]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test12 ; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC_NPM-NEXT: ret i32 0 @@ -735,13 +735,13 @@ ; However, we should not simplify `and i32 %c, 3` to `%c` define internal i32 @potential_test13_callee(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test13_callee ; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[RET:%.*]] = and i32 [[C]], 3 ; IS__TUNIT____-NEXT: ret i32 [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test13_callee ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET:%.*]] = and i32 [[C]], 3 @@ -752,28 +752,28 @@ } define i32 @potential_test13_caller1() { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test13_caller1 ; IS__TUNIT_OPM-SAME: () [[ATTR0]] { -; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) [[ATTR0]], [[RNG2]] +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) [[ATTR1]], [[RNG2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test13_caller1 ; IS__TUNIT_NPM-SAME: () [[ATTR0]] { -; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) [[ATTR0]], [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) [[ATTR1]], [[RNG0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test13_caller1 ; IS__CGSCC_OPM-SAME: () [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) [[ATTR2]], [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) [[ATTR3]], [[RNG0]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller1 ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) [[ATTR1]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) [[ATTR2]], [[RNG0]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET]] ; %ret = call i32 @potential_test13_callee(i32 0) @@ -781,28 +781,28 @@ } define i32 @potential_test13_caller2() { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test13_caller2 ; IS__TUNIT_OPM-SAME: () [[ATTR0]] { -; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) [[ATTR0]], [[RNG2]] +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) [[ATTR1]], [[RNG2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test13_caller2 ; IS__TUNIT_NPM-SAME: () [[ATTR0]] { -; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) [[ATTR0]], [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) [[ATTR1]], [[RNG0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test13_caller2 ; IS__CGSCC_OPM-SAME: () [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) [[ATTR2]], [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) [[ATTR3]], [[RNG0]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller2 ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) [[ATTR1]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) [[ATTR2]], [[RNG0]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET]] ; %ret = call i32 @potential_test13_callee(i32 1) @@ -810,28 +810,28 @@ } define i32 @potential_test13_caller3() { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test13_caller3 ; IS__TUNIT_OPM-SAME: () [[ATTR0]] { -; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) [[ATTR0]], [[RNG2]] +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) [[ATTR1]], [[RNG2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test13_caller3 ; IS__TUNIT_NPM-SAME: () [[ATTR0]] { -; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) [[ATTR0]], [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) [[ATTR1]], [[RNG0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test13_caller3 ; IS__CGSCC_OPM-SAME: () [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) [[ATTR2]], [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) [[ATTR3]], [[RNG0]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller3 ; IS__CGSCC_NPM-SAME: () [[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) [[ATTR1]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) [[ATTR2]], [[RNG0]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET]] ; %ret = call i32 @potential_test13_callee(i32 undef) @@ -839,7 +839,7 @@ } define i1 @potential_test14(i1 %c0, i1 %c1, i1 %c2, i1 %c3) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test14 ; IS__TUNIT____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[X0:%.*]] = select i1 [[C0]], i32 0, i32 1 @@ -849,7 +849,7 @@ ; IS__TUNIT____-NEXT: [[RET:%.*]] = icmp slt i32 [[Z3]], 7 ; IS__TUNIT____-NEXT: ret i1 [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test14 ; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[X0:%.*]] = select i1 [[C0]], i32 0, i32 1 @@ -868,12 +868,12 @@ } define i1 @potential_test15(i1 %c0, i1 %c1) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test15 ; IS__TUNIT____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test15 ; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false @@ -885,12 +885,12 @@ } define i1 @potential_test16(i1 %c0, i1 %c1) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test16 ; IS__TUNIT____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test16 ; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false diff --git a/llvm/test/Transforms/Attributor/range.ll b/llvm/test/Transforms/Attributor/range.ll --- a/llvm/test/Transforms/Attributor/range.ll +++ b/llvm/test/Transforms/Attributor/range.ll @@ -7,16 +7,16 @@ ; FIXME: CGSCC is not looking at callees and calleers even though it could be allowed. define i32 @test0(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test0 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0:#.*]] { -; IS__TUNIT____-NEXT: [[A:%.*]] = load i32, i32* [[P]], align 4, [[RNG0:!range !.*]] +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__TUNIT____-NEXT: [[A:%.*]] = load i32, i32* [[P]], align 4, !range [[RNG0:![0-9]+]] ; IS__TUNIT____-NEXT: ret i32 [[A]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test0 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0:#.*]] { -; IS__CGSCC____-NEXT: [[A:%.*]] = load i32, i32* [[P]], align 4, [[RNG0:!range !.*]] +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__CGSCC____-NEXT: [[A:%.*]] = load i32, i32* [[P]], align 4, !range [[RNG0:![0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[A]] ; %a = load i32, i32* %p, !range !0 @@ -24,28 +24,28 @@ } define i32 @test0-range-check(i32* %p) { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test0-range-check -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) [[ATTR0:#.*]] { -; IS__TUNIT_OPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) [[ATTR3:#.*]], [[RNG0:!range !.*]] +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR5:[0-9]+]], !range [[RNG0]] ; IS__TUNIT_OPM-NEXT: ret i32 [[A]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test0-range-check -; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) [[ATTR0:#.*]] { -; IS__TUNIT_NPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) [[ATTR2:#.*]], [[RNG0:!range !.*]] +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR4:[0-9]+]], !range [[RNG0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[A]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test0-range-check -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0:#.*]] { -; IS__CGSCC_OPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR3:#.*]], [[RNG0:!range !.*]] +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5:[0-9]+]], !range [[RNG0]] ; IS__CGSCC_OPM-NEXT: ret i32 [[A]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test0-range-check -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0:#.*]] { -; IS__CGSCC_NPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR2:#.*]], [[RNG0:!range !.*]] +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR4:[0-9]+]], !range [[RNG0]] ; IS__CGSCC_NPM-NEXT: ret i32 [[A]] ; %a = tail call i32 @test0(i32* %p) @@ -68,7 +68,7 @@ ; ret = [0, 10) ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test0-icmp-check ; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) { -; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) [[ATTR3]], [[RNG0]] +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR5]], !range [[RNG0]] ; IS__TUNIT_OPM-NEXT: [[CMP_EQ_2:%.*]] = icmp eq i32 [[RET]], 9 ; IS__TUNIT_OPM-NEXT: [[CMP_EQ_3:%.*]] = icmp eq i32 [[RET]], 8 ; IS__TUNIT_OPM-NEXT: [[CMP_EQ_4:%.*]] = icmp eq i32 [[RET]], 1 @@ -115,7 +115,7 @@ ; ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test0-icmp-check ; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) { -; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) [[ATTR2]], [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR4]], !range [[RNG0]] ; IS__TUNIT_NPM-NEXT: [[CMP_EQ_2:%.*]] = icmp eq i32 [[RET]], 9 ; IS__TUNIT_NPM-NEXT: [[CMP_EQ_3:%.*]] = icmp eq i32 [[RET]], 8 ; IS__TUNIT_NPM-NEXT: [[CMP_EQ_4:%.*]] = icmp eq i32 [[RET]], 1 @@ -162,7 +162,7 @@ ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test0-icmp-check ; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR3]], [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5]], !range [[RNG0]] ; IS__CGSCC_OPM-NEXT: [[CMP_EQ_2:%.*]] = icmp eq i32 [[RET]], 9 ; IS__CGSCC_OPM-NEXT: [[CMP_EQ_3:%.*]] = icmp eq i32 [[RET]], 8 ; IS__CGSCC_OPM-NEXT: [[CMP_EQ_4:%.*]] = icmp eq i32 [[RET]], 1 @@ -209,7 +209,7 @@ ; ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test0-icmp-check ; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) { -; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR2]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR4]], !range [[RNG0]] ; IS__CGSCC_NPM-NEXT: [[CMP_EQ_2:%.*]] = icmp eq i32 [[RET]], 9 ; IS__CGSCC_NPM-NEXT: [[CMP_EQ_3:%.*]] = icmp eq i32 [[RET]], 8 ; IS__CGSCC_NPM-NEXT: [[CMP_EQ_4:%.*]] = icmp eq i32 [[RET]], 1 @@ -339,18 +339,18 @@ ret void } define i32 @test1(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { -; IS__TUNIT____-NEXT: [[LOAD_10_100:%.*]] = load i32, i32* [[P]], align 4, [[RNG1:!range !.*]] +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-NEXT: [[LOAD_10_100:%.*]] = load i32, i32* [[P]], align 4, !range [[RNG1:![0-9]+]] ; IS__TUNIT____-NEXT: [[ADD_10_THEN_20_110:%.*]] = add i32 [[LOAD_10_100]], 10 ; IS__TUNIT____-NEXT: [[MUL_10_THEN_200_1091:%.*]] = mul i32 [[ADD_10_THEN_20_110]], 10 ; IS__TUNIT____-NEXT: ret i32 [[MUL_10_THEN_200_1091]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test1 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { -; IS__CGSCC____-NEXT: [[LOAD_10_100:%.*]] = load i32, i32* [[P]], align 4, [[RNG1:!range !.*]] +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-NEXT: [[LOAD_10_100:%.*]] = load i32, i32* [[P]], align 4, !range [[RNG1:![0-9]+]] ; IS__CGSCC____-NEXT: [[ADD_10_THEN_20_110:%.*]] = add i32 [[LOAD_10_100]], 10 ; IS__CGSCC____-NEXT: [[MUL_10_THEN_200_1091:%.*]] = mul i32 [[ADD_10_THEN_20_110]], 10 ; IS__CGSCC____-NEXT: ret i32 [[MUL_10_THEN_200_1091]] @@ -363,31 +363,31 @@ define i1 @test1-check(i32* %p) { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test1-check -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) [[ATTR0]] { -; IS__TUNIT_OPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree readonly align 4 [[P]]) [[ATTR3]], [[RNG2:!range !.*]] +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR5]], !range [[RNG2:![0-9]+]] ; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500 ; IS__TUNIT_OPM-NEXT: ret i1 [[CMP]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test1-check -; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) [[ATTR0]] { -; IS__TUNIT_NPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree readonly align 4 [[P]]) [[ATTR2]], [[RNG2:!range !.*]] +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR4]], !range [[RNG2:![0-9]+]] ; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500 ; IS__TUNIT_NPM-NEXT: ret i1 [[CMP]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test1-check -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR3]], [[RNG2:!range !.*]] +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5]], !range [[RNG2:![0-9]+]] ; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500 ; IS__CGSCC_OPM-NEXT: ret i1 [[CMP]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test1-check -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR2]], [[RNG2:!range !.*]] +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR4]], !range [[RNG2:![0-9]+]] ; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500 ; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]] ; @@ -409,18 +409,18 @@ ; } define i32 @test2(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 4 ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[TMP0]], 0 ; IS__TUNIT____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i32 4, i32 3 ; IS__TUNIT____-NEXT: ret i32 [[COND]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 4 ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[TMP0]], 0 @@ -435,9 +435,9 @@ } define i32 @test2_check(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_check -; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[IF_THEN:%.*]] ; IS__TUNIT____: if.then: @@ -447,9 +447,9 @@ ; IS__TUNIT____: return: ; IS__TUNIT____-NEXT: ret i32 2 ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_check -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[IF_THEN:%.*]] ; IS__CGSCC____: if.then: @@ -505,7 +505,7 @@ define internal i32 @r1(i32) local_unnamed_addr { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@r1 -; IS__TUNIT_OPM-SAME: () local_unnamed_addr [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: () local_unnamed_addr #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: br label [[TMP4:%.*]] ; IS__TUNIT_OPM: 1: ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP7:%.*]], 10000 @@ -524,7 +524,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@r1 -; IS__CGSCC_OPM-SAME: () local_unnamed_addr [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: () local_unnamed_addr #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br label [[TMP4:%.*]] ; IS__CGSCC_OPM: 1: ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP7:%.*]], 10000 @@ -541,9 +541,9 @@ ; IS__CGSCC_OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 100 ; IS__CGSCC_OPM-NEXT: br i1 [[TMP9]], label [[TMP1:%.*]], label [[TMP4]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@r1 -; IS__CGSCC_NPM-SAME: () local_unnamed_addr [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP3:%.*]] ; IS__CGSCC_NPM: 1: ; IS__CGSCC_NPM-NEXT: br label [[F:%.*]] @@ -580,7 +580,7 @@ define void @f1(i32){ ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f1 ; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]]) { -; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = tail call i32 @r1() [[ATTR1]] +; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = tail call i32 @r1() #[[ATTR1]] ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 15 ; IS__TUNIT_OPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]] ; IS__TUNIT_OPM: 4: @@ -591,7 +591,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f1 -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: br label [[TMP3:%.*]] ; IS__TUNIT_NPM: 2: ; IS__TUNIT_NPM-NEXT: unreachable @@ -600,7 +600,7 @@ ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1 ; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]]) { -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = tail call i32 @r1(), [[RNG3:!range !.*]] +; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = tail call i32 @r1() #[[ATTR6:[0-9]+]], !range [[RNG3:![0-9]+]] ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 15 ; IS__CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]] ; IS__CGSCC_OPM: 4: @@ -609,9 +609,9 @@ ; IS__CGSCC_OPM: 5: ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP3:%.*]] ; IS__CGSCC_NPM: 2: ; IS__CGSCC_NPM-NEXT: unreachable @@ -641,9 +641,9 @@ ; } ; } define dso_local i32 @test4-f1(i32 %u) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test4-f1 -; IS__TUNIT____-SAME: (i32 [[U:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32 [[U:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 ; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] @@ -653,17 +653,29 @@ ; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ] ; IS__TUNIT____-NEXT: ret i32 [[RETVAL_0]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@test4-f1 -; IS__CGSCC____-SAME: (i32 [[U:%.*]]) [[ATTR1:#.*]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 -; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] -; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: br label [[RETURN]] -; IS__CGSCC____: return: -; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ] -; IS__CGSCC____-NEXT: ret i32 [[RETVAL_0]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test4-f1 +; IS__CGSCC_OPM-SAME: (i32 [[U:%.*]]) #[[ATTR2:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 +; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] +; IS__CGSCC_OPM: if.then: +; IS__CGSCC_OPM-NEXT: br label [[RETURN]] +; IS__CGSCC_OPM: return: +; IS__CGSCC_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ] +; IS__CGSCC_OPM-NEXT: ret i32 [[RETVAL_0]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4-f1 +; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] +; IS__CGSCC_NPM: if.then: +; IS__CGSCC_NPM-NEXT: br label [[RETURN]] +; IS__CGSCC_NPM: return: +; IS__CGSCC_NPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ] +; IS__CGSCC_NPM-NEXT: ret i32 [[RETVAL_0]] ; ; FIXME: RETVAL_0 >= 0 entry: @@ -680,32 +692,32 @@ define dso_local i32 @test4-g1(i32 %u) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test4-g1 -; IS__TUNIT_OPM-SAME: (i32 [[U:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT_OPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) [[ATTR2]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR3:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[CALL]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4-g1 -; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { ; IS__TUNIT_NPM-NEXT: entry: -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) [[ATTR1]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR1]] ; IS__TUNIT_NPM-NEXT: ret i32 [[CALL]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test4-g1 -; IS__CGSCC_OPM-SAME: (i32 [[U:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) [[ATTR4:#.*]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR7:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4-g1 -; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: entry: -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) [[ATTR3:#.*]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR5:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]] ; ; FIXME: %call should have range [0, inf] @@ -724,9 +736,9 @@ ; } ; } define dso_local i32 @test4-f2(i32 %u) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test4-f2 -; IS__TUNIT____-SAME: (i32 [[U:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 ; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] @@ -739,20 +751,35 @@ ; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ] ; IS__TUNIT____-NEXT: ret i32 [[RETVAL_0]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@test4-f2 -; IS__CGSCC____-SAME: (i32 [[U:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 -; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] -; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nuw nsw i32 [[U]], 1 -; IS__CGSCC____-NEXT: br label [[RETURN:%.*]] -; IS__CGSCC____: if.else: -; IS__CGSCC____-NEXT: br label [[RETURN]] -; IS__CGSCC____: return: -; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ] -; IS__CGSCC____-NEXT: ret i32 [[RETVAL_0]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test4-f2 +; IS__CGSCC_OPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 +; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__CGSCC_OPM: if.then: +; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nuw nsw i32 [[U]], 1 +; IS__CGSCC_OPM-NEXT: br label [[RETURN:%.*]] +; IS__CGSCC_OPM: if.else: +; IS__CGSCC_OPM-NEXT: br label [[RETURN]] +; IS__CGSCC_OPM: return: +; IS__CGSCC_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ] +; IS__CGSCC_OPM-NEXT: ret i32 [[RETVAL_0]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4-f2 +; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__CGSCC_NPM: if.then: +; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nuw nsw i32 [[U]], 1 +; IS__CGSCC_NPM-NEXT: br label [[RETURN:%.*]] +; IS__CGSCC_NPM: if.else: +; IS__CGSCC_NPM-NEXT: br label [[RETURN]] +; IS__CGSCC_NPM: return: +; IS__CGSCC_NPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ] +; IS__CGSCC_NPM-NEXT: ret i32 [[RETVAL_0]] ; entry: %cmp = icmp sgt i32 %u, -1 @@ -772,32 +799,32 @@ define dso_local i32 @test4-g2(i32 %u) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test4-g2 -; IS__TUNIT_OPM-SAME: (i32 [[U:%.*]]) [[ATTR2]] { +; IS__TUNIT_OPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) [[ATTR2]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR3]] ; IS__TUNIT_OPM-NEXT: ret i32 [[CALL]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4-g2 -; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { ; IS__TUNIT_NPM-NEXT: entry: -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) [[ATTR1]], [[RNG3:!range !.*]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR1]], !range [[RNG3:![0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32 [[CALL]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test4-g2 -; IS__CGSCC_OPM-SAME: (i32 [[U:%.*]]) [[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) [[ATTR4]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4-g2 -; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: entry: -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) [[ATTR3]], [[RNG3:!range !.*]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR5]], !range [[RNG3:![0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]] ; entry: @@ -808,12 +835,12 @@ define dso_local i32 @test-5() { ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test-5() { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @rec(i32 noundef 0), [[RNG3:!range !.*]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @rec(i32 noundef 0), !range [[RNG3:![0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[CALL]] ; ; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test-5() { ; NOT_TUNIT_OPM-NEXT: entry: -; NOT_TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @rec(i32 noundef 0), [[RNG4:!range !.*]] +; NOT_TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @rec(i32 noundef 0), !range [[RNG4:![0-9]+]] ; NOT_TUNIT_OPM-NEXT: ret i32 [[CALL]] ; entry: @@ -877,9 +904,9 @@ ; FIXME: All but the return is not needed anymore define dso_local zeroext i1 @phi(i32 %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@phi -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: bb: ; IS__TUNIT____-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5 ; IS__TUNIT____-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]] @@ -903,31 +930,57 @@ ; IS__TUNIT____: bb13: ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@phi -; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: bb: -; IS__CGSCC____-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5 -; IS__CGSCC____-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]] -; IS__CGSCC____: bb1: -; IS__CGSCC____-NEXT: br label [[BB3:%.*]] -; IS__CGSCC____: bb2: -; IS__CGSCC____-NEXT: br label [[BB3]] -; IS__CGSCC____: bb3: -; IS__CGSCC____-NEXT: [[TMP4:%.*]] = icmp sgt i32 [[ARG]], 10 -; IS__CGSCC____-NEXT: br i1 [[TMP4]], label [[BB5:%.*]], label [[BB7:%.*]] -; IS__CGSCC____: bb5: -; IS__CGSCC____-NEXT: br label [[BB9:%.*]] -; IS__CGSCC____: bb7: -; IS__CGSCC____-NEXT: br label [[BB9]] -; IS__CGSCC____: bb9: -; IS__CGSCC____-NEXT: br label [[BB12:%.*]] -; IS__CGSCC____: bb11: -; IS__CGSCC____-NEXT: unreachable -; IS__CGSCC____: bb12: -; IS__CGSCC____-NEXT: br label [[BB13:%.*]] -; IS__CGSCC____: bb13: -; IS__CGSCC____-NEXT: ret i1 false +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi +; IS__CGSCC_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: bb: +; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5 +; IS__CGSCC_OPM-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]] +; IS__CGSCC_OPM: bb1: +; IS__CGSCC_OPM-NEXT: br label [[BB3:%.*]] +; IS__CGSCC_OPM: bb2: +; IS__CGSCC_OPM-NEXT: br label [[BB3]] +; IS__CGSCC_OPM: bb3: +; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = icmp sgt i32 [[ARG]], 10 +; IS__CGSCC_OPM-NEXT: br i1 [[TMP4]], label [[BB5:%.*]], label [[BB7:%.*]] +; IS__CGSCC_OPM: bb5: +; IS__CGSCC_OPM-NEXT: br label [[BB9:%.*]] +; IS__CGSCC_OPM: bb7: +; IS__CGSCC_OPM-NEXT: br label [[BB9]] +; IS__CGSCC_OPM: bb9: +; IS__CGSCC_OPM-NEXT: br label [[BB12:%.*]] +; IS__CGSCC_OPM: bb11: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: bb12: +; IS__CGSCC_OPM-NEXT: br label [[BB13:%.*]] +; IS__CGSCC_OPM: bb13: +; IS__CGSCC_OPM-NEXT: ret i1 false +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi +; IS__CGSCC_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: bb: +; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5 +; IS__CGSCC_NPM-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]] +; IS__CGSCC_NPM: bb1: +; IS__CGSCC_NPM-NEXT: br label [[BB3:%.*]] +; IS__CGSCC_NPM: bb2: +; IS__CGSCC_NPM-NEXT: br label [[BB3]] +; IS__CGSCC_NPM: bb3: +; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = icmp sgt i32 [[ARG]], 10 +; IS__CGSCC_NPM-NEXT: br i1 [[TMP4]], label [[BB5:%.*]], label [[BB7:%.*]] +; IS__CGSCC_NPM: bb5: +; IS__CGSCC_NPM-NEXT: br label [[BB9:%.*]] +; IS__CGSCC_NPM: bb7: +; IS__CGSCC_NPM-NEXT: br label [[BB9]] +; IS__CGSCC_NPM: bb9: +; IS__CGSCC_NPM-NEXT: br label [[BB12:%.*]] +; IS__CGSCC_NPM: bb11: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: bb12: +; IS__CGSCC_NPM-NEXT: br label [[BB13:%.*]] +; IS__CGSCC_NPM: bb13: +; IS__CGSCC_NPM-NEXT: ret i1 false ; bb: %tmp = icmp sgt i32 %arg, 5 @@ -969,17 +1022,23 @@ } define dso_local i1 @select(i32 %a) local_unnamed_addr #0 { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@select -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i1 false ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@select -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: ret i1 false +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@select +; IS__CGSCC_OPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: ret i1 false +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@select +; IS__CGSCC_NPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: ret i1 false ; entry: %cmp = icmp sgt i32 %a, 5 @@ -992,17 +1051,23 @@ } define dso_local i32 @select_zext(i32 %a) local_unnamed_addr #0 { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@select_zext -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@select_zext -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: ret i32 0 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@select_zext +; IS__CGSCC_OPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: ret i32 0 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@select_zext +; IS__CGSCC_NPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: ret i32 0 ; entry: %cmp = icmp sgt i32 %a, 5 @@ -1017,23 +1082,32 @@ ; FIXME: We do not look through the ptr casts here. define dso_local i64 @select_int2ptr_bitcast_ptr2int(i32 %a) local_unnamed_addr #0 { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[I2P:%.*]] = inttoptr i1 false to i1* ; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast i1* [[I2P]] to i32* ; IS__TUNIT____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[BC]] to i64 ; IS__TUNIT____-NEXT: ret i64 [[P2I]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[I2P:%.*]] = inttoptr i1 false to i1* -; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i1* [[I2P]] to i32* -; IS__CGSCC____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[BC]] to i64 -; IS__CGSCC____-NEXT: ret i64 [[P2I]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int +; IS__CGSCC_OPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: [[I2P:%.*]] = inttoptr i1 false to i1* +; IS__CGSCC_OPM-NEXT: [[BC:%.*]] = bitcast i1* [[I2P]] to i32* +; IS__CGSCC_OPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[BC]] to i64 +; IS__CGSCC_OPM-NEXT: ret i64 [[P2I]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int +; IS__CGSCC_NPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: [[I2P:%.*]] = inttoptr i1 false to i1* +; IS__CGSCC_NPM-NEXT: [[BC:%.*]] = bitcast i1* [[I2P]] to i32* +; IS__CGSCC_NPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[BC]] to i64 +; IS__CGSCC_NPM-NEXT: ret i64 [[P2I]] ; entry: %cmp = icmp sgt i32 %a, 5 @@ -1051,125 +1125,153 @@ ; } define i1 @f_fcmp(float %a, float %b) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@f_fcmp -; IS__TUNIT____-SAME: (float [[A:%.*]], float [[B:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (float [[A:%.*]], float [[B:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[R:%.*]] = fcmp uge float [[A]], [[B]] ; IS__TUNIT____-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false ; IS__TUNIT____-NEXT: ret i1 [[S]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@f_fcmp -; IS__CGSCC____-SAME: (float [[A:%.*]], float [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: [[R:%.*]] = fcmp uge float [[A]], [[B]] -; IS__CGSCC____-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false -; IS__CGSCC____-NEXT: ret i1 [[S]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f_fcmp +; IS__CGSCC_OPM-SAME: (float [[A:%.*]], float [[B:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = fcmp uge float [[A]], [[B]] +; IS__CGSCC_OPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__CGSCC_OPM-NEXT: ret i1 [[S]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f_fcmp +; IS__CGSCC_NPM-SAME: (float [[A:%.*]], float [[B:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[R:%.*]] = fcmp uge float [[A]], [[B]] +; IS__CGSCC_NPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__CGSCC_NPM-NEXT: ret i1 [[S]] ; %r = fcmp uge float %a, %b %s = select i1 %r, i1 %r, i1 0 ret i1 %s } define i1 @d_fcmp(double %a, double %b) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@d_fcmp -; IS__TUNIT____-SAME: (double [[A:%.*]], double [[B:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (double [[A:%.*]], double [[B:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[R:%.*]] = fcmp oeq double [[A]], [[B]] ; IS__TUNIT____-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false ; IS__TUNIT____-NEXT: ret i1 [[S]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@d_fcmp -; IS__CGSCC____-SAME: (double [[A:%.*]], double [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: [[R:%.*]] = fcmp oeq double [[A]], [[B]] -; IS__CGSCC____-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false -; IS__CGSCC____-NEXT: ret i1 [[S]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@d_fcmp +; IS__CGSCC_OPM-SAME: (double [[A:%.*]], double [[B:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = fcmp oeq double [[A]], [[B]] +; IS__CGSCC_OPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__CGSCC_OPM-NEXT: ret i1 [[S]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@d_fcmp +; IS__CGSCC_NPM-SAME: (double [[A:%.*]], double [[B:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[R:%.*]] = fcmp oeq double [[A]], [[B]] +; IS__CGSCC_NPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__CGSCC_NPM-NEXT: ret i1 [[S]] ; %r = fcmp oeq double %a, %b %s = select i1 %r, i1 %r, i1 0 ret i1 %s } define i1 @dp_icmp(double* %a, double* %b) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@dp_icmp -; IS__TUNIT____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[R:%.*]] = icmp sge double* [[A]], [[B]] ; IS__TUNIT____-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false ; IS__TUNIT____-NEXT: ret i1 [[S]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@dp_icmp -; IS__CGSCC____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: [[R:%.*]] = icmp sge double* [[A]], [[B]] -; IS__CGSCC____-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false -; IS__CGSCC____-NEXT: ret i1 [[S]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@dp_icmp +; IS__CGSCC_OPM-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = icmp sge double* [[A]], [[B]] +; IS__CGSCC_OPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__CGSCC_OPM-NEXT: ret i1 [[S]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@dp_icmp +; IS__CGSCC_NPM-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[R:%.*]] = icmp sge double* [[A]], [[B]] +; IS__CGSCC_NPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__CGSCC_NPM-NEXT: ret i1 [[S]] ; %r = icmp sge double* %a, %b %s = select i1 %r, i1 %r, i1 0 ret i1 %s } define i1 @ip_icmp(i8* %a, i8* %b) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ip_icmp -; IS__TUNIT____-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[R:%.*]] = icmp ult i8* [[A]], [[B]] ; IS__TUNIT____-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false ; IS__TUNIT____-NEXT: ret i1 [[S]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ip_icmp -; IS__CGSCC____-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: [[R:%.*]] = icmp ult i8* [[A]], [[B]] -; IS__CGSCC____-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false -; IS__CGSCC____-NEXT: ret i1 [[S]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ip_icmp +; IS__CGSCC_OPM-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = icmp ult i8* [[A]], [[B]] +; IS__CGSCC_OPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__CGSCC_OPM-NEXT: ret i1 [[S]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ip_icmp +; IS__CGSCC_NPM-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[R:%.*]] = icmp ult i8* [[A]], [[B]] +; IS__CGSCC_NPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__CGSCC_NPM-NEXT: ret i1 [[S]] ; %r = icmp ult i8* %a, %b %s = select i1 %r, i1 %r, i1 0 ret i1 %s } define i1 @fcmp_caller(float %fa, float %fb, double %da, double %db, double* %dpa, double* %dpb, i8* %ipa, i8* %ipb) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@fcmp_caller -; IS__TUNIT_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]] { -; IS__TUNIT_OPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) [[ATTR2]] -; IS__TUNIT_OPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) [[ATTR2]] -; IS__TUNIT_OPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) [[ATTR2]] -; IS__TUNIT_OPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) [[ATTR2]] +; IS__TUNIT_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]] { +; IS__TUNIT_OPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR3]] ; IS__TUNIT_OPM-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]] ; IS__TUNIT_OPM-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]] ; IS__TUNIT_OPM-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]] ; IS__TUNIT_OPM-NEXT: ret i1 [[O3]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@fcmp_caller -; IS__TUNIT_NPM-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:%.*]]) [[ATTR1]] { -; IS__TUNIT_NPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) [[ATTR1]] -; IS__TUNIT_NPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) [[ATTR1]] -; IS__TUNIT_NPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) [[ATTR1]] -; IS__TUNIT_NPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) [[ATTR1]] +; IS__TUNIT_NPM-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]] { +; IS__TUNIT_NPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) #[[ATTR1]] +; IS__TUNIT_NPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR1]] +; IS__TUNIT_NPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR1]] +; IS__TUNIT_NPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR1]] ; IS__TUNIT_NPM-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]] ; IS__TUNIT_NPM-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]] ; IS__TUNIT_NPM-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]] ; IS__TUNIT_NPM-NEXT: ret i1 [[O3]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fcmp_caller -; 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]] { -; IS__CGSCC_OPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) [[ATTR4]] -; IS__CGSCC_OPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) [[ATTR4]] -; IS__CGSCC_OPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) [[ATTR4]] -; IS__CGSCC_OPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) [[ATTR4]] +; 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]] { +; IS__CGSCC_OPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) #[[ATTR7]] +; IS__CGSCC_OPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR7]] +; IS__CGSCC_OPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR7]] +; IS__CGSCC_OPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]] ; IS__CGSCC_OPM-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]] ; IS__CGSCC_OPM-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]] ; IS__CGSCC_OPM-NEXT: ret i1 [[O3]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fcmp_caller -; IS__CGSCC_NPM-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:%.*]]) [[ATTR1]] { -; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) [[ATTR3]] -; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) [[ATTR3]] -; IS__CGSCC_NPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) [[ATTR3]] -; IS__CGSCC_NPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) [[ATTR3]] +; IS__CGSCC_NPM-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:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) #[[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR5]] ; IS__CGSCC_NPM-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]] ; IS__CGSCC_NPM-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]] ; IS__CGSCC_NPM-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]] @@ -1186,43 +1288,63 @@ } define i8 @ret_two() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_two -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 2 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_two -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i8 2 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ret_two +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i8 2 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ret_two +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i8 2 ; ret i8 2 } define i8 @ret_undef() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 undef ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i8 undef +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ret_undef +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i8 undef +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ret_undef +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i8 undef ; ret i8 undef } ; Verify we collapse undef to a value and return something non-undef here. define i8 @undef_collapse_1() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@undef_collapse_1 -; IS__TUNIT____-SAME: () [[ATTR1]] { -; IS__TUNIT____-NEXT: ret i8 0 +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@undef_collapse_1 +; IS__TUNIT_OPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: ret i8 0 +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@undef_collapse_1 +; IS__TUNIT_NPM-SAME: () #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: ret i8 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@undef_collapse_1 -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i8 0 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@undef_collapse_1 +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i8 0 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@undef_collapse_1 +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i8 0 ; %c = call i8 @ret_undef() %s = shl i8 %c, 2 @@ -1231,15 +1353,20 @@ ; Verify we collapse undef to a value and return something non-undef here. define i8 @undef_collapse_2() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@undef_collapse_2 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@undef_collapse_2 -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i8 0 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@undef_collapse_2 +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i8 0 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@undef_collapse_2 +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i8 0 ; %c = call i8 @ret_two() %s = shl i8 undef, %c @@ -1248,15 +1375,25 @@ define i8 @undef_collapse_caller() { ; -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@undef_collapse_caller -; IS__TUNIT____-SAME: () [[ATTR1]] { -; IS__TUNIT____-NEXT: ret i8 0 +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@undef_collapse_caller +; IS__TUNIT_OPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: ret i8 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@undef_collapse_caller -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i8 0 +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@undef_collapse_caller +; IS__TUNIT_NPM-SAME: () #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: ret i8 0 +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@undef_collapse_caller +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i8 0 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@undef_collapse_caller +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i8 0 ; %c1 = call i8 @undef_collapse_1() %c2 = call i8 @undef_collapse_2() @@ -1265,32 +1402,48 @@ } define i32 @ret1or2(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret1or2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2 ; IS__TUNIT____-NEXT: ret i32 [[S]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ret1or2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2 -; IS__CGSCC____-NEXT: ret i32 [[S]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ret1or2 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2 +; IS__CGSCC_OPM-NEXT: ret i32 [[S]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ret1or2 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2 +; IS__CGSCC_NPM-NEXT: ret i32 [[S]] ; %s = select i1 %c, i32 1, i32 2 ret i32 %s } define i1 @callee_range_1(i1 %c1, i1 %c2, i1 %c3) { ; -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@callee_range_1 -; IS__TUNIT____-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: ret i1 true +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@callee_range_1 +; IS__TUNIT_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@callee_range_1 -; IS__CGSCC____-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i1 true +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@callee_range_1 +; IS__TUNIT_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: ret i1 true +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callee_range_1 +; IS__CGSCC_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: ret i1 true +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callee_range_1 +; IS__CGSCC_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR2:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: ret i1 true ; %r1 = call i32 @ret1or2(i1 %c1) %r2 = call i32 @ret1or2(i1 %c2) @@ -1304,44 +1457,44 @@ define i1 @callee_range_2(i1 %c1, i1 %c2) { ; -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@callee_range_2 -; IS__TUNIT_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) [[ATTR2]] { -; IS__TUNIT_OPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) [[ATTR2]], [[RNG4:!range !.*]] -; IS__TUNIT_OPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) [[ATTR2]], [[RNG4]] +; IS__TUNIT_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR3]], !range [[RNG4:![0-9]+]] +; IS__TUNIT_OPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR3]], !range [[RNG4]] ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = add i32 [[R1]], [[R2]] ; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 3 ; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2 ; IS__TUNIT_OPM-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]] ; IS__TUNIT_OPM-NEXT: ret i1 [[F]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@callee_range_2 -; IS__TUNIT_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) [[ATTR1]] { -; IS__TUNIT_NPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) [[ATTR1]], [[RNG5:!range !.*]] -; IS__TUNIT_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) [[ATTR1]], [[RNG5]] +; IS__TUNIT_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR2]] { +; IS__TUNIT_NPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR1]], !range [[RNG5:![0-9]+]] +; IS__TUNIT_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR1]], !range [[RNG5]] ; IS__TUNIT_NPM-NEXT: [[A:%.*]] = add i32 [[R1]], [[R2]] ; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 3 ; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2 ; IS__TUNIT_NPM-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]] ; IS__TUNIT_NPM-NEXT: ret i1 [[F]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callee_range_2 -; IS__CGSCC_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) [[ATTR2]] { -; IS__CGSCC_OPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) [[ATTR4]], [[RNG5:!range !.*]] -; IS__CGSCC_OPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) [[ATTR4]], [[RNG5]] +; IS__CGSCC_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR7]], !range [[RNG5:![0-9]+]] +; IS__CGSCC_OPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR7]], !range [[RNG5]] ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = add i32 [[R1]], [[R2]] ; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 3 ; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2 ; IS__CGSCC_OPM-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]] ; IS__CGSCC_OPM-NEXT: ret i1 [[F]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callee_range_2 -; IS__CGSCC_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) [[ATTR1]] { -; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) [[ATTR3]], [[RNG5:!range !.*]] -; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) [[ATTR3]], [[RNG5]] +; IS__CGSCC_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR5]], !range [[RNG5:![0-9]+]] +; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR5]], !range [[RNG5]] ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = add i32 [[R1]], [[R2]] ; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 3 ; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2 @@ -1359,24 +1512,29 @@ define i32 @ret100() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret100 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR2]] { ; IS__TUNIT____-NEXT: ret i32 100 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ret100 -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i32 100 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ret100 +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i32 100 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ret100 +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i32 100 ; ret i32 100 } define i1 @ctx_adjustment(i32 %V) { ; -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@ctx_adjustment -; IS__TUNIT_OPM-SAME: (i32 [[V:%.*]]) [[ATTR2]] { +; IS__TUNIT_OPM-SAME: (i32 [[V:%.*]]) #[[ATTR2]] { ; IS__TUNIT_OPM-NEXT: [[C1:%.*]] = icmp sge i32 [[V]], 100 ; IS__TUNIT_OPM-NEXT: br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; IS__TUNIT_OPM: if.true: @@ -1388,9 +1546,9 @@ ; IS__TUNIT_OPM-NEXT: [[C2:%.*]] = icmp sge i32 [[PHI]], 100 ; IS__TUNIT_OPM-NEXT: ret i1 [[C2]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ctx_adjustment -; IS__TUNIT_NPM-SAME: (i32 [[V:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i32 [[V:%.*]]) #[[ATTR2]] { ; IS__TUNIT_NPM-NEXT: [[C1:%.*]] = icmp sge i32 [[V]], 100 ; IS__TUNIT_NPM-NEXT: br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; IS__TUNIT_NPM: if.true: @@ -1400,9 +1558,9 @@ ; IS__TUNIT_NPM: end: ; IS__TUNIT_NPM-NEXT: ret i1 true ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ctx_adjustment -; IS__CGSCC_OPM-SAME: (i32 [[V:%.*]]) [[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i32 [[V:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: [[C1:%.*]] = icmp sge i32 [[V]], 100 ; IS__CGSCC_OPM-NEXT: br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; IS__CGSCC_OPM: if.true: @@ -1414,9 +1572,9 @@ ; IS__CGSCC_OPM-NEXT: [[C2:%.*]] = icmp sge i32 [[PHI]], 100 ; IS__CGSCC_OPM-NEXT: ret i1 [[C2]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ctx_adjustment -; IS__CGSCC_NPM-SAME: (i32 [[V:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i32 [[V:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: [[C1:%.*]] = icmp sge i32 [[V]], 100 ; IS__CGSCC_NPM-NEXT: br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; IS__CGSCC_NPM: if.true: @@ -1441,69 +1599,75 @@ define i32 @func(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@func -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1 ; IS__TUNIT____-NEXT: ret i32 [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@func -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1 -; IS__CGSCC____-NEXT: ret i32 [[RET]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@func +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1 +; IS__CGSCC_OPM-NEXT: ret i32 [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@func +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1 +; IS__CGSCC_NPM-NEXT: ret i32 [[RET]] ; %ret = select i1 %c, i32 0, i32 1 ret i32 %ret } define i32 @simplify_callsite_argument(i1 %d) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@simplify_callsite_argument -; IS__TUNIT_OPM-SAME: (i1 [[D:%.*]]) [[ATTR2]] { +; IS__TUNIT_OPM-SAME: (i1 [[D:%.*]]) #[[ATTR2]] { ; IS__TUNIT_OPM-NEXT: [[C:%.*]] = select i1 [[D]], i1 true, i1 false ; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT_OPM: t: -; IS__TUNIT_OPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) [[ATTR2]], [[RNG3]] +; IS__TUNIT_OPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) #[[ATTR3]], !range [[RNG3]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET1]] ; IS__TUNIT_OPM: f: -; IS__TUNIT_OPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) [[ATTR2]], [[RNG3]] +; IS__TUNIT_OPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR3]], !range [[RNG3]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET2]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@simplify_callsite_argument -; IS__TUNIT_NPM-SAME: (i1 [[D:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i1 [[D:%.*]]) #[[ATTR2]] { ; IS__TUNIT_NPM-NEXT: [[C:%.*]] = select i1 [[D]], i1 true, i1 false ; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT_NPM: t: -; IS__TUNIT_NPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef true) [[ATTR1]], [[RNG4:!range !.*]] +; IS__TUNIT_NPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef true) #[[ATTR1]], !range [[RNG4]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET1]] ; IS__TUNIT_NPM: f: -; IS__TUNIT_NPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) [[ATTR1]], [[RNG4]] +; IS__TUNIT_NPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR1]], !range [[RNG4]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET2]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@simplify_callsite_argument -; IS__CGSCC_OPM-SAME: (i1 [[D:%.*]]) [[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i1 [[D:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = select i1 [[D]], i1 true, i1 false ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_OPM: t: -; IS__CGSCC_OPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) [[ATTR4]], [[RNG4:!range !.*]] +; IS__CGSCC_OPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) #[[ATTR7]], !range [[RNG4]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET1]] ; IS__CGSCC_OPM: f: -; IS__CGSCC_OPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) [[ATTR4]], [[RNG4]] +; IS__CGSCC_OPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR7]], !range [[RNG4]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET2]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@simplify_callsite_argument -; IS__CGSCC_NPM-SAME: (i1 [[D:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i1 [[D:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: [[C:%.*]] = select i1 [[D]], i1 true, i1 false ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_NPM: t: -; IS__CGSCC_NPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef true) [[ATTR3]], [[RNG4:!range !.*]] +; IS__CGSCC_NPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef true) #[[ATTR5]], !range [[RNG4]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET1]] ; IS__CGSCC_NPM: f: -; IS__CGSCC_NPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) [[ATTR3]], [[RNG4]] +; IS__CGSCC_NPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR5]], !range [[RNG4]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET2]] ; %c = select i1 %d, i1 true, i1 false @@ -1517,34 +1681,46 @@ } define internal i32 @less_than_65536(i32 %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@less_than_65536 -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536 ; IS__TUNIT____-NEXT: ret i32 [[SHRINKED]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@less_than_65536 -; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536 -; IS__CGSCC____-NEXT: ret i32 [[SHRINKED]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@less_than_65536 +; IS__CGSCC_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536 +; IS__CGSCC_OPM-NEXT: ret i32 [[SHRINKED]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@less_than_65536 +; IS__CGSCC_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536 +; IS__CGSCC_NPM-NEXT: ret i32 [[SHRINKED]] ; %shrinked = udiv i32 %arg, 65536 ret i32 %shrinked } define internal i1 @is_less_than_65536(i32 %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@is_less_than_65536 -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536 ; IS__TUNIT____-NEXT: ret i1 [[CMP]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@is_less_than_65536 -; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536 -; IS__CGSCC____-NEXT: ret i1 [[CMP]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@is_less_than_65536 +; IS__CGSCC_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536 +; IS__CGSCC_OPM-NEXT: ret i1 [[CMP]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@is_less_than_65536 +; IS__CGSCC_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536 +; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]] ; %cmp = icmp ult i32 %arg, 65536 ret i1 %cmp @@ -1554,41 +1730,41 @@ define i1 @check_divided_range(i32 %arg) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@check_divided_range -; IS__TUNIT_OPM-SAME: (i32 [[ARG:%.*]]) [[ATTR2]] { -; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) [[ATTR2]] -; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) [[ATTR2]] -; IS__TUNIT_OPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) [[ATTR2]] -; IS__TUNIT_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) [[ATTR2]] +; IS__TUNIT_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) #[[ATTR3]] ; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = and i1 [[TRUE1]], [[TRUE2]] ; IS__TUNIT_OPM-NEXT: ret i1 [[RET]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@check_divided_range -; IS__TUNIT_NPM-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { -; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) [[ATTR1]], [[RNG6:!range !.*]] -; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) [[ATTR1]], [[RNG6]] -; IS__TUNIT_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) [[ATTR1]] -; IS__TUNIT_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) [[ATTR1]] +; IS__TUNIT_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) #[[ATTR1]], !range [[RNG6:![0-9]+]] +; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) #[[ATTR1]], !range [[RNG6]] +; IS__TUNIT_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) #[[ATTR1]] +; IS__TUNIT_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) #[[ATTR1]] ; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = and i1 [[TRUE1]], [[TRUE2]] ; IS__TUNIT_NPM-NEXT: ret i1 [[RET]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@check_divided_range -; IS__CGSCC_OPM-SAME: (i32 [[ARG:%.*]]) [[ATTR2]] { -; IS__CGSCC_OPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) [[ATTR4]] -; IS__CGSCC_OPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) [[ATTR4]] -; IS__CGSCC_OPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) [[ATTR4]] -; IS__CGSCC_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) [[ATTR4]] +; IS__CGSCC_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR3]] { +; IS__CGSCC_OPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) #[[ATTR7]] +; IS__CGSCC_OPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) #[[ATTR7]] +; IS__CGSCC_OPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) #[[ATTR7]] +; IS__CGSCC_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = and i1 [[TRUE1]], [[TRUE2]] ; IS__CGSCC_OPM-NEXT: ret i1 [[RET]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@check_divided_range -; IS__CGSCC_NPM-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { -; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) [[ATTR3]], [[RNG6:!range !.*]] -; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) [[ATTR3]], [[RNG6]] -; IS__CGSCC_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) [[ATTR3]] -; IS__CGSCC_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) [[ATTR3]] +; IS__CGSCC_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { +; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) #[[ATTR5]], !range [[RNG6:![0-9]+]] +; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) #[[ATTR5]], !range [[RNG6]] +; IS__CGSCC_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) #[[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) #[[ATTR5]] ; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = and i1 [[TRUE1]], [[TRUE2]] ; IS__CGSCC_NPM-NEXT: ret i1 [[RET]] ; @@ -1601,32 +1777,42 @@ } define internal i32 @cast_and_return(i1 %c) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@cast_and_return -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR2]] { +; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { ; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = zext i1 [[C]] to i32 ; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@cast_and_return -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i32 undef +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@cast_and_return +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i32 undef +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@cast_and_return +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i32 undef ; %ret = zext i1 %c to i32 ret i32 %ret } define internal i1 @is_less_than_3(i32 %c) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@is_less_than_3 -; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) [[ATTR2]] { +; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { ; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 3 ; IS__TUNIT_OPM-NEXT: ret i1 [[CMP]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@is_less_than_3 -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i1 undef +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@is_less_than_3 +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i1 undef +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@is_less_than_3 +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i1 undef ; %cmp = icmp slt i32 %c, 3 ret i1 %cmp @@ -1636,22 +1822,27 @@ define i1 @check_casted_range(i1 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@check_casted_range -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR2]] { -; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @cast_and_return(i1 noundef true) [[ATTR2]] -; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call i32 @cast_and_return(i1 [[C]]) [[ATTR2]] +; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @cast_and_return(i1 noundef true) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call i32 @cast_and_return(i1 [[C]]) #[[ATTR3]] ; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add i32 [[CSRET1]], [[CSRET2]] -; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i1 @is_less_than_3(i32 [[ADD]]) [[ATTR2]] +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i1 @is_less_than_3(i32 [[ADD]]) #[[ATTR3]] ; IS__TUNIT_OPM-NEXT: ret i1 [[RET]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@check_casted_range -; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { ; IS__TUNIT_NPM-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@check_casted_range -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i1 true +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@check_casted_range +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR3]] { +; IS__CGSCC_OPM-NEXT: ret i1 true +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@check_casted_range +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_NPM-NEXT: ret i1 true ; %csret1 = call i32 @cast_and_return(i1 true) %csret2 = call i32 @cast_and_return(i1 %c) @@ -1661,34 +1852,63 @@ } define internal i32 @less_than_100_1(i32 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@less_than_100_1 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ -; IS__CGSCC____-NEXT: i32 0, label [[ONZERO:%.*]] -; IS__CGSCC____-NEXT: i32 1, label [[ONONE:%.*]] -; IS__CGSCC____-NEXT: i32 2, label [[ONTWO:%.*]] -; IS__CGSCC____-NEXT: i32 3, label [[ONTHREE:%.*]] -; IS__CGSCC____-NEXT: i32 4, label [[ONFOUR:%.*]] -; IS__CGSCC____-NEXT: i32 5, label [[ONFIVE:%.*]] -; IS__CGSCC____-NEXT: i32 6, label [[ONSIX:%.*]] -; IS__CGSCC____-NEXT: ] -; IS__CGSCC____: onzero: -; IS__CGSCC____-NEXT: ret i32 undef -; IS__CGSCC____: onone: -; IS__CGSCC____-NEXT: ret i32 undef -; IS__CGSCC____: ontwo: -; IS__CGSCC____-NEXT: ret i32 undef -; IS__CGSCC____: onthree: -; IS__CGSCC____-NEXT: ret i32 undef -; IS__CGSCC____: onfour: -; IS__CGSCC____-NEXT: ret i32 undef -; IS__CGSCC____: onfive: -; IS__CGSCC____-NEXT: ret i32 undef -; IS__CGSCC____: onsix: -; IS__CGSCC____-NEXT: ret i32 undef -; IS__CGSCC____: otherwise: -; IS__CGSCC____-NEXT: ret i32 undef +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@less_than_100_1 +; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ +; IS__CGSCC_OPM-NEXT: i32 0, label [[ONZERO:%.*]] +; IS__CGSCC_OPM-NEXT: i32 1, label [[ONONE:%.*]] +; IS__CGSCC_OPM-NEXT: i32 2, label [[ONTWO:%.*]] +; IS__CGSCC_OPM-NEXT: i32 3, label [[ONTHREE:%.*]] +; IS__CGSCC_OPM-NEXT: i32 4, label [[ONFOUR:%.*]] +; IS__CGSCC_OPM-NEXT: i32 5, label [[ONFIVE:%.*]] +; IS__CGSCC_OPM-NEXT: i32 6, label [[ONSIX:%.*]] +; IS__CGSCC_OPM-NEXT: ] +; IS__CGSCC_OPM: onzero: +; IS__CGSCC_OPM-NEXT: ret i32 undef +; IS__CGSCC_OPM: onone: +; IS__CGSCC_OPM-NEXT: ret i32 undef +; IS__CGSCC_OPM: ontwo: +; IS__CGSCC_OPM-NEXT: ret i32 undef +; IS__CGSCC_OPM: onthree: +; IS__CGSCC_OPM-NEXT: ret i32 undef +; IS__CGSCC_OPM: onfour: +; IS__CGSCC_OPM-NEXT: ret i32 undef +; IS__CGSCC_OPM: onfive: +; IS__CGSCC_OPM-NEXT: ret i32 undef +; IS__CGSCC_OPM: onsix: +; IS__CGSCC_OPM-NEXT: ret i32 undef +; IS__CGSCC_OPM: otherwise: +; IS__CGSCC_OPM-NEXT: ret i32 undef +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@less_than_100_1 +; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ +; IS__CGSCC_NPM-NEXT: i32 0, label [[ONZERO:%.*]] +; IS__CGSCC_NPM-NEXT: i32 1, label [[ONONE:%.*]] +; IS__CGSCC_NPM-NEXT: i32 2, label [[ONTWO:%.*]] +; IS__CGSCC_NPM-NEXT: i32 3, label [[ONTHREE:%.*]] +; IS__CGSCC_NPM-NEXT: i32 4, label [[ONFOUR:%.*]] +; IS__CGSCC_NPM-NEXT: i32 5, label [[ONFIVE:%.*]] +; IS__CGSCC_NPM-NEXT: i32 6, label [[ONSIX:%.*]] +; IS__CGSCC_NPM-NEXT: ] +; IS__CGSCC_NPM: onzero: +; IS__CGSCC_NPM-NEXT: ret i32 undef +; IS__CGSCC_NPM: onone: +; IS__CGSCC_NPM-NEXT: ret i32 undef +; IS__CGSCC_NPM: ontwo: +; IS__CGSCC_NPM-NEXT: ret i32 undef +; IS__CGSCC_NPM: onthree: +; IS__CGSCC_NPM-NEXT: ret i32 undef +; IS__CGSCC_NPM: onfour: +; IS__CGSCC_NPM-NEXT: ret i32 undef +; IS__CGSCC_NPM: onfive: +; IS__CGSCC_NPM-NEXT: ret i32 undef +; IS__CGSCC_NPM: onsix: +; IS__CGSCC_NPM-NEXT: ret i32 undef +; IS__CGSCC_NPM: otherwise: +; IS__CGSCC_NPM-NEXT: ret i32 undef ; switch i32 %c, label %otherwise [ i32 0, label %onzero i32 1, label %onone @@ -1716,25 +1936,40 @@ } define internal i1 @is_less_than_100_1(i32 %c) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@is_less_than_100_1 -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i1 undef +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@is_less_than_100_1 +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i1 undef +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@is_less_than_100_1 +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i1 undef ; %cmp = icmp slt i32 %c, 100 ret i1 %cmp } define i1 @propagate_range1(i32 %c){ -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@propagate_range1 -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: ret i1 true +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@propagate_range1 +; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: ret i1 true +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@propagate_range1 +; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@propagate_range1 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i1 true +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@propagate_range1 +; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i1 true +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@propagate_range1 +; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i1 true ; %csret = call i32 @less_than_100_1(i32 %c) %true = call i1 @is_less_than_100_1(i32 %csret) @@ -1742,9 +1977,9 @@ } define internal i32 @less_than_100_2(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@less_than_100_2 -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ ; IS__TUNIT____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT____-NEXT: i32 1, label [[ONONE:%.*]] @@ -1771,34 +2006,63 @@ ; IS__TUNIT____: otherwise: ; IS__TUNIT____-NEXT: ret i32 99 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@less_than_100_2 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ -; IS__CGSCC____-NEXT: i32 0, label [[ONZERO:%.*]] -; IS__CGSCC____-NEXT: i32 1, label [[ONONE:%.*]] -; IS__CGSCC____-NEXT: i32 2, label [[ONTWO:%.*]] -; IS__CGSCC____-NEXT: i32 3, label [[ONTHREE:%.*]] -; IS__CGSCC____-NEXT: i32 4, label [[ONFOUR:%.*]] -; IS__CGSCC____-NEXT: i32 5, label [[ONFIVE:%.*]] -; IS__CGSCC____-NEXT: i32 6, label [[ONSIX:%.*]] -; IS__CGSCC____-NEXT: ] -; IS__CGSCC____: onzero: -; IS__CGSCC____-NEXT: ret i32 0 -; IS__CGSCC____: onone: -; IS__CGSCC____-NEXT: ret i32 1 -; IS__CGSCC____: ontwo: -; IS__CGSCC____-NEXT: ret i32 2 -; IS__CGSCC____: onthree: -; IS__CGSCC____-NEXT: ret i32 3 -; IS__CGSCC____: onfour: -; IS__CGSCC____-NEXT: ret i32 4 -; IS__CGSCC____: onfive: -; IS__CGSCC____-NEXT: ret i32 5 -; IS__CGSCC____: onsix: -; IS__CGSCC____-NEXT: ret i32 6 -; IS__CGSCC____: otherwise: -; IS__CGSCC____-NEXT: ret i32 99 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@less_than_100_2 +; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ +; IS__CGSCC_OPM-NEXT: i32 0, label [[ONZERO:%.*]] +; IS__CGSCC_OPM-NEXT: i32 1, label [[ONONE:%.*]] +; IS__CGSCC_OPM-NEXT: i32 2, label [[ONTWO:%.*]] +; IS__CGSCC_OPM-NEXT: i32 3, label [[ONTHREE:%.*]] +; IS__CGSCC_OPM-NEXT: i32 4, label [[ONFOUR:%.*]] +; IS__CGSCC_OPM-NEXT: i32 5, label [[ONFIVE:%.*]] +; IS__CGSCC_OPM-NEXT: i32 6, label [[ONSIX:%.*]] +; IS__CGSCC_OPM-NEXT: ] +; IS__CGSCC_OPM: onzero: +; IS__CGSCC_OPM-NEXT: ret i32 0 +; IS__CGSCC_OPM: onone: +; IS__CGSCC_OPM-NEXT: ret i32 1 +; IS__CGSCC_OPM: ontwo: +; IS__CGSCC_OPM-NEXT: ret i32 2 +; IS__CGSCC_OPM: onthree: +; IS__CGSCC_OPM-NEXT: ret i32 3 +; IS__CGSCC_OPM: onfour: +; IS__CGSCC_OPM-NEXT: ret i32 4 +; IS__CGSCC_OPM: onfive: +; IS__CGSCC_OPM-NEXT: ret i32 5 +; IS__CGSCC_OPM: onsix: +; IS__CGSCC_OPM-NEXT: ret i32 6 +; IS__CGSCC_OPM: otherwise: +; IS__CGSCC_OPM-NEXT: ret i32 99 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@less_than_100_2 +; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ +; IS__CGSCC_NPM-NEXT: i32 0, label [[ONZERO:%.*]] +; IS__CGSCC_NPM-NEXT: i32 1, label [[ONONE:%.*]] +; IS__CGSCC_NPM-NEXT: i32 2, label [[ONTWO:%.*]] +; IS__CGSCC_NPM-NEXT: i32 3, label [[ONTHREE:%.*]] +; IS__CGSCC_NPM-NEXT: i32 4, label [[ONFOUR:%.*]] +; IS__CGSCC_NPM-NEXT: i32 5, label [[ONFIVE:%.*]] +; IS__CGSCC_NPM-NEXT: i32 6, label [[ONSIX:%.*]] +; IS__CGSCC_NPM-NEXT: ] +; IS__CGSCC_NPM: onzero: +; IS__CGSCC_NPM-NEXT: ret i32 0 +; IS__CGSCC_NPM: onone: +; IS__CGSCC_NPM-NEXT: ret i32 1 +; IS__CGSCC_NPM: ontwo: +; IS__CGSCC_NPM-NEXT: ret i32 2 +; IS__CGSCC_NPM: onthree: +; IS__CGSCC_NPM-NEXT: ret i32 3 +; IS__CGSCC_NPM: onfour: +; IS__CGSCC_NPM-NEXT: ret i32 4 +; IS__CGSCC_NPM: onfive: +; IS__CGSCC_NPM-NEXT: ret i32 5 +; IS__CGSCC_NPM: onsix: +; IS__CGSCC_NPM-NEXT: ret i32 6 +; IS__CGSCC_NPM: otherwise: +; IS__CGSCC_NPM-NEXT: ret i32 99 ; switch i32 %c, label %otherwise [ i32 0, label %onzero i32 1, label %onone @@ -1826,16 +2090,21 @@ } define internal i1 @is_less_than_100_2(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@is_less_than_100_2 -; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100 ; IS__TUNIT____-NEXT: ret i1 [[CMP]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@is_less_than_100_2 -; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i1 true +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@is_less_than_100_2 +; IS__CGSCC_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: ret i1 true +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@is_less_than_100_2 +; IS__CGSCC_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i1 true ; %cmp = icmp slt i32 %c, 100 ret i1 %cmp @@ -1845,28 +2114,33 @@ define i1 @propagate_range2(i32 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@propagate_range2 -; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) [[ATTR2]] { -; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call noundef i32 @less_than_100_2(i32 noundef 0) [[ATTR2]], [[RNG5:!range !.*]] -; IS__TUNIT_OPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) [[ATTR2]] -; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call noundef i32 @less_than_100_2(i32 [[C]]) [[ATTR2]], [[RNG5]] -; IS__TUNIT_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) [[ATTR2]] +; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call noundef i32 @less_than_100_2(i32 noundef 0) #[[ATTR3]], !range [[RNG5:![0-9]+]] +; IS__TUNIT_OPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call noundef i32 @less_than_100_2(i32 [[C]]) #[[ATTR3]], !range [[RNG5]] +; IS__TUNIT_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR3]] ; IS__TUNIT_OPM-NEXT: [[TRUE:%.*]] = and i1 [[TRUE1]], [[TRUE2]] ; IS__TUNIT_OPM-NEXT: ret i1 [[TRUE]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@propagate_range2 -; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) [[ATTR1]] { -; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call noundef i32 @less_than_100_2(i32 noundef 0) [[ATTR1]], [[RNG7:!range !.*]] -; IS__TUNIT_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) [[ATTR1]] -; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call noundef i32 @less_than_100_2(i32 [[C]]) [[ATTR1]], [[RNG7]] -; IS__TUNIT_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) [[ATTR1]] +; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call noundef i32 @less_than_100_2(i32 noundef 0) #[[ATTR1]], !range [[RNG7:![0-9]+]] +; IS__TUNIT_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) #[[ATTR1]] +; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call noundef i32 @less_than_100_2(i32 [[C]]) #[[ATTR1]], !range [[RNG7]] +; IS__TUNIT_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR1]] ; IS__TUNIT_NPM-NEXT: [[TRUE:%.*]] = and i1 [[TRUE1]], [[TRUE2]] ; IS__TUNIT_NPM-NEXT: ret i1 [[TRUE]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@propagate_range2 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i1 true +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@propagate_range2 +; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR3]] { +; IS__CGSCC_OPM-NEXT: ret i1 true +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@propagate_range2 +; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_NPM-NEXT: ret i1 true ; %csret1 = call i32 @less_than_100_2(i32 0) %true1 = call i1 @is_less_than_100_2(i32 %csret1) @@ -1877,21 +2151,21 @@ } define internal i1 @non_zero(i8 %v) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@non_zero -; IS__TUNIT_OPM-SAME: (i8 [[V:%.*]]) [[ATTR2]] { +; IS__TUNIT_OPM-SAME: (i8 [[V:%.*]]) #[[ATTR2]] { ; IS__TUNIT_OPM-NEXT: [[R:%.*]] = icmp ne i8 [[V]], 0 ; IS__TUNIT_OPM-NEXT: ret i1 [[R]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@non_zero -; IS__CGSCC_OPM-SAME: (i8 [[V:%.*]]) [[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i8 [[V:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: [[R:%.*]] = icmp ne i8 [[V]], 0 ; IS__CGSCC_OPM-NEXT: ret i1 [[R]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@non_zero -; IS__CGSCC_NPM-SAME: () [[ATTR1]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: ret i1 undef ; %r = icmp ne i8 %v, 0 @@ -1902,19 +2176,19 @@ define i1 @context(i8* %p) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@context -; IS__TUNIT_OPM-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(1) [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT_OPM-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1 ; IS__TUNIT_OPM-NEXT: [[C:%.*]] = icmp slt i8 0, [[L]] ; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT_OPM: t: -; IS__TUNIT_OPM-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) [[ATTR2]] +; IS__TUNIT_OPM-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) #[[ATTR3]] ; IS__TUNIT_OPM-NEXT: ret i1 [[R]] ; IS__TUNIT_OPM: f: ; IS__TUNIT_OPM-NEXT: ret i1 false ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@context -; IS__TUNIT_NPM-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(1) [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1 ; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp slt i8 0, [[L]] ; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] @@ -1925,19 +2199,19 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@context -; IS__CGSCC_OPM-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(1) [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC_OPM-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1 ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp slt i8 0, [[L]] ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_OPM: t: -; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) [[ATTR4]] +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: ret i1 [[R]] ; IS__CGSCC_OPM: f: ; IS__CGSCC_OPM-NEXT: ret i1 false ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@context -; IS__CGSCC_NPM-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(1) [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1 ; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp slt i8 0, [[L]] ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] diff --git a/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll b/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll --- a/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll +++ b/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll @@ -227,7 +227,7 @@ } define i32* @external_sink_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@external_sink_ret2_nrw ; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nocapture nofree readonly [[R0:%.*]], i32* nofree returned writeonly "no-capture-maybe-returned" [[W0:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: entry: @@ -242,7 +242,7 @@ ; IS__TUNIT____: return: ; IS__TUNIT____-NEXT: ret i32* [[W0]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@external_sink_ret2_nrw ; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nocapture nofree readonly [[R0:%.*]], i32* nofree returned writeonly "no-capture-maybe-returned" [[W0:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -369,7 +369,7 @@ ; ; IS__CGSCC____-NOT: attributes # ; IS__CGSCC____: attributes #{{.*}} = { argmemonly nofree nosync nounwind } -; IS__CGSCC____: attributes #{{.*}} = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #{{.*}} = { argmemonly nofree norecurse nosync nounwind willreturn mustprogress } ; IS__CGSCC____: attributes #{{.*}} = { nofree nosync nounwind } ; IS__CGSCC____: attributes #{{.*}} = { nounwind } ; IS__CGSCC____: attributes #{{.*}} = { nounwind willreturn } @@ -377,7 +377,7 @@ ; IS__TUNIT____-NOT: attributes # ; IS__TUNIT____: attributes #{{.*}} = { argmemonly nofree nosync nounwind } -; IS__TUNIT____: attributes #{{.*}} = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #{{.*}} = { argmemonly nofree nosync nounwind willreturn mustprogress } ; IS__TUNIT____: attributes #{{.*}} = { nofree nosync nounwind } ; IS__TUNIT____: attributes #{{.*}} = { nofree nosync nounwind willreturn } ; IS__TUNIT____-NOT: attributes # diff --git a/llvm/test/Transforms/Attributor/readattrs.ll b/llvm/test/Transforms/Attributor/readattrs.ll --- a/llvm/test/Transforms/Attributor/readattrs.ll +++ b/llvm/test/Transforms/Attributor/readattrs.ll @@ -24,13 +24,13 @@ } define i8* @test2(i8* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 ; IS__TUNIT____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: store i32 0, i32* @x, align 4 ; IS__TUNIT____-NEXT: ret i8* [[P]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 ; IS__CGSCC____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: store i32 0, i32* @x, align 4 @@ -41,13 +41,13 @@ } define i1 @test3(i8* %p, i8* %q) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test3 ; IS__TUNIT____-SAME: (i8* nofree readnone [[P:%.*]], i8* nofree readnone [[Q:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = icmp ult i8* [[P]], [[Q]] ; IS__TUNIT____-NEXT: ret i1 [[A]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test3 ; IS__CGSCC____-SAME: (i8* nofree readnone [[P:%.*]], i8* nofree readnone [[Q:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = icmp ult i8* [[P]], [[Q]] @@ -72,13 +72,13 @@ ; Missed optz'n: we could make %q readnone, but don't break test6! define void @test5(i8** %p, i8* %q) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test5 ; IS__TUNIT____-SAME: (i8** nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[P:%.*]], i8* nofree writeonly [[Q:%.*]]) [[ATTR3:#.*]] { ; IS__TUNIT____-NEXT: store i8* [[Q]], i8** [[P]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test5 ; IS__CGSCC____-SAME: (i8** nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[P:%.*]], i8* nofree writeonly [[Q:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: store i8* [[Q]], i8** [[P]], align 8 @@ -104,12 +104,12 @@ ; inalloca parameters are always considered written define void @test7_1(i32* inalloca %a) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7_1 ; IS__TUNIT____-SAME: (i32* inalloca nocapture nofree nonnull writeonly dereferenceable(4) [[A:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test7_1 ; IS__CGSCC____-SAME: (i32* inalloca nocapture nofree nonnull writeonly dereferenceable(4) [[A:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret void @@ -118,13 +118,13 @@ } define i32* @test8_1(i32* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test8_1 ; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32* [[P]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test8_1 ; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: entry: @@ -135,19 +135,19 @@ } define void @test8_2(i32* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test8_2 ; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @test8_1(i32* noalias nofree readnone "no-capture-maybe-returned" [[P]]) [[ATTR1]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @test8_1(i32* noalias nofree readnone "no-capture-maybe-returned" [[P]]) [[ATTR12:#.*]] ; IS__TUNIT____-NEXT: store i32 10, i32* [[CALL]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test8_2 ; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call align 4 i32* @test8_1(i32* noalias nofree readnone "no-capture-maybe-returned" [[P]]) [[ATTR11:#.*]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call align 4 i32* @test8_1(i32* noalias nofree readnone "no-capture-maybe-returned" [[P]]) [[ATTR13:#.*]] ; IS__CGSCC____-NEXT: store i32 10, i32* [[CALL]], align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -163,16 +163,16 @@ ; CHECK-NOT: readnone ; CHECK-NOT: readonly define void @test9(<4 x i32*> %ptrs, <4 x i32>%val) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test9 ; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) [[ATTR0]] { -; IS__TUNIT____-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) [[ATTR10:#.*]] +; IS__TUNIT____-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) [[ATTR13:#.*]] ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test9 -; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) [[ATTR4:#.*]] { -; IS__CGSCC____-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) [[ATTR12:#.*]] +; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) [[ATTR5:#.*]] { +; IS__CGSCC____-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) [[ATTR14:#.*]] ; IS__CGSCC____-NEXT: ret void ; call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32>%val, <4 x i32*> %ptrs, i32 4, <4 x i1>) @@ -182,16 +182,16 @@ ; CHECK: declare <4 x i32> @llvm.masked.gather declare <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*>, i32, <4 x i1>, <4 x i32>) define <4 x i32> @test10(<4 x i32*> %ptrs) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test10 -; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR4:#.*]] { -; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) [[ATTR11:#.*]] +; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR6:#.*]] { +; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) [[ATTR14:#.*]] ; IS__TUNIT____-NEXT: ret <4 x i32> [[RES]] ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test10 -; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR5:#.*]] { -; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) [[ATTR13:#.*]] +; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) [[ATTR15:#.*]] ; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %ptrs, i32 4, <4 x i1>, <4 x i32>undef) @@ -203,7 +203,7 @@ define <4 x i32> @test11_2(<4 x i32*> %ptrs) { ; CHECK: Function Attrs: argmemonly nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@test11_2 -; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR6:#.*]] { +; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR8:#.*]] { ; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) [[ATTR2]] ; CHECK-NEXT: ret <4 x i32> [[RES]] ; @@ -216,14 +216,14 @@ define <4 x i32> @test12_2(<4 x i32*> %ptrs) { ; IS__TUNIT____: Function Attrs: argmemonly nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12_2 -; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR6:#.*]] { -; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) [[ATTR12:#.*]] +; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR8:#.*]] { +; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) [[ATTR15:#.*]] ; IS__TUNIT____-NEXT: ret <4 x i32> [[RES]] ; ; IS__CGSCC____: Function Attrs: argmemonly nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@test12_2 -; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR7:#.*]] { -; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) [[ATTR14:#.*]] +; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR9:#.*]] { +; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) [[ATTR16:#.*]] ; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @test12_1(<4 x i32*> %ptrs) @@ -231,15 +231,15 @@ } define i32 @volatile_load(i32* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn +; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@volatile_load -; IS__TUNIT____-SAME: (i32* nofree align 4 [[P:%.*]]) [[ATTR7:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree align 4 [[P:%.*]]) [[ATTR9:#.*]] { ; IS__TUNIT____-NEXT: [[LOAD:%.*]] = load volatile i32, i32* [[P]], align 4 ; IS__TUNIT____-NEXT: ret i32 [[LOAD]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@volatile_load -; IS__CGSCC____-SAME: (i32* nofree align 4 [[P:%.*]]) [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree align 4 [[P:%.*]]) [[ATTR10:#.*]] { ; IS__CGSCC____-NEXT: [[LOAD:%.*]] = load volatile i32, i32* [[P]], align 4 ; IS__CGSCC____-NEXT: ret i32 [[LOAD]] ; @@ -304,13 +304,13 @@ } define void @byval_not_readonly_2(i8* byval(i8) %written) readonly { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@byval_not_readonly_2 ; IS__TUNIT____-SAME: (i8* noalias nocapture nofree nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@byval_not_readonly_2 ; IS__CGSCC____-SAME: (i8* noalias nocapture nofree nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 @@ -323,7 +323,7 @@ define void @byval_not_readnone_1(i8* byval(i8) %written) readnone { ; CHECK: Function Attrs: readnone ; CHECK-LABEL: define {{[^@]+}}@byval_not_readnone_1 -; CHECK-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR9:#.*]] { +; CHECK-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR11:#.*]] { ; CHECK-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]]) ; CHECK-NEXT: ret void ; @@ -332,13 +332,13 @@ } define void @byval_not_readnone_2(i8* byval(i8) %written) readnone { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@byval_not_readnone_2 ; IS__TUNIT____-SAME: (i8* noalias nocapture nofree nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@byval_not_readnone_2 ; IS__CGSCC____-SAME: (i8* noalias nocapture nofree nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 @@ -349,13 +349,13 @@ } define void @byval_no_fnarg(i8* byval(i8) %written) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@byval_no_fnarg ; IS__TUNIT____-SAME: (i8* noalias nocapture nofree nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@byval_no_fnarg ; IS__CGSCC____-SAME: (i8* noalias nocapture nofree nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 @@ -395,7 +395,7 @@ define void @ptr_uses(i8* %ptr) { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@ptr_uses -; CHECK-SAME: (i8* nocapture readonly [[PTR:%.*]]) [[ATTR10:#.*]] { +; CHECK-SAME: (i8* nocapture readonly [[PTR:%.*]]) [[ATTR12:#.*]] { ; CHECK-NEXT: ret void ; %call_ptr = call i8* @maybe_returned_ptr(i8* %ptr) @@ -452,13 +452,13 @@ @constant_mem = external dso_local constant i32, align 4 define i32 @read_only_constant_mem() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@read_only_constant_mem ; IS__TUNIT____-SAME: () [[ATTR1]] { ; IS__TUNIT____-NEXT: [[L:%.*]] = load i32, i32* @constant_mem, align 4 ; IS__TUNIT____-NEXT: ret i32 [[L]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@read_only_constant_mem ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @constant_mem, align 4 diff --git a/llvm/test/Transforms/Attributor/returned.ll b/llvm/test/Transforms/Attributor/returned.ll --- a/llvm/test/Transforms/Attributor/returned.ll +++ b/llvm/test/Transforms/Attributor/returned.ll @@ -38,13 +38,13 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" define i32 @sink_r0(i32 %r) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@sink_r0 ; IS__TUNIT____-SAME: (i32 returned [[R:%.*]]) [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 [[R]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@sink_r0 ; IS__CGSCC____-SAME: (i32 returned [[R:%.*]]) [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: entry: @@ -55,21 +55,13 @@ } define i32 @scc_r1(i32 %a, i32 %r, i32 %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@scc_r1 -; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) [[ATTR1:#.*]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR5:#.*]] -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[CALL]]) [[ATTR6:#.*]] -; IS__TUNIT____-NEXT: ret i32 [[CALL1]] -; -; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@scc_r1 -; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) [[ATTR1:#.*]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR6:#.*]] -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[CALL]]) [[ATTR7:#.*]] -; IS__CGSCC____-NEXT: ret i32 [[CALL1]] +; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable +; CHECK-LABEL: define {{[^@]+}}@scc_r1 +; CHECK-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) [[ATTR1:#.*]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR6:#.*]] +; CHECK-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[CALL]]) [[ATTR7:#.*]] +; CHECK-NEXT: ret i32 [[CALL1]] ; entry: %call = call i32 @sink_r0(i32 %r) @@ -80,25 +72,25 @@ define i32 @scc_r2(i32 %a, i32 %b, i32 %r) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@scc_r2 -; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]] ; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] ; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR5]] -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[CALL]]) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR6:#.*]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[CALL]]) [[ATTR7:#.*]] ; IS__TUNIT____-NEXT: br label [[RETURN:%.*]] ; IS__TUNIT____: if.end: ; IS__TUNIT____-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]] ; IS__TUNIT____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]] ; IS__TUNIT____: if.then3: -; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32 @sink_r0(i32 [[B]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[CALL6]], i32 undef) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[CALL5]], i32 [[CALL7]], i32 [[CALL8]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[CALL4]], i32 [[CALL9]], i32 undef) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32 @sink_r0(i32 [[B]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[CALL6]], i32 undef) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[CALL5]], i32 [[CALL7]], i32 [[CALL8]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[CALL4]], i32 [[CALL9]], i32 undef) [[ATTR7]] ; IS__TUNIT____-NEXT: br label [[RETURN]] ; IS__TUNIT____: if.end12: ; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]] @@ -106,7 +98,7 @@ ; IS__TUNIT____: cond.true: ; IS__TUNIT____-NEXT: br label [[COND_END:%.*]] ; IS__TUNIT____: cond.false: -; IS__TUNIT____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR7]] ; IS__TUNIT____-NEXT: br label [[COND_END]] ; IS__TUNIT____: cond.end: ; IS__TUNIT____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -117,13 +109,13 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@scc_r2 -; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]] ; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] ; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR6]] -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[CALL]]) [[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR6:#.*]] +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[CALL]]) [[ATTR7:#.*]] ; IS__CGSCC____-NEXT: br label [[RETURN:%.*]] ; IS__CGSCC____: if.end: ; IS__CGSCC____-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]] @@ -204,20 +196,20 @@ ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]] ; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] ; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR5]] -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[CALL]]) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[CALL]]) [[ATTR7]] ; IS__TUNIT____-NEXT: br label [[RETURN:%.*]] ; IS__TUNIT____: if.end: ; IS__TUNIT____-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]] ; IS__TUNIT____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]] ; IS__TUNIT____: if.then3: -; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32 @sink_r0(i32 [[B]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[CALL6]], i32 undef) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[CALL5]], i32 [[CALL7]], i32 [[CALL8]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[CALL4]], i32 [[CALL9]], i32 undef) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32 @sink_r0(i32 [[B]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[CALL6]], i32 undef) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[CALL5]], i32 [[CALL7]], i32 [[CALL8]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[CALL4]], i32 [[CALL9]], i32 undef) [[ATTR7]] ; IS__TUNIT____-NEXT: br label [[RETURN]] ; IS__TUNIT____: if.end12: ; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]] @@ -225,7 +217,7 @@ ; IS__TUNIT____: cond.true: ; IS__TUNIT____-NEXT: br label [[COND_END:%.*]] ; IS__TUNIT____: cond.false: -; IS__TUNIT____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR7]] ; IS__TUNIT____-NEXT: br label [[COND_END]] ; IS__TUNIT____: cond.end: ; IS__TUNIT____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -337,13 +329,13 @@ ; return a == b ? r : ptr_scc_r2(a, b, r); ; } define double* @ptr_sink_r0(double* %r) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_sink_r0 ; IS__TUNIT____-SAME: (double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret double* [[R]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_sink_r0 ; IS__CGSCC____-SAME: (double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -354,21 +346,13 @@ } define double* @ptr_scc_r1(double* %a, double* %r, double* %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_scc_r1 -; IS__TUNIT____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone returned [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call double* @ptr_sink_r0(double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) [[ATTR5]] -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[R]], double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL]]) [[ATTR6]] -; IS__TUNIT____-NEXT: ret double* [[CALL1]] -; -; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_scc_r1 -; IS__CGSCC____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone returned [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call double* @ptr_sink_r0(double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) [[ATTR6]] -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[R]], double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL]]) [[ATTR7]] -; IS__CGSCC____-NEXT: ret double* [[CALL1]] +; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable +; CHECK-LABEL: define {{[^@]+}}@ptr_scc_r1 +; CHECK-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone returned [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) [[ATTR1]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CALL:%.*]] = call double* @ptr_sink_r0(double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) [[ATTR6]] +; CHECK-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[R]], double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL]]) [[ATTR7]] +; CHECK-NEXT: ret double* [[CALL1]] ; entry: %call = call double* @ptr_sink_r0(double* %r) @@ -384,20 +368,20 @@ ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp ugt double* [[A]], [[B]] ; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] ; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call double* @ptr_sink_r0(double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) [[ATTR5]] -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[B]], double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL]]) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call double* @ptr_sink_r0(double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[B]], double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL]]) [[ATTR7]] ; IS__TUNIT____-NEXT: br label [[RETURN:%.*]] ; IS__TUNIT____: if.end: ; IS__TUNIT____-NEXT: [[CMP2:%.*]] = icmp ult double* [[A]], [[B]] ; IS__TUNIT____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]] ; IS__TUNIT____: if.then3: -; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call double* @ptr_sink_r0(double* noalias nofree readnone "no-capture-maybe-returned" [[B]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nocapture nofree readnone undef) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[R]], double* noalias nofree readnone [[R]], double* noalias nofree readnone [[R]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL6]], double* noalias nocapture nofree readnone undef) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nofree readnone [[R]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[CALL5]], double* noalias nofree readnone [[CALL7]], double* noalias nofree readnone [[CALL8]]) [[ATTR6]] -; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nofree readnone [[CALL4]], double* noalias nofree readnone [[CALL9]], double* noalias nocapture nofree readnone undef) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call double* @ptr_sink_r0(double* noalias nofree readnone "no-capture-maybe-returned" [[B]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nocapture nofree readnone undef) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[R]], double* noalias nofree readnone [[R]], double* noalias nofree readnone [[R]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL6]], double* noalias nocapture nofree readnone undef) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nofree readnone [[R]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[CALL5]], double* noalias nofree readnone [[CALL7]], double* noalias nofree readnone [[CALL8]]) [[ATTR7]] +; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nofree readnone [[CALL4]], double* noalias nofree readnone [[CALL9]], double* noalias nocapture nofree readnone undef) [[ATTR7]] ; IS__TUNIT____-NEXT: br label [[RETURN]] ; IS__TUNIT____: if.end12: ; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]] @@ -405,7 +389,7 @@ ; IS__TUNIT____: cond.true: ; IS__TUNIT____-NEXT: br label [[COND_END:%.*]] ; IS__TUNIT____: cond.false: -; IS__TUNIT____-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nofree readnone [[R]]) [[ATTR6]] +; IS__TUNIT____-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nofree readnone [[R]]) [[ATTR7]] ; IS__TUNIT____-NEXT: br label [[COND_END]] ; IS__TUNIT____: cond.end: ; IS__TUNIT____-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -553,19 +537,12 @@ ; TEST another SCC test ; define i32* @rt2_helper(i32* %a) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@rt2_helper -; IS__TUNIT____-SAME: (i32* nofree readnone returned [[A:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) [[ATTR6]] -; IS__TUNIT____-NEXT: ret i32* [[CALL]] -; -; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@rt2_helper -; IS__CGSCC____-SAME: (i32* nofree readnone returned [[A:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) [[ATTR7]] -; IS__CGSCC____-NEXT: ret i32* [[CALL]] +; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable +; CHECK-LABEL: define {{[^@]+}}@rt2_helper +; CHECK-SAME: (i32* nofree readnone returned [[A:%.*]]) [[ATTR1]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) [[ATTR7]] +; CHECK-NEXT: ret i32* [[CALL]] ; entry: %call = call i32* @rt2(i32* %a, i32* %a) @@ -573,31 +550,18 @@ } define i32* @rt2(i32* %a, i32 *%b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@rt2 -; IS__TUNIT____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null -; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] -; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) [[ATTR6]] -; IS__TUNIT____-NEXT: br label [[IF_END]] -; IS__TUNIT____: if.end: -; IS__TUNIT____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[CALL]], [[IF_THEN]] ] -; IS__TUNIT____-NEXT: ret i32* [[SEL]] -; -; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@rt2 -; IS__CGSCC____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null -; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] -; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) [[ATTR7]] -; IS__CGSCC____-NEXT: br label [[IF_END]] -; IS__CGSCC____: if.end: -; IS__CGSCC____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[CALL]], [[IF_THEN]] ] -; IS__CGSCC____-NEXT: ret i32* [[SEL]] +; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable +; CHECK-LABEL: define {{[^@]+}}@rt2 +; CHECK-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null +; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] +; CHECK: if.then: +; CHECK-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) [[ATTR7]] +; CHECK-NEXT: br label [[IF_END]] +; CHECK: if.end: +; CHECK-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[CALL]], [[IF_THEN]] ] +; CHECK-NEXT: ret i32* [[SEL]] ; entry: %cmp = icmp eq i32* %a, null @@ -615,19 +579,12 @@ ; TEST another SCC test ; define i32* @rt3_helper(i32* %a, i32* %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@rt3_helper -; IS__TUNIT____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt3(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) [[ATTR6]] -; IS__TUNIT____-NEXT: ret i32* [[CALL]] -; -; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@rt3_helper -; IS__CGSCC____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt3(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) [[ATTR7]] -; IS__CGSCC____-NEXT: ret i32* [[CALL]] +; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable +; CHECK-LABEL: define {{[^@]+}}@rt3_helper +; CHECK-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CALL:%.*]] = call i32* @rt3(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) [[ATTR7]] +; CHECK-NEXT: ret i32* [[CALL]] ; entry: %call = call i32* @rt3(i32* %a, i32* %b) @@ -635,31 +592,18 @@ } define i32* @rt3(i32* %a, i32 *%b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@rt3 -; IS__TUNIT____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null -; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] -; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt3_helper(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) [[ATTR6]] -; IS__TUNIT____-NEXT: br label [[IF_END]] -; IS__TUNIT____: if.end: -; IS__TUNIT____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[CALL]], [[IF_THEN]] ] -; IS__TUNIT____-NEXT: ret i32* [[SEL]] -; -; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@rt3 -; IS__CGSCC____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null -; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] -; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt3_helper(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) [[ATTR7]] -; IS__CGSCC____-NEXT: br label [[IF_END]] -; IS__CGSCC____: if.end: -; IS__CGSCC____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[CALL]], [[IF_THEN]] ] -; IS__CGSCC____-NEXT: ret i32* [[SEL]] +; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable +; CHECK-LABEL: define {{[^@]+}}@rt3 +; CHECK-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR1]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null +; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] +; CHECK: if.then: +; CHECK-NEXT: [[CALL:%.*]] = call i32* @rt3_helper(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) [[ATTR7]] +; CHECK-NEXT: br label [[IF_END]] +; CHECK: if.end: +; CHECK-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[CALL]], [[IF_THEN]] ] +; CHECK-NEXT: ret i32* [[SEL]] ; entry: %cmp = icmp eq i32* %a, null @@ -686,17 +630,11 @@ declare void @unknown_fn(i32* (i32*)*) #0 define i32* @calls_unknown_fn(i32* %r) #0 { -; IS__TUNIT____: Function Attrs: noinline nounwind uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@calls_unknown_fn -; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) [[ATTR3:#.*]] { -; IS__TUNIT____-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) [[ATTR7:#.*]] -; IS__TUNIT____-NEXT: ret i32* [[R]] -; -; IS__CGSCC____: Function Attrs: noinline nounwind uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@calls_unknown_fn -; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) [[ATTR3:#.*]] { -; IS__CGSCC____-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) [[ATTR8:#.*]] -; IS__CGSCC____-NEXT: ret i32* [[R]] +; CHECK: Function Attrs: noinline nounwind uwtable +; CHECK-LABEL: define {{[^@]+}}@calls_unknown_fn +; CHECK-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) [[ATTR3:#.*]] { +; CHECK-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) [[ATTR8:#.*]] +; CHECK-NEXT: ret i32* [[R]] ; tail call void @unknown_fn(i32* (i32*)* nonnull @calls_unknown_fn) ret i32* %r @@ -719,7 +657,7 @@ define linkonce_odr i32* @maybe_redefined_fn(i32* %r) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@maybe_redefined_fn -; CHECK-SAME: (i32* [[R:%.*]]) [[ATTR3:#.*]] { +; CHECK-SAME: (i32* [[R:%.*]]) [[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: ret i32* [[R]] ; @@ -728,19 +666,12 @@ } define i32* @calls_maybe_redefined_fn(i32* %r) #0 { -; IS__TUNIT____: Function Attrs: noinline nounwind uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn -; IS__TUNIT____-SAME: (i32* returned [[R:%.*]]) [[ATTR3]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) [[ATTR7]] -; IS__TUNIT____-NEXT: ret i32* [[R]] -; -; IS__CGSCC____: Function Attrs: noinline nounwind uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn -; IS__CGSCC____-SAME: (i32* returned [[R:%.*]]) [[ATTR3]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) [[ATTR8]] -; IS__CGSCC____-NEXT: ret i32* [[R]] +; CHECK: Function Attrs: noinline nounwind uwtable +; CHECK-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn +; CHECK-SAME: (i32* returned [[R:%.*]]) [[ATTR3]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) [[ATTR8]] +; CHECK-NEXT: ret i32* [[R]] ; entry: %call = call i32* @maybe_redefined_fn(i32* %r) @@ -771,19 +702,12 @@ } define i32* @calls_maybe_redefined_fn2(i32* %r) #0 { -; IS__TUNIT____: Function Attrs: noinline nounwind uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn2 -; IS__TUNIT____-SAME: (i32* [[R:%.*]]) [[ATTR3]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) [[ATTR7]] -; IS__TUNIT____-NEXT: ret i32* [[CALL]] -; -; IS__CGSCC____: Function Attrs: noinline nounwind uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn2 -; IS__CGSCC____-SAME: (i32* [[R:%.*]]) [[ATTR3]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) [[ATTR8]] -; IS__CGSCC____-NEXT: ret i32* [[CALL]] +; CHECK: Function Attrs: noinline nounwind uwtable +; CHECK-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn2 +; CHECK-SAME: (i32* [[R:%.*]]) [[ATTR3]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) [[ATTR8]] +; CHECK-NEXT: ret i32* [[CALL]] ; entry: %call = call i32* @maybe_redefined_fn2(i32* %r) @@ -801,7 +725,7 @@ ; } ; define double @select_and_phi(double %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@select_and_phi ; IS__TUNIT____-SAME: (double returned [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -815,7 +739,7 @@ ; IS__TUNIT____-NEXT: [[SEL:%.*]] = select i1 [[CMP1]], double [[B]], double [[PHI]] ; IS__TUNIT____-NEXT: ret double [[SEL]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@select_and_phi ; IS__CGSCC____-SAME: (double returned [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -854,37 +778,21 @@ ; } ; define double @recursion_select_and_phi(i32 %a, double %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@recursion_select_and_phi -; IS__TUNIT____-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1 -; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0 -; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] -; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) [[ATTR6]] -; IS__TUNIT____-NEXT: br label [[IF_END]] -; IS__TUNIT____: if.end: -; IS__TUNIT____-NEXT: [[PHI:%.*]] = phi double [ [[CALL]], [[IF_THEN]] ], [ [[B]], [[ENTRY:%.*]] ] -; IS__TUNIT____-NEXT: [[CMP1:%.*]] = fcmp oeq double [[B]], 0.000000e+00 -; IS__TUNIT____-NEXT: [[SEL:%.*]] = select i1 [[CMP1]], double [[B]], double [[PHI]] -; IS__TUNIT____-NEXT: ret double [[SEL]] -; -; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@recursion_select_and_phi -; IS__CGSCC____-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1 -; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0 -; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] -; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) [[ATTR7]] -; IS__CGSCC____-NEXT: br label [[IF_END]] -; IS__CGSCC____: if.end: -; IS__CGSCC____-NEXT: [[PHI:%.*]] = phi double [ [[CALL]], [[IF_THEN]] ], [ [[B]], [[ENTRY:%.*]] ] -; IS__CGSCC____-NEXT: [[CMP1:%.*]] = fcmp oeq double [[B]], 0.000000e+00 -; IS__CGSCC____-NEXT: [[SEL:%.*]] = select i1 [[CMP1]], double [[B]], double [[PHI]] -; IS__CGSCC____-NEXT: ret double [[SEL]] +; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable +; CHECK-LABEL: define {{[^@]+}}@recursion_select_and_phi +; CHECK-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) [[ATTR1]] { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1 +; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0 +; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] +; CHECK: if.then: +; CHECK-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) [[ATTR7]] +; CHECK-NEXT: br label [[IF_END]] +; CHECK: if.end: +; CHECK-NEXT: [[PHI:%.*]] = phi double [ [[CALL]], [[IF_THEN]] ], [ [[B]], [[ENTRY:%.*]] ] +; CHECK-NEXT: [[CMP1:%.*]] = fcmp oeq double [[B]], 0.000000e+00 +; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP1]], double [[B]], double [[PHI]] +; CHECK-NEXT: ret double [[SEL]] ; entry: %dec = add nsw i32 %a, -1 @@ -910,14 +818,14 @@ ; } ; define double* @bitcast(i32* %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcast ; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__TUNIT____-NEXT: ret double* [[BC0]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bitcast ; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -940,7 +848,7 @@ ; } ; define double* @bitcasts_select_and_phi(i32* %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcasts_select_and_phi ; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -959,7 +867,7 @@ ; IS__TUNIT____-NEXT: [[BC4:%.*]] = bitcast i8* [[SEL]] to double* ; IS__TUNIT____-NEXT: ret double* [[BC4]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@bitcasts_select_and_phi ; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -1009,7 +917,7 @@ ; } ; define double* @ret_arg_arg_undef(i32* %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_arg_arg_undef ; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -1026,7 +934,7 @@ ; IS__TUNIT____: ret_undef: ; IS__TUNIT____-NEXT: ret double* undef ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_arg_arg_undef ; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -1074,7 +982,7 @@ ; } ; define double* @ret_undef_arg_arg(i32* %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef_arg_arg ; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -1091,7 +999,7 @@ ; IS__TUNIT____-NEXT: [[BC1:%.*]] = bitcast i32* [[B]] to double* ; IS__TUNIT____-NEXT: ret double* [[BC1]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef_arg_arg ; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -1139,7 +1047,7 @@ ; } ; define double* @ret_undef_arg_undef(i32* %b) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef_arg_undef ; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -1155,7 +1063,7 @@ ; IS__TUNIT____: ret_undef1: ; IS__TUNIT____-NEXT: ret double* undef ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef_arg_undef ; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -1261,7 +1169,7 @@ ; TEST inconsistent IR in dead code. ; define i32 @deadblockcall1(i32 %A) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockcall1 ; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -1269,7 +1177,7 @@ ; IS__TUNIT____: unreachableblock: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockcall1 ; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -1287,7 +1195,7 @@ declare i32 @deadblockcall_helper(i32 returned %A); define i32 @deadblockcall2(i32 %A) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockcall2 ; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -1297,7 +1205,7 @@ ; IS__TUNIT____: unreachableblock2: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockcall2 ; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -1318,7 +1226,7 @@ } define i32 @deadblockphi1(i32 %A) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockphi1 ; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -1330,7 +1238,7 @@ ; IS__TUNIT____: r: ; IS__TUNIT____-NEXT: ret i32 [[A]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockphi1 ; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -1356,7 +1264,7 @@ } define i32 @deadblockphi2(i32 %A) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockphi2 ; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: entry: @@ -1370,7 +1278,7 @@ ; IS__TUNIT____: r: ; IS__TUNIT____-NEXT: ret i32 [[A]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockphi2 ; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -1505,13 +1413,13 @@ @G = external global i8 define i32* @ret_const() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_const ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast i8* @G to i32* ; IS__TUNIT____-NEXT: ret i32* [[BC]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_const ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i8* @G to i32* @@ -1521,12 +1429,12 @@ ret i32* %bc } define i32* @use_const() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@use_const ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32* bitcast (i8* @G to i32*) ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@use_const ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* bitcast (i8* @G to i32*) @@ -1535,13 +1443,13 @@ ret i32* %c } define i32* @dont_use_const() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@dont_use_const ; IS__TUNIT____-SAME: () [[ATTR0]] { -; IS__TUNIT____-NEXT: [[C:%.*]] = musttail call i32* @ret_const() [[ATTR5]] +; IS__TUNIT____-NEXT: [[C:%.*]] = musttail call i32* @ret_const() [[ATTR6]] ; IS__TUNIT____-NEXT: ret i32* [[C]] ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@dont_use_const ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: [[C:%.*]] = musttail call i32* @ret_const() [[ATTR6]] diff --git a/llvm/test/Transforms/Attributor/undefined_behavior.ll b/llvm/test/Transforms/Attributor/undefined_behavior.ll --- a/llvm/test/Transforms/Attributor/undefined_behavior.ll +++ b/llvm/test/Transforms/Attributor/undefined_behavior.ll @@ -13,12 +13,12 @@ ; -- Load tests -- define void @load_wholly_unreachable() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_wholly_unreachable ; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_wholly_unreachable ; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { ; IS__CGSCC____-NEXT: unreachable @@ -28,12 +28,12 @@ } define void @loads_wholly_unreachable() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@loads_wholly_unreachable ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@loads_wholly_unreachable ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -45,7 +45,7 @@ define void @load_single_bb_unreachable(i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_single_bb_unreachable ; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -54,7 +54,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_single_bb_unreachable ; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -74,12 +74,12 @@ ; Note that while the load is removed (because it's unused), the block ; is not changed to unreachable define void @load_null_pointer_is_defined() null_pointer_is_valid { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_null_pointer_is_defined ; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_null_pointer_is_defined ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: ret void @@ -89,7 +89,7 @@ } define internal i32* @ret_null() { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_null ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* undef @@ -98,12 +98,12 @@ } define void @load_null_propagated() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_null_propagated ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_null_propagated ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -116,12 +116,12 @@ ; -- Store tests -- define void @store_wholly_unreachable() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_wholly_unreachable ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_wholly_unreachable ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -131,7 +131,7 @@ } define void @store_single_bb_unreachable(i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_single_bb_unreachable ; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -140,7 +140,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_single_bb_unreachable ; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -158,13 +158,13 @@ } define void @store_null_pointer_is_defined() null_pointer_is_valid { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined ; IS__TUNIT____-SAME: () [[ATTR2:#.*]] { ; IS__TUNIT____-NEXT: store i32 5, i32* null, align 536870912 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined ; IS__CGSCC____-SAME: () [[ATTR2:#.*]] { ; IS__CGSCC____-NEXT: store i32 5, i32* null, align 536870912 @@ -178,12 +178,12 @@ ; ATTRIBUTOR-LABEL: @store_null_propagated( ; ATTRIBUTOR-NEXT: unreachable ; -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_null_propagated ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_null_propagated ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -196,12 +196,12 @@ ; -- AtomicRMW tests -- define void @atomicrmw_wholly_unreachable() { -; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_wholly_unreachable ; IS__TUNIT____-SAME: () [[ATTR3:#.*]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_wholly_unreachable ; IS__CGSCC____-SAME: () [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: unreachable @@ -211,7 +211,7 @@ } define void @atomicrmw_single_bb_unreachable(i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable ; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR3]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -220,7 +220,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable ; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -238,13 +238,13 @@ } define void @atomicrmw_null_pointer_is_defined() null_pointer_is_valid { -; IS__TUNIT____: Function Attrs: nofree nounwind null_pointer_is_valid willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind null_pointer_is_valid willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_null_pointer_is_defined ; IS__TUNIT____-SAME: () [[ATTR4:#.*]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = atomicrmw add i32* null, i32 1 acquire ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_null_pointer_is_defined ; IS__CGSCC____-SAME: () [[ATTR4:#.*]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = atomicrmw add i32* null, i32 1 acquire @@ -258,12 +258,12 @@ ; ATTRIBUTOR-LABEL: @atomicrmw_null_propagated( ; ATTRIBUTOR-NEXT: unreachable ; -; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_null_propagated ; IS__TUNIT____-SAME: () [[ATTR3]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_null_propagated ; IS__CGSCC____-SAME: () [[ATTR3]] { ; IS__CGSCC____-NEXT: unreachable @@ -276,12 +276,12 @@ ; -- AtomicCmpXchg tests -- define void @atomiccmpxchg_wholly_unreachable() { -; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_wholly_unreachable ; IS__TUNIT____-SAME: () [[ATTR3]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_wholly_unreachable ; IS__CGSCC____-SAME: () [[ATTR3]] { ; IS__CGSCC____-NEXT: unreachable @@ -291,7 +291,7 @@ } define void @atomiccmpxchg_single_bb_unreachable(i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable ; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR3]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -300,7 +300,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable ; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -318,13 +318,13 @@ } define void @atomiccmpxchg_null_pointer_is_defined() null_pointer_is_valid { -; IS__TUNIT____: Function Attrs: nofree nounwind null_pointer_is_valid willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind null_pointer_is_valid willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_pointer_is_defined ; IS__TUNIT____-SAME: () [[ATTR4]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_pointer_is_defined ; IS__CGSCC____-SAME: () [[ATTR4]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic @@ -338,12 +338,12 @@ ; ATTRIBUTOR-LABEL: @atomiccmpxchg_null_propagated( ; ATTRIBUTOR-NEXT: unreachable ; -; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_propagated ; IS__TUNIT____-SAME: () [[ATTR3]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_propagated ; IS__CGSCC____-SAME: () [[ATTR3]] { ; IS__CGSCC____-NEXT: unreachable @@ -358,7 +358,7 @@ ; Note: The unreachable on %t and %e is _not_ from AAUndefinedBehavior define i32 @cond_br_on_undef() { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef ; IS__TUNIT____-SAME: () [[ATTR5:#.*]] { ; IS__TUNIT____-NEXT: unreachable @@ -367,7 +367,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef ; IS__CGSCC____-SAME: () [[ATTR5:#.*]] { ; IS__CGSCC____-NEXT: unreachable @@ -387,7 +387,7 @@ ; Valid branch - verify that this is not converted ; to unreachable. define void @cond_br_on_undef2(i1 %cond) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef2 ; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T1:%.*]], label [[E1:%.*]] @@ -400,7 +400,7 @@ ; IS__TUNIT____: e1: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef2 ; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T1:%.*]], label [[E1:%.*]] @@ -425,12 +425,12 @@ } define i1 @ret_undef() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 undef ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 undef @@ -439,7 +439,7 @@ } define void @cond_br_on_undef_interproc() { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc ; IS__TUNIT____-SAME: () [[ATTR5]] { ; IS__TUNIT____-NEXT: unreachable @@ -448,7 +448,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc ; IS__CGSCC____-SAME: () [[ATTR5]] { ; IS__CGSCC____-NEXT: unreachable @@ -466,7 +466,7 @@ } define i1 @ret_undef2() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef2 ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 true, label [[T:%.*]], label [[E:%.*]] @@ -475,7 +475,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef2 ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 true, label [[T:%.*]], label [[E:%.*]] @@ -493,7 +493,7 @@ ; More complicated interproc deduction of undef define void @cond_br_on_undef_interproc2() { -; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc2 ; IS__TUNIT____-SAME: () [[ATTR5]] { ; IS__TUNIT____-NEXT: unreachable @@ -502,7 +502,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc2 ; IS__CGSCC____-SAME: () [[ATTR5]] { ; IS__CGSCC____-NEXT: unreachable @@ -522,7 +522,7 @@ ; Branch on undef that depends on propagation of ; undef of a previous instruction. define i32 @cond_br_on_undef3() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef3 ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: br label [[T:%.*]] @@ -531,7 +531,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef3 ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: br label [[T:%.*]] @@ -551,7 +551,7 @@ ; Branch on undef because of uninitialized value. ; FIXME: Currently it doesn't propagate the undef. define i32 @cond_br_on_undef_uninit() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_uninit ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i1, align 1 @@ -562,7 +562,7 @@ ; IS__TUNIT____: e: ; IS__TUNIT____-NEXT: ret i32 2 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_uninit ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i1, align 1 @@ -588,7 +588,7 @@ ; MODULE-NOT: @callee( define internal i32 @callee(i1 %C, i32* %A) { ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: entry: @@ -610,12 +610,12 @@ } define i32 @foo() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32 1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 1 @@ -629,13 +629,13 @@ ; Tests for argument position define void @arg_nonnull_1(i32* nonnull %a) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_1 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR6:#.*]] { ; IS__TUNIT____-NEXT: store i32 0, i32* [[A]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_1 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR6:#.*]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[A]], align 4 @@ -646,13 +646,13 @@ } define void @arg_nonnull_1_noundef_1(i32* nonnull noundef %a) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_1_noundef_1 ; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR6]] { ; IS__TUNIT____-NEXT: store i32 0, i32* [[A]], align 4 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_1_noundef_1 ; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR6]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[A]], align 4 @@ -663,7 +663,7 @@ } define void @arg_nonnull_12(i32* nonnull %a, i32* nonnull %b, i32* %c) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_12 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly [[A:%.*]], i32* nocapture nofree nonnull writeonly [[B:%.*]], i32* nofree writeonly [[C:%.*]]) [[ATTR6]] { ; IS__TUNIT____-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null @@ -677,7 +677,7 @@ ; IS__TUNIT____: ret: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_12 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly [[A:%.*]], i32* nocapture nofree nonnull writeonly [[B:%.*]], i32* nofree writeonly [[C:%.*]]) [[ATTR6]] { ; IS__CGSCC____-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null @@ -704,7 +704,7 @@ } define void @arg_nonnull_12_noundef_2(i32* nonnull %a, i32* noundef nonnull %b, i32* %c) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_12_noundef_2 ; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly [[A:%.*]], i32* nocapture nofree noundef nonnull writeonly [[B:%.*]], i32* nofree writeonly [[C:%.*]]) [[ATTR6]] { ; IS__TUNIT____-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null @@ -718,7 +718,7 @@ ; IS__TUNIT____: ret: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_12_noundef_2 ; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly [[A:%.*]], i32* nocapture nofree noundef nonnull writeonly [[B:%.*]], i32* nofree writeonly [[C:%.*]]) [[ATTR6]] { ; IS__CGSCC____-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null @@ -746,12 +746,12 @@ ; Pass null directly to argument with nonnull attribute define void @arg_nonnull_violation1_1() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_1 ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_1 ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -761,12 +761,12 @@ } define void @arg_nonnull_violation1_2() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_2 ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_2 ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -777,12 +777,12 @@ ; A case that depends on value simplification define void @arg_nonnull_violation2_1(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_1 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_1 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -794,12 +794,12 @@ } define void @arg_nonnull_violation2_2(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_2 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_2 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -812,7 +812,7 @@ ; Cases for single and multiple violation at a callsite define void @arg_nonnull_violation3_1(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = alloca i32, align 4 @@ -826,7 +826,7 @@ ; IS__TUNIT____: ret: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 4 @@ -859,7 +859,7 @@ } define void @arg_nonnull_violation3_2(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = alloca i32, align 4 @@ -873,7 +873,7 @@ ; IS__TUNIT____: ret: ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 4 @@ -908,7 +908,7 @@ ; Tests for returned position define nonnull i32* @returned_nonnnull(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_nonnnull ; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ @@ -923,7 +923,7 @@ ; IS__TUNIT____: ondefault: ; IS__TUNIT____-NEXT: ret i32* undef ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_nonnnull ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ @@ -950,7 +950,7 @@ } define noundef i32* @returned_noundef(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_noundef ; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ @@ -965,7 +965,7 @@ ; IS__TUNIT____: ondefault: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_noundef ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ @@ -992,7 +992,7 @@ } define nonnull noundef i32* @returned_nonnnull_noundef(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef ; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ @@ -1007,7 +1007,7 @@ ; IS__TUNIT____: ondefault: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef ; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ @@ -1034,12 +1034,12 @@ } define noundef i32 @returned_nonnnull_noundef_int() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef_int ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef_int ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 0 @@ -1069,12 +1069,12 @@ } define i32 @argument_noundef1(i32 noundef %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@argument_noundef1 ; IS__TUNIT____-SAME: (i32 noundef returned [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32 [[C]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@argument_noundef1 ; IS__CGSCC____-SAME: (i32 noundef returned [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 [[C]] @@ -1083,12 +1083,12 @@ } define i32 @violate_noundef_nonpointer() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@violate_noundef_nonpointer ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@violate_noundef_nonpointer ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable @@ -1098,12 +1098,12 @@ } define i32* @argument_noundef2(i32* noundef %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@argument_noundef2 ; IS__TUNIT____-SAME: (i32* nofree noundef readnone returned "no-capture-maybe-returned" [[C:%.*]]) [[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32* [[C]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@argument_noundef2 ; IS__CGSCC____-SAME: (i32* nofree noundef readnone returned "no-capture-maybe-returned" [[C:%.*]]) [[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[C]] @@ -1112,12 +1112,12 @@ } define i32* @violate_noundef_pointer() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@violate_noundef_pointer ; IS__TUNIT____-SAME: () [[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@violate_noundef_pointer ; IS__CGSCC____-SAME: () [[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable diff --git a/llvm/test/Transforms/Attributor/value-simplify.ll b/llvm/test/Transforms/Attributor/value-simplify.ll --- a/llvm/test/Transforms/Attributor/value-simplify.ll +++ b/llvm/test/Transforms/Attributor/value-simplify.ll @@ -30,12 +30,12 @@ ; TEST 2 : Simplify return value define i32 @return0() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@return0 ; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@return0 ; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { ; IS__CGSCC____-NEXT: ret i32 0 @@ -44,12 +44,12 @@ } define i32 @return1() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@return1 ; IS__TUNIT____-SAME: () [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@return1 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 1 @@ -58,7 +58,7 @@ } define i32 @test2_1(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_1 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] @@ -71,7 +71,7 @@ ; IS__TUNIT____-NEXT: [[RET:%.*]] = phi i32 [ [[RET0]], [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ] ; IS__TUNIT____-NEXT: ret i32 1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_1 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] @@ -102,12 +102,12 @@ define i32 @test2_2(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_2 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 1 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_2 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 1 @@ -201,7 +201,7 @@ } define i32 @ipccp1(i32 %a) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp1 ; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: br i1 true, label [[T:%.*]], label [[F:%.*]] @@ -210,7 +210,7 @@ ; IS__TUNIT____: f: ; IS__TUNIT____-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp1 ; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: br i1 true, label [[T:%.*]], label [[F:%.*]] @@ -228,15 +228,6 @@ } define internal i1 @ipccp2i(i1 %a) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2i -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: br label [[T:%.*]] -; IS__CGSCC____: t: -; IS__CGSCC____-NEXT: ret i1 undef -; IS__CGSCC____: f: -; IS__CGSCC____-NEXT: unreachable -; br i1 %a, label %t, label %f t: ret i1 %a @@ -248,10 +239,10 @@ define i1 @ipccp2() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp2 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2:#.*]] { ; IS__TUNIT____-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i1 true @@ -261,15 +252,6 @@ } define internal i1 @ipccp2ib(i1 %a) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2ib -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: br label [[T:%.*]] -; IS__CGSCC____: t: -; IS__CGSCC____-NEXT: ret i1 undef -; IS__CGSCC____: f: -; IS__CGSCC____-NEXT: unreachable -; br i1 %a, label %t, label %f t: ret i1 true @@ -281,10 +263,10 @@ define i1 @ipccp2b() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp2b -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2b ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i1 true @@ -294,15 +276,6 @@ } define internal i32 @ipccp3i(i32 %a) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp3i -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: br label [[T:%.*]] -; IS__CGSCC____: t: -; IS__CGSCC____-NEXT: ret i32 undef -; IS__CGSCC____: f: -; IS__CGSCC____-NEXT: unreachable -; %c = icmp eq i32 %a, 7 br i1 %c, label %t, label %f t: @@ -315,10 +288,10 @@ define i32 @ipccp3() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp3 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: ret i32 7 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp3 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 7 @@ -330,12 +303,12 @@ ; Do not touch complicated arguments (for now) %struct.X = type { i8* } define internal i32* @test_inalloca(i32* inalloca %a) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_inalloca ; IS__TUNIT____-SAME: (i32* inalloca noalias nofree nonnull returned writeonly dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32* [[A]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inalloca ; IS__CGSCC____-SAME: (i32* inalloca noalias nofree nonnull returned writeonly dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32* [[A]] @@ -343,22 +316,22 @@ ret i32* %a } define i32* @complicated_args_inalloca(i32* %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_inalloca ; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree writeonly "no-capture-maybe-returned" [[ARG]]) [[ATTR1]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree writeonly "no-capture-maybe-returned" [[ARG]]) [[ATTR2]] ; IS__TUNIT____-NEXT: ret i32* [[CALL]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_inalloca ; IS__CGSCC_OPM-SAME: (i32* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR1:#.*]] { -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) [[ATTR5:#.*]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) [[ATTR6:#.*]] ; IS__CGSCC_OPM-NEXT: ret i32* [[CALL]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_inalloca ; IS__CGSCC_NPM-SAME: (i32* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR1:#.*]] { -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) [[ATTR4:#.*]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) [[ATTR5:#.*]] ; IS__CGSCC_NPM-NEXT: ret i32* [[CALL]] ; %call = call i32* @test_inalloca(i32* %arg) @@ -366,12 +339,12 @@ } define internal i32* @test_preallocated(i32* preallocated(i32) %a) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_preallocated ; IS__TUNIT____-SAME: (i32* noalias nofree noundef nonnull returned writeonly preallocated(i32) align 536870912 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32* [[A]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_preallocated ; IS__CGSCC____-SAME: (i32* noalias nofree noundef nonnull returned writeonly preallocated(i32) align 536870912 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32* [[A]] @@ -379,32 +352,32 @@ ret i32* %a } define i32* @complicated_args_preallocated() { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated -; IS__TUNIT_OPM-SAME: () [[ATTR0:#.*]] { -; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) [[ATTR5:#.*]] -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) [[ATTR1:#.*]] [ "preallocated"(token [[C]]) ] +; IS__TUNIT_OPM-SAME: () [[ATTR3:#.*]] { +; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) [[ATTR7:#.*]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) [[ATTR2:#.*]] [ "preallocated"(token [[C]]) ] ; IS__TUNIT_OPM-NEXT: ret i32* [[CALL]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated -; IS__TUNIT_NPM-SAME: () [[ATTR0:#.*]] { -; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) [[ATTR4:#.*]] -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) [[ATTR1:#.*]] [ "preallocated"(token [[C]]) ] +; IS__TUNIT_NPM-SAME: () [[ATTR3:#.*]] { +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) [[ATTR6:#.*]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) [[ATTR2:#.*]] [ "preallocated"(token [[C]]) ] ; IS__TUNIT_NPM-NEXT: ret i32* [[CALL]] ; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated -; IS__CGSCC_OPM-SAME: () [[ATTR0:#.*]] { -; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) [[ATTR6:#.*]] [ "preallocated"(token [[C]]) ] +; IS__CGSCC_OPM-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) [[ATTR6]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) [[ATTR7:#.*]] [ "preallocated"(token [[C]]) ] ; IS__CGSCC_OPM-NEXT: ret i32* [[CALL]] ; -; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated -; IS__CGSCC_NPM-SAME: () [[ATTR0:#.*]] { -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) [[ATTR4]] -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) [[ATTR5:#.*]] [ "preallocated"(token [[C]]) ] +; IS__CGSCC_NPM-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) [[ATTR6:#.*]] [ "preallocated"(token [[C]]) ] ; IS__CGSCC_NPM-NEXT: ret i32* [[CALL]] ; %c = call token @llvm.call.preallocated.setup(i32 1) @@ -414,15 +387,15 @@ define internal void @test_sret(%struct.X* sret(%struct.X) %a, %struct.X** %b) { ; -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_sret -; IS__TUNIT____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret(%struct.X) align 536870912 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret(%struct.X) align 536870912 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) [[ATTR4:#.*]] { ; IS__TUNIT____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_sret -; IS__CGSCC____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret(%struct.X) align 536870912 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret(%struct.X) align 536870912 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -432,21 +405,21 @@ ; FIXME: Alignment and dereferenceability are not propagated to the argument define void @complicated_args_sret(%struct.X** %b) { ; -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_sret -; IS__TUNIT_OPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) [[ATTR2:#.*]] { -; IS__TUNIT_OPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly align 536870912 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) [[ATTR6:#.*]] +; IS__TUNIT_OPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT_OPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly align 536870912 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) [[ATTR8:#.*]] ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_sret -; IS__TUNIT_NPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) [[ATTR2:#.*]] { -; IS__TUNIT_NPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly align 536870912 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) [[ATTR5:#.*]] +; IS__TUNIT_NPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT_NPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly align 536870912 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) [[ATTR7:#.*]] ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@complicated_args_sret -; IS__CGSCC____-SAME: (%struct.X** nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (%struct.X** nocapture nofree nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) [[ATTR3]] { ; IS__CGSCC____-NEXT: unreachable ; call void @test_sret(%struct.X* null, %struct.X** %b) @@ -454,12 +427,12 @@ } define internal %struct.X* @test_nest(%struct.X* nest %a) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_nest ; IS__TUNIT____-SAME: (%struct.X* nest noalias nofree noundef readnone returned align 536870912 "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__TUNIT____-NEXT: ret %struct.X* [[A]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_nest ; IS__CGSCC____-SAME: (%struct.X* nest noalias nofree noundef readnone returned align 536870912 "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { ; IS__CGSCC____-NEXT: ret %struct.X* [[A]] @@ -467,22 +440,22 @@ ret %struct.X* %a } define %struct.X* @complicated_args_nest() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_nest ; IS__TUNIT____-SAME: () [[ATTR1]] { -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) [[ATTR1]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) [[ATTR2]] ; IS__TUNIT____-NEXT: ret %struct.X* [[CALL]] ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_nest ; IS__CGSCC_OPM-SAME: () [[ATTR1]] { -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) [[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) [[ATTR6]] ; IS__CGSCC_OPM-NEXT: ret %struct.X* [[CALL]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_nest ; IS__CGSCC_NPM-SAME: () [[ATTR1]] { -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) [[ATTR4]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) [[ATTR5]] ; IS__CGSCC_NPM-NEXT: ret %struct.X* [[CALL]] ; %call = call %struct.X* @test_nest(%struct.X* null) @@ -491,14 +464,14 @@ @S = external global %struct.X define internal void @test_byval(%struct.X* byval(%struct.X) %a) { -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test_byval ; IS__CGSCC_OPM-SAME: (%struct.X* noalias nocapture nofree noundef nonnull writeonly byval(%struct.X) align 8 dereferenceable(8) [[A:%.*]]) [[ATTR1]] { ; IS__CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X:%.*]], %struct.X* [[A]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: store i8* null, i8** [[G0]], align 8 ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_byval ; IS__CGSCC_NPM-SAME: (i8* noalias nocapture nofree readnone [[TMP0:%.*]]) [[ATTR1]] { ; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8 @@ -513,19 +486,19 @@ ret void } define void @complicated_args_byval() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_byval ; IS__TUNIT____-SAME: () [[ATTR1]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_byval ; IS__CGSCC_OPM-SAME: () [[ATTR1]] { ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_byval -; IS__CGSCC_NPM-SAME: () [[ATTR3:#.*]] { +; IS__CGSCC_NPM-SAME: () [[ATTR4:#.*]] { ; IS__CGSCC_NPM-NEXT: ret void ; call void @test_byval(%struct.X* @S) @@ -533,16 +506,16 @@ } define internal i8*@test_byval2(%struct.X* byval(%struct.X) %a) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_byval2 -; IS__TUNIT____-SAME: () [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: () [[ATTR5:#.*]] { ; IS__TUNIT____-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X:%.*]], %struct.X* @S, i32 0, i32 0 ; IS__TUNIT____-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8 ; IS__TUNIT____-NEXT: ret i8* [[L]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_byval2 -; IS__CGSCC____-SAME: () [[ATTR3:#.*]] { +; IS__CGSCC____-SAME: () [[ATTR4:#.*]] { ; IS__CGSCC____-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X:%.*]], %struct.X* @S, i32 0, i32 0 ; IS__CGSCC____-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8 ; IS__CGSCC____-NEXT: ret i8* [[L]] @@ -552,22 +525,28 @@ ret i8* %l } define i8* @complicated_args_byval2() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_byval2 -; IS__TUNIT____-SAME: () [[ATTR3]] { -; IS__TUNIT____-NEXT: [[C:%.*]] = call i8* @test_byval2() [[ATTR3]] -; IS__TUNIT____-NEXT: ret i8* [[C]] -; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_byval2 +; IS__TUNIT_OPM-SAME: () [[ATTR5:#.*]] { +; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call i8* @test_byval2() [[ATTR9:#.*]] +; IS__TUNIT_OPM-NEXT: ret i8* [[C]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn mustprogress +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_byval2 +; IS__TUNIT_NPM-SAME: () [[ATTR5:#.*]] { +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i8* @test_byval2() [[ATTR8:#.*]] +; IS__TUNIT_NPM-NEXT: ret i8* [[C]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_byval2 -; IS__CGSCC_OPM-SAME: () [[ATTR3:#.*]] { -; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i8* @test_byval2() [[ATTR7:#.*]] +; IS__CGSCC_OPM-SAME: () [[ATTR4:#.*]] { +; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i8* @test_byval2() [[ATTR8:#.*]] ; IS__CGSCC_OPM-NEXT: ret i8* [[C]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_byval2 -; IS__CGSCC_NPM-SAME: () [[ATTR3]] { -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i8* @test_byval2() [[ATTR6:#.*]] +; IS__CGSCC_NPM-SAME: () [[ATTR4]] { +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i8* @test_byval2() [[ATTR7:#.*]] ; IS__CGSCC_NPM-NEXT: ret i8* [[C]] ; %c = call i8* @test_byval2(%struct.X* @S) @@ -577,7 +556,7 @@ define void @fixpoint_changed(i32* %p) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@fixpoint_changed -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR6:#.*]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_OPM: for.cond: @@ -598,9 +577,9 @@ ; IS__TUNIT_OPM: for.end: ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@fixpoint_changed -; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR2]] { +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_NPM: for.cond: @@ -623,7 +602,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fixpoint_changed -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR5:#.*]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_OPM: for.cond: @@ -644,9 +623,9 @@ ; IS__CGSCC_OPM: for.end: ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fixpoint_changed -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR3:#.*]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_NPM: for.cond: @@ -697,10 +676,10 @@ define i8 @caller0() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller0 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 49 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller0 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 @@ -711,10 +690,10 @@ define i8 @caller1() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller1 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 49 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller1 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 @@ -725,10 +704,10 @@ define i8 @caller2() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 49 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 @@ -739,10 +718,10 @@ define i8 @caller_middle() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller_middle -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 49 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller_middle ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 @@ -753,10 +732,10 @@ define i8 @caller3() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller3 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 49 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller3 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 @@ -767,10 +746,10 @@ define i8 @caller4() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller4 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () [[ATTR2]] { ; IS__TUNIT____-NEXT: ret i8 49 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller4 ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 @@ -779,7 +758,7 @@ ret i8 %c } define internal i8 @callee(i8 %a) { -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 undef @@ -790,12 +769,12 @@ define i1 @icmp() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@icmp ; IS__TUNIT____-SAME: () [[ATTR1]] { ; IS__TUNIT____-NEXT: ret i1 true ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@icmp ; IS__CGSCC____-SAME: () [[ATTR1]] { ; IS__CGSCC____-NEXT: ret i1 true diff --git a/llvm/test/Transforms/Attributor/willreturn.ll b/llvm/test/Transforms/Attributor/willreturn.ll --- a/llvm/test/Transforms/Attributor/willreturn.ll +++ b/llvm/test/Transforms/Attributor/willreturn.ll @@ -12,14 +12,14 @@ ; TEST 1 (positive case) define void @only_return() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@only_return -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@only_return -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret void ; ret void @@ -37,14 +37,14 @@ define i32 @fib(i32 %0) local_unnamed_addr #0 { ; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@fib -; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 2 ; IS__TUNIT_OPM-NEXT: br i1 [[TMP2]], label [[TMP9:%.*]], label [[TMP3:%.*]] ; IS__TUNIT_OPM: 3: ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = add nsw i32 [[TMP0]], -1 -; IS__TUNIT_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) [[ATTR15:#.*]] +; IS__TUNIT_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR15:[0-9]+]] ; IS__TUNIT_OPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2 -; IS__TUNIT_OPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) [[ATTR15]] +; IS__TUNIT_OPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR15]] ; IS__TUNIT_OPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]] ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP8]] ; IS__TUNIT_OPM: 9: @@ -52,14 +52,14 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@fib -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 2 ; IS__TUNIT_NPM-NEXT: br i1 [[TMP2]], label [[TMP9:%.*]], label [[TMP3:%.*]] ; IS__TUNIT_NPM: 3: ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = add nsw i32 [[TMP0]], -1 -; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) [[ATTR16:#.*]] +; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR17:[0-9]+]] ; IS__TUNIT_NPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2 -; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) [[ATTR16]] +; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR17]] ; IS__TUNIT_NPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]] ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP8]] ; IS__TUNIT_NPM: 9: @@ -67,14 +67,14 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fib -; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 2 ; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP9:%.*]], label [[TMP3:%.*]] ; IS__CGSCC_OPM: 3: ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = add nsw i32 [[TMP0]], -1 -; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) [[ATTR19:#.*]] +; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR19:[0-9]+]] ; IS__CGSCC_OPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2 -; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) [[ATTR19]] +; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR19]] ; IS__CGSCC_OPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]] ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP8]] ; IS__CGSCC_OPM: 9: @@ -82,14 +82,14 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fib -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 2 ; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP9:%.*]], label [[TMP3:%.*]] ; IS__CGSCC_NPM: 3: ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = add nsw i32 [[TMP0]], -1 -; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) [[ATTR21:#.*]] +; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR22:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2 -; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) [[ATTR21]] +; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR22]] ; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]] ; IS__CGSCC_NPM-NEXT: ret i32 [[TMP8]] ; IS__CGSCC_NPM: 9: @@ -123,7 +123,7 @@ define i32 @fact_maybe_not_halt(i32 %0) local_unnamed_addr #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@fact_maybe_not_halt -; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0 ; IS__TUNIT____-NEXT: br i1 [[TMP2]], label [[TMP11:%.*]], label [[TMP3:%.*]] ; IS__TUNIT____: 3: @@ -141,7 +141,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@fact_maybe_not_halt -; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0 ; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP11:%.*]], label [[TMP3:%.*]] ; IS__CGSCC____: 3: @@ -189,7 +189,7 @@ define i32 @fact_loop(i32 %0) local_unnamed_addr #0 { ; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@fact_loop -; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR1]] { +; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] { ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1 ; IS__TUNIT_OPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]] ; IS__TUNIT_OPM: 3: @@ -203,9 +203,9 @@ ; IS__TUNIT_OPM-NEXT: [[TMP10:%.*]] = icmp eq i32 [[TMP6]], [[TMP0]] ; IS__TUNIT_OPM-NEXT: br i1 [[TMP10]], label [[TMP3]], label [[TMP5]] ; -; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@fact_loop -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1 ; IS__TUNIT_NPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]] ; IS__TUNIT_NPM: 3: @@ -221,7 +221,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fact_loop -; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR2:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1 ; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]] ; IS__CGSCC_OPM: 3: @@ -235,9 +235,9 @@ ; IS__CGSCC_OPM-NEXT: [[TMP10:%.*]] = icmp eq i32 [[TMP6]], [[TMP0]] ; IS__CGSCC_OPM-NEXT: br i1 [[TMP10]], label [[TMP3]], label [[TMP5]] ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fact_loop -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1 ; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]] ; IS__CGSCC_NPM: 3: @@ -281,44 +281,44 @@ define void @mutual_recursion1(i1 %c) #0 { ; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__TUNIT_OPM: rec: -; IS__TUNIT_OPM-NEXT: call void @sink() [[ATTR11:#.*]] -; IS__TUNIT_OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) [[ATTR16:#.*]] +; IS__TUNIT_OPM-NEXT: call void @sink() #[[ATTR16:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) #[[ATTR17:[0-9]+]] ; IS__TUNIT_OPM-NEXT: br label [[END]] ; IS__TUNIT_OPM: end: ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__TUNIT_NPM: rec: -; IS__TUNIT_NPM-NEXT: call void @sink() [[ATTR11:#.*]] -; IS__TUNIT_NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) [[ATTR18:#.*]] +; IS__TUNIT_NPM-NEXT: call void @sink() #[[ATTR19:[0-9]+]] +; IS__TUNIT_NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR20:[0-9]+]] ; IS__TUNIT_NPM-NEXT: br label [[END]] ; IS__TUNIT_NPM: end: ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__CGSCC_OPM: rec: -; IS__CGSCC_OPM-NEXT: call void @sink() [[ATTR14:#.*]] -; IS__CGSCC_OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) [[ATTR20:#.*]] +; IS__CGSCC_OPM-NEXT: call void @sink() #[[ATTR20:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) #[[ATTR21:[0-9]+]] ; IS__CGSCC_OPM-NEXT: br label [[END]] ; IS__CGSCC_OPM: end: ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__CGSCC_NPM: rec: -; IS__CGSCC_NPM-NEXT: call void @sink() [[ATTR14:#.*]] -; IS__CGSCC_NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) [[ATTR22:#.*]] +; IS__CGSCC_NPM-NEXT: call void @sink() #[[ATTR23:[0-9]+]] +; IS__CGSCC_NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR24:[0-9]+]] ; IS__CGSCC_NPM-NEXT: br label [[END]] ; IS__CGSCC_NPM: end: ; IS__CGSCC_NPM-NEXT: ret void @@ -336,26 +336,26 @@ define void @mutual_recursion2(i1 %c) #0 { ; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@mutual_recursion2 -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR3]] { -; IS__TUNIT_OPM-NEXT: call void @mutual_recursion1(i1 [[C]]) [[ATTR16]] +; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR17]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@mutual_recursion2 -; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR3]] { -; IS__TUNIT_NPM-NEXT: call void @mutual_recursion1(i1 [[C]]) [[ATTR18]] +; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR20]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@mutual_recursion2 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) [[ATTR4]] { -; IS__CGSCC_OPM-NEXT: call void @mutual_recursion1(i1 [[C]]) [[ATTR20]] +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR4]] { +; IS__CGSCC_OPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR21]] ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion2 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR4]] { -; IS__CGSCC_NPM-NEXT: call void @mutual_recursion1(i1 [[C]]) [[ATTR22]] +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR4]] { +; IS__CGSCC_NPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR24]] ; IS__CGSCC_NPM-NEXT: ret void ; call void @mutual_recursion1(i1 %c) @@ -372,14 +372,14 @@ define void @only_exit() local_unnamed_addr #0 { ; IS__TUNIT____: Function Attrs: noinline noreturn nounwind uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@only_exit -; IS__TUNIT____-SAME: () local_unnamed_addr [[ATTR5:#.*]] { -; IS__TUNIT____-NEXT: tail call void @exit(i32 noundef 0) [[ATTR4:#.*]] +; IS__TUNIT____-SAME: () local_unnamed_addr #[[ATTR5:[0-9]+]] { +; IS__TUNIT____-NEXT: tail call void @exit(i32 noundef 0) #[[ATTR4:[0-9]+]] ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: noinline noreturn nounwind uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@only_exit -; IS__CGSCC____-SAME: () local_unnamed_addr [[ATTR6:#.*]] { -; IS__CGSCC____-NEXT: tail call void @exit(i32 noundef 0) [[ATTR5:#.*]] +; IS__CGSCC____-SAME: () local_unnamed_addr #[[ATTR6:[0-9]+]] { +; IS__CGSCC____-NEXT: tail call void @exit(i32 noundef 0) #[[ATTR5:[0-9]+]] ; IS__CGSCC____-NEXT: unreachable ; tail call void @exit(i32 0) @@ -399,36 +399,36 @@ define void @conditional_exit(i32 %0, i32* nocapture readonly %1) local_unnamed_addr #0 { ; IS__TUNIT____: Function Attrs: noinline nounwind uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@conditional_exit -; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]], i32* nocapture readonly [[TMP1:%.*]]) local_unnamed_addr [[ATTR6:#.*]] { +; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]], i32* nocapture readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR6:[0-9]+]] { ; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 0 ; IS__TUNIT____-NEXT: br i1 [[TMP3]], label [[TMP5:%.*]], label [[TMP4:%.*]] ; IS__TUNIT____: 4: -; IS__TUNIT____-NEXT: tail call void @exit(i32 noundef 0) [[ATTR4]] +; IS__TUNIT____-NEXT: tail call void @exit(i32 noundef 0) #[[ATTR4]] ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: 5: ; IS__TUNIT____-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP1]], align 4 ; IS__TUNIT____-NEXT: [[TMP7:%.*]] = icmp eq i32 [[TMP6]], 0 ; IS__TUNIT____-NEXT: br i1 [[TMP7]], label [[TMP9:%.*]], label [[TMP8:%.*]] ; IS__TUNIT____: 8: -; IS__TUNIT____-NEXT: tail call void @exit(i32 noundef 1) [[ATTR4]] +; IS__TUNIT____-NEXT: tail call void @exit(i32 noundef 1) #[[ATTR4]] ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: 9: ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: noinline nounwind uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@conditional_exit -; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32* nocapture readonly [[TMP1:%.*]]) local_unnamed_addr [[ATTR7:#.*]] { +; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32* nocapture readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR7:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 0 ; IS__CGSCC____-NEXT: br i1 [[TMP3]], label [[TMP5:%.*]], label [[TMP4:%.*]] ; IS__CGSCC____: 4: -; IS__CGSCC____-NEXT: tail call void @exit(i32 noundef 0) [[ATTR5]] +; IS__CGSCC____-NEXT: tail call void @exit(i32 noundef 0) #[[ATTR5]] ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: 5: ; IS__CGSCC____-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP1]], align 4 ; IS__CGSCC____-NEXT: [[TMP7:%.*]] = icmp eq i32 [[TMP6]], 0 ; IS__CGSCC____-NEXT: br i1 [[TMP7]], label [[TMP9:%.*]], label [[TMP8:%.*]] ; IS__CGSCC____: 8: -; IS__CGSCC____-NEXT: tail call void @exit(i32 noundef 1) [[ATTR5]] +; IS__CGSCC____-NEXT: tail call void @exit(i32 noundef 1) #[[ATTR5]] ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: 9: ; IS__CGSCC____-NEXT: ret void @@ -460,14 +460,14 @@ declare float @llvm.floor.f32(float) define void @call_floor(float %a) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_floor -; IS__TUNIT____-SAME: (float [[A:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (float [[A:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_floor -; IS__CGSCC____-SAME: (float [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (float [[A:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret void ; tail call float @llvm.floor.f32(float %a) @@ -475,28 +475,28 @@ } define float @call_floor2(float %a) #0 { -; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@call_floor2 -; IS__TUNIT_OPM-SAME: (float [[A:%.*]]) [[ATTR0:#.*]] { -; IS__TUNIT_OPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) [[ATTR17:#.*]] +; IS__TUNIT_OPM-SAME: (float [[A:%.*]]) #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR18:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret float [[C]] ; -; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@call_floor2 -; IS__TUNIT_NPM-SAME: (float [[A:%.*]]) [[ATTR0]] { -; IS__TUNIT_NPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) [[ATTR19:#.*]] +; IS__TUNIT_NPM-SAME: (float [[A:%.*]]) #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR21:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret float [[C]] ; -; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@call_floor2 -; IS__CGSCC_OPM-SAME: (float [[A:%.*]]) [[ATTR9:#.*]] { -; IS__CGSCC_OPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) [[ATTR21:#.*]] +; IS__CGSCC_OPM-SAME: (float [[A:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR22:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret float [[C]] ; -; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@call_floor2 -; IS__CGSCC_NPM-SAME: (float [[A:%.*]]) [[ATTR9:#.*]] { -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) [[ATTR23:#.*]] +; IS__CGSCC_NPM-SAME: (float [[A:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR25:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret float [[C]] ; %c = tail call float @llvm.floor.f32(float %a) @@ -515,26 +515,26 @@ define void @call_maybe_noreturn() #0 { ; IS__TUNIT_OPM: Function Attrs: noinline nounwind uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@call_maybe_noreturn -; IS__TUNIT_OPM-SAME: () [[ATTR6:#.*]] { -; IS__TUNIT_OPM-NEXT: tail call void @maybe_noreturn() [[ATTR18:#.*]] +; IS__TUNIT_OPM-SAME: () #[[ATTR6]] { +; IS__TUNIT_OPM-NEXT: tail call void @maybe_noreturn() #[[ATTR19:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: noinline nounwind uwtable ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@call_maybe_noreturn -; IS__TUNIT_NPM-SAME: () [[ATTR6:#.*]] { -; IS__TUNIT_NPM-NEXT: tail call void @maybe_noreturn() [[ATTR20:#.*]] +; IS__TUNIT_NPM-SAME: () #[[ATTR6]] { +; IS__TUNIT_NPM-NEXT: tail call void @maybe_noreturn() #[[ATTR22:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@call_maybe_noreturn -; IS__CGSCC_OPM-SAME: () [[ATTR7:#.*]] { -; IS__CGSCC_OPM-NEXT: tail call void @maybe_noreturn() [[ATTR22:#.*]] +; IS__CGSCC_OPM-SAME: () #[[ATTR7]] { +; IS__CGSCC_OPM-NEXT: tail call void @maybe_noreturn() #[[ATTR23:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@call_maybe_noreturn -; IS__CGSCC_NPM-SAME: () [[ATTR7:#.*]] { -; IS__CGSCC_NPM-NEXT: tail call void @maybe_noreturn() [[ATTR24:#.*]] +; IS__CGSCC_NPM-SAME: () #[[ATTR7]] { +; IS__CGSCC_NPM-NEXT: tail call void @maybe_noreturn() #[[ATTR26:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret void ; tail call void @maybe_noreturn() @@ -550,28 +550,28 @@ declare void @will_return() willreturn norecurse define void @f1() #0 { -; IS__TUNIT_OPM: Function Attrs: noinline nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: noinline nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f1 -; IS__TUNIT_OPM-SAME: () [[ATTR9:#.*]] { -; IS__TUNIT_OPM-NEXT: tail call void @will_return() [[ATTR17]] +; IS__TUNIT_OPM-SAME: () #[[ATTR9:[0-9]+]] { +; IS__TUNIT_OPM-NEXT: tail call void @will_return() #[[ATTR18]] ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: noinline nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: noinline nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f1 -; IS__TUNIT_NPM-SAME: () [[ATTR9:#.*]] { -; IS__TUNIT_NPM-NEXT: tail call void @will_return() [[ATTR19]] +; IS__TUNIT_NPM-SAME: () #[[ATTR9:[0-9]+]] { +; IS__TUNIT_NPM-NEXT: tail call void @will_return() #[[ATTR21]] ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: noinline norecurse nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: noinline norecurse nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC_OPM-SAME: () [[ATTR11:#.*]] { -; IS__CGSCC_OPM-NEXT: tail call void @will_return() [[ATTR21]] +; IS__CGSCC_OPM-SAME: () #[[ATTR11:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: tail call void @will_return() #[[ATTR22]] ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: noinline norecurse nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: noinline norecurse nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC_NPM-SAME: () [[ATTR11:#.*]] { -; IS__CGSCC_NPM-NEXT: tail call void @will_return() [[ATTR23]] +; IS__CGSCC_NPM-SAME: () #[[ATTR11:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: tail call void @will_return() #[[ATTR25]] ; IS__CGSCC_NPM-NEXT: ret void ; tail call void @will_return() @@ -579,17 +579,29 @@ } define void @f2() #0 { -; IS__TUNIT____: Function Attrs: noinline nounwind uwtable willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@f2 -; IS__TUNIT____-SAME: () [[ATTR9:#.*]] { -; IS__TUNIT____-NEXT: tail call void @f1() [[ATTR11:#.*]] -; IS__TUNIT____-NEXT: ret void +; IS__TUNIT_OPM: Function Attrs: noinline nounwind uwtable willreturn mustprogress +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f2 +; IS__TUNIT_OPM-SAME: () #[[ATTR9]] { +; IS__TUNIT_OPM-NEXT: tail call void @f1() #[[ATTR16]] +; IS__TUNIT_OPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: noinline norecurse nounwind uwtable willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@f2 -; IS__CGSCC____-SAME: () [[ATTR11:#.*]] { -; IS__CGSCC____-NEXT: tail call void @f1() [[ATTR14:#.*]] -; IS__CGSCC____-NEXT: ret void +; IS__TUNIT_NPM: Function Attrs: noinline nounwind uwtable willreturn mustprogress +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f2 +; IS__TUNIT_NPM-SAME: () #[[ATTR9]] { +; IS__TUNIT_NPM-NEXT: tail call void @f1() #[[ATTR19]] +; IS__TUNIT_NPM-NEXT: ret void +; +; IS__CGSCC_OPM: Function Attrs: noinline norecurse nounwind uwtable willreturn mustprogress +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f2 +; IS__CGSCC_OPM-SAME: () #[[ATTR11]] { +; IS__CGSCC_OPM-NEXT: tail call void @f1() #[[ATTR20]] +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: noinline norecurse nounwind uwtable willreturn mustprogress +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2 +; IS__CGSCC_NPM-SAME: () #[[ATTR11]] { +; IS__CGSCC_NPM-NEXT: tail call void @f1() #[[ATTR23]] +; IS__CGSCC_NPM-NEXT: ret void ; tail call void @f1() ret void @@ -602,7 +614,7 @@ define void @call_will_return_but_has_loop() #0 { ; IS__TUNIT____: Function Attrs: noinline noreturn nounwind uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_will_return_but_has_loop -; IS__TUNIT____-SAME: () [[ATTR5]] { +; IS__TUNIT____-SAME: () #[[ATTR5]] { ; IS__TUNIT____-NEXT: br label [[LABEL1:%.*]] ; IS__TUNIT____: label1: ; IS__TUNIT____-NEXT: tail call void @will_return() @@ -612,7 +624,7 @@ ; ; IS__CGSCC____: Function Attrs: noinline norecurse noreturn nounwind uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_will_return_but_has_loop -; IS__CGSCC____-SAME: () [[ATTR12:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR12:[0-9]+]] { ; IS__CGSCC____-NEXT: br label [[LABEL1:%.*]] ; IS__CGSCC____: label1: ; IS__CGSCC____-NEXT: tail call void @will_return() @@ -637,10 +649,10 @@ declare i1 @maybe_raise_exception() #1 willreturn define void @invoke_test() personality i32 (...)* @__gxx_personality_v0 { -; IS__TUNIT_OPM: Function Attrs: nounwind willreturn +; IS__TUNIT_OPM: Function Attrs: nounwind willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@invoke_test -; IS__TUNIT_OPM-SAME: () [[ATTR11]] personality i32 (...)* @__gxx_personality_v0 { -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() [[ATTR17]] +; IS__TUNIT_OPM-SAME: () #[[ATTR11:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { +; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR18]] ; IS__TUNIT_OPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS__TUNIT_OPM: N: ; IS__TUNIT_OPM-NEXT: ret void @@ -649,10 +661,10 @@ ; IS__TUNIT_OPM-NEXT: catch i8* null ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: nounwind willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@invoke_test -; IS__TUNIT_NPM-SAME: () [[ATTR11]] personality i32 (...)* @__gxx_personality_v0 { -; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() [[ATTR19]] +; IS__TUNIT_NPM-SAME: () #[[ATTR11:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { +; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR21]] ; IS__TUNIT_NPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS__TUNIT_NPM: N: ; IS__TUNIT_NPM-NEXT: ret void @@ -661,10 +673,10 @@ ; IS__TUNIT_NPM-NEXT: catch i8* null ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: nounwind willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@invoke_test -; IS__CGSCC_OPM-SAME: () [[ATTR14]] personality i32 (...)* @__gxx_personality_v0 { -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() [[ATTR21]] +; IS__CGSCC_OPM-SAME: () #[[ATTR14:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { +; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR22]] ; IS__CGSCC_OPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS__CGSCC_OPM: N: ; IS__CGSCC_OPM-NEXT: ret void @@ -673,10 +685,10 @@ ; IS__CGSCC_OPM-NEXT: catch i8* null ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@invoke_test -; IS__CGSCC_NPM-SAME: () [[ATTR14]] personality i32 (...)* @__gxx_personality_v0 { -; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() [[ATTR23]] +; IS__CGSCC_NPM-SAME: () #[[ATTR14:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { +; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR25]] ; IS__CGSCC_NPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS__CGSCC_NPM: N: ; IS__CGSCC_NPM-NEXT: ret void @@ -711,7 +723,7 @@ define i32 @loop_constant_trip_count(i32* nocapture readonly %0) #0 { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@loop_constant_trip_count -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly [[TMP0:%.*]]) [[ATTR12:#.*]] { +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly [[TMP0:%.*]]) #[[ATTR12:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: br label [[TMP3:%.*]] ; IS__TUNIT_OPM: 2: ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP8:%.*]] @@ -725,9 +737,9 @@ ; IS__TUNIT_OPM-NEXT: [[TMP10:%.*]] = icmp eq i64 [[TMP9]], 10 ; IS__TUNIT_OPM-NEXT: br i1 [[TMP10]], label [[TMP2:%.*]], label [[TMP3]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@loop_constant_trip_count -; IS__TUNIT_NPM-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[TMP0:%.*]]) [[ATTR12:#.*]] { +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[TMP0:%.*]]) #[[ATTR12:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: br label [[TMP3:%.*]] ; IS__TUNIT_NPM: 2: ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP8:%.*]] @@ -743,7 +755,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@loop_constant_trip_count -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[TMP0:%.*]]) [[ATTR15:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[TMP0:%.*]]) #[[ATTR15:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br label [[TMP3:%.*]] ; IS__CGSCC_OPM: 2: ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP8:%.*]] @@ -757,9 +769,9 @@ ; IS__CGSCC_OPM-NEXT: [[TMP10:%.*]] = icmp eq i64 [[TMP9]], 10 ; IS__CGSCC_OPM-NEXT: br i1 [[TMP10]], label [[TMP2:%.*]], label [[TMP3]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@loop_constant_trip_count -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[TMP0:%.*]]) [[ATTR15:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[TMP0:%.*]]) #[[ATTR15:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP3:%.*]] ; IS__CGSCC_NPM: 2: ; IS__CGSCC_NPM-NEXT: ret i32 [[TMP8:%.*]] @@ -801,43 +813,81 @@ ; return ans; ; } define i32 @loop_trip_count_unbound(i32 %0, i32 %1, i32* nocapture readonly %2, i32 %3) local_unnamed_addr #0 { -; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@loop_trip_count_unbound -; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr [[ATTR13:#.*]] { -; IS__TUNIT____-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]] -; IS__TUNIT____-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]] -; IS__TUNIT____: 6: -; IS__TUNIT____-NEXT: [[TMP7:%.*]] = phi i32 [ 0, [[TMP4:%.*]] ], [ [[TMP14:%.*]], [[TMP8]] ] -; IS__TUNIT____-NEXT: ret i32 [[TMP7]] -; IS__TUNIT____: 8: -; IS__TUNIT____-NEXT: [[TMP9:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP8]] ], [ [[TMP0]], [[TMP4]] ] -; IS__TUNIT____-NEXT: [[TMP10:%.*]] = phi i32 [ [[TMP14]], [[TMP8]] ], [ 0, [[TMP4]] ] -; IS__TUNIT____-NEXT: [[TMP11:%.*]] = zext i32 [[TMP9]] to i64 -; IS__TUNIT____-NEXT: [[TMP12:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[TMP11]] -; IS__TUNIT____-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4 -; IS__TUNIT____-NEXT: [[TMP14]] = add nsw i32 [[TMP13]], [[TMP10]] -; IS__TUNIT____-NEXT: [[TMP15]] = add i32 [[TMP9]], [[TMP3]] -; IS__TUNIT____-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP15]], [[TMP1]] -; IS__TUNIT____-NEXT: br i1 [[TMP16]], label [[TMP6]], label [[TMP8]] -; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@loop_trip_count_unbound -; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr [[ATTR16:#.*]] { -; IS__CGSCC____-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]] -; IS__CGSCC____-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]] -; IS__CGSCC____: 6: -; IS__CGSCC____-NEXT: [[TMP7:%.*]] = phi i32 [ 0, [[TMP4:%.*]] ], [ [[TMP14:%.*]], [[TMP8]] ] -; IS__CGSCC____-NEXT: ret i32 [[TMP7]] -; IS__CGSCC____: 8: -; IS__CGSCC____-NEXT: [[TMP9:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP8]] ], [ [[TMP0]], [[TMP4]] ] -; IS__CGSCC____-NEXT: [[TMP10:%.*]] = phi i32 [ [[TMP14]], [[TMP8]] ], [ 0, [[TMP4]] ] -; IS__CGSCC____-NEXT: [[TMP11:%.*]] = zext i32 [[TMP9]] to i64 -; IS__CGSCC____-NEXT: [[TMP12:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[TMP11]] -; IS__CGSCC____-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4 -; IS__CGSCC____-NEXT: [[TMP14]] = add nsw i32 [[TMP13]], [[TMP10]] -; IS__CGSCC____-NEXT: [[TMP15]] = add i32 [[TMP9]], [[TMP3]] -; IS__CGSCC____-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP15]], [[TMP1]] -; IS__CGSCC____-NEXT: br i1 [[TMP16]], label [[TMP6]], label [[TMP8]] +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@loop_trip_count_unbound +; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR12]] { +; IS__TUNIT_OPM-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]] +; IS__TUNIT_OPM-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]] +; IS__TUNIT_OPM: 6: +; IS__TUNIT_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ 0, [[TMP4:%.*]] ], [ [[TMP14:%.*]], [[TMP8]] ] +; IS__TUNIT_OPM-NEXT: ret i32 [[TMP7]] +; IS__TUNIT_OPM: 8: +; IS__TUNIT_OPM-NEXT: [[TMP9:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP8]] ], [ [[TMP0]], [[TMP4]] ] +; IS__TUNIT_OPM-NEXT: [[TMP10:%.*]] = phi i32 [ [[TMP14]], [[TMP8]] ], [ 0, [[TMP4]] ] +; IS__TUNIT_OPM-NEXT: [[TMP11:%.*]] = zext i32 [[TMP9]] to i64 +; IS__TUNIT_OPM-NEXT: [[TMP12:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[TMP11]] +; IS__TUNIT_OPM-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4 +; IS__TUNIT_OPM-NEXT: [[TMP14]] = add nsw i32 [[TMP13]], [[TMP10]] +; IS__TUNIT_OPM-NEXT: [[TMP15]] = add i32 [[TMP9]], [[TMP3]] +; IS__TUNIT_OPM-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP15]], [[TMP1]] +; IS__TUNIT_OPM-NEXT: br i1 [[TMP16]], label [[TMP6]], label [[TMP8]] +; +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@loop_trip_count_unbound +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR13:[0-9]+]] { +; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]] +; IS__TUNIT_NPM-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]] +; IS__TUNIT_NPM: 6: +; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ 0, [[TMP4:%.*]] ], [ [[TMP14:%.*]], [[TMP8]] ] +; IS__TUNIT_NPM-NEXT: ret i32 [[TMP7]] +; IS__TUNIT_NPM: 8: +; IS__TUNIT_NPM-NEXT: [[TMP9:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP8]] ], [ [[TMP0]], [[TMP4]] ] +; IS__TUNIT_NPM-NEXT: [[TMP10:%.*]] = phi i32 [ [[TMP14]], [[TMP8]] ], [ 0, [[TMP4]] ] +; IS__TUNIT_NPM-NEXT: [[TMP11:%.*]] = zext i32 [[TMP9]] to i64 +; IS__TUNIT_NPM-NEXT: [[TMP12:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[TMP11]] +; IS__TUNIT_NPM-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4 +; IS__TUNIT_NPM-NEXT: [[TMP14]] = add nsw i32 [[TMP13]], [[TMP10]] +; IS__TUNIT_NPM-NEXT: [[TMP15]] = add i32 [[TMP9]], [[TMP3]] +; IS__TUNIT_NPM-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP15]], [[TMP1]] +; IS__TUNIT_NPM-NEXT: br i1 [[TMP16]], label [[TMP6]], label [[TMP8]] +; +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@loop_trip_count_unbound +; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR15]] { +; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]] +; IS__CGSCC_OPM-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]] +; IS__CGSCC_OPM: 6: +; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i32 [ 0, [[TMP4:%.*]] ], [ [[TMP14:%.*]], [[TMP8]] ] +; IS__CGSCC_OPM-NEXT: ret i32 [[TMP7]] +; IS__CGSCC_OPM: 8: +; IS__CGSCC_OPM-NEXT: [[TMP9:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP8]] ], [ [[TMP0]], [[TMP4]] ] +; IS__CGSCC_OPM-NEXT: [[TMP10:%.*]] = phi i32 [ [[TMP14]], [[TMP8]] ], [ 0, [[TMP4]] ] +; IS__CGSCC_OPM-NEXT: [[TMP11:%.*]] = zext i32 [[TMP9]] to i64 +; IS__CGSCC_OPM-NEXT: [[TMP12:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[TMP11]] +; IS__CGSCC_OPM-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4 +; IS__CGSCC_OPM-NEXT: [[TMP14]] = add nsw i32 [[TMP13]], [[TMP10]] +; IS__CGSCC_OPM-NEXT: [[TMP15]] = add i32 [[TMP9]], [[TMP3]] +; IS__CGSCC_OPM-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP15]], [[TMP1]] +; IS__CGSCC_OPM-NEXT: br i1 [[TMP16]], label [[TMP6]], label [[TMP8]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@loop_trip_count_unbound +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR16:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]] +; IS__CGSCC_NPM-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]] +; IS__CGSCC_NPM: 6: +; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ 0, [[TMP4:%.*]] ], [ [[TMP14:%.*]], [[TMP8]] ] +; IS__CGSCC_NPM-NEXT: ret i32 [[TMP7]] +; IS__CGSCC_NPM: 8: +; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP8]] ], [ [[TMP0]], [[TMP4]] ] +; IS__CGSCC_NPM-NEXT: [[TMP10:%.*]] = phi i32 [ [[TMP14]], [[TMP8]] ], [ 0, [[TMP4]] ] +; IS__CGSCC_NPM-NEXT: [[TMP11:%.*]] = zext i32 [[TMP9]] to i64 +; IS__CGSCC_NPM-NEXT: [[TMP12:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[TMP11]] +; IS__CGSCC_NPM-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4 +; IS__CGSCC_NPM-NEXT: [[TMP14]] = add nsw i32 [[TMP13]], [[TMP10]] +; IS__CGSCC_NPM-NEXT: [[TMP15]] = add i32 [[TMP9]], [[TMP3]] +; IS__CGSCC_NPM-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP15]], [[TMP1]] +; IS__CGSCC_NPM-NEXT: br i1 [[TMP16]], label [[TMP6]], label [[TMP8]] ; %5 = icmp eq i32 %0, %1 br i1 %5, label %6, label %8 @@ -873,7 +923,7 @@ define i32 @loop_trip_dec(i32 %0, i32* nocapture readonly %1) local_unnamed_addr #0 { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@loop_trip_dec -; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr [[ATTR12]] { +; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR12]] { ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], -1 ; IS__TUNIT_OPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP14:%.*]] ; IS__TUNIT_OPM: 4: @@ -892,9 +942,9 @@ ; IS__TUNIT_OPM-NEXT: [[TMP15:%.*]] = phi i32 [ 0, [[TMP2:%.*]] ], [ [[TMP11]], [[TMP6]] ] ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP15]] ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@loop_trip_dec -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr [[ATTR12]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR12]] { ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], -1 ; IS__TUNIT_NPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP14:%.*]] ; IS__TUNIT_NPM: 4: @@ -915,7 +965,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@loop_trip_dec -; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr [[ATTR15]] { +; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR15]] { ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], -1 ; IS__CGSCC_OPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP14:%.*]] ; IS__CGSCC_OPM: 4: @@ -934,9 +984,9 @@ ; IS__CGSCC_OPM-NEXT: [[TMP15:%.*]] = phi i32 [ 0, [[TMP2:%.*]] ], [ [[TMP11]], [[TMP6]] ] ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP15]] ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@loop_trip_dec -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr [[ATTR15]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR15]] { ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], -1 ; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP14:%.*]] ; IS__CGSCC_NPM: 4: @@ -981,9 +1031,9 @@ ; multiple return define i32 @multiple_return(i32 %a) #0 { -; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn mustprogress ; IS__TUNIT____-LABEL: define {{[^@]+}}@multiple_return -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = icmp eq i32 [[A]], 0 ; IS__TUNIT____-NEXT: br i1 [[B]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: @@ -991,9 +1041,9 @@ ; IS__TUNIT____: f: ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn +; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn mustprogress ; IS__CGSCC____-LABEL: define {{[^@]+}}@multiple_return -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[B:%.*]] = icmp eq i32 [[A]], 0 ; IS__CGSCC____-NEXT: br i1 [[B]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: @@ -1015,34 +1065,34 @@ ; 15.1 (positive case) define void @unreachable_exit_positive1() #0 { -; IS__TUNIT_OPM: Function Attrs: noinline nounwind uwtable willreturn +; IS__TUNIT_OPM: Function Attrs: noinline nounwind uwtable willreturn mustprogress ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@unreachable_exit_positive1 -; IS__TUNIT_OPM-SAME: () [[ATTR9]] { -; IS__TUNIT_OPM-NEXT: tail call void @will_return() [[ATTR17]] +; IS__TUNIT_OPM-SAME: () #[[ATTR9]] { +; IS__TUNIT_OPM-NEXT: tail call void @will_return() #[[ATTR18]] ; IS__TUNIT_OPM-NEXT: ret void ; IS__TUNIT_OPM: unreachable_label: ; IS__TUNIT_OPM-NEXT: unreachable ; -; IS__TUNIT_NPM: Function Attrs: noinline nounwind uwtable willreturn +; IS__TUNIT_NPM: Function Attrs: noinline nounwind uwtable willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unreachable_exit_positive1 -; IS__TUNIT_NPM-SAME: () [[ATTR9]] { -; IS__TUNIT_NPM-NEXT: tail call void @will_return() [[ATTR19]] +; IS__TUNIT_NPM-SAME: () #[[ATTR9]] { +; IS__TUNIT_NPM-NEXT: tail call void @will_return() #[[ATTR21]] ; IS__TUNIT_NPM-NEXT: ret void ; IS__TUNIT_NPM: unreachable_label: ; IS__TUNIT_NPM-NEXT: unreachable ; -; IS__CGSCC_OPM: Function Attrs: noinline norecurse nounwind uwtable willreturn +; IS__CGSCC_OPM: Function Attrs: noinline norecurse nounwind uwtable willreturn mustprogress ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@unreachable_exit_positive1 -; IS__CGSCC_OPM-SAME: () [[ATTR11]] { -; IS__CGSCC_OPM-NEXT: tail call void @will_return() [[ATTR21]] +; IS__CGSCC_OPM-SAME: () #[[ATTR11]] { +; IS__CGSCC_OPM-NEXT: tail call void @will_return() #[[ATTR22]] ; IS__CGSCC_OPM-NEXT: ret void ; IS__CGSCC_OPM: unreachable_label: ; IS__CGSCC_OPM-NEXT: unreachable ; -; IS__CGSCC_NPM: Function Attrs: noinline norecurse nounwind uwtable willreturn +; IS__CGSCC_NPM: Function Attrs: noinline norecurse nounwind uwtable willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@unreachable_exit_positive1 -; IS__CGSCC_NPM-SAME: () [[ATTR11]] { -; IS__CGSCC_NPM-NEXT: tail call void @will_return() [[ATTR23]] +; IS__CGSCC_NPM-SAME: () #[[ATTR11]] { +; IS__CGSCC_NPM-NEXT: tail call void @will_return() #[[ATTR25]] ; IS__CGSCC_NPM-NEXT: ret void ; IS__CGSCC_NPM: unreachable_label: ; IS__CGSCC_NPM-NEXT: unreachable @@ -1058,7 +1108,7 @@ define i32 @unreachable_exit_positive2(i32) local_unnamed_addr #0 { ; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@unreachable_exit_positive2 -; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR1]] { +; IS__TUNIT_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] { ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1 ; IS__TUNIT_OPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]] ; IS__TUNIT_OPM: 3: @@ -1076,7 +1126,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unreachable_exit_positive2 -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR14:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1 ; IS__TUNIT_NPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]] ; IS__TUNIT_NPM: 3: @@ -1094,7 +1144,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@unreachable_exit_positive2 -; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1 ; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]] ; IS__CGSCC_OPM: 3: @@ -1112,7 +1162,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@unreachable_exit_positive2 -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR17:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1 ; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]] ; IS__CGSCC_NPM: 3: @@ -1154,16 +1204,16 @@ define void @unreachable_exit_negative1() #0 { ; IS__TUNIT____: Function Attrs: noinline noreturn nounwind uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@unreachable_exit_negative1 -; IS__TUNIT____-SAME: () [[ATTR5]] { -; IS__TUNIT____-NEXT: tail call void @exit(i32 noundef 0) [[ATTR4]] +; IS__TUNIT____-SAME: () #[[ATTR5]] { +; IS__TUNIT____-NEXT: tail call void @exit(i32 noundef 0) #[[ATTR4]] ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: unreachable_label: ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: noinline noreturn nounwind uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@unreachable_exit_negative1 -; IS__CGSCC____-SAME: () [[ATTR6]] { -; IS__CGSCC____-NEXT: tail call void @exit(i32 noundef 0) [[ATTR5]] +; IS__CGSCC____-SAME: () #[[ATTR6]] { +; IS__CGSCC____-NEXT: tail call void @exit(i32 noundef 0) #[[ATTR5]] ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: unreachable_label: ; IS__CGSCC____-NEXT: unreachable @@ -1177,27 +1227,49 @@ } define void @unreachable_exit_negative2() #0 { -; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable -; IS__TUNIT____-LABEL: define {{[^@]+}}@unreachable_exit_negative2 -; IS__TUNIT____-SAME: () [[ATTR14:#.*]] { -; IS__TUNIT____-NEXT: br label [[L1:%.*]] -; IS__TUNIT____: L1: -; IS__TUNIT____-NEXT: br label [[L2:%.*]] -; IS__TUNIT____: L2: -; IS__TUNIT____-NEXT: br label [[L1]] -; IS__TUNIT____: unreachable_label: -; IS__TUNIT____-NEXT: unreachable +; IS__TUNIT_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@unreachable_exit_negative2 +; IS__TUNIT_OPM-SAME: () #[[ATTR13:[0-9]+]] { +; IS__TUNIT_OPM-NEXT: br label [[L1:%.*]] +; IS__TUNIT_OPM: L1: +; IS__TUNIT_OPM-NEXT: br label [[L2:%.*]] +; IS__TUNIT_OPM: L2: +; IS__TUNIT_OPM-NEXT: br label [[L1]] +; IS__TUNIT_OPM: unreachable_label: +; IS__TUNIT_OPM-NEXT: unreachable ; -; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable -; IS__CGSCC____-LABEL: define {{[^@]+}}@unreachable_exit_negative2 -; IS__CGSCC____-SAME: () [[ATTR17:#.*]] { -; IS__CGSCC____-NEXT: br label [[L1:%.*]] -; IS__CGSCC____: L1: -; IS__CGSCC____-NEXT: br label [[L2:%.*]] -; IS__CGSCC____: L2: -; IS__CGSCC____-NEXT: br label [[L1]] -; IS__CGSCC____: unreachable_label: -; IS__CGSCC____-NEXT: unreachable +; IS__TUNIT_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unreachable_exit_negative2 +; IS__TUNIT_NPM-SAME: () #[[ATTR15:[0-9]+]] { +; IS__TUNIT_NPM-NEXT: br label [[L1:%.*]] +; IS__TUNIT_NPM: L1: +; IS__TUNIT_NPM-NEXT: br label [[L2:%.*]] +; IS__TUNIT_NPM: L2: +; IS__TUNIT_NPM-NEXT: br label [[L1]] +; IS__TUNIT_NPM: unreachable_label: +; IS__TUNIT_NPM-NEXT: unreachable +; +; IS__CGSCC_OPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@unreachable_exit_negative2 +; IS__CGSCC_OPM-SAME: () #[[ATTR16:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: br label [[L1:%.*]] +; IS__CGSCC_OPM: L1: +; IS__CGSCC_OPM-NEXT: br label [[L2:%.*]] +; IS__CGSCC_OPM: L2: +; IS__CGSCC_OPM-NEXT: br label [[L1]] +; IS__CGSCC_OPM: unreachable_label: +; IS__CGSCC_OPM-NEXT: unreachable +; +; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@unreachable_exit_negative2 +; IS__CGSCC_NPM-SAME: () #[[ATTR18:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: br label [[L1:%.*]] +; IS__CGSCC_NPM: L1: +; IS__CGSCC_NPM-NEXT: br label [[L2:%.*]] +; IS__CGSCC_NPM: L2: +; IS__CGSCC_NPM-NEXT: br label [[L1]] +; IS__CGSCC_NPM: unreachable_label: +; IS__CGSCC_NPM-NEXT: unreachable ; br label %L1 L1: @@ -1217,14 +1289,14 @@ define void @call_longjmp(i8* nocapture readnone %0) local_unnamed_addr #0 { ; IS__TUNIT____: Function Attrs: noinline noreturn nounwind uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_longjmp -; IS__TUNIT____-SAME: (i8* nocapture readnone [[TMP0:%.*]]) local_unnamed_addr [[ATTR5]] { -; IS__TUNIT____-NEXT: tail call void @llvm.eh.sjlj.longjmp(i8* noalias readnone [[TMP0]]) [[ATTR4]] +; IS__TUNIT____-SAME: (i8* nocapture readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR5]] { +; IS__TUNIT____-NEXT: tail call void @llvm.eh.sjlj.longjmp(i8* noalias readnone [[TMP0]]) #[[ATTR4]] ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: noinline noreturn nounwind uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_longjmp -; IS__CGSCC____-SAME: (i8* nocapture readnone [[TMP0:%.*]]) local_unnamed_addr [[ATTR6]] { -; IS__CGSCC____-NEXT: tail call void @llvm.eh.sjlj.longjmp(i8* noalias readnone [[TMP0]]) [[ATTR5]] +; IS__CGSCC____-SAME: (i8* nocapture readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR6]] { +; IS__CGSCC____-NEXT: tail call void @llvm.eh.sjlj.longjmp(i8* noalias readnone [[TMP0]]) #[[ATTR5]] ; IS__CGSCC____-NEXT: unreachable ; tail call void @llvm.eh.sjlj.longjmp(i8* %0) @@ -1243,47 +1315,89 @@ ; } define i32 @infinite_loop_inside_bounded_loop(i32 %n) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone -; IS__TUNIT____-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop -; IS__TUNIT____-SAME: (i32 [[N:%.*]]) [[ATTR16:#.*]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: br label [[FOR_COND:%.*]] -; IS__TUNIT____: for.cond: -; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[N]], 0 -; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] -; IS__TUNIT____: for.cond.cleanup: -; IS__TUNIT____-NEXT: br label [[FOR_END:%.*]] -; IS__TUNIT____: for.body: -; IS__TUNIT____-NEXT: br label [[WHILE_COND:%.*]] -; IS__TUNIT____: while.cond: -; IS__TUNIT____-NEXT: br label [[WHILE_BODY:%.*]] -; IS__TUNIT____: while.body: -; IS__TUNIT____-NEXT: br label [[WHILE_COND]] -; IS__TUNIT____: for.inc: -; IS__TUNIT____-NEXT: unreachable -; IS__TUNIT____: for.end: -; IS__TUNIT____-NEXT: ret i32 0 +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop +; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR15]] { +; IS__TUNIT_OPM-NEXT: entry: +; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] +; IS__TUNIT_OPM: for.cond: +; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[N]], 0 +; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] +; IS__TUNIT_OPM: for.cond.cleanup: +; IS__TUNIT_OPM-NEXT: br label [[FOR_END:%.*]] +; IS__TUNIT_OPM: for.body: +; IS__TUNIT_OPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__TUNIT_OPM: while.cond: +; IS__TUNIT_OPM-NEXT: br label [[WHILE_BODY:%.*]] +; IS__TUNIT_OPM: while.body: +; IS__TUNIT_OPM-NEXT: br label [[WHILE_COND]] +; IS__TUNIT_OPM: for.inc: +; IS__TUNIT_OPM-NEXT: unreachable +; IS__TUNIT_OPM: for.end: +; IS__TUNIT_OPM-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone -; IS__CGSCC____-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop -; IS__CGSCC____-SAME: (i32 [[N:%.*]]) [[ATTR19:#.*]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: br label [[FOR_COND:%.*]] -; IS__CGSCC____: for.cond: -; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[N]], 0 -; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] -; IS__CGSCC____: for.cond.cleanup: -; IS__CGSCC____-NEXT: br label [[FOR_END:%.*]] -; IS__CGSCC____: for.body: -; IS__CGSCC____-NEXT: br label [[WHILE_COND:%.*]] -; IS__CGSCC____: while.cond: -; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]] -; IS__CGSCC____: while.body: -; IS__CGSCC____-NEXT: br label [[WHILE_COND]] -; IS__CGSCC____: for.inc: -; IS__CGSCC____-NEXT: unreachable -; IS__CGSCC____: for.end: -; IS__CGSCC____-NEXT: ret i32 0 +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop +; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] +; IS__TUNIT_NPM: for.cond: +; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[N]], 0 +; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] +; IS__TUNIT_NPM: for.cond.cleanup: +; IS__TUNIT_NPM-NEXT: br label [[FOR_END:%.*]] +; IS__TUNIT_NPM: for.body: +; IS__TUNIT_NPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__TUNIT_NPM: while.cond: +; IS__TUNIT_NPM-NEXT: br label [[WHILE_BODY:%.*]] +; IS__TUNIT_NPM: while.body: +; IS__TUNIT_NPM-NEXT: br label [[WHILE_COND]] +; IS__TUNIT_NPM: for.inc: +; IS__TUNIT_NPM-NEXT: unreachable +; IS__TUNIT_NPM: for.end: +; IS__TUNIT_NPM-NEXT: ret i32 0 +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop +; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR18:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] +; IS__CGSCC_OPM: for.cond: +; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[N]], 0 +; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] +; IS__CGSCC_OPM: for.cond.cleanup: +; IS__CGSCC_OPM-NEXT: br label [[FOR_END:%.*]] +; IS__CGSCC_OPM: for.body: +; IS__CGSCC_OPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__CGSCC_OPM: while.cond: +; IS__CGSCC_OPM-NEXT: br label [[WHILE_BODY:%.*]] +; IS__CGSCC_OPM: while.body: +; IS__CGSCC_OPM-NEXT: br label [[WHILE_COND]] +; IS__CGSCC_OPM: for.inc: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: for.end: +; IS__CGSCC_OPM-NEXT: ret i32 0 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop +; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR20:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] +; IS__CGSCC_NPM: for.cond: +; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[N]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]] +; IS__CGSCC_NPM: for.cond.cleanup: +; IS__CGSCC_NPM-NEXT: br label [[FOR_END:%.*]] +; IS__CGSCC_NPM: for.body: +; IS__CGSCC_NPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__CGSCC_NPM: while.cond: +; IS__CGSCC_NPM-NEXT: br label [[WHILE_BODY:%.*]] +; IS__CGSCC_NPM: while.body: +; IS__CGSCC_NPM-NEXT: br label [[WHILE_COND]] +; IS__CGSCC_NPM: for.inc: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: for.end: +; IS__CGSCC_NPM-NEXT: ret i32 0 ; entry: br label %for.cond @@ -1327,7 +1441,7 @@ define i32 @bounded_nested_loops(i32 %n) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@bounded_nested_loops -; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) [[ATTR15]] { +; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR15]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_OPM: for.cond: @@ -1354,9 +1468,9 @@ ; IS__TUNIT_OPM: for.end: ; IS__TUNIT_OPM-NEXT: ret i32 [[ANS_0_LCSSA]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn mustprogress ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bounded_nested_loops -; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) [[ATTR17:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR18:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_NPM: for.cond: @@ -1385,7 +1499,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bounded_nested_loops -; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) [[ATTR18:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_OPM: for.cond: @@ -1412,9 +1526,9 @@ ; IS__CGSCC_OPM: for.end: ; IS__CGSCC_OPM-NEXT: ret i32 [[ANS_0_LCSSA]] ; -; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bounded_nested_loops -; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) [[ATTR20:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR21:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_NPM: for.cond: @@ -1489,67 +1603,129 @@ ; } define i32 @bounded_loop_inside_unbounded_loop(i32 %n) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone -; IS__TUNIT____-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop -; IS__TUNIT____-SAME: (i32 [[N:%.*]]) [[ATTR16]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: br label [[WHILE_COND:%.*]] -; IS__TUNIT____: while.cond: -; IS__TUNIT____-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP2:%.*]], [[FOR_END:%.*]] ] -; IS__TUNIT____-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[INC:%.*]], [[FOR_END]] ] -; IS__TUNIT____-NEXT: [[TMP:%.*]] = icmp sgt i32 [[N_ADDR_0]], -1 -; IS__TUNIT____-NEXT: [[SMAX:%.*]] = select i1 [[TMP]], i32 [[N_ADDR_0]], i32 -1 -; IS__TUNIT____-NEXT: [[INC]] = add nsw i32 [[N_ADDR_0]], 1 -; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 -; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]] -; IS__TUNIT____: while.body: -; IS__TUNIT____-NEXT: [[TMP1:%.*]] = add i32 [[ANS_0]], 1 -; IS__TUNIT____-NEXT: br label [[FOR_COND:%.*]] -; IS__TUNIT____: for.cond: -; IS__TUNIT____-NEXT: br i1 true, label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]] -; IS__TUNIT____: for.cond.cleanup: -; IS__TUNIT____-NEXT: [[TMP2]] = add i32 [[TMP1]], [[SMAX]] -; IS__TUNIT____-NEXT: br label [[FOR_END]] -; IS__TUNIT____: for.body: -; IS__TUNIT____-NEXT: unreachable -; IS__TUNIT____: for.inc: -; IS__TUNIT____-NEXT: unreachable -; IS__TUNIT____: for.end: -; IS__TUNIT____-NEXT: br label [[WHILE_COND]] -; IS__TUNIT____: while.end: -; IS__TUNIT____-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] -; IS__TUNIT____-NEXT: ret i32 [[ANS_0_LCSSA]] -; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone -; IS__CGSCC____-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop -; IS__CGSCC____-SAME: (i32 [[N:%.*]]) [[ATTR19]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: br label [[WHILE_COND:%.*]] -; IS__CGSCC____: while.cond: -; IS__CGSCC____-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP2:%.*]], [[FOR_END:%.*]] ] -; IS__CGSCC____-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[INC:%.*]], [[FOR_END]] ] -; IS__CGSCC____-NEXT: [[TMP:%.*]] = icmp sgt i32 [[N_ADDR_0]], -1 -; IS__CGSCC____-NEXT: [[SMAX:%.*]] = select i1 [[TMP]], i32 [[N_ADDR_0]], i32 -1 -; IS__CGSCC____-NEXT: [[INC]] = add nsw i32 [[N_ADDR_0]], 1 -; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 -; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]] -; IS__CGSCC____: while.body: -; IS__CGSCC____-NEXT: [[TMP1:%.*]] = add i32 [[ANS_0]], 1 -; IS__CGSCC____-NEXT: br label [[FOR_COND:%.*]] -; IS__CGSCC____: for.cond: -; IS__CGSCC____-NEXT: br i1 true, label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]] -; IS__CGSCC____: for.cond.cleanup: -; IS__CGSCC____-NEXT: [[TMP2]] = add i32 [[TMP1]], [[SMAX]] -; IS__CGSCC____-NEXT: br label [[FOR_END]] -; IS__CGSCC____: for.body: -; IS__CGSCC____-NEXT: unreachable -; IS__CGSCC____: for.inc: -; IS__CGSCC____-NEXT: unreachable -; IS__CGSCC____: for.end: -; IS__CGSCC____-NEXT: br label [[WHILE_COND]] -; IS__CGSCC____: while.end: -; IS__CGSCC____-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] -; IS__CGSCC____-NEXT: ret i32 [[ANS_0_LCSSA]] +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop +; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR15]] { +; IS__TUNIT_OPM-NEXT: entry: +; IS__TUNIT_OPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__TUNIT_OPM: while.cond: +; IS__TUNIT_OPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP2:%.*]], [[FOR_END:%.*]] ] +; IS__TUNIT_OPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[INC:%.*]], [[FOR_END]] ] +; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[N_ADDR_0]], -1 +; IS__TUNIT_OPM-NEXT: [[SMAX:%.*]] = select i1 [[TMP]], i32 [[N_ADDR_0]], i32 -1 +; IS__TUNIT_OPM-NEXT: [[INC]] = add nsw i32 [[N_ADDR_0]], 1 +; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 +; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]] +; IS__TUNIT_OPM: while.body: +; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = add i32 [[ANS_0]], 1 +; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] +; IS__TUNIT_OPM: for.cond: +; IS__TUNIT_OPM-NEXT: br i1 true, label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]] +; IS__TUNIT_OPM: for.cond.cleanup: +; IS__TUNIT_OPM-NEXT: [[TMP2]] = add i32 [[TMP1]], [[SMAX]] +; IS__TUNIT_OPM-NEXT: br label [[FOR_END]] +; IS__TUNIT_OPM: for.body: +; IS__TUNIT_OPM-NEXT: unreachable +; IS__TUNIT_OPM: for.inc: +; IS__TUNIT_OPM-NEXT: unreachable +; IS__TUNIT_OPM: for.end: +; IS__TUNIT_OPM-NEXT: br label [[WHILE_COND]] +; IS__TUNIT_OPM: while.end: +; IS__TUNIT_OPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] +; IS__TUNIT_OPM-NEXT: ret i32 [[ANS_0_LCSSA]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop +; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__TUNIT_NPM: while.cond: +; IS__TUNIT_NPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP2:%.*]], [[FOR_END:%.*]] ] +; IS__TUNIT_NPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[INC:%.*]], [[FOR_END]] ] +; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[N_ADDR_0]], -1 +; IS__TUNIT_NPM-NEXT: [[SMAX:%.*]] = select i1 [[TMP]], i32 [[N_ADDR_0]], i32 -1 +; IS__TUNIT_NPM-NEXT: [[INC]] = add nsw i32 [[N_ADDR_0]], 1 +; IS__TUNIT_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 +; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]] +; IS__TUNIT_NPM: while.body: +; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = add i32 [[ANS_0]], 1 +; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] +; IS__TUNIT_NPM: for.cond: +; IS__TUNIT_NPM-NEXT: br i1 true, label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]] +; IS__TUNIT_NPM: for.cond.cleanup: +; IS__TUNIT_NPM-NEXT: [[TMP2]] = add i32 [[TMP1]], [[SMAX]] +; IS__TUNIT_NPM-NEXT: br label [[FOR_END]] +; IS__TUNIT_NPM: for.body: +; IS__TUNIT_NPM-NEXT: unreachable +; IS__TUNIT_NPM: for.inc: +; IS__TUNIT_NPM-NEXT: unreachable +; IS__TUNIT_NPM: for.end: +; IS__TUNIT_NPM-NEXT: br label [[WHILE_COND]] +; IS__TUNIT_NPM: while.end: +; IS__TUNIT_NPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] +; IS__TUNIT_NPM-NEXT: ret i32 [[ANS_0_LCSSA]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop +; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__CGSCC_OPM: while.cond: +; IS__CGSCC_OPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP2:%.*]], [[FOR_END:%.*]] ] +; IS__CGSCC_OPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[INC:%.*]], [[FOR_END]] ] +; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[N_ADDR_0]], -1 +; IS__CGSCC_OPM-NEXT: [[SMAX:%.*]] = select i1 [[TMP]], i32 [[N_ADDR_0]], i32 -1 +; IS__CGSCC_OPM-NEXT: [[INC]] = add nsw i32 [[N_ADDR_0]], 1 +; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 +; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]] +; IS__CGSCC_OPM: while.body: +; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = add i32 [[ANS_0]], 1 +; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] +; IS__CGSCC_OPM: for.cond: +; IS__CGSCC_OPM-NEXT: br i1 true, label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]] +; IS__CGSCC_OPM: for.cond.cleanup: +; IS__CGSCC_OPM-NEXT: [[TMP2]] = add i32 [[TMP1]], [[SMAX]] +; IS__CGSCC_OPM-NEXT: br label [[FOR_END]] +; IS__CGSCC_OPM: for.body: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: for.inc: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: for.end: +; IS__CGSCC_OPM-NEXT: br label [[WHILE_COND]] +; IS__CGSCC_OPM: while.end: +; IS__CGSCC_OPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] +; IS__CGSCC_OPM-NEXT: ret i32 [[ANS_0_LCSSA]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop +; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR20]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__CGSCC_NPM: while.cond: +; IS__CGSCC_NPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP2:%.*]], [[FOR_END:%.*]] ] +; IS__CGSCC_NPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[INC:%.*]], [[FOR_END]] ] +; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[N_ADDR_0]], -1 +; IS__CGSCC_NPM-NEXT: [[SMAX:%.*]] = select i1 [[TMP]], i32 [[N_ADDR_0]], i32 -1 +; IS__CGSCC_NPM-NEXT: [[INC]] = add nsw i32 [[N_ADDR_0]], 1 +; IS__CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]] +; IS__CGSCC_NPM: while.body: +; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = add i32 [[ANS_0]], 1 +; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] +; IS__CGSCC_NPM: for.cond: +; IS__CGSCC_NPM-NEXT: br i1 true, label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]] +; IS__CGSCC_NPM: for.cond.cleanup: +; IS__CGSCC_NPM-NEXT: [[TMP2]] = add i32 [[TMP1]], [[SMAX]] +; IS__CGSCC_NPM-NEXT: br label [[FOR_END]] +; IS__CGSCC_NPM: for.body: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: for.inc: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: for.end: +; IS__CGSCC_NPM-NEXT: br label [[WHILE_COND]] +; IS__CGSCC_NPM: while.end: +; IS__CGSCC_NPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] +; IS__CGSCC_NPM-NEXT: ret i32 [[ANS_0_LCSSA]] ; entry: br label %while.cond @@ -1604,65 +1780,125 @@ ; } define i32 @nested_unbounded_loops(i32 %n) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone -; IS__TUNIT____-LABEL: define {{[^@]+}}@nested_unbounded_loops -; IS__TUNIT____-SAME: (i32 [[N:%.*]]) [[ATTR16]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: br label [[WHILE_COND:%.*]] -; IS__TUNIT____: while.cond: -; IS__TUNIT____-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1:%.*]], [[WHILE_END10:%.*]] ] -; IS__TUNIT____-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[WHILE_END10]] ] -; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 -; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[WHILE_END11:%.*]], label [[WHILE_BODY:%.*]] -; IS__TUNIT____: while.body: -; IS__TUNIT____-NEXT: br label [[WHILE_COND1:%.*]] -; IS__TUNIT____: while.cond1: -; IS__TUNIT____-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY4:%.*]] -; IS__TUNIT____: while.body4: -; IS__TUNIT____-NEXT: unreachable -; IS__TUNIT____: while.end: -; IS__TUNIT____-NEXT: [[TMP:%.*]] = add i32 [[N_ADDR_0]], -2 -; IS__TUNIT____-NEXT: br label [[WHILE_COND5:%.*]] -; IS__TUNIT____: while.cond5: -; IS__TUNIT____-NEXT: br i1 true, label [[WHILE_END10]], label [[WHILE_BODY8:%.*]] -; IS__TUNIT____: while.body8: -; IS__TUNIT____-NEXT: unreachable -; IS__TUNIT____: while.end10: -; IS__TUNIT____-NEXT: [[TMP1]] = add i32 [[TMP]], [[ANS_0]] -; IS__TUNIT____-NEXT: br label [[WHILE_COND]] -; IS__TUNIT____: while.end11: -; IS__TUNIT____-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] -; IS__TUNIT____-NEXT: ret i32 [[ANS_0_LCSSA]] -; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone -; IS__CGSCC____-LABEL: define {{[^@]+}}@nested_unbounded_loops -; IS__CGSCC____-SAME: (i32 [[N:%.*]]) [[ATTR19]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: br label [[WHILE_COND:%.*]] -; IS__CGSCC____: while.cond: -; IS__CGSCC____-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1:%.*]], [[WHILE_END10:%.*]] ] -; IS__CGSCC____-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[WHILE_END10]] ] -; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 -; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[WHILE_END11:%.*]], label [[WHILE_BODY:%.*]] -; IS__CGSCC____: while.body: -; IS__CGSCC____-NEXT: br label [[WHILE_COND1:%.*]] -; IS__CGSCC____: while.cond1: -; IS__CGSCC____-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY4:%.*]] -; IS__CGSCC____: while.body4: -; IS__CGSCC____-NEXT: unreachable -; IS__CGSCC____: while.end: -; IS__CGSCC____-NEXT: [[TMP:%.*]] = add i32 [[N_ADDR_0]], -2 -; IS__CGSCC____-NEXT: br label [[WHILE_COND5:%.*]] -; IS__CGSCC____: while.cond5: -; IS__CGSCC____-NEXT: br i1 true, label [[WHILE_END10]], label [[WHILE_BODY8:%.*]] -; IS__CGSCC____: while.body8: -; IS__CGSCC____-NEXT: unreachable -; IS__CGSCC____: while.end10: -; IS__CGSCC____-NEXT: [[TMP1]] = add i32 [[TMP]], [[ANS_0]] -; IS__CGSCC____-NEXT: br label [[WHILE_COND]] -; IS__CGSCC____: while.end11: -; IS__CGSCC____-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] -; IS__CGSCC____-NEXT: ret i32 [[ANS_0_LCSSA]] +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@nested_unbounded_loops +; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR15]] { +; IS__TUNIT_OPM-NEXT: entry: +; IS__TUNIT_OPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__TUNIT_OPM: while.cond: +; IS__TUNIT_OPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1:%.*]], [[WHILE_END10:%.*]] ] +; IS__TUNIT_OPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[WHILE_END10]] ] +; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 +; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END11:%.*]], label [[WHILE_BODY:%.*]] +; IS__TUNIT_OPM: while.body: +; IS__TUNIT_OPM-NEXT: br label [[WHILE_COND1:%.*]] +; IS__TUNIT_OPM: while.cond1: +; IS__TUNIT_OPM-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY4:%.*]] +; IS__TUNIT_OPM: while.body4: +; IS__TUNIT_OPM-NEXT: unreachable +; IS__TUNIT_OPM: while.end: +; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = add i32 [[N_ADDR_0]], -2 +; IS__TUNIT_OPM-NEXT: br label [[WHILE_COND5:%.*]] +; IS__TUNIT_OPM: while.cond5: +; IS__TUNIT_OPM-NEXT: br i1 true, label [[WHILE_END10]], label [[WHILE_BODY8:%.*]] +; IS__TUNIT_OPM: while.body8: +; IS__TUNIT_OPM-NEXT: unreachable +; IS__TUNIT_OPM: while.end10: +; IS__TUNIT_OPM-NEXT: [[TMP1]] = add i32 [[TMP]], [[ANS_0]] +; IS__TUNIT_OPM-NEXT: br label [[WHILE_COND]] +; IS__TUNIT_OPM: while.end11: +; IS__TUNIT_OPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] +; IS__TUNIT_OPM-NEXT: ret i32 [[ANS_0_LCSSA]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@nested_unbounded_loops +; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__TUNIT_NPM: while.cond: +; IS__TUNIT_NPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1:%.*]], [[WHILE_END10:%.*]] ] +; IS__TUNIT_NPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[WHILE_END10]] ] +; IS__TUNIT_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 +; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END11:%.*]], label [[WHILE_BODY:%.*]] +; IS__TUNIT_NPM: while.body: +; IS__TUNIT_NPM-NEXT: br label [[WHILE_COND1:%.*]] +; IS__TUNIT_NPM: while.cond1: +; IS__TUNIT_NPM-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY4:%.*]] +; IS__TUNIT_NPM: while.body4: +; IS__TUNIT_NPM-NEXT: unreachable +; IS__TUNIT_NPM: while.end: +; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = add i32 [[N_ADDR_0]], -2 +; IS__TUNIT_NPM-NEXT: br label [[WHILE_COND5:%.*]] +; IS__TUNIT_NPM: while.cond5: +; IS__TUNIT_NPM-NEXT: br i1 true, label [[WHILE_END10]], label [[WHILE_BODY8:%.*]] +; IS__TUNIT_NPM: while.body8: +; IS__TUNIT_NPM-NEXT: unreachable +; IS__TUNIT_NPM: while.end10: +; IS__TUNIT_NPM-NEXT: [[TMP1]] = add i32 [[TMP]], [[ANS_0]] +; IS__TUNIT_NPM-NEXT: br label [[WHILE_COND]] +; IS__TUNIT_NPM: while.end11: +; IS__TUNIT_NPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] +; IS__TUNIT_NPM-NEXT: ret i32 [[ANS_0_LCSSA]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nested_unbounded_loops +; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__CGSCC_OPM: while.cond: +; IS__CGSCC_OPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1:%.*]], [[WHILE_END10:%.*]] ] +; IS__CGSCC_OPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[WHILE_END10]] ] +; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 +; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END11:%.*]], label [[WHILE_BODY:%.*]] +; IS__CGSCC_OPM: while.body: +; IS__CGSCC_OPM-NEXT: br label [[WHILE_COND1:%.*]] +; IS__CGSCC_OPM: while.cond1: +; IS__CGSCC_OPM-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY4:%.*]] +; IS__CGSCC_OPM: while.body4: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: while.end: +; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = add i32 [[N_ADDR_0]], -2 +; IS__CGSCC_OPM-NEXT: br label [[WHILE_COND5:%.*]] +; IS__CGSCC_OPM: while.cond5: +; IS__CGSCC_OPM-NEXT: br i1 true, label [[WHILE_END10]], label [[WHILE_BODY8:%.*]] +; IS__CGSCC_OPM: while.body8: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: while.end10: +; IS__CGSCC_OPM-NEXT: [[TMP1]] = add i32 [[TMP]], [[ANS_0]] +; IS__CGSCC_OPM-NEXT: br label [[WHILE_COND]] +; IS__CGSCC_OPM: while.end11: +; IS__CGSCC_OPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] +; IS__CGSCC_OPM-NEXT: ret i32 [[ANS_0_LCSSA]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nested_unbounded_loops +; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR20]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: br label [[WHILE_COND:%.*]] +; IS__CGSCC_NPM: while.cond: +; IS__CGSCC_NPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1:%.*]], [[WHILE_END10:%.*]] ] +; IS__CGSCC_NPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[WHILE_END10]] ] +; IS__CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END11:%.*]], label [[WHILE_BODY:%.*]] +; IS__CGSCC_NPM: while.body: +; IS__CGSCC_NPM-NEXT: br label [[WHILE_COND1:%.*]] +; IS__CGSCC_NPM: while.cond1: +; IS__CGSCC_NPM-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY4:%.*]] +; IS__CGSCC_NPM: while.body4: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: while.end: +; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = add i32 [[N_ADDR_0]], -2 +; IS__CGSCC_NPM-NEXT: br label [[WHILE_COND5:%.*]] +; IS__CGSCC_NPM: while.cond5: +; IS__CGSCC_NPM-NEXT: br i1 true, label [[WHILE_END10]], label [[WHILE_BODY8:%.*]] +; IS__CGSCC_NPM: while.body8: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: while.end10: +; IS__CGSCC_NPM-NEXT: [[TMP1]] = add i32 [[TMP]], [[ANS_0]] +; IS__CGSCC_NPM-NEXT: br label [[WHILE_COND]] +; IS__CGSCC_NPM: while.end11: +; IS__CGSCC_NPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ] +; IS__CGSCC_NPM-NEXT: ret i32 [[ANS_0_LCSSA]] ; entry: br label %while.cond @@ -1726,9 +1962,9 @@ define void @non_loop_cycle(i32 %n) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@non_loop_cycle -; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) [[ATTR15]] { +; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR15]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) [[ATTR15]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR15]] ; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 ; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; IS__TUNIT_OPM: if.then: @@ -1736,7 +1972,7 @@ ; IS__TUNIT_OPM: if.else: ; IS__TUNIT_OPM-NEXT: br label [[ENTRY2:%.*]] ; IS__TUNIT_OPM: entry1: -; IS__TUNIT_OPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) [[ATTR15]] +; IS__TUNIT_OPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR15]] ; IS__TUNIT_OPM-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5 ; IS__TUNIT_OPM-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]] ; IS__TUNIT_OPM: if.then3: @@ -1744,7 +1980,7 @@ ; IS__TUNIT_OPM: if.else4: ; IS__TUNIT_OPM-NEXT: br label [[ENTRY2]] ; IS__TUNIT_OPM: entry2: -; IS__TUNIT_OPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) [[ATTR15]] +; IS__TUNIT_OPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR15]] ; IS__TUNIT_OPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5 ; IS__TUNIT_OPM-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]] ; IS__TUNIT_OPM: if.then7: @@ -1756,9 +1992,9 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_loop_cycle -; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) [[ATTR16]] { +; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { ; IS__TUNIT_NPM-NEXT: entry: -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) [[ATTR16]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR17]] ; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 ; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; IS__TUNIT_NPM: if.then: @@ -1766,7 +2002,7 @@ ; IS__TUNIT_NPM: if.else: ; IS__TUNIT_NPM-NEXT: br label [[ENTRY2:%.*]] ; IS__TUNIT_NPM: entry1: -; IS__TUNIT_NPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) [[ATTR16]] +; IS__TUNIT_NPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR17]] ; IS__TUNIT_NPM-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5 ; IS__TUNIT_NPM-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]] ; IS__TUNIT_NPM: if.then3: @@ -1774,7 +2010,7 @@ ; IS__TUNIT_NPM: if.else4: ; IS__TUNIT_NPM-NEXT: br label [[ENTRY2]] ; IS__TUNIT_NPM: entry2: -; IS__TUNIT_NPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) [[ATTR16]] +; IS__TUNIT_NPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR17]] ; IS__TUNIT_NPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5 ; IS__TUNIT_NPM-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]] ; IS__TUNIT_NPM: if.then7: @@ -1784,35 +2020,65 @@ ; IS__TUNIT_NPM: exit: ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone -; IS__CGSCC____-LABEL: define {{[^@]+}}@non_loop_cycle -; IS__CGSCC____-SAME: (i32 [[N:%.*]]) [[ATTR19]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) -; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 -; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] -; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: br label [[ENTRY1:%.*]] -; IS__CGSCC____: if.else: -; IS__CGSCC____-NEXT: br label [[ENTRY2:%.*]] -; IS__CGSCC____: entry1: -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) -; IS__CGSCC____-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5 -; IS__CGSCC____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]] -; IS__CGSCC____: if.then3: -; IS__CGSCC____-NEXT: br label [[EXIT:%.*]] -; IS__CGSCC____: if.else4: -; IS__CGSCC____-NEXT: br label [[ENTRY2]] -; IS__CGSCC____: entry2: -; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) -; IS__CGSCC____-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5 -; IS__CGSCC____-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]] -; IS__CGSCC____: if.then7: -; IS__CGSCC____-NEXT: br label [[EXIT]] -; IS__CGSCC____: if.else8: -; IS__CGSCC____-NEXT: br label [[ENTRY1]] -; IS__CGSCC____: exit: -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@non_loop_cycle +; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) +; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 +; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__CGSCC_OPM: if.then: +; IS__CGSCC_OPM-NEXT: br label [[ENTRY1:%.*]] +; IS__CGSCC_OPM: if.else: +; IS__CGSCC_OPM-NEXT: br label [[ENTRY2:%.*]] +; IS__CGSCC_OPM: entry1: +; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) +; IS__CGSCC_OPM-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5 +; IS__CGSCC_OPM-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]] +; IS__CGSCC_OPM: if.then3: +; IS__CGSCC_OPM-NEXT: br label [[EXIT:%.*]] +; IS__CGSCC_OPM: if.else4: +; IS__CGSCC_OPM-NEXT: br label [[ENTRY2]] +; IS__CGSCC_OPM: entry2: +; IS__CGSCC_OPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) +; IS__CGSCC_OPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5 +; IS__CGSCC_OPM-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]] +; IS__CGSCC_OPM: if.then7: +; IS__CGSCC_OPM-NEXT: br label [[EXIT]] +; IS__CGSCC_OPM: if.else8: +; IS__CGSCC_OPM-NEXT: br label [[ENTRY1]] +; IS__CGSCC_OPM: exit: +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@non_loop_cycle +; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR20]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) +; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__CGSCC_NPM: if.then: +; IS__CGSCC_NPM-NEXT: br label [[ENTRY1:%.*]] +; IS__CGSCC_NPM: if.else: +; IS__CGSCC_NPM-NEXT: br label [[ENTRY2:%.*]] +; IS__CGSCC_NPM: entry1: +; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) +; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]] +; IS__CGSCC_NPM: if.then3: +; IS__CGSCC_NPM-NEXT: br label [[EXIT:%.*]] +; IS__CGSCC_NPM: if.else4: +; IS__CGSCC_NPM-NEXT: br label [[ENTRY2]] +; IS__CGSCC_NPM: entry2: +; IS__CGSCC_NPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) +; IS__CGSCC_NPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]] +; IS__CGSCC_NPM: if.then7: +; IS__CGSCC_NPM-NEXT: br label [[EXIT]] +; IS__CGSCC_NPM: if.else8: +; IS__CGSCC_NPM-NEXT: br label [[ENTRY1]] +; IS__CGSCC_NPM: exit: +; IS__CGSCC_NPM-NEXT: ret void ; entry: %call = call i32 @fact_loop(i32 %n)