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 @@ -1,20 +1,19 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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 - define internal i32 @deref(i32* %x) nounwind { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; 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-LABEL: define {{[^@]+}}@deref -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]], align 4 @@ -23,14 +22,14 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; 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-LABEL: define {{[^@]+}}@deref -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]], align 4 @@ -41,44 +40,43 @@ %tmp2 = load i32, i32* %x, align 4 ret i32 %tmp2 } - define i32 @f(i32 %x) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f -; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X_ADDR]]) [[ATTR2:#.*]] +; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X_ADDR]]) #[[ATTR2:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f -; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 4 -; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]]) [[ATTR2:#.*]] +; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]]) #[[ATTR2:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP1]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) #[[ATTR1:[0-9]+]] { ; 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 -; 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: [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X_ADDR]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] ; ; 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:%.*]]) #[[ATTR0]] { ; 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 ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 4 -; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]]) [[ATTR1:#.*]] +; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[TMP1]] ; entry: @@ -87,3 +85,15 @@ %tmp1 = call i32 @deref( i32* %x_addr ) nounwind ret i32 %tmp1 } +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nounwind readonly willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nounwind readnone willreturn } +;. 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 @@ -1,17 +1,16 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 ; PR2498 - ; This test tries to convince CHECK about promoting the load from %A + 2, ; 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____-LABEL: define {{[^@]+}}@callee -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[A_0:%.*]] = load i32, i32* [[A]], align 4 ; IS__TUNIT____-NEXT: br label [[F:%.*]] @@ -24,7 +23,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[F:%.*]] ; IS__CGSCC____: T: @@ -38,31 +37,34 @@ ; Unconditonally load the element at %A %A.0 = load i32, i32* %A br i1 %C, label %T, label %F - T: ret i32 %A.0 - F: ; Load the element at offset two from %A. This should not be promoted! %A.2 = getelementptr i32, i32* %A, i32 2 %R = load i32, i32* %A.2 ret i32 %R } - define i32 @foo(i32* %A) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; 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____-SAME: (i32* nocapture nofree readonly [[A:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree readonly align 4 [[A]]) #[[ATTR1:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 [[X]] ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0]] { -; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]]) [[ATTR1:#.*]] +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[X]] ; %X = call i32 @callee(i1 false, i32* %A) ; [#uses=1] ret i32 %X } - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nosync nounwind readonly willreturn } +;. 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 @@ -1,30 +1,28 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - define internal fastcc i32 @hash(i32* %ts, i32 %mod) nounwind { ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@hash -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; entry: unreachable } - define void @encode(i32* %m, i32* %ts, i32* %new) nounwind { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; 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____-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; 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____-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -32,3 +30,8 @@ %0 = call fastcc i32 @hash( i32* %ts, i32 0 ) nounwind ; [#uses=0] unreachable } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +;. 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 @@ -1,13 +1,12 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - define internal fastcc i32 @term_SharingList(i32* %Term, i32* %List) nounwind { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@term_SharingList -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 false, label [[BB:%.*]], label [[BB5:%.*]] ; IS__CGSCC____: bb: @@ -17,19 +16,16 @@ ; entry: br i1 false, label %bb, label %bb5 - bb: ; preds = %entry %0 = call fastcc i32 @term_SharingList( i32* null, i32* %List ) nounwind ; [#uses=0] unreachable - bb5: ; preds = %entry ret i32 0 } - define i32 @term_Sharing(i32* %Term) nounwind { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@term_Sharing -; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[TERM:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[TERM:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 false, label [[BB_I:%.*]], label [[BB14:%.*]] ; IS__TUNIT____: bb.i: @@ -39,7 +35,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@term_Sharing -; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TERM:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TERM:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 false, label [[BB_I:%.*]], label [[BB14:%.*]] ; IS__CGSCC____: bb.i: @@ -49,11 +45,14 @@ ; entry: br i1 false, label %bb.i, label %bb14 - bb.i: ; preds = %entry %0 = call fastcc i32 @term_SharingList( i32* null, i32* null ) nounwind ; [#uses=0] ret i32 1 - bb14: ; preds = %entry ret i32 0 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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 @@ -11,7 +11,7 @@ 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-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-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:[0-9]+]] { ; IS________OPM-NEXT: bb: ; IS________OPM-NEXT: [[TMP:%.*]] = load <4 x i64>, <4 x i64>* [[ARG1]], align 32 ; IS________OPM-NEXT: store <4 x i64> [[TMP]], <4 x i64>* [[ARG]], align 32 @@ -19,7 +19,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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:[0-9]+]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[TMP:%.*]] = load <4 x i64>, <4 x i64>* [[ARG1]], align 32 ; IS________NPM-NEXT: store <4 x i64> [[TMP]], <4 x i64>* [[ARG]], align 32 @@ -34,52 +34,52 @@ define void @no_promote(<4 x i64>* %arg) #1 { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind uwtable willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@no_promote -; IS__TUNIT_OPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR3:#.*]] -; IS__TUNIT_OPM-NEXT: call fastcc void @no_promote_avx2(<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) [[ATTR4:#.*]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR3:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call fastcc void @no_promote_avx2(<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32 ; 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-LABEL: define {{[^@]+}}@no_promote -; IS__TUNIT_NPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR3:#.*]] -; IS__TUNIT_NPM-NEXT: call fastcc void @no_promote_avx2(<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* noalias nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) [[ATTR4:#.*]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR3:[0-9]+]] +; IS__TUNIT_NPM-NEXT: call fastcc void @no_promote_avx2(<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* noalias nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32 ; 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-LABEL: define {{[^@]+}}@no_promote -; IS__CGSCC_OPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR3:#.*]] -; IS__CGSCC_OPM-NEXT: call fastcc void @no_promote_avx2(<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) [[ATTR4:#.*]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR3:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call fastcc void @no_promote_avx2(<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) #[[ATTR4:[0-9]+]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32 ; 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-LABEL: define {{[^@]+}}@no_promote -; IS__CGSCC_NPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR3:#.*]] -; IS__CGSCC_NPM-NEXT: call fastcc void @no_promote_avx2(<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* noalias nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) [[ATTR4:#.*]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR3:[0-9]+]] +; IS__CGSCC_NPM-NEXT: call fastcc void @no_promote_avx2(<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* noalias nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) #[[ATTR4:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32 ; IS__CGSCC_NPM-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -98,7 +98,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-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-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: ; IS________OPM-NEXT: [[TMP:%.*]] = load <4 x i64>, <4 x i64>* [[ARG1]], align 32 ; IS________OPM-NEXT: store <4 x i64> [[TMP]], <4 x i64>* [[ARG]], align 32 @@ -106,7 +106,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[ARG:%.*]], <4 x i64> [[TMP0:%.*]]) #[[ATTR0]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[ARG1_PRIV:%.*]] = alloca <4 x i64>, align 32 ; IS________NPM-NEXT: store <4 x i64> [[TMP0]], <4 x i64>* [[ARG1_PRIV]], align 32 @@ -123,54 +123,54 @@ define void @promote(<4 x i64>* %arg) #0 { ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@promote -; IS__TUNIT_OPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_OPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR3]] -; IS__TUNIT_OPM-NEXT: call fastcc void @promote_avx2(<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) [[ATTR4]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR3]] +; IS__TUNIT_OPM-NEXT: call fastcc void @promote_avx2(<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) #[[ATTR4]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32 ; 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-LABEL: define {{[^@]+}}@promote -; IS__TUNIT_NPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR3]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR3]] ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load <4 x i64>, <4 x i64>* [[TMP]], align 32 -; IS__TUNIT_NPM-NEXT: call fastcc void @promote_avx2(<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64> [[TMP0]]) [[ATTR4]] +; IS__TUNIT_NPM-NEXT: call fastcc void @promote_avx2(<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64> [[TMP0]]) #[[ATTR4]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32 ; 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-LABEL: define {{[^@]+}}@promote -; IS__CGSCC_OPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR3]] -; IS__CGSCC_OPM-NEXT: call fastcc void @promote_avx2(<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) [[ATTR4]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR3]] +; IS__CGSCC_OPM-NEXT: call fastcc void @promote_avx2(<4 x i64>* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64>* nocapture nofree noundef nonnull readonly align 32 dereferenceable(32) [[TMP]]) #[[ATTR4]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32 ; 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-LABEL: define {{[^@]+}}@promote -; IS__CGSCC_NPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR3]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR3]] ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load <4 x i64>, <4 x i64>* [[TMP]], align 32 -; IS__CGSCC_NPM-NEXT: call fastcc void @promote_avx2(<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64> [[TMP0]]) [[ATTR4]] +; IS__CGSCC_NPM-NEXT: call fastcc void @promote_avx2(<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[TMP2]], <4 x i64> [[TMP0]]) #[[ATTR4]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32 ; IS__CGSCC_NPM-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -192,3 +192,16 @@ attributes #0 = { inlinehint norecurse nounwind uwtable "target-features"="+avx2" } attributes #1 = { nounwind uwtable } attributes #2 = { argmemonly nounwind } +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "target-features"="+avx2" } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR3:[0-9]+]] = { willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "target-features"="+avx2" } +; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR3:[0-9]+]] = { willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { nounwind willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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 @@ -13,7 +13,7 @@ ; ; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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:[0-9]+]] { ; IS________OPM-NEXT: bb: ; IS________OPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -21,7 +21,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64 ; IS________NPM-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64 @@ -39,54 +39,54 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6:#.*]] -; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7:#.*]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7:[0-9]+]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512 -; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6:#.*]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6:[0-9]+]] ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7:#.*]] +; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7:[0-9]+]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512 -; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6:#.*]] -; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7:#.*]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7:[0-9]+]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512 -; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6:#.*]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7:#.*]] +; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; IS__CGSCC_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -107,7 +107,7 @@ ; ; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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:[0-9]+]] { ; IS________OPM-NEXT: bb: ; IS________OPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -115,7 +115,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64 ; IS________NPM-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64 @@ -133,54 +133,54 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256 -; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256 -; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256 -; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; IS__CGSCC_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -201,7 +201,7 @@ ; ; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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: ; IS________OPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -209,7 +209,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR1]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64 ; IS________NPM-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64 @@ -227,54 +227,54 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256 -; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256 -; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR0]] { +; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256 -; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; IS__CGSCC_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -295,7 +295,7 @@ ; ; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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: ; IS________OPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -303,7 +303,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR0]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64 ; IS________NPM-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64 @@ -321,54 +321,54 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512 -; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512 -; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1]] { +; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512 -; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; IS__CGSCC_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -389,7 +389,7 @@ ; ; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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: ; IS________OPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -397,7 +397,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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: ; IS________NPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________NPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -413,52 +413,52 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256 -; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256 -; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256 -; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; IS__CGSCC_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -479,7 +479,7 @@ ; ; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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:[0-9]+]] { ; IS________OPM-NEXT: bb: ; IS________OPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -487,7 +487,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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:[0-9]+]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________NPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -503,52 +503,52 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256 -; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256 -; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1]] { +; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256 -; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; IS__CGSCC_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -569,7 +569,7 @@ ; ; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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:[0-9]+]] { ; IS________OPM-NEXT: bb: ; IS________OPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -577,7 +577,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR3:[0-9]+]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64 ; IS________NPM-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64 @@ -595,54 +595,54 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256 -; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256 -; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256 -; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; IS__CGSCC_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -663,7 +663,7 @@ ; ; IS________OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-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:[0-9]+]] { ; IS________OPM-NEXT: bb: ; IS________OPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64 ; IS________OPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64 @@ -671,7 +671,7 @@ ; ; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR4:[0-9]+]] { ; IS________NPM-NEXT: bb: ; IS________NPM-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64 ; IS________NPM-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64 @@ -689,54 +689,54 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn ; 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-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR3]] { ; IS__TUNIT_OPM-NEXT: bb: ; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__TUNIT_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__TUNIT_OPM-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256 -; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR3]] { ; IS__TUNIT_NPM-NEXT: bb: ; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__TUNIT_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__TUNIT_NPM-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256 -; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC_OPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR3]] { ; IS__CGSCC_OPM-NEXT: bb: ; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] -; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] +; IS__CGSCC_OPM-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; 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-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256 -; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC_NPM-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR3]] { ; IS__CGSCC_NPM-NEXT: bb: ; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) [[ATTR6]] +; IS__CGSCC_NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]] ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64 -; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) [[ATTR7]] +; IS__CGSCC_NPM-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR7]] ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64 ; IS__CGSCC_NPM-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2 ; IS__CGSCC_NPM-NEXT: ret void @@ -761,3 +761,22 @@ attributes #3 = { inlinehint norecurse nounwind uwtable "target-features"="+avx2" "min-legal-vector-width"="512" "prefer-vector-width"="256" } attributes #4 = { inlinehint norecurse nounwind uwtable "target-features"="+avx2" "min-legal-vector-width"="256" "prefer-vector-width"="256" } attributes #5 = { argmemonly nounwind } +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="512" "prefer-vector-width"="512" "target-features"="+avx512vl" } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx512vl" } +; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx512vl" } +; IS__TUNIT____: attributes #[[ATTR3:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx2" } +; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx2" } +; IS__TUNIT____: attributes #[[ATTR5:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR6:[0-9]+]] = { willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR7:[0-9]+]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="512" "prefer-vector-width"="512" "target-features"="+avx512vl" } +; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx512vl" } +; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx512vl" } +; IS__CGSCC____: attributes #[[ATTR3:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx2" } +; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind uwtable willreturn "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx2" } +; IS__CGSCC____: attributes #[[ATTR5:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR7:[0-9]+]] = { nounwind willreturn } +;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; In PR41658, argpromotion put an inalloca in a position that per the ; calling convention is passed in a register. This test verifies that ; we don't do that anymore. It also verifies that the combination of @@ -38,7 +38,7 @@ define void @exportedfun(%struct.a* %a) { ; CHECK-LABEL: define {{[^@]+}}@exportedfun ; CHECK-SAME: (%struct.a* nocapture nofree readnone [[A:%.*]]) { -; CHECK-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() [[ATTR1:#.*]] +; CHECK-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() #[[ATTR1:[0-9]+]] ; CHECK-NEXT: [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A:%.*]] }>, align 4 ; CHECK-NEXT: call x86_thiscallcc void @internalfun(%struct.a* noalias nocapture nofree readnone undef, <{ [[STRUCT_A]] }>* inalloca noundef nonnull align 4 dereferenceable(1) [[ARGMEM]]) ; CHECK-NEXT: call void @llvm.stackrestore(i8* nofree [[INALLOCA_SAVE]]) @@ -55,3 +55,7 @@ declare void @ext(<{ %struct.a }>* inalloca) declare i8* @llvm.stacksave() declare void @llvm.stackrestore(i8*) +;. +; CHECK: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind willreturn } +; CHECK: attributes #[[ATTR1]] = { willreturn } +;. 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 @@ -1,16 +1,17 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - %T = type { i32, i32, i32, i32 } @G = constant %T { i32 0, i32 0, i32 17, i32 25 } - +;. +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = 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____-LABEL: define {{[^@]+}}@test -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* @G, i64 0, i32 3 ; IS__TUNIT____-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* @G, i64 0, i32 2 @@ -21,7 +22,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* @G, i64 0, i32 3 ; IS__CGSCC____-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* @G, i64 0, i32 2 @@ -38,23 +39,28 @@ %v = add i32 %a, %b ret i32 %v } - define i32 @caller() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test() [[ATTR0]] +; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test() #[[ATTR0]] ; IS__TUNIT____-NEXT: ret i32 [[V]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[V:%.*]] = call i32 @test() [[ATTR1:#.*]] +; IS__CGSCC____-NEXT: [[V:%.*]] = call i32 @test() #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[V]] ; entry: %v = call i32 @test(%T* @G) ret i32 %v } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { willreturn } +;. 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 @@ -1,9 +1,8 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -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=9 -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 - define void @f() { ; IS________OPM-LABEL: define {{[^@]+}}@f() { ; IS________OPM-NEXT: entry: @@ -23,7 +22,6 @@ call void @g(i32* %a) ret void } - define internal void @g(i32* %a) { ; IS________OPM-LABEL: define {{[^@]+}}@g ; IS________OPM-SAME: (i32* noalias nocapture noundef nonnull readonly dereferenceable(4) [[A:%.*]]) { @@ -51,15 +49,13 @@ call void @z(i32 %aa) ret void } - declare void @z(i32) - ; 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-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-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:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4 ; IS__TUNIT_OPM-NEXT: [[B:%.*]] = load i64, i64* [[Y]], align 8 ; IS__TUNIT_OPM-NEXT: [[C:%.*]] = add i32 [[A]], 1 @@ -73,7 +69,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i64, align 8 ; IS__TUNIT_NPM-NEXT: store i64 [[TMP1]], i64* [[Y_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 @@ -91,7 +87,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; 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-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:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4 ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = load i64, i64* [[Y]], align 8 ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = add i32 [[A]], 1 @@ -105,7 +101,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i64, align 8 ; IS__CGSCC_NPM-NEXT: store i64 [[TMP1]], i64* [[Y_PRIV]], align 8 ; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 @@ -132,46 +128,45 @@ Return2: ret i32 %A } - define internal i32 @caller(i32* %A) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@caller -; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[B:%.*]] = alloca i64, align 8 ; IS__TUNIT_OPM-NEXT: store i64 1, i64* [[B]], align 8 -; IS__TUNIT_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__TUNIT_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:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[C]] ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@caller -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[A_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i64, align 8 ; IS__TUNIT_NPM-NEXT: store i64 1, i64* [[B]], align 8 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[A_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i64, i64* [[B]], align 8 -; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i64 [[TMP3]]) [[ATTR3:#.*]] +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i64 [[TMP3]]) #[[ATTR3:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32 [[C]] ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i64, align 8 ; IS__CGSCC_OPM-NEXT: store i64 1, i64* [[B]], align 8 -; 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: [[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:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[C]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[A_PRIV]], align 4 ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i64, align 8 ; IS__CGSCC_NPM-NEXT: store i64 1, i64* [[B]], align 8 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[A_PRIV]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i64, i64* [[B]], align 8 -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i64 [[TMP3]]) [[ATTR1:#.*]] +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i64 [[TMP3]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[C]] ; %B = alloca i64 @@ -179,40 +174,39 @@ %C = call i32 @test(i32* %A, i64* %B) ret i32 %C } - define i32 @callercaller() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@callercaller -; IS__TUNIT_OPM-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: store i32 2, i32* [[B]], align 4 -; IS__TUNIT_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4:#.*]] +; IS__TUNIT_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[X]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@callercaller -; IS__TUNIT_NPM-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 2, i32* [[B]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 -; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) [[ATTR4:#.*]] +; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32 [[X]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC_OPM-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR2:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 2, i32* [[B]], align 4 -; 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: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[X]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC_NPM-SAME: () [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 2, i32* [[B]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 -; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) [[ATTR2:#.*]] +; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[X]] ; %B = alloca i32 @@ -220,3 +214,20 @@ %X = call i32 @caller(i32* %B) ret i32 %X } +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nounwind willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nounwind readnone willreturn } +;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll @@ -1,13 +1,11 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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 ; ; FIXME: The GEP + BC + GEP solution we create is not great but correct. - declare void @use(i32* nocapture readonly %arg) - define void @caller() { ; IS________OPM-LABEL: define {{[^@]+}}@caller() { ; IS________OPM-NEXT: entry: @@ -42,7 +40,6 @@ call void @callee(i32* %arraydecay) ret void } - define internal void @callee(i32* noalias %arg) { ; IS________OPM-LABEL: define {{[^@]+}}@callee ; IS________OPM-SAME: (i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(12) [[ARG:%.*]]) { 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 @@ -1,19 +1,17 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -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=4 -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 - %struct.ss = type { i32, i64 } - ; 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-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 noundef nonnull byval(i32) align 4 dereferenceable(4) [[X:%.*]], i32 noundef [[I:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]], i32* noalias nocapture nofree noundef nonnull byval(i32) align 4 dereferenceable(4) [[X:%.*]], i32 noundef [[I:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[B]], i32 0, i32 0 +; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0 ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1 ; IS__TUNIT_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8 @@ -24,7 +22,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]], i32 noundef [[I:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]], i32 noundef [[I:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4 @@ -44,9 +42,9 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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 noundef nonnull byval(i32) align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]], i32* noalias nocapture nofree noundef nonnull byval(i32) align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[B]], i32 0, i32 0 +; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1 ; IS__CGSCC_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8 @@ -57,7 +55,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4 @@ -76,36 +74,33 @@ ; IS__CGSCC_NPM-NEXT: ret i32 [[A]] ; entry: - %tmp = getelementptr %struct.ss, %struct.ss* %b, i32 0, i32 0 %tmp1 = load i32, i32* %tmp, align 4 %tmp2 = add i32 %tmp1, 1 store i32 %tmp2, i32* %tmp, align 4 - store i32 %i, i32* %X %l = load i32, i32* %X %a = add i32 %l, %tmp2 ret i32 %a } - ; 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-LABEL: define {{[^@]+}}@test -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) [[ATTR0]] { +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8 ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 ; 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) #[[ATTR0]] ; IS__TUNIT_OPM-NEXT: ret i32 [[C]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test -; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 @@ -117,24 +112,24 @@ ; 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) #[[ATTR0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[C]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[TMP1]], align 8 ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__CGSCC_OPM-NEXT: store i64 2, i64* [[TMP4]], align 4 -; 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 noundef nonnull readnone byval(i32) align 4 dereferenceable(4) [[X]]) [[ATTR1:#.*]] +; 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 noundef nonnull readnone byval(i32) align 4 dereferenceable(4) [[X]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[C]] ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 @@ -146,7 +141,7 @@ ; IS__CGSCC_NPM-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i64, i64* [[S_0_1]], align 8 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4 -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]], i32 [[TMP2]]) [[ATTR2:#.*]] +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]], i32 [[TMP2]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[C]] ; entry: @@ -155,8 +150,16 @@ store i32 1, i32* %tmp1, align 8 %tmp4 = getelementptr %struct.ss, %struct.ss* %S, i32 0, i32 1 store i64 2, i64* %tmp4, align 4 - %c = call i32 @f(%struct.ss* byval(%struct.ss) %S, i32* byval(i32) %X, i32 zeroext 0) - ret i32 %c } +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { willreturn } +;. 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 @@ -1,14 +1,13 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -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=8 -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-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-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-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:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4 ; IS__TUNIT_OPM-NEXT: [[B:%.*]] = load i32, i32* [[Y]], align 4 ; IS__TUNIT_OPM-NEXT: [[C:%.*]] = add i32 [[A]], [[B]] @@ -16,7 +15,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[Y_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 @@ -28,7 +27,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; 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-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:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4 ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = load i32, i32* [[Y]], align 4 ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = add i32 [[A]], [[B]] @@ -36,7 +35,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP1]], i32* [[Y_PRIV]], align 4 ; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 @@ -51,46 +50,45 @@ %C = add i32 %A, %B ret i32 %C } - define internal i32 @caller(i32* %B) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@caller -; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[A]], align 4 -; IS__TUNIT_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__TUNIT_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:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[C]] ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@caller -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[A]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[A]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[B_PRIV]], align 4 -; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i32 [[TMP3]]) [[ATTR3:#.*]] +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i32 [[TMP3]]) #[[ATTR3:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32 [[C]] ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[A]], align 4 -; 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: [[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:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[C]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV]], align 4 ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[A]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[A]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[B_PRIV]], align 4 -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i32 [[TMP3]]) [[ATTR1:#.*]] +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32 [[TMP2]], i32 [[TMP3]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[C]] ; %A = alloca i32 @@ -98,40 +96,39 @@ %C = call i32 @test(i32* %A, i32* %B) ret i32 %C } - define i32 @callercaller() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@callercaller -; IS__TUNIT_OPM-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: store i32 2, i32* [[B]], align 4 -; IS__TUNIT_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4:#.*]] +; IS__TUNIT_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[X]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@callercaller -; IS__TUNIT_NPM-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 2, i32* [[B]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 -; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) [[ATTR4:#.*]] +; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32 [[X]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC_OPM-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR2:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 2, i32* [[B]], align 4 -; 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: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[X]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC_NPM-SAME: () [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 2, i32* [[B]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 -; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) [[ATTR2:#.*]] +; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 [[TMP1]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[X]] ; %B = alloca i32 @@ -139,4 +136,20 @@ %X = call i32 @caller(i32* %B) ret i32 %X } - +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nounwind willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nounwind readnone willreturn } +;. 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 @@ -1,17 +1,15 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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 - %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-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 noundef nonnull writeonly byval(i32) align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly byval(i32) align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[B]], i32 0, i32 0 +; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1 ; IS__CGSCC_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8 @@ -20,7 +18,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4 @@ -41,16 +39,14 @@ %tmp1 = load i32, i32* %tmp, align 4 %tmp2 = add i32 %tmp1, 1 store i32 %tmp2, i32* %tmp, align 4 - store i32 0, i32* %X ret void } - define i32 @test(i32* %X) { ; ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test -; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8 ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 @@ -61,7 +57,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 @@ -72,7 +68,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 @@ -90,3 +86,11 @@ call void @f(%struct.ss* byval(%struct.ss) %S, i32* byval(i32) %X) ret i32 0 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +;. 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 @@ -1,19 +1,16 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; 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-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" - %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-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-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[B]], i32 0, i32 0 +; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0 ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1 ; IS__TUNIT_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8 @@ -21,7 +18,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4 ; IS__TUNIT_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32* @@ -36,9 +33,9 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 32 dereferenceable(12) [[B:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[B]], i32 0, i32 0 +; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1 ; IS__CGSCC_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32 @@ -46,7 +43,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4 ; IS__CGSCC_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32* @@ -66,14 +63,12 @@ store i32 %tmp2, i32* %tmp, align 4 ret i32 %tmp1 } - - 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-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-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 32 dereferenceable(12) [[B:%.*]]) #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[B]], i32 0, i32 0 +; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0 ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1 ; IS__TUNIT_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32 @@ -81,7 +76,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@g -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4 ; IS__TUNIT_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32* @@ -96,9 +91,9 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 32 dereferenceable(12) [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[B]], i32 0, i32 0 +; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32 ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1 ; IS__CGSCC_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32 @@ -106,7 +101,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@g -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4 ; IS__CGSCC_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32* @@ -126,62 +121,60 @@ store i32 %tmp2, i32* %tmp, align 4 ret i32 %tmp2 } - - define i32 @main() nounwind { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@main -; IS__TUNIT_OPM-SAME: () [[ATTR0]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4 ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 ; 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]]) #[[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: [[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-LABEL: define {{[^@]+}}@main -; IS__TUNIT_NPM-SAME: () [[ATTR0]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 ; 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_CAST1:%.*]] = bitcast %struct.ss* [[S]] to i32* -; 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: [[TMP1:%.*]] = load i64, i64* [[S_0_12]], align 8 -; IS__TUNIT_NPM-NEXT: [[C0:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]]) [[ATTR0]] ; 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: [[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: [[TMP3:%.*]] = load i64, i64* [[S_0_1]], 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_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: [[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: [[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-LABEL: define {{[^@]+}}@main -; IS__CGSCC_OPM-SAME: () [[ATTR0]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[TMP1]], align 32 ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__CGSCC_OPM-NEXT: store i64 2, i64* [[TMP4]], align 4 -; IS__CGSCC_OPM-NEXT: [[C0:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readnone byval(%struct.ss) align 32 dereferenceable(12) [[S]]) [[ATTR1:#.*]] -; IS__CGSCC_OPM-NEXT: [[C1:%.*]] = call i32 @g(%struct.ss* noalias nocapture nofree noundef nonnull readnone byval(%struct.ss) align 32 dereferenceable(12) [[S]]) [[ATTR1]] +; IS__CGSCC_OPM-NEXT: [[C0:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_SS]]) align 32 dereferenceable(12) [[S]]) #[[ATTR1:[0-9]+]] +; IS__CGSCC_OPM-NEXT: [[C1:%.*]] = call i32 @g(%struct.ss* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_SS]]) align 32 dereferenceable(12) [[S]]) #[[ATTR1]] ; 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-LABEL: define {{[^@]+}}@main -; IS__CGSCC_NPM-SAME: () [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 @@ -192,12 +185,12 @@ ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[S_CAST]], align 32 ; IS__CGSCC_NPM-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i64, i64* [[S_0_1]], align 8 -; IS__CGSCC_NPM-NEXT: [[C0:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]]) [[ATTR1:#.*]] +; IS__CGSCC_NPM-NEXT: [[C0:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[S_CAST1:%.*]] = bitcast %struct.ss* [[S]] to i32* ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[S_CAST1]], align 32 ; IS__CGSCC_NPM-NEXT: [[S_0_12:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i64, i64* [[S_0_12]], align 32 -; IS__CGSCC_NPM-NEXT: [[C1:%.*]] = call i32 @g(i32 [[TMP2]], i64 [[TMP3]]) [[ATTR1]] +; IS__CGSCC_NPM-NEXT: [[C1:%.*]] = call i32 @g(i32 [[TMP2]], i64 [[TMP3]]) #[[ATTR1]] ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = add i32 [[C0]], [[C1]] ; IS__CGSCC_NPM-NEXT: ret i32 [[A]] ; @@ -212,5 +205,9 @@ %a = add i32 %c0, %c1 ret i32 %a } - - +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { nounwind willreturn } +;. 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 @@ -1,17 +1,19 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - @G1 = constant i32 0 @G2 = constant i32* @G1 - +;. +; CHECK: @[[G1:[a-zA-Z0-9_$"\\.-]+]] = constant i32 0 +; CHECK: @[[G2:[a-zA-Z0-9_$"\\.-]+]] = constant i32* @G1 +;. define internal i32 @test(i32** %x) { ; ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[Y:%.*]] = load i32*, i32** @G2, align 8 ; IS__TUNIT____-NEXT: [[Z:%.*]] = load i32, i32* [[Y]], align 4 @@ -19,7 +21,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[Y:%.*]] = load i32*, i32** @G2, align 8 ; IS__CGSCC____-NEXT: [[Z:%.*]] = load i32, i32* [[Y]], align 4 @@ -30,24 +32,28 @@ %z = load i32, i32* %y ret i32 %z } - define i32 @caller() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @test() [[ATTR0]] +; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @test() #[[ATTR0]] ; IS__TUNIT____-NEXT: ret i32 [[X]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @test() [[ATTR1:#.*]] +; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @test() #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[X]] ; entry: %x = call i32 @test(i32** @G2) ret i32 %x } - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { readonly willreturn } +;. 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 @@ -1,14 +1,13 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; 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____-LABEL: define {{[^@]+}}@callee -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: @@ -19,7 +18,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: @@ -30,32 +29,35 @@ ; entry: br i1 %C, label %T, label %F - T: ret i32 17 - F: %X = load i32, i32* %P ret i32 %X } - define i32 @foo(i1 %C, i32* %P) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) [[ATTR0]] { +; 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: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) #[[ATTR1:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 [[X]] ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) [[ATTR1:#.*]] +; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[X]] ; entry: %X = call i32 @callee(i1 %C, i32* %P) ret i32 %X } - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nosync nounwind readonly willreturn } +;. 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 @@ -1,15 +1,13 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -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=7 -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-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-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-SAME: (i1 noundef [[C:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: br label [[F:%.*]] ; IS__TUNIT_OPM: T: ; IS__TUNIT_OPM-NEXT: unreachable @@ -19,7 +17,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@callee -; IS__TUNIT_NPM-SAME: (i1 noundef [[C:%.*]], i32 [[TMP0:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i1 noundef [[C:%.*]], i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[P_PRIV:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[P_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: br label [[F:%.*]] @@ -31,7 +29,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br label [[F:%.*]] ; IS__CGSCC_OPM: T: ; IS__CGSCC_OPM-NEXT: unreachable @@ -41,7 +39,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callee -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[P_PRIV:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[P_PRIV]], align 4 ; IS__CGSCC_NPM-NEXT: br label [[F:%.*]] @@ -52,48 +50,45 @@ ; IS__CGSCC_NPM-NEXT: ret i32 [[X]] ; br i1 %C, label %T, label %F - T: ; preds = %0 ret i32 17 - F: ; preds = %0 %X = load i32, i32* %P ; [#uses=1] ret i32 %X } - define i32 @foo() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@foo -; IS__TUNIT_OPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: store i32 17, i32* [[A]], align 4 -; IS__TUNIT_OPM-NEXT: [[X:%.*]] = call i32 @callee(i1 noundef false, i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]]) [[ATTR2:#.*]] +; IS__TUNIT_OPM-NEXT: [[X:%.*]] = call i32 @callee(i1 noundef false, i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]]) #[[ATTR2:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[X]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@foo -; IS__TUNIT_NPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 17, i32* [[A]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[A]], align 4 -; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @callee(i1 noundef false, i32 [[TMP1]]) [[ATTR2:#.*]] +; IS__TUNIT_NPM-NEXT: [[X:%.*]] = call i32 @callee(i1 noundef false, i32 [[TMP1]]) #[[ATTR2:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32 [[X]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@foo -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 17, i32* [[A]], align 4 -; 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: [[X:%.*]] = call i32 @callee(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[X]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo -; IS__CGSCC_NPM-SAME: () [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 17, i32* [[A]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[A]], align 4 -; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @callee(i32 [[TMP1]]) [[ATTR1:#.*]] +; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @callee(i32 [[TMP1]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[X]] ; %A = alloca i32 ; [#uses=2] @@ -101,4 +96,15 @@ %X = call i32 @callee( i1 false, i32* %A ) ; [#uses=1] ret i32 %X } - +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nounwind readonly willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nounwind readnone willreturn } +;. 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 @@ -1,19 +1,17 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; 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 - %S = type { %S* } - ; 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____-LABEL: define {{[^@]+}}@zot -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] personality i32 (...)* @wibble { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] personality i32 (...)* @wibble { ; IS__TUNIT____-NEXT: bb: -; IS__TUNIT____-NEXT: call void @hoge() [[ATTR1:#.*]] +; IS__TUNIT____-NEXT: call void @hoge() #[[ATTR1:[0-9]+]] ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: bb1: ; IS__TUNIT____-NEXT: unreachable @@ -22,9 +20,9 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@zot -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] personality i32 (...)* @wibble { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] personality i32 (...)* @wibble { ; IS__CGSCC____-NEXT: bb: -; IS__CGSCC____-NEXT: call void @hoge() [[ATTR2:#.*]] +; IS__CGSCC____-NEXT: call void @hoge() #[[ATTR2:[0-9]+]] ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: bb1: ; IS__CGSCC____-NEXT: unreachable @@ -34,26 +32,23 @@ bb: invoke void @hoge() to label %bb1 unwind label %bb2 - bb1: unreachable - bb2: %tmp = landingpad { i8*, i32 } cleanup unreachable } - define internal void @hoge() { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@hoge -; IS__TUNIT____-SAME: () [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@hoge -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: bb: ; IS__CGSCC____-NEXT: unreachable ; @@ -62,45 +57,41 @@ %tmp1 = call fastcc i8* @spam(i1 (i8*)* @barney) unreachable } - define internal fastcc i8* @spam(i1 (i8*)* %arg) { ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@spam -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: bb: ; IS__CGSCC____-NEXT: unreachable ; bb: unreachable } - define internal i1 @eggs(i8* %arg) { bb: %tmp = call zeroext i1 @barney(i8* %arg) unreachable } - define internal i1 @barney(i8* %arg) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@barney -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: bb: ; IS__CGSCC____-NEXT: ret i1 undef ; bb: ret i1 undef } - 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:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: bb: ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inf_promote_caller -; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: bb: ; IS__CGSCC____-NEXT: [[TMP:%.*]] = alloca [[S:%.*]], align 8 ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = alloca [[S]], align 8 @@ -110,14 +101,12 @@ %tmp = alloca %S %tmp1 = alloca %S %tmp2 = call i32 @test_inf_promote_callee(%S* %tmp, %S* %tmp1) - ret i32 0 } - 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____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: bb: ; IS__CGSCC____-NEXT: unreachable ; @@ -127,8 +116,14 @@ %tmp3 = getelementptr %S, %S* %arg, i32 0, i32 0 %tmp4 = load %S*, %S** %tmp3 %tmp5 = call i32 @test_inf_promote_callee(%S* %tmp4, %S* %tmp2) - ret i32 0 } - declare i32 @wibble(...) +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { noreturn nounwind readnone } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { noreturn nounwind readnone } +;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/dbg.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/dbg.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/dbg.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/dbg.ll @@ -1,14 +1,12 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; 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 - declare void @sink(i32) - define internal void @test(i32** %X) !dbg !2 { ; CHECK-LABEL: define {{[^@]+}}@test -; CHECK-SAME: (i32** nocapture noundef nonnull readonly align 8 dereferenceable(8) [[X:%.*]]) [[DBG3:!dbg !.*]] { +; CHECK-SAME: (i32** nocapture noundef nonnull readonly align 8 dereferenceable(8) [[X:%.*]]) !dbg [[DBG3:![0-9]+]] { ; CHECK-NEXT: [[TMP1:%.*]] = load i32*, i32** [[X]], align 8 ; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 8 ; CHECK-NEXT: call void @sink(i32 [[TMP2]]) @@ -19,9 +17,7 @@ call void @sink(i32 %2) ret void } - %struct.pair = type { i32, i32 } - define internal void @test_byval(%struct.pair* byval(%struct.pair) %P) { ; CHECK-LABEL: define {{[^@]+}}@test_byval() { ; CHECK-NEXT: call void @sink(i32 noundef 0) @@ -30,33 +26,36 @@ call void @sink(i32 0) ret void } - define void @caller(i32** %Y, %struct.pair* %P) { ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller ; IS__TUNIT____-SAME: (i32** nocapture readonly [[Y:%.*]], %struct.pair* nocapture nofree readnone [[P:%.*]]) { -; IS__TUNIT____-NEXT: call void @test(i32** nocapture readonly align 8 [[Y]]), [[DBG4:!dbg !.*]] -; IS__TUNIT____-NEXT: call void @test_byval(), [[DBG5:!dbg !.*]] +; IS__TUNIT____-NEXT: call void @test(i32** nocapture readonly align 8 [[Y]]), !dbg [[DBG4:![0-9]+]] +; IS__TUNIT____-NEXT: call void @test_byval(), !dbg [[DBG5:![0-9]+]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller ; IS__CGSCC____-SAME: (i32** nocapture noundef nonnull readonly align 8 dereferenceable(8) [[Y:%.*]], %struct.pair* nocapture nofree readnone [[P:%.*]]) { -; IS__CGSCC____-NEXT: call void @test(i32** nocapture noundef nonnull readonly align 8 dereferenceable(8) [[Y]]), [[DBG4:!dbg !.*]] -; IS__CGSCC____-NEXT: call void @test_byval(), [[DBG5:!dbg !.*]] +; IS__CGSCC____-NEXT: call void @test(i32** nocapture noundef nonnull readonly align 8 dereferenceable(8) [[Y]]), !dbg [[DBG4:![0-9]+]] +; IS__CGSCC____-NEXT: call void @test_byval(), !dbg [[DBG5:![0-9]+]] ; IS__CGSCC____-NEXT: ret void ; call void @test(i32** %Y), !dbg !1 - call void @test_byval(%struct.pair* %P), !dbg !6 ret void } - - !llvm.module.flags = !{!0} !llvm.dbg.cu = !{!3} - !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = !DILocation(line: 8, scope: !2) !2 = distinct !DISubprogram(name: "test", file: !5, line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, scope: null) !3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !5) !5 = !DIFile(filename: "test.c", directory: "") !6 = !DILocation(line: 9, scope: !2) +;. +; CHECK: [[META0:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3} +; CHECK: [[META1:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly) +; CHECK: [[META2:![0-9]+]] = !DIFile(filename: "test.c", directory: "") +; CHECK: [[DBG3]] = distinct !DISubprogram(name: "test", scope: null, file: !2, line: 3, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1) +; CHECK: [[META4:![0-9]+]] = !DILocation(line: 8, scope: !3) +; CHECK: [[META5:![0-9]+]] = !DILocation(line: 9, scope: !3) +;. 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 @@ -1,43 +1,42 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM ; TODO: The old pass manager cgscc run is disabled as it causes a crash on windows which is under investigation: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23151 ; 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-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" - %union.u = type { x86_fp80 } %struct.s = type { double, i16, i8, [5 x i8] } - @b = internal global %struct.s { double 3.14, i16 9439, i8 25, [5 x i8] undef }, align 16 - %struct.Foo = type { i32, i64 } @a = internal global %struct.Foo { i32 1, i64 2 }, align 8 - +;. +; CHECK: @[[B:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_S:%.*]] { double 3.140000e+00, i16 9439, i8 25, [5 x i8] undef }, align 16 +; CHECK: @[[A:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_FOO:%.*]] { i32 1, i64 2 }, align 8 +;. define void @run() { ; IS________OPM: Function Attrs: nofree noreturn nosync nounwind readnone ; IS________OPM-LABEL: define {{[^@]+}}@run -; IS________OPM-SAME: () [[ATTR0:#.*]] { +; IS________OPM-SAME: () #[[ATTR0:[0-9]+]] { ; IS________OPM-NEXT: entry: -; IS________OPM-NEXT: [[TMP0:%.*]] = call i64 @CaptureAStruct(%struct.Foo* nocapture nofree noundef nonnull readonly align 8 dereferenceable(16) @a) [[ATTR0]] +; IS________OPM-NEXT: [[TMP0:%.*]] = call i64 @CaptureAStruct(%struct.Foo* nocapture nofree noundef nonnull readonly align 8 dereferenceable(16) @a) #[[ATTR0]] ; IS________OPM-NEXT: unreachable ; ; IS__TUNIT_NPM: Function Attrs: nofree noreturn nosync nounwind readnone ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@run -; IS__TUNIT_NPM-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[A_CAST:%.*]] = bitcast %struct.Foo* @a to i32* ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_CAST]], align 8 ; IS__TUNIT_NPM-NEXT: [[A_0_1:%.*]] = getelementptr [[STRUCT_FOO:%.*]], %struct.Foo* @a, i32 0, i32 1 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_0_1]], align 8 -; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = call i64 @CaptureAStruct(i32 [[TMP0]], i64 [[TMP1]]) [[ATTR0]] +; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = call i64 @CaptureAStruct(i32 [[TMP0]], i64 [[TMP1]]) #[[ATTR0]] ; IS__TUNIT_NPM-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@run -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[A_CAST:%.*]] = bitcast %struct.Foo* @a to i32* ; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_CAST]], align 8 @@ -52,11 +51,10 @@ call i64 @CaptureAStruct(%struct.Foo* @a) ret void } - define internal i8 @UseLongDoubleUnsafely(%union.u* byval(%union.u) align 16 %arg) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@UseLongDoubleUnsafely -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i8 undef ; @@ -66,29 +64,26 @@ %result = load i8, i8* %gep ret i8 %result } - 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____-LABEL: define {{[^@]+}}@UseLongDoubleSafely -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret x86_fp80 undef ; %gep = getelementptr inbounds %union.u, %union.u* %arg, i64 0, i32 0 %fp80 = load x86_fp80, x86_fp80* %gep ret x86_fp80 %fp80 } - define internal i64 @AccessPaddingOfStruct(%struct.Foo* byval(%struct.Foo) %a) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@AccessPaddingOfStruct -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i64 undef ; %p = bitcast %struct.Foo* %a to i64* %v = load i64, i64* %p ret i64 %v } - define internal i64 @CaptureAStruct(%struct.Foo* byval(%struct.Foo) %a) { ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@CaptureAStruct ; IS__CGSCC_OPM-SAME: (%struct.Foo* noalias nofree byval(%struct.Foo) [[A:%.*]]) @@ -104,7 +99,7 @@ ; ; IS________OPM: Function Attrs: nofree noreturn nosync nounwind readnone ; IS________OPM-LABEL: define {{[^@]+}}@CaptureAStruct -; IS________OPM-SAME: (%struct.Foo* noalias nofree noundef nonnull byval(%struct.Foo) align 8 dereferenceable(16) [[A:%.*]]) [[ATTR0]] { +; IS________OPM-SAME: (%struct.Foo* noalias nofree noundef nonnull byval([[STRUCT_FOO:%.*]]) align 8 dereferenceable(16) [[A:%.*]]) #[[ATTR0]] { ; IS________OPM-NEXT: entry: ; IS________OPM-NEXT: [[A_PTR:%.*]] = alloca %struct.Foo*, align 8 ; IS________OPM-NEXT: br label [[LOOP:%.*]] @@ -112,12 +107,12 @@ ; IS________OPM-NEXT: [[PHI:%.*]] = phi %struct.Foo* [ null, [[ENTRY:%.*]] ], [ [[GEP:%.*]], [[LOOP]] ] ; IS________OPM-NEXT: [[TMP0:%.*]] = phi %struct.Foo* [ [[A]], [[ENTRY]] ], [ [[TMP0]], [[LOOP]] ] ; IS________OPM-NEXT: store %struct.Foo* [[PHI]], %struct.Foo** [[A_PTR]], align 8 -; IS________OPM-NEXT: [[GEP]] = getelementptr [[STRUCT_FOO:%.*]], %struct.Foo* [[A]], i64 0 +; IS________OPM-NEXT: [[GEP]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A]], i64 0 ; IS________OPM-NEXT: br label [[LOOP]] ; ; IS__TUNIT_NPM: Function Attrs: nofree noreturn nosync nounwind readnone ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@CaptureAStruct -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_FOO:%.*]], align 8 ; IS__TUNIT_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.Foo* [[A_PRIV]] to i32* @@ -135,7 +130,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@CaptureAStruct -; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_FOO:%.*]], align 8 ; IS__CGSCC____-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.Foo* [[A_PRIV]] to i32* @@ -154,7 +149,6 @@ entry: %a_ptr = alloca %struct.Foo* br label %loop - loop: %phi = phi %struct.Foo* [ null, %entry ], [ %gep, %loop ] %0 = phi %struct.Foo* [ %a, %entry ], [ %0, %loop ] @@ -162,3 +156,10 @@ %gep = getelementptr %struct.Foo, %struct.Foo* %a, i64 0 br label %loop } +;. +; NOT_CGSCC_NPM: attributes #[[ATTR0:[0-9]+]] = { nofree noreturn nosync nounwind readnone } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse noreturn nosync nounwind readnone } +;. 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 @@ -1,18 +1,15 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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-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" - %struct.ss = type { i32, i32 } - ; 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____-LABEL: define {{[^@]+}}@f -; IS__TUNIT____-SAME: (%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[F0:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[S]], i32 0, i32 0 ; IS__TUNIT____-NEXT: [[F1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 @@ -23,7 +20,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@f -; IS__CGSCC____-SAME: (%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[F0:%.*]] = getelementptr [[STRUCT_SS:%.*]], %struct.ss* [[S]], i32 0, i32 0 ; IS__CGSCC____-NEXT: [[F1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 @@ -40,30 +37,29 @@ %r = add i32 %a, %b ret i32 %r } - define i32 @main() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@main -; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[S:%.*]] = alloca inalloca [[STRUCT_SS:%.*]], align 4 ; IS__TUNIT____-NEXT: [[F0:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 ; 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]]) #[[ATTR2:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 [[R]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@main -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[S:%.*]] = alloca inalloca [[STRUCT_SS:%.*]], align 4 ; IS__CGSCC____-NEXT: [[F0:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0 ; IS__CGSCC____-NEXT: [[F1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1 ; IS__CGSCC____-NEXT: store i32 1, i32* [[F0]], align 4 ; IS__CGSCC____-NEXT: store i32 2, i32* [[F1]], align 4 -; IS__CGSCC____-NEXT: [[R:%.*]] = call i32 @f(%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S]]) [[ATTR2:#.*]] +; IS__CGSCC____-NEXT: [[R:%.*]] = call i32 @f(%struct.ss* inalloca noalias nocapture nofree noundef nonnull align 4 dereferenceable(8) [[S]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[R]] ; entry: @@ -75,12 +71,11 @@ %r = call i32 @f(%struct.ss* inalloca %S) ret i32 %r } - ; 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____-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____-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: ; IS__CGSCC____-NEXT: ret i1 undef ; @@ -88,17 +83,16 @@ %c = icmp eq %struct.ss* %a, %b ret i1 %c } - define i32 @test() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 0 ; @@ -107,3 +101,12 @@ %c = call i1 @g(%struct.ss* %S, %struct.ss* inalloca %S) ret i32 0 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind readonly willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; Check that when argument promotion changes a function in some parent node of ; the call graph, any analyses that happened to be cached for that function are ; actually invalidated. We are using `demanded-bits` here because when printed @@ -8,13 +8,14 @@ ; now-invalid demanded bits. ; ; RUN: opt < %s -passes='function(print),attributor,function(print)' -S | FileCheck %s - @G = constant i32 0 - +;. +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = constant i32 0 +;. define internal i32 @a(i32* %x) { ; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn ; CHECK-LABEL: define {{[^@]+}}@a -; CHECK-SAME: () [[ATTR0:#.*]] { +; CHECK-SAME: () #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[V:%.*]] = load i32, i32* @G, align 4 ; CHECK-NEXT: ret i32 [[V]] @@ -23,27 +24,25 @@ %v = load i32, i32* %x ret i32 %v } - define i32 @b() { ; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn ; CHECK-LABEL: define {{[^@]+}}@b -; CHECK-SAME: () [[ATTR0]] { +; CHECK-SAME: () #[[ATTR0]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[V:%.*]] = call i32 @a() [[ATTR0]] +; CHECK-NEXT: [[V:%.*]] = call i32 @a() #[[ATTR0]] ; CHECK-NEXT: ret i32 [[V]] ; entry: %v = call i32 @a(i32* @G) ret i32 %v } - define i32 @c() { ; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn ; CHECK-LABEL: define {{[^@]+}}@c -; CHECK-SAME: () [[ATTR0]] { +; CHECK-SAME: () #[[ATTR0]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[V1:%.*]] = call i32 @a() [[ATTR0]] -; CHECK-NEXT: [[V2:%.*]] = call i32 @b() [[ATTR0]] +; CHECK-NEXT: [[V1:%.*]] = call i32 @a() #[[ATTR0]] +; CHECK-NEXT: [[V2:%.*]] = call i32 @b() #[[ATTR0]] ; CHECK-NEXT: [[RESULT:%.*]] = add i32 [[V1]], [[V2]] ; CHECK-NEXT: ret i32 [[RESULT]] ; @@ -53,3 +52,6 @@ %result = add i32 %v1, %v2 ret i32 %result } +;. +; CHECK: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. 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 @@ -1,19 +1,16 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -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=4 -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 - - define internal void @dead() { call i32 @test(i32* null, i32* null) ret void } - define internal i32 @test(i32* %X, i32* %Y) { ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] ; IS__CGSCC_OPM: live: ; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[X]], align 4 @@ -23,7 +20,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] ; IS__CGSCC_NPM: live: ; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 @@ -40,22 +37,21 @@ call void @dead() ret i32 1 } - define internal i32 @caller(i32* %B) { ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@caller -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[A]], align 4 -; 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: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR3:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 undef ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller -; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[A]], align 4 -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) [[ATTR2:#.*]] +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 undef ; %A = alloca i32 @@ -63,25 +59,42 @@ %C = call i32 @test(i32* %A, i32* %B) ret i32 %C } - define i32 @callercaller() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { -; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4 -; IS__CGSCC____-NEXT: store i32 2, i32* [[B]], align 4 -; IS__CGSCC____-NEXT: ret i32 0 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callercaller +; IS__CGSCC_OPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 +; IS__CGSCC_OPM-NEXT: store i32 2, i32* [[B]], align 4 +; IS__CGSCC_OPM-NEXT: ret i32 0 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 +; IS__CGSCC_NPM-NEXT: store i32 2, i32* [[B]], align 4 +; IS__CGSCC_NPM-NEXT: ret i32 0 ; %B = alloca i32 store i32 2, i32* %B %X = call i32 @caller(i32* %B) ret i32 %X } - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly } +;. 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 @@ -1,19 +1,16 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -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=8 -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 - - define internal void @dead() { call i32 @test(i32* null, i32* null) ret void } - define internal i32 @test(i32* %X, i32* %Y) { ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test -; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) [[ATTR0:#.*]] { +; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] ; NOT_CGSCC_NPM: live: ; NOT_CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 @@ -23,7 +20,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] ; IS__CGSCC_NPM: live: ; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 @@ -40,22 +37,21 @@ call void @dead() ret i32 1 } - define internal i32 @caller(i32* %B) { ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { ; NOT_CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; NOT_CGSCC_NPM-NEXT: store i32 1, i32* [[A]], align 4 -; 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: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]] ; NOT_CGSCC_NPM-NEXT: ret i32 undef ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[A]], align 4 -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR2:#.*]] +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 undef ; %A = alloca i32 @@ -63,30 +59,29 @@ %C = call i32 @test(i32* %B, i32* %A) ret i32 %C } - define i32 @callercaller() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller -; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: store i32 2, i32* [[B]], align 4 -; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR2:#.*]] +; 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-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 2, i32* [[B]], align 4 -; 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: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR3:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 0 ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 2, i32* [[B]], align 4 -; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR3:#.*]] +; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR3:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 0 ; %B = alloca i32 @@ -94,4 +89,18 @@ %X = call i32 @caller(i32* %B) ret i32 %X } - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nounwind willreturn writeonly } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nounwind willreturn writeonly } +;. 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 @@ -1,18 +1,15 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 ; PR36543 - ; Don't promote arguments of musttail callee - %T = type { i32, i32, i32, i32 } - define internal i32 @test(%T* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test -; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3 ; IS__TUNIT____-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* [[P]], i64 0, i32 2 ; IS__TUNIT____-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4 @@ -22,7 +19,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test -; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3 ; IS__CGSCC____-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* [[P]], i64 0, i32 2 ; IS__CGSCC____-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4 @@ -37,44 +34,40 @@ %v = add i32 %a, %b ret i32 %v } - define i32 @caller(%T* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; 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____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-NEXT: [[V:%.*]] = musttail call i32 @test(%T* nocapture nofree readonly [[P]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 [[V]] ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; 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:#.*]] +; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-NEXT: [[V:%.*]] = musttail call i32 @test(%T* nocapture nofree readonly [[P]]) #[[ATTR4:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[V]] ; %v = musttail call i32 @test(%T* %p) ret i32 %v } - ; 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____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 0 ; ret i32 0 } - define internal i32 @test2(%T* %p, i32 %p2) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC____-SAME: (%T* noalias nocapture nofree readnone [[P:%.*]], i32 [[P2:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (%T* noalias nocapture nofree readnone [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 undef ; %a.gep = getelementptr %T, %T* %p, i64 0, i32 3 @@ -85,37 +78,34 @@ %ca = musttail call i32 @foo(%T* undef, i32 %v) ret i32 %ca } - define i32 @caller2(%T* %g) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2 -; IS__TUNIT____-SAME: (%T* nocapture nofree readnone [[G:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@caller2 -; IS__CGSCC____-SAME: (%T* nocapture nofree readnone [[G:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (%T* nocapture nofree readnone [[G:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 0 ; %v = call i32 @test2(%T* %g, i32 0) ret i32 %v } - ; In the version above we can remove the call to foo completely. ; In the version below we keep the call and verify the return value ; is kept as well. - define i32 @bar(%T* %p, i32 %v) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar -; IS__TUNIT____-SAME: (%T* nocapture nofree nonnull writeonly dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: (%T* nocapture nofree nonnull writeonly dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR2:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: (%T* nocapture nofree nonnull writeonly dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: (%T* nocapture nofree nonnull writeonly dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: [[I32PTR:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 0 ; IS__CGSCC____-NEXT: store i32 [[V]], i32* [[I32PTR]], align 4 ; IS__CGSCC____-NEXT: ret i32 0 @@ -124,28 +114,27 @@ store i32 %v, i32* %i32ptr ret i32 0 } - define internal i32 @test2b(%T* %p, i32 %p2) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2b -; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__TUNIT____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3 ; IS__TUNIT____-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* [[P]], i64 0, i32 2 ; IS__TUNIT____-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4 ; IS__TUNIT____-NEXT: [[B:%.*]] = load i32, i32* [[B_GEP]], align 4 ; IS__TUNIT____-NEXT: [[V:%.*]] = add i32 [[A]], [[B]] -; IS__TUNIT____-NEXT: [[CA:%.*]] = musttail call i32 @bar(%T* undef, i32 [[V]]) [[ATTR5:#.*]] +; IS__TUNIT____-NEXT: [[CA:%.*]] = musttail call i32 @bar(%T* undef, i32 [[V]]) #[[ATTR5:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 [[CA]] ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2b -; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3 ; IS__CGSCC____-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* [[P]], i64 0, i32 2 ; IS__CGSCC____-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4 ; IS__CGSCC____-NEXT: [[B:%.*]] = load i32, i32* [[B_GEP]], align 4 ; IS__CGSCC____-NEXT: [[V:%.*]] = add i32 [[A]], [[B]] -; IS__CGSCC____-NEXT: [[CA:%.*]] = musttail call i32 @bar(%T* undef, i32 [[V]]) [[ATTR5:#.*]] +; IS__CGSCC____-NEXT: [[CA:%.*]] = musttail call i32 @bar(%T* undef, i32 [[V]]) #[[ATTR5:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[CA]] ; %a.gep = getelementptr %T, %T* %p, i64 0, i32 3 @@ -156,20 +145,36 @@ %ca = musttail call i32 @bar(%T* undef, i32 %v) ret i32 %ca } - define i32 @caller2b(%T* %g) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn ; 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____-SAME: (%T* nocapture nofree readonly [[G:%.*]]) #[[ATTR3]] { +; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) #[[ATTR6:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; 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 undef) [[ATTR6:#.*]] +; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[G:%.*]]) #[[ATTR3]] { +; IS__CGSCC____-NEXT: [[V:%.*]] = call i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) #[[ATTR6:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 0 ; %v = call i32 @test2b(%T* %g, i32 0) ret i32 %v } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR4]] = { nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR5]] = { nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR6]] = { nosync nounwind willreturn } +;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/naked_functions.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/naked_functions.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/naked_functions.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/naked_functions.ll @@ -1,13 +1,13 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; Don't promote paramaters of/arguments to naked functions - @g = common global i32 0, align 4 - +;. +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = common global i32 0, align 4 +;. define i32 @bar() { ; CHECK-LABEL: define {{[^@]+}}@bar() { ; CHECK-NEXT: entry: @@ -18,11 +18,10 @@ %call = call i32 @foo(i32* @g) ret i32 %call } - define internal i32 @foo(i32*) #0 { ; CHECK: Function Attrs: naked ; CHECK-LABEL: define {{[^@]+}}@foo -; CHECK-SAME: (i32* [[TMP0:%.*]]) [[ATTR0:#.*]] { +; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 ; CHECK-NEXT: call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""() @@ -33,6 +32,7 @@ call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""() unreachable } - - attributes #0 = { naked } +;. +; CHECK: attributes #[[ATTR0]] = { naked } +;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/nonzero-address-spaces.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/nonzero-address-spaces.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/nonzero-address-spaces.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/nonzero-address-spaces.ll @@ -1,34 +1,31 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; ArgumentPromotion should preserve the default function address space ; from the data layout. - target datalayout = "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8" - @g = common global i32 0, align 4 - +;. +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = common global i32 0, align 4 +;. define i32 @bar() { ; CHECK: Function Attrs: noreturn ; CHECK-LABEL: define {{[^@]+}}@bar -; CHECK-SAME: () addrspace(1) [[ATTR0:#.*]] { +; CHECK-SAME: () addrspace(1) #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[CALL:%.*]] = call addrspace(1) i32 @foo() [[ATTR0]] +; CHECK-NEXT: [[CALL:%.*]] = call addrspace(1) i32 @foo() #[[ATTR0]] ; CHECK-NEXT: unreachable ; - entry: %call = call i32 @foo(i32* @g) ret i32 %call } - define internal i32 @foo(i32*) { ; CHECK: Function Attrs: noreturn ; CHECK-LABEL: define {{[^@]+}}@foo -; CHECK-SAME: () addrspace(1) [[ATTR0]] { +; CHECK-SAME: () addrspace(1) #[[ATTR0]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 ; CHECK-NEXT: call addrspace(0) void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""() @@ -39,4 +36,6 @@ call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""() unreachable } - +;. +; CHECK: attributes #[[ATTR0]] = { noreturn } +;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/pr27568.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/pr27568.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/pr27568.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/pr27568.ll @@ -1,10 +1,9 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 triple = "x86_64-pc-windows-msvc" - define internal void @callee(i8*) { ; CHECK-LABEL: define {{[^@]+}}@callee() { ; CHECK-NEXT: entry: @@ -15,7 +14,6 @@ call void @thunk() ret void } - define void @test1() personality i32 (...)* @__CxxFrameHandler3 { ; CHECK-LABEL: define {{[^@]+}}@test1() personality i32 (...)* @__CxxFrameHandler3 { ; CHECK-NEXT: entry: @@ -31,17 +29,12 @@ entry: invoke void @thunk() to label %out unwind label %cpad - out: ret void - cpad: %pad = cleanuppad within none [] call void @callee(i8* null) [ "funclet"(token %pad) ] cleanupret from %pad unwind to caller } - - declare void @thunk() - declare i32 @__CxxFrameHandler3(...) 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 @@ -1,30 +1,32 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -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=5 -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 ; PR 32917 - @b = common local_unnamed_addr global i32 0, align 4 @a = common local_unnamed_addr global i32 0, align 4 - +;. +; CHECK: @[[B:[a-zA-Z0-9_$"\\.-]+]] = common local_unnamed_addr global i32 0, align 4 +; CHECK: @[[A:[a-zA-Z0-9_$"\\.-]+]] = 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____-LABEL: define {{[^@]+}}@fn2 -; IS__TUNIT____-SAME: () local_unnamed_addr [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] { ; 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]]) #[[ATTR0]] ; IS__TUNIT____-NEXT: ret i32 undef ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2 -; IS__CGSCC____-SAME: () local_unnamed_addr [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* @b, align 4 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = sext i32 [[TMP1]] to i64 ; IS__CGSCC____-NEXT: [[TMP3:%.*]] = inttoptr i64 [[TMP2]] to i32* -; IS__CGSCC____-NEXT: call fastcc void @fn1(i32* nocapture nofree nonnull readonly align 4 [[TMP3]]) [[ATTR1:#.*]] +; IS__CGSCC____-NEXT: call fastcc void @fn1(i32* nocapture nofree nonnull readonly align 4 [[TMP3]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 undef ; %1 = load i32, i32* @b, align 4 @@ -33,11 +35,10 @@ call fastcc void @fn1(i32* %3) ret i32 undef } - define internal fastcc void @fn1(i32* nocapture readonly) unnamed_addr { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn1 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 [[TMP0:%.*]]) unnamed_addr [[ATTR0]] { +; 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 ; IS__TUNIT____-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4 ; IS__TUNIT____-NEXT: store i32 [[TMP3]], i32* @a, align 4 @@ -45,7 +46,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 [[TMP0:%.*]]) unnamed_addr [[ATTR0]] { +; 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 ; IS__CGSCC____-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4 ; IS__CGSCC____-NEXT: store i32 [[TMP3]], i32* @a, align 4 @@ -56,3 +57,9 @@ store i32 %3, i32* @a, align 4 ret void } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nounwind willreturn } +;. 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 @@ -1,29 +1,25 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; Fix for PR33641. ArgumentPromotion removed the argument to bar but left the call to ; dbg.value which still used the removed argument. - ; The %p argument should be removed, and the use of it in dbg.value should be ; changed to undef. - %p_t = type i16* %fun_t = type void (%p_t)* - define void @foo() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = alloca void (i16*)*, align 8 ; IS__CGSCC____-NEXT: store void (i16*)* @bar, void (i16*)** [[TMP]], align 8 ; IS__CGSCC____-NEXT: ret void @@ -32,29 +28,25 @@ store %fun_t @bar, %fun_t* %tmp ret void } - define internal void @bar(%p_t %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-SAME: (i16* nocapture nofree readnone [[P:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], metadata [[META3:![0-9]+]], metadata !DIExpression()) #[[ATTR2:[0-9]+]], !dbg [[DBG5:![0-9]+]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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 !.*]] +; IS__CGSCC____-SAME: (i16* nocapture nofree readnone [[P:%.*]]) #[[ATTR1:[0-9]+]] { +; IS__CGSCC____-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], metadata [[META3:![0-9]+]], metadata !DIExpression()) #[[ATTR3:[0-9]+]], !dbg [[DBG5:![0-9]+]] ; IS__CGSCC____-NEXT: ret void ; call void @llvm.dbg.value(metadata %p_t %p, metadata !4, metadata !5), !dbg !6 ret void } - declare void @llvm.dbg.value(metadata, metadata, metadata) - !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!2} - !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1) !1 = !DIFile(filename: "test.c", directory: "") !2 = !{i32 2, !"Debug Info Version", i32 3} @@ -62,3 +54,20 @@ !4 = !DILocalVariable(name: "p", scope: !3) !5 = !DIExpression() !6 = !DILocation(line: 1, column: 1, scope: !3) +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC____: attributes #[[ATTR3]] = { willreturn } +;. +; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug) +; CHECK: [[META1:![0-9]+]] = !DIFile(filename: "test.c", directory: "") +; CHECK: [[META2:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3} +; CHECK: [[META3:![0-9]+]] = !DILocalVariable(name: "p", scope: !4) +; CHECK: [[META4:![0-9]+]] = distinct !DISubprogram(name: "bar", scope: null, spFlags: DISPFlagDefinition, unit: !0) +; CHECK: [[META5:![0-9]+]] = !DILocation(line: 1, column: 1, scope: !4) +;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll @@ -1,12 +1,10 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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-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" - ; Checks if !prof metadata is corret in deadargelim. - define void @caller() #0 { ; IS________OPM-LABEL: define {{[^@]+}}@caller() { ; IS________OPM-NEXT: [[X:%.*]] = alloca i32, align 4 @@ -26,7 +24,6 @@ call void @promote_i32_ptr(i32* %x), !prof !0 ret void } - define internal void @promote_i32_ptr(i32* %xp) { ; IS________OPM-LABEL: define {{[^@]+}}@promote_i32_ptr ; IS________OPM-SAME: (i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[XP:%.*]]) { @@ -46,7 +43,8 @@ call void @use_i32(i32 %x) ret void } - declare void @use_i32(i32) - !0 = !{!"branch_weights", i32 30} +;. +; CHECK: [[META0:![0-9]+]] = !{!"branch_weights", i32 30} +;. 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 @@ -1,38 +1,42 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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 - ; PR17906 ; When we promote two arguments in a single function with different types, ; before the fix, we used the same tag for the newly-created two loads. ; This testing case makes sure that we correctly transfer the tbaa tags from the ; original loads to the newly-created loads when promoting pointer arguments. - @a = global i32* null, align 8 @e = global i32** @a, align 8 @g = global i32 0, align 4 @c = global i64 0, align 8 @d = global i8 0, align 1 - +;. +; CHECK: @[[A:[a-zA-Z0-9_$"\\.-]+]] = global i32* null, align 8 +; CHECK: @[[E:[a-zA-Z0-9_$"\\.-]+]] = global i32** @a, align 8 +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = global i32 0, align 4 +; CHECK: @[[C:[a-zA-Z0-9_$"\\.-]+]] = global i64 0, align 8 +; CHECK: @[[D:[a-zA-Z0-9_$"\\.-]+]] = 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____-LABEL: define {{[^@]+}}@fn -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P1:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* @g, align 4, [[TBAA0:!tbaa !.*]] +; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* @g, align 4, !tbaa [[TBAA0:![0-9]+]] ; IS__TUNIT____-NEXT: [[CONV1:%.*]] = trunc i32 [[TMP0]] to i8 -; IS__TUNIT____-NEXT: store i8 [[CONV1]], i8* @d, align 1, [[TBAA4:!tbaa !.*]] +; IS__TUNIT____-NEXT: store i8 [[CONV1]], i8* @d, align 1, !tbaa [[TBAA4:![0-9]+]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* @g, align 4, [[TBAA0:!tbaa !.*]] +; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* @g, align 4, !tbaa [[TBAA0:![0-9]+]] ; IS__CGSCC____-NEXT: [[CONV1:%.*]] = trunc i32 [[TMP0]] to i8 -; IS__CGSCC____-NEXT: store i8 [[CONV1]], i8* @d, align 1, [[TBAA4:!tbaa !.*]] +; IS__CGSCC____-NEXT: store i8 [[CONV1]], i8* @d, align 1, !tbaa [[TBAA4:![0-9]+]] ; IS__CGSCC____-NEXT: ret void ; entry: @@ -43,28 +47,27 @@ store i8 %conv1, i8* @d, align 1, !tbaa !7 ret void } - define i32 @main() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@main -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32**, i32*** @e, align 8, [[TBAA5:!tbaa !.*]] -; 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: [[TMP0:%.*]] = load i32**, i32*** @e, align 8, !tbaa [[TBAA5:![0-9]+]] +; IS__TUNIT____-NEXT: store i32* @g, i32** [[TMP0]], align 8, !tbaa [[TBAA5]] +; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32*, i32** @a, align 8, !tbaa [[TBAA5]] +; IS__TUNIT____-NEXT: store i32 1, i32* [[TMP1]], align 4, !tbaa [[TBAA0]] +; IS__TUNIT____-NEXT: call fastcc void @fn(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) @g) #[[ATTR0]] ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@main -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32**, i32*** @e, align 8, [[TBAA5:!tbaa !.*]] -; IS__CGSCC____-NEXT: store i32* @g, i32** [[TMP0]], align 8, [[TBAA5]] -; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32*, i32** @a, align 8, [[TBAA5]] -; IS__CGSCC____-NEXT: store i32 1, i32* [[TMP1]], align 4, [[TBAA0]] -; IS__CGSCC____-NEXT: call fastcc void @fn() [[ATTR1:#.*]] +; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32**, i32*** @e, align 8, !tbaa [[TBAA5:![0-9]+]] +; IS__CGSCC____-NEXT: store i32* @g, i32** [[TMP0]], align 8, !tbaa [[TBAA5]] +; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32*, i32** @a, align 8, !tbaa [[TBAA5]] +; IS__CGSCC____-NEXT: store i32 1, i32* [[TMP1]], align 4, !tbaa [[TBAA0]] +; IS__CGSCC____-NEXT: call fastcc void @fn() #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 0 ; entry: @@ -73,10 +76,8 @@ %1 = load i32*, i32** @a, align 8, !tbaa !8 store i32 1, i32* %1, align 4, !tbaa !5 call fastcc void @fn(i32* @g, i64* @c) - ret i32 0 } - !1 = !{!2, !2, i64 0} !2 = !{!"long", !3, i64 0} !3 = !{!"omnipotent char", !4, i64 0} @@ -86,4 +87,17 @@ !7 = !{!3, !3, i64 0} !8 = !{!9, !9, i64 0} !9 = !{!"any pointer", !3, i64 0} - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nounwind willreturn } +;. +; CHECK: [[META0:![0-9]+]] = !{!1, !1, i64 0} +; CHECK: [[META1:![0-9]+]] = !{!"int", !2, i64 0} +; CHECK: [[META2:![0-9]+]] = !{!"omnipotent char", !3, i64 0} +; CHECK: [[META3:![0-9]+]] = !{!"Simple C/C++ TBAA"} +; CHECK: [[META4:![0-9]+]] = !{!2, !2, i64 0} +; CHECK: [[META5:![0-9]+]] = !{!6, !6, i64 0} +; CHECK: [[META6:![0-9]+]] = !{!"any pointer", !2, i64 0} +;. 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 @@ -1,17 +1,15 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -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=4 -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:w-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc" - define internal void @add({i32, i32}* %this, i32* sret(i32) %r) { ; ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn ; 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-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:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0 ; IS__TUNIT_OPM-NEXT: [[BP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 1 ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = load i32, i32* [[AP]], align 8 @@ -22,7 +20,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn ; 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-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:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0 ; IS__TUNIT_NPM-NEXT: [[BP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 1 ; IS__TUNIT_NPM-NEXT: [[A:%.*]] = load i32, i32* [[AP]], align 8 @@ -33,7 +31,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; 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-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:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: [[BP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 1 ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = load i32, i32* [[AP]], align 8 @@ -44,7 +42,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; 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-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:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0 ; IS__CGSCC_NPM-NEXT: [[BP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 1 ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = load i32, i32* [[AP]], align 8 @@ -61,43 +59,50 @@ store i32 %ab, i32* %r ret void } - define void @f() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f -; IS__TUNIT_OPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: [[R:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: [[PAIR:%.*]] = alloca { i32, i32 }, align 8 -; 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: 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:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f -; IS__TUNIT_NPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[R:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: [[PAIR:%.*]] = alloca { i32, i32 }, align 8 -; 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: 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:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[R:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: [[PAIR:%.*]] = alloca { i32, i32 }, align 8 -; 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: 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:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f -; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[R:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: [[PAIR:%.*]] = alloca { i32, i32 }, align 8 -; IS__CGSCC_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__CGSCC_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:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret void ; %r = alloca i32 %pair = alloca {i32, i32} - call void @add({i32, i32}* %pair, i32* sret(i32) %r) ret void } +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn } +;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/tail.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/tail.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/tail.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/tail.ll @@ -1,19 +1,15 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; 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 ; PR14710 - target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" - %pair = type { i32, i32 } - declare i8* @foo(%pair*) - define internal void @bar(%pair* byval(%pair) %Data) { ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@bar -; IS__TUNIT_OPM-SAME: (%pair* noalias nonnull byval(%pair) dereferenceable(8) [[DATA:%.*]]) { +; IS__TUNIT_OPM-SAME: (%pair* noalias nonnull byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) { ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = tail call i8* @foo(%pair* nonnull dereferenceable(8) [[DATA]]) ; IS__TUNIT_OPM-NEXT: ret void ; @@ -28,7 +24,7 @@ ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar -; IS__CGSCC_OPM-SAME: (%pair* noalias noundef nonnull byval(%pair) dereferenceable(8) [[DATA:%.*]]) { +; IS__CGSCC_OPM-SAME: (%pair* noalias noundef nonnull byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) { ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = tail call i8* @foo(%pair* noundef nonnull dereferenceable(8) [[DATA]]) ; IS__CGSCC_OPM-NEXT: ret void ; @@ -45,25 +41,24 @@ tail call i8* @foo(%pair* %Data) ret void } - define void @zed(%pair* byval(%pair) %Data) { ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@zed -; IS__TUNIT_OPM-SAME: (%pair* noalias nocapture nonnull readonly byval(%pair) dereferenceable(8) [[DATA:%.*]]) { -; IS__TUNIT_OPM-NEXT: call void @bar(%pair* noalias nocapture nonnull readonly byval(%pair) dereferenceable(8) [[DATA]]) +; IS__TUNIT_OPM-SAME: (%pair* noalias nocapture nonnull readonly byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) { +; IS__TUNIT_OPM-NEXT: call void @bar(%pair* noalias nocapture nonnull readonly byval([[PAIR]]) dereferenceable(8) [[DATA]]) ; IS__TUNIT_OPM-NEXT: ret void ; ; IS________NPM-LABEL: define {{[^@]+}}@zed -; IS________NPM-SAME: (%pair* noalias nocapture nonnull readonly byval(%pair) dereferenceable(8) [[DATA:%.*]]) { +; IS________NPM-SAME: (%pair* noalias nocapture nonnull readonly byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) { ; IS________NPM-NEXT: [[DATA_CAST:%.*]] = bitcast %pair* [[DATA]] to i32* ; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[DATA_CAST]], align 1 -; IS________NPM-NEXT: [[DATA_0_1:%.*]] = getelementptr [[PAIR:%.*]], %pair* [[DATA]], i32 0, i32 1 +; IS________NPM-NEXT: [[DATA_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA]], i32 0, i32 1 ; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[DATA_0_1]], align 1 ; IS________NPM-NEXT: call void @bar(i32 [[TMP1]], i32 [[TMP2]]) ; IS________NPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@zed -; IS__CGSCC_OPM-SAME: (%pair* noalias nocapture noundef nonnull readonly byval(%pair) dereferenceable(8) [[DATA:%.*]]) { -; IS__CGSCC_OPM-NEXT: call void @bar(%pair* noalias nocapture noundef nonnull readonly byval(%pair) dereferenceable(8) [[DATA]]) +; IS__CGSCC_OPM-SAME: (%pair* noalias nocapture noundef nonnull readonly byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) { +; IS__CGSCC_OPM-NEXT: call void @bar(%pair* noalias nocapture noundef nonnull readonly byval([[PAIR]]) dereferenceable(8) [[DATA]]) ; IS__CGSCC_OPM-NEXT: ret void ; call void @bar(%pair* byval(%pair) %Data) diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/variadic.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/variadic.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/variadic.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/variadic.ll @@ -1,34 +1,31 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; Unused arguments from variadic functions cannot be eliminated as that changes ; their classiciation according to the SysV amd64 ABI. Clang and other frontends ; bake in the classification when they use things like byval, as in this test. - target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" - %struct.tt0 = type { i64, i64 } %struct.__va_list_tag = type { i32, i32, i8*, i8* } - @t45 = internal global %struct.tt0 { i64 1335139741, i64 438042995 }, align 8 - ; Function Attrs: nounwind uwtable +;. +; CHECK: @[[T45:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_TT0:%.*]] { i64 1335139741, i64 438042995 }, align 8 +;. define i32 @main(i32 %argc, i8** nocapture readnone %argv) #0 { ; CHECK-LABEL: define {{[^@]+}}@main ; CHECK-SAME: (i32 [[ARGC:%.*]], i8** nocapture nofree readnone [[ARGV:%.*]]) { ; CHECK-NEXT: entry: -; CHECK-NEXT: tail call void (i8*, i8*, i8*, i8*, i8*, ...) @callee_t0f(i8* undef, i8* undef, i8* undef, i8* undef, i8* undef, %struct.tt0* noundef nonnull byval(%struct.tt0) align 8 dereferenceable(16) @t45) +; CHECK-NEXT: tail call void (i8*, i8*, i8*, i8*, i8*, ...) @callee_t0f(i8* undef, i8* undef, i8* undef, i8* undef, i8* undef, %struct.tt0* noundef nonnull byval([[STRUCT_TT0:%.*]]) align 8 dereferenceable(16) @t45) ; CHECK-NEXT: ret i32 0 ; entry: tail call void (i8*, i8*, i8*, i8*, i8*, ...) @callee_t0f(i8* undef, i8* undef, i8* undef, i8* undef, i8* undef, %struct.tt0* byval(%struct.tt0) align 8 @t45) ret i32 0 } - ; Function Attrs: nounwind uwtable define internal void @callee_t0f(i8* nocapture readnone %tp13, i8* nocapture readnone %tp14, i8* nocapture readnone %tp15, i8* nocapture readnone %tp16, i8* nocapture readnone %tp17, ...) { ; CHECK-LABEL: define {{[^@]+}}@callee_t0f @@ -41,5 +38,4 @@ call void @sink(i32 0) ret void } - declare void @sink(i32) diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/2008-06-09-WeakProp.ll b/llvm/test/Transforms/Attributor/IPConstantProp/2008-06-09-WeakProp.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/2008-06-09-WeakProp.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/2008-06-09-WeakProp.ll @@ -1,33 +1,32 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; Should not propagate the result of a weak function. ; PR2411 - define weak i32 @foo() nounwind { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@foo -; CHECK-SAME: () [[ATTR0:#.*]] { +; CHECK-SAME: () #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: ret i32 1 ; entry: ret i32 1 } - define i32 @main() nounwind { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@main -; CHECK-SAME: () [[ATTR0]] { +; CHECK-SAME: () #[[ATTR0]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[R:%.*]] = call i32 @foo() [[ATTR0]] +; CHECK-NEXT: [[R:%.*]] = call i32 @foo() #[[ATTR0]] ; CHECK-NEXT: ret i32 [[R]] ; entry: %r = call i32 @foo( ) nounwind ret i32 %r } - +;. +; CHECK: attributes #[[ATTR0]] = { nounwind } +;. 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 @@ -1,19 +1,21 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -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=6 -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 - ; Don't constant-propagate byval pointers, since they are not pointers! ; PR5038 %struct.MYstr = type { i8, i32 } @mystr = internal global %struct.MYstr zeroinitializer ; <%struct.MYstr*> [#uses=3] +;. +; CHECK: @[[MYSTR:[a-zA-Z0-9_$"\\.-]+]] = internal global [[STRUCT_MYSTR:%.*]] zeroinitializer +;. 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-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-SAME: (%struct.MYstr* noalias nocapture nofree noundef nonnull writeonly byval([[STRUCT_MYSTR:%.*]]) align 8 dereferenceable(8) [[U:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* [[U]], i32 0, i32 1 +; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 1 ; IS__CGSCC_OPM-NEXT: store i32 99, i32* [[TMP0]], align 4 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 0 ; IS__CGSCC_OPM-NEXT: store i8 97, i8* [[TMP1]], align 8 @@ -23,7 +25,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vfu1 -; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8 ; IS__CGSCC_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8* @@ -44,17 +46,15 @@ %1 = getelementptr %struct.MYstr, %struct.MYstr* %u, i32 0, i32 0 ; [#uses=1] store i8 97, i8* %1, align 4 br label %return - return: ; preds = %entry ret void } - 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-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-SAME: (%struct.MYstr* noalias nocapture nofree noundef nonnull readonly byval([[STRUCT_MYSTR:%.*]]) align 8 dereferenceable(8) [[U:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i32 0, i32 1 +; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i32 0, i32 1 ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 ; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i32 0, i32 0 ; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = load i8, i8* [[TMP2]], align 8 @@ -64,7 +64,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@vfu2 -; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8 ; IS__TUNIT_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8* @@ -81,7 +81,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@vfu2 -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i32 0, i32 1 ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 @@ -100,31 +100,30 @@ %5 = add i32 %4, %1 ret i32 %5 } - define i32 @unions() nounwind { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@unions -; IS__TUNIT_OPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; 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) #[[ATTR0]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RESULT]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions -; IS__TUNIT_NPM-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST:%.*]] = bitcast %struct.MYstr* @mystr to i8* ; 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]]) #[[ATTR0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RESULT]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@unions -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[RESULT:%.*]] = call i32 @vfu2() [[ATTR2:#.*]] +; IS__CGSCC____-NEXT: [[RESULT:%.*]] = call i32 @vfu2() #[[ATTR2:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[RESULT]] ; entry: @@ -132,13 +131,12 @@ %result = call i32 @vfu2(%struct.MYstr* byval(%struct.MYstr) align 4 @mystr) nounwind ret i32 %result } - 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-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-SAME: (%struct.MYstr* noalias nocapture nofree noundef nonnull byval([[STRUCT_MYSTR:%.*]]) align 8 dereferenceable(8) [[U:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* [[U]], i32 0, i32 1 +; IS__TUNIT_OPM-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 1 ; IS__TUNIT_OPM-NEXT: store i32 99, i32* [[Z]], align 4 ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 1 ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 @@ -150,7 +148,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@vfu2_v2 -; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8 ; IS__TUNIT_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8* @@ -169,9 +167,9 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: (%struct.MYstr* noalias nocapture nofree noundef nonnull byval([[STRUCT_MYSTR:%.*]]) align 8 dereferenceable(8) [[U:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* [[U]], i32 0, i32 1 +; IS__CGSCC_OPM-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 1 ; IS__CGSCC_OPM-NEXT: store i32 99, i32* [[Z]], align 4 ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 1 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 @@ -183,7 +181,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vfu2_v2 -; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8 ; IS__CGSCC_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8* @@ -211,42 +209,41 @@ %5 = add i32 %4, %1 ret i32 %5 } - define i32 @unions_v2() nounwind { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@unions_v2 -; IS__TUNIT_OPM-SAME: () [[ATTR2]] { +; 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) #[[ATTR2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RESULT]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions_v2 -; IS__TUNIT_NPM-SAME: () [[ATTR2]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR2]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST:%.*]] = bitcast %struct.MYstr* @mystr to i8* ; 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]]) #[[ATTR2]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RESULT]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@unions_v2 -; IS__CGSCC_OPM-SAME: () [[ATTR0]] { +; 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: [[RESULT:%.*]] = call i32 @vfu2_v2(%struct.MYstr* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_MYSTR:%.*]]) align 8 dereferenceable(8) @mystr) #[[ATTR3:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RESULT]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@unions_v2 -; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8* ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8 ; IS__CGSCC_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i32 0, i32 1 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8 -; IS__CGSCC_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 [[TMP0]], i32 [[TMP1]]) [[ATTR3:#.*]] +; IS__CGSCC_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR3:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RESULT]] ; entry: @@ -254,3 +251,13 @@ %result = call i32 @vfu2_v2(%struct.MYstr* byval(%struct.MYstr) align 4 @mystr) nounwind ret i32 %result } +;. +; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR3:[0-9]+]] = { nounwind willreturn } +;. 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 @@ -1,32 +1,30 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; 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-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" - define i64 @fn2() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2 -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; 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) #[[ATTR0]], !range [[RNG0:![0-9]+]] ; IS__TUNIT____-NEXT: ret i64 [[CALL2]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fn2 -; IS__CGSCC_OPM-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR0:[0-9]+]] { ; 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) #[[ATTR1:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i64 [[CALL2]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fn2 -; IS__CGSCC_NPM-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR0:[0-9]+]] { ; 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) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i64 [[CALL2]] ; entry: @@ -35,24 +33,23 @@ %call2 = call i64 @fn1(i64 %div) ret i64 %call2 } - define i64 @fn2b(i32 %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2b -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR0]] { +; 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]]) #[[ATTR0]], !range [[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:%.*]]) #[[ATTR0:[0-9]+]] { ; 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]]) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]] ; IS__CGSCC____-NEXT: ret i64 [[CALL2]] ; entry: @@ -61,20 +58,19 @@ %call2 = call i64 @fn1(i64 %div) ret i64 %call2 } - define i64 @fn2c() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2c -; IS__TUNIT____-SAME: () [[ATTR0]] { +; 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) #[[ATTR0]], !range [[RNG0]] ; IS__TUNIT____-NEXT: ret i64 [[CALL2]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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) #[[ATTR1]] ; IS__CGSCC____-NEXT: ret i64 [[CALL2]] ; entry: @@ -83,11 +79,10 @@ %call2 = call i64 @fn1(i64 %add) ret i64 %call2 } - define internal i64 @fn1(i64 %p1) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn1 -; IS__TUNIT____-SAME: (i64 returned [[P1:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i64 returned [[P1:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i64 [[P1]], 0 ; IS__TUNIT____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i64 [[P1]], i64 [[P1]] @@ -95,7 +90,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1 -; IS__CGSCC____-SAME: (i64 returned [[P1:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i64 returned [[P1:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i64 [[P1]], 0 ; IS__CGSCC____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i64 [[P1]], i64 [[P1]] @@ -106,3 +101,11 @@ %cond = select i1 %tobool, i64 %p1, i64 %p1 ret i64 %cond } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { willreturn } +;. +; CHECK: [[META0:![0-9]+]] = !{i64 -8, i64 43} +;. 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 @@ -1,16 +1,15 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" - define void @fn2(i32* %P, i1 %C) { ; ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2 -; IS__TUNIT____-SAME: (i32* nocapture nofree [[P:%.*]], i1 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree [[P:%.*]], i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[IF_END:%.*]] ; IS__TUNIT____: for.cond1: @@ -18,7 +17,7 @@ ; IS__TUNIT____: if.end: ; IS__TUNIT____-NEXT: [[E_2:%.*]] = phi i32* [ [[P]], [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ] ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[E_2]], align 4 -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @fn1(i32 [[TMP0]]) [[ATTR3:#.*]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @fn1(i32 [[TMP0]]) #[[ATTR3:[0-9]+]] ; IS__TUNIT____-NEXT: store i32 [[CALL]], i32* [[P]], align 4 ; IS__TUNIT____-NEXT: br label [[FOR_COND1]] ; IS__TUNIT____: exit: @@ -26,7 +25,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull align 4 dereferenceable(4) [[P:%.*]], i1 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull align 4 dereferenceable(4) [[P:%.*]], i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[IF_END:%.*]] ; IS__CGSCC____: for.cond1: @@ -42,10 +41,8 @@ ; entry: br label %if.end - for.cond1: ; preds = %if.end br i1 %C, label %if.end, label %exit - if.end: ; preds = %entry, %for.cond1 %e.2 = phi i32* [ %P, %entry ], [ null, %for.cond1 ] %0 = load i32, i32* %e.2, align 4 @@ -55,11 +52,10 @@ exit: ret void } - define internal i32 @fn1(i32 %p1) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn1 -; IS__TUNIT____-SAME: (i32 returned [[P1:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[P1]], 0 ; IS__TUNIT____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i32 [[P1]], i32 [[P1]] @@ -67,7 +63,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1 -; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[P1]], 0 ; IS__CGSCC____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i32 [[P1]], i32 [[P1]] @@ -78,12 +74,11 @@ %cond = select i1 %tobool, i32 %p1, i32 %p1 ret i32 %cond } - define void @fn_no_null_opt(i32* %P, i1 %C) null_pointer_is_valid { ; ; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn_no_null_opt -; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i1 [[C:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[IF_END:%.*]] ; IS__TUNIT____: for.cond1: @@ -91,7 +86,7 @@ ; IS__TUNIT____: if.end: ; IS__TUNIT____-NEXT: [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ] ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* null, align 4 -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @fn0(i32 [[TMP0]]) [[ATTR3]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @fn0(i32 [[TMP0]]) #[[ATTR3]] ; IS__TUNIT____-NEXT: store i32 [[CALL]], i32* [[P]], align 4 ; IS__TUNIT____-NEXT: br label [[FOR_COND1]] ; IS__TUNIT____: exit: @@ -99,7 +94,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn_no_null_opt -; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly align 4 dereferenceable_or_null(4) [[P:%.*]], i1 [[C:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly align 4 dereferenceable_or_null(4) [[P:%.*]], i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[IF_END:%.*]] ; IS__CGSCC____: for.cond1: @@ -115,10 +110,8 @@ ; entry: br label %if.end - for.cond1: ; preds = %if.end br i1 %C, label %if.end, label %exit - if.end: ; preds = %entry, %for.cond1 %e.2 = phi i32* [ undef, %entry ], [ null, %for.cond1 ] %0 = load i32, i32* %e.2, align 4 @@ -128,11 +121,10 @@ exit: ret void } - define internal i32 @fn0(i32 %p1) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@fn0 -; IS__TUNIT____-SAME: (i32 returned [[P1:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[P1]], 0 ; IS__TUNIT____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i32 [[P1]], i32 [[P1]] @@ -140,7 +132,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn0 -; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[P1]], 0 ; IS__CGSCC____-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i32 [[P1]], i32 [[P1]] @@ -151,3 +143,13 @@ %cond = select i1 %tobool, i32 %p1, i32 %p1 ret i32 %cond } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind null_pointer_is_valid } +; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind readnone } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind null_pointer_is_valid } +;. 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 @@ -1,41 +1,37 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - %struct.wobble = type { i32 } %struct.zot = type { %struct.wobble, %struct.wobble, %struct.wobble } - 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____-LABEL: define {{[^@]+}}@widget -; IS__TUNIT____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: bb: ; IS__TUNIT____-NEXT: ret [[STRUCT_ZOT:%.*]] undef ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@widget -; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: bb: ; IS__CGSCC____-NEXT: ret [[STRUCT_ZOT:%.*]] undef ; bb: ret %struct.zot undef } - define void @baz(<8 x i32> %arg) local_unnamed_addr { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@baz -; IS__TUNIT____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@baz -; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr [[ATTR0]] { +; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0]] { ; IS__CGSCC____-NEXT: bb: ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = extractvalue [[STRUCT_ZOT:%.*]] undef, 0, 0 ; IS__CGSCC____-NEXT: ret void @@ -45,3 +41,8 @@ %tmp1 = extractvalue %struct.zot %tmp, 0, 0 ret void } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,9 +1,8 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; The original C source looked like this: ; ; long long a101, b101, e101; @@ -29,12 +28,9 @@ ; This ll reproducer has been reduced to only include tha call. ; ; Note that -lint will report this as UB, but it passes -verify. - ; This test is just to verify that we do not crash/assert due to mismatch in ; argument count between the caller and callee. - ; FIXME we should recognize this as UB and make it an unreachable. - define dso_local i16 @foo(i16 %a) { ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@foo ; NOT_CGSCC_NPM-SAME: (i16 [[A:%.*]]) { @@ -43,32 +39,30 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo -; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: ret i16 0 ; %call = call i16 bitcast (i16 (i16, i16) * @bar to i16 (i16) *)(i16 %a) ret i16 %call } - define internal i16 @bar(i16 %p1, i16 %p2) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i16 0 ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar -; IS__CGSCC_OPM-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: ret i16 0 ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar -; IS__CGSCC_NPM-SAME: () [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: ret i16 undef ; ret i16 0 } - define dso_local i16 @foo2(i16 %a) { ; CHECK-LABEL: define {{[^@]+}}@foo2 ; CHECK-SAME: (i16 [[A:%.*]]) { @@ -78,30 +72,26 @@ %call = call i16 bitcast (i16 (i16, i16) * @bar2 to i16 (i16) *)(i16 %a) ret i16 %call } - define internal i16 @bar2(i16 %p1, i16 %p2) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar2 -; IS__TUNIT____-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@bar2 -; IS__CGSCC____-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = add i16 [[P1]], [[P2]] ; IS__CGSCC____-NEXT: ret i16 [[A]] ; %a = add i16 %p1, %p2 ret i16 %a } - - ;------------------------------------------------------------------------------- ; Additional tests to verify that we still optimize when having a mismatch ; in argument count due to varargs (as long as all non-variadic arguments have ; been provided), - define dso_local i16 @vararg_tests(i16 %a) { ; CHECK-LABEL: define {{[^@]+}}@vararg_tests ; CHECK-SAME: (i16 [[A:%.*]]) { @@ -114,27 +104,29 @@ %add = add i16 %call1, %call2 ret i16 %add } - define internal i16 @vararg_prop(i16 %p1, ...) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@vararg_prop -; IS__CGSCC____-SAME: (i16 returned [[P1:%.*]], ...) [[ATTR0]] { +; IS__CGSCC____-SAME: (i16 returned [[P1:%.*]], ...) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i16 7 ; ret i16 %p1 } - define internal i16 @vararg_no_prop(i16 %p1, i16 %p2, ...) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@vararg_no_prop -; IS__TUNIT____-SAME: (i16 returned [[P1:%.*]], i16 [[P2:%.*]], ...) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@vararg_no_prop -; IS__CGSCC____-SAME: (i16 returned [[P1:%.*]], i16 [[P2:%.*]], ...) [[ATTR0]] { +; IS__CGSCC____-SAME: (i16 returned [[P1:%.*]], i16 [[P2:%.*]], ...) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i16 7 ; ret i16 %p1 } - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,12 +1,10 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; This test is just to verify that we do not crash/assert due to mismatch in ; argument type between the caller and callee. - define dso_local i16 @foo(i16 %a) { ; CHECK-LABEL: define {{[^@]+}}@foo ; CHECK-SAME: (i16 [[A:%.*]]) { @@ -16,19 +14,21 @@ %call = call i16 bitcast (i16 (i16, i16) * @bar to i16 (i16, i32) *)(i16 %a, i32 7) ret i16 %call } - define internal i16 @bar(i16 %p1, i16 %p2) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar -; IS__TUNIT____-SAME: (i16 [[P1:%.*]], i16 returned [[P2:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i16 [[P1:%.*]], i16 returned [[P2:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i16 [[P2]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: (i16 [[P1:%.*]], i16 returned [[P2:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i16 [[P1:%.*]], i16 returned [[P2:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i16 [[P2]] ; ret i16 %p2 } - - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,43 +1,41 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; See PR26774 - define i32 @baz() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@baz -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32 10 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@baz -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 10 ; ret i32 10 } - ; We can const-prop @baz's return value *into* @foo, but cannot ; constprop @foo's return value into bar. - define linkonce_odr i32 @foo() { ; CHECK-LABEL: define {{[^@]+}}@foo() { ; CHECK-NEXT: ret i32 10 ; - %val = call i32 @baz() ret i32 %val } - define i32 @bar() { ; CHECK-LABEL: define {{[^@]+}}@bar() { ; CHECK-NEXT: [[VAL:%.*]] = call i32 @foo() ; CHECK-NEXT: ret i32 [[VAL]] ; - %val = call i32 @foo() ret i32 %val } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,23 +1,24 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 ; PR5569 - ; IPSCCP should prove that the blocks are dead and delete them, and ; properly handle the dangling blockaddress constants. - -; NOT_CGSCC_OPM: @bar.l = internal constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] -; IS__CGSCC_OPM: @bar.l = internal constant [2 x i8*] [i8* blockaddress(@bar, %lab0), i8* blockaddress(@bar, %end)] - @code = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4 ; <[5 x i32]*> [#uses=0] @bar.l = internal constant [2 x i8*] [i8* blockaddress(@bar, %lab0), i8* blockaddress(@bar, %end)] ; <[2 x i8*]*> [#uses=1] - +;. +; NOT_CGSCC_OPM: @[[CODE:[a-zA-Z0-9_$"\\.-]+]] = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4 +; NOT_CGSCC_OPM: @[[BAR_L:[a-zA-Z0-9_$"\\.-]+]] = internal constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] +;. +; IS__CGSCC_OPM: @[[CODE:[a-zA-Z0-9_$"\\.-]+]] = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4 +; IS__CGSCC_OPM: @[[BAR_L:[a-zA-Z0-9_$"\\.-]+]] = internal constant [2 x i8*] [i8* blockaddress(@bar, [[LAB0:%.*]]), i8* blockaddress(@bar, [[END:%.*]])] +;. define internal void @foo(i32 %x) nounwind readnone { ; IS__CGSCC____: Function Attrs: nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i32 [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: store volatile i32 -1, i32* [[B]], align 4 @@ -28,11 +29,10 @@ store volatile i32 -1, i32* %b ret void } - define internal void @bar(i32* nocapture %pc) nounwind readonly { ; IS__CGSCC_OPM: Function Attrs: nounwind readonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar -; IS__CGSCC_OPM-SAME: (i32* nocapture [[PC:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture [[PC:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[INDIRECTGOTO:%.*]] ; IS__CGSCC_OPM: lab0: @@ -50,14 +50,11 @@ ; entry: br label %indirectgoto - lab0: ; preds = %indirectgoto %indvar.next = add i32 %indvar, 1 ; [#uses=1] br label %indirectgoto - end: ; preds = %indirectgoto ret void - indirectgoto: ; preds = %lab0, %entry %indvar = phi i32 [ %indvar.next, %lab0 ], [ 0, %entry ] ; [#uses=2] %pc.addr.0 = getelementptr i32, i32* %pc, i32 %indvar ; [#uses=1] @@ -66,20 +63,35 @@ %indirect.goto.dest = load i8*, i8** %indirect.goto.dest.in ; [#uses=1] indirectbr i8* %indirect.goto.dest, [label %lab0, label %end] } - define i32 @main() nounwind readnone { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@main -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@main -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { -; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: ret i32 0 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@main +; IS__CGSCC_OPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: ret i32 0 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@main +; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: ret i32 0 ; entry: ret i32 0 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nounwind readonly } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nounwind readnone } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -12,17 +12,21 @@ call void @foo( i32 %X ) ret void } - define void @bar() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret void ; ret void } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll b/llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll @@ -1,15 +1,14 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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-i64:64-n32:64" target triple = "powerpc64le-unknown-linux" - define void @test(i32 signext %n) { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@test -; IS__TUNIT____-SAME: (i32 signext [[N:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32 signext [[N:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: if.then: @@ -37,7 +36,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@test -; IS__CGSCC____-SAME: (i32 signext [[N:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32 signext [[N:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: if.then: @@ -63,48 +62,40 @@ ; IS__CGSCC____: _ZN5boost4math4signIgEEiRKT_.exit30: ; IS__CGSCC____-NEXT: unreachable ; - entry: br i1 undef, label %if.then, label %if.end - if.then: ; preds = %entry ret void - if.end: ; preds = %entry br i1 undef, label %if.then2, label %if.end4 - if.then2: ; preds = %if.end unreachable - if.end4: ; preds = %if.end %sub.n = select i1 undef, i32 undef, i32 %n switch i32 %sub.n, label %if.else14 [ i32 0, label %if.then9 i32 1, label %if.then12 ] - if.then9: ; preds = %if.end4 unreachable - if.then12: ; preds = %if.end4 unreachable - if.else14: ; preds = %if.end4 br label %do.body - do.body: ; preds = %do.body, %if.else14 %scale.0 = phi ppc_fp128 [ 0xM3FF00000000000000000000000000000, %if.else14 ], [ %scale.0, %do.body ] br i1 undef, label %do.body, label %if.then33 - if.then33: ; preds = %do.body br i1 undef, label %_ZN5boost4math4signIgEEiRKT_.exit30, label %cond.false.i28 - cond.false.i28: ; preds = %if.then33 %0 = bitcast ppc_fp128 %scale.0 to i128 %tobool.i26 = icmp slt i128 %0, 0 br label %_ZN5boost4math4signIgEEiRKT_.exit30 - _ZN5boost4math4signIgEEiRKT_.exit30: ; preds = %cond.false.i28, %if.then33 unreachable } - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone } +;. 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 @@ -1,15 +1,16 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -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=4 -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 - @_ZL6test1g = internal global i32 42, align 4 - +;. +; CHECK: @[[_ZL6TEST1G:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 42, align 4 +;. define void @_Z7test1f1v() nounwind { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@_Z7test1f1v -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP:%.*]] = load i32, i32* @_ZL6test1g, align 4 ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0 @@ -22,7 +23,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@_Z7test1f1v -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP:%.*]] = load i32, i32* @_ZL6test1g, align 4 ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0 @@ -37,26 +38,23 @@ %tmp = load i32, i32* @_ZL6test1g, align 4 %cmp = icmp eq i32 %tmp, 0 br i1 %cmp, label %if.then, label %if.end - if.then: ; preds = %entry store i32 0, i32* @_ZL6test1g, align 4 br label %if.end - if.end: ; preds = %if.then, %entry ret void } - define i32 @_Z7test1f2v() nounwind { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@_Z7test1f2v -; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@_Z7test1f2v -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP:%.*]] = load i32, i32* @_ZL6test1g, align 4 ; IS__CGSCC____-NEXT: ret i32 [[TMP]] @@ -65,3 +63,10 @@ %tmp = load i32, i32* @_ZL6test1g, align 4 ret i32 %tmp } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readonly willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -38,51 +38,48 @@ ; } ; 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____-LABEL: define {{[^@]+}}@cb0 -; IS__TUNIT____-SAME: (i32 returned [[ZERO:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32 returned [[ZERO:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cb0 -; IS__CGSCC____-SAME: (i32 returned [[ZERO:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32 returned [[ZERO:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 0 ; entry: ret i32 %zero } - define internal i32 @cb1(i32 %unknown) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb1 -; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@cb1 -; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 [[UNKNOWN]] ; entry: ret i32 %unknown } - define internal i32 @cb2(i32 %unknown) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb2 -; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@cb2 -; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 [[UNKNOWN]] ; @@ -90,41 +87,38 @@ %call = call i32 @cb0(i32 0) ret i32 %unknown } - define internal i32 @cb3(i32 %unknown) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb3 -; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@cb3 -; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 [[UNKNOWN]] ; entry: ret i32 %unknown } - define internal i32 @cb4(i32 %unknown) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb4 -; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@cb4 -; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 [[UNKNOWN]] ; entry: ret i32 %unknown } - define void @foo() { ; CHECK-LABEL: define {{[^@]+}}@foo() { ; CHECK-NEXT: entry: @@ -143,10 +137,18 @@ call void @broker(i32 (i32)* nonnull @cb4, i32 (i32)* nonnull @cb4, i32 (i32)* nonnull @cb4, i32 0, i32 1) ret void } - declare !callback !3 void @broker(i32 (i32)*, i32 (i32)*, i32 (i32)*, i32, i32) - !0 = !{i64 0, i64 3, i1 false} !1 = !{i64 1, i64 4, i1 false} !2 = !{i64 2, i64 3, i1 false} !3 = !{!0, !2, !1} +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. +; CHECK: [[META0:![0-9]+]] = !{!1, !2, !3} +; CHECK: [[META1:![0-9]+]] = !{i64 0, i64 3, i1 false} +; CHECK: [[META2:![0-9]+]] = !{i64 2, i64 3, i1 false} +; CHECK: [[META3:![0-9]+]] = !{i64 1, i64 4, i1 false} +;. 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 @@ -1,13 +1,11 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -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=4 -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 ; PR36485 ; musttail call result can't be replaced with a constant, unless the call can be removed - declare i32 @external() - define i8* @start(i8 %v) { ; IS__TUNIT____-LABEL: define {{[^@]+}}@start ; IS__TUNIT____-SAME: (i8 [[V:%.*]]) { @@ -59,7 +57,6 @@ %ca2 = musttail call i8* @dont_zap_me(i8 %v) ret i8* %ca2 } - define internal i8* @side_effects(i8 %v) { ; CHECK-LABEL: define {{[^@]+}}@side_effects ; CHECK-SAME: (i8 [[V:%.*]]) { @@ -68,26 +65,21 @@ ; CHECK-NEXT: ret i8* [[CA]] ; %i1 = call i32 @external() - ; since this goes back to `start` the SCPP should be see that the return value ; is always `null`. ; The call can't be removed due to `external` call above, though. - %ca = musttail call i8* @start(i8 %v) - ; Thus the result must be returned anyway ret i8* %ca } - define internal i8* @no_side_effects(i8 %v) readonly nounwind { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@no_side_effects -; IS__CGSCC____-SAME: (i8 [[V:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i8 [[V:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i8* undef ; ret i8* null } - define internal i8* @dont_zap_me(i8 %v) { ; CHECK-LABEL: define {{[^@]+}}@dont_zap_me ; CHECK-SAME: (i8 [[V:%.*]]) { @@ -97,3 +89,6 @@ %i1 = call i32 @external() ret i8* null } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/naked-return.ll b/llvm/test/Transforms/Attributor/IPConstantProp/naked-return.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/naked-return.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/naked-return.ll @@ -1,44 +1,40 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i686-pc-windows-msvc19.0.24215" - define i32 @dipsy(i32, i32) local_unnamed_addr #0 { ; CHECK: Function Attrs: naked ; CHECK-LABEL: define {{[^@]+}}@dipsy -; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) local_unnamed_addr [[ATTR0:#.*]] { +; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: BasicBlock0: -; CHECK-NEXT: call void asm "\0D\0Apushl %ebp\0D\0Amovl 8(%esp),%eax\0D\0Amovl 12(%esp), %ebp\0D\0Acalll *%eax\0D\0Apopl %ebp\0D\0Aretl\0D\0A", ""() +; CHECK-NEXT: call void asm "\0D\0Apushl %ebp\0D\0Amovl 8([[ESP:%.*]]),%eax\0D\0Amovl 12([[ESP]]), %ebp\0D\0Acalll *%eax\0D\0Apopl %ebp\0D\0Aretl\0D\0A", ""() ; CHECK-NEXT: ret i32 0 ; BasicBlock0: call void asm "\0D\0Apushl %ebp\0D\0Amovl 8(%esp),%eax\0D\0Amovl 12(%esp), %ebp\0D\0Acalll *%eax\0D\0Apopl %ebp\0D\0Aretl\0D\0A", ""() ret i32 0 } - define void @tinkywinky(i32, i32, i32) local_unnamed_addr #0 { ; CHECK: Function Attrs: naked ; CHECK-LABEL: define {{[^@]+}}@tinkywinky -; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) local_unnamed_addr [[ATTR0]] { +; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) local_unnamed_addr #[[ATTR0]] { ; CHECK-NEXT: BasicBlock1: -; CHECK-NEXT: call void asm "\0D\0A movl 12(%esp), %ebp\0D\0A movl 4(%esp), %eax\0D\0A movl 8(%esp), %esp\0D\0A jmpl *%eax\0D\0A", ""() +; CHECK-NEXT: call void asm "\0D\0A movl 12([[ESP:%.*]]), %ebp\0D\0A movl 4([[ESP]]), %eax\0D\0A movl 8([[ESP]]), %esp\0D\0A jmpl *%eax\0D\0A", ""() ; CHECK-NEXT: ret void ; BasicBlock1: call void asm "\0D\0A movl 12(%esp), %ebp\0D\0A movl 4(%esp), %eax\0D\0A movl 8(%esp), %esp\0D\0A jmpl *%eax\0D\0A", ""() ret void } - define void @patatino(i32, i32, i32) local_unnamed_addr #1 { ; CHECK-LABEL: define {{[^@]+}}@patatino -; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) local_unnamed_addr [[ATTR1:#.*]] { +; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] { ; CHECK-NEXT: bb: -; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @dipsy(i32 [[TMP0]], i32 [[TMP1]]) [[ATTR0]] -; CHECK-NEXT: tail call void @tinkywinky(i32 [[TMP3]], i32 [[TMP2]], i32 [[TMP1]]) [[ATTR0]] +; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @dipsy(i32 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]] +; CHECK-NEXT: tail call void @tinkywinky(i32 [[TMP3]], i32 [[TMP2]], i32 [[TMP1]]) #[[ATTR0]] ; CHECK-NEXT: ret void ; bb: @@ -47,6 +43,9 @@ tail call void @tinkywinky(i32 %3, i32 %2, i32 %1) #0 ret void } - attributes #0 = { naked } attributes #1 = { "frame-pointer"="all" } +;. +; CHECK: attributes #[[ATTR0]] = { naked } +; CHECK: attributes #[[ATTR1]] = { "frame-pointer"="all" } +;. diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll b/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -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=6 -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 @@ -20,13 +20,15 @@ ; Verify the constant value of q is propagated into the outlined function. ; target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" - %struct.ident_t = type { i32, i32, i32, i32, i8* } - @.str = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1 @0 = private unnamed_addr global %struct.ident_t { i32 0, i32 514, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i32 0, i32 0) }, align 8 @1 = private unnamed_addr global %struct.ident_t { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i32 0, i32 0) }, align 8 - +;. +; CHECK: @[[_STR:[a-zA-Z0-9_$"\\.-]+]] = private unnamed_addr constant [23 x i8] c" +; CHECK: @[[GLOB0:[0-9]+]] = private unnamed_addr global [[STRUCT_IDENT_T:%.*]] { i32 0, i32 514, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i32 0, i32 0) }, align 8 +; CHECK: @[[GLOB1:[0-9]+]] = private unnamed_addr global [[STRUCT_IDENT_T:%.*]] { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i32 0, i32 0) }, align 8 +;. define dso_local void @foo(i32 %N) { ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@foo ; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) { @@ -36,7 +38,7 @@ ; IS__TUNIT_OPM-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4 ; IS__TUNIT_OPM-NEXT: store float 3.000000e+00, float* [[P]], align 4 ; IS__TUNIT_OPM-NEXT: store i32 7, i32* [[N_ADDR]], align 4 -; IS__TUNIT_OPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB1:@.*]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 undef) +; IS__TUNIT_OPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 undef) ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@foo @@ -47,7 +49,7 @@ ; IS__TUNIT_NPM-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4 ; IS__TUNIT_NPM-NEXT: store float 3.000000e+00, float* [[P]], align 4 ; IS__TUNIT_NPM-NEXT: store i32 7, i32* [[N_ADDR]], align 4 -; IS__TUNIT_NPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB1:@.*]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 undef) +; IS__TUNIT_NPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 undef) ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@foo @@ -58,7 +60,7 @@ ; IS__CGSCC_OPM-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4 ; IS__CGSCC_OPM-NEXT: store float 3.000000e+00, float* [[P]], align 4 ; IS__CGSCC_OPM-NEXT: store i32 7, i32* [[N_ADDR]], align 4 -; IS__CGSCC_OPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB1:@.*]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 noundef 4617315517961601024) +; IS__CGSCC_OPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 noundef 4617315517961601024) ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo @@ -69,7 +71,7 @@ ; IS__CGSCC_NPM-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4 ; IS__CGSCC_NPM-NEXT: store float 3.000000e+00, float* [[P]], align 4 ; IS__CGSCC_NPM-NEXT: store i32 7, i32* [[N_ADDR]], align 4 -; IS__CGSCC_NPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB1:@.*]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 noundef 4617315517961601024) +; IS__CGSCC_NPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* noalias nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 noundef 4617315517961601024) ; IS__CGSCC_NPM-NEXT: ret void ; entry: @@ -81,7 +83,6 @@ call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nonnull %N.addr, float* nonnull %p, i64 4617315517961601024) ret void } - define internal void @.omp_outlined.(i32* noalias %.global_tid., i32* noalias %.bound_tid., i32* dereferenceable(4) %N, float* dereferenceable(4) %p, i64 %q) { ; IS________OPM-LABEL: define {{[^@]+}}@.omp_outlined. ; IS________OPM-SAME: (i32* noalias nocapture readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[N:%.*]], float* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]], i64 [[Q:%.*]]) { @@ -103,7 +104,7 @@ ; IS________OPM-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4 ; IS________OPM-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4 ; IS________OPM-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4 -; IS________OPM-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0:@.*]], i32 [[TMP5]], i32 noundef 34, i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_IS_LAST]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_LB]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_UB]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_STRIDE]], i32 noundef 1, i32 noundef 1) +; IS________OPM-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB0]], i32 [[TMP5]], i32 noundef 34, i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_IS_LAST]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_LB]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_UB]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_STRIDE]], i32 noundef 1, i32 noundef 1) ; IS________OPM-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4 ; IS________OPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP6]], [[SUB3]] ; IS________OPM-NEXT: br i1 [[CMP6]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] @@ -139,7 +140,7 @@ ; IS________OPM-NEXT: br label [[OMP_LOOP_EXIT:%.*]] ; IS________OPM: omp.loop.exit: ; IS________OPM-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4 -; IS________OPM-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 [[TMP12]]) +; IS________OPM-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB0]], i32 [[TMP12]]) ; IS________OPM-NEXT: br label [[OMP_PRECOND_END]] ; IS________OPM: omp.precond.end: ; IS________OPM-NEXT: ret void @@ -164,7 +165,7 @@ ; IS________NPM-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4 ; IS________NPM-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4 ; IS________NPM-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4 -; IS________NPM-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0:@.*]], i32 [[TMP5]], i32 noundef 34, i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_IS_LAST]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_LB]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_UB]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_STRIDE]], i32 noundef 1, i32 noundef 1) +; IS________NPM-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB0]], i32 [[TMP5]], i32 noundef 34, i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_IS_LAST]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_LB]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_UB]], i32* noundef nonnull align 4 dereferenceable(4) [[DOTOMP_STRIDE]], i32 noundef 1, i32 noundef 1) ; IS________NPM-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4 ; IS________NPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP6]], [[SUB3]] ; IS________NPM-NEXT: br i1 [[CMP6]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] @@ -200,7 +201,7 @@ ; IS________NPM-NEXT: br label [[OMP_LOOP_EXIT:%.*]] ; IS________NPM: omp.loop.exit: ; IS________NPM-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4 -; IS________NPM-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) [[GLOB0]], i32 [[TMP12]]) +; IS________NPM-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB0]], i32 [[TMP12]]) ; IS________NPM-NEXT: br label [[OMP_PRECOND_END]] ; IS________NPM: omp.precond.end: ; IS________NPM-NEXT: ret void @@ -217,7 +218,6 @@ %sub3 = add nsw i32 %tmp, -3 %cmp = icmp sgt i32 %tmp, 2 br i1 %cmp, label %omp.precond.then, label %omp.precond.end - omp.precond.then: ; preds = %entry store i32 0, i32* %.omp.lb, align 4 store i32 %sub3, i32* %.omp.ub, align 4 @@ -228,62 +228,50 @@ %tmp6 = load i32, i32* %.omp.ub, align 4 %cmp6 = icmp sgt i32 %tmp6, %sub3 br i1 %cmp6, label %cond.true, label %cond.false - cond.true: ; preds = %omp.precond.then br label %cond.end - cond.false: ; preds = %omp.precond.then %tmp7 = load i32, i32* %.omp.ub, align 4 br label %cond.end - cond.end: ; preds = %cond.false, %cond.true %cond = phi i32 [ %sub3, %cond.true ], [ %tmp7, %cond.false ] store i32 %cond, i32* %.omp.ub, align 4 %tmp8 = load i32, i32* %.omp.lb, align 4 br label %omp.inner.for.cond - omp.inner.for.cond: ; preds = %omp.inner.for.inc, %cond.end %.omp.iv.0 = phi i32 [ %tmp8, %cond.end ], [ %add11, %omp.inner.for.inc ] %tmp9 = load i32, i32* %.omp.ub, align 4 %cmp8 = icmp sgt i32 %.omp.iv.0, %tmp9 br i1 %cmp8, label %omp.inner.for.cond.cleanup, label %omp.inner.for.body - omp.inner.for.cond.cleanup: ; preds = %omp.inner.for.cond br label %omp.inner.for.end - omp.inner.for.body: ; preds = %omp.inner.for.cond %add10 = add nsw i32 %.omp.iv.0, 2 %tmp10 = load float, float* %p, align 4 %tmp11 = load double, double* %conv, align 8 call void @bar(i32 %add10, float %tmp10, double %tmp11) br label %omp.body.continue - omp.body.continue: ; preds = %omp.inner.for.body br label %omp.inner.for.inc - omp.inner.for.inc: ; preds = %omp.body.continue %add11 = add nsw i32 %.omp.iv.0, 1 br label %omp.inner.for.cond - omp.inner.for.end: ; preds = %omp.inner.for.cond.cleanup br label %omp.loop.exit - omp.loop.exit: ; preds = %omp.inner.for.end %tmp12 = load i32, i32* %.global_tid., align 4 call void @__kmpc_for_static_fini(%struct.ident_t* nonnull @0, i32 %tmp12) br label %omp.precond.end - omp.precond.end: ; preds = %omp.loop.exit, %entry ret void } - declare dso_local void @__kmpc_for_static_init_4(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32, i32) - declare dso_local void @bar(i32, float, double) - declare dso_local void @__kmpc_for_static_fini(%struct.ident_t*, i32) - declare !callback !0 dso_local void @__kmpc_fork_call(%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) - !1 = !{i64 2, i64 -1, i64 -1, i1 true} !0 = !{!1} +;. +; CHECK: [[META0:![0-9]+]] = !{!1} +; CHECK: [[META1:![0-9]+]] = !{i64 2, i64 -1, i64 -1, i1 true} +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -22,14 +22,13 @@ ; bar, respectively. ; target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" - %union.pthread_attr_t = type { i64, [48 x i8] } - @GlobalVPtr = common dso_local global i8* null, align 8 - ; FIXME: nocapture & noalias for @GlobalVPtr in %call1 ; FIXME: nocapture & noalias for %alloc2 in %call3 - +;. +; CHECK: @[[GLOBALVPTR:[a-zA-Z0-9_$"\\.-]+]] = common dso_local global i8* null, align 8 +;. define dso_local i32 @main() { ; IS__TUNIT____-LABEL: define {{[^@]+}}@main() { ; IS__TUNIT____-NEXT: entry: @@ -63,76 +62,78 @@ %call3 = call i32 @pthread_create(i64* nonnull %thread, %union.pthread_attr_t* null, i8* (i8*)* nonnull @buz, i8* %alloc2) ret i32 0 } - 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____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (i8* noalias nofree readnone returned align 536870912 "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i8* noalias nofree readnone returned align 536870912 "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i8* null ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i8* noalias nofree readnone returned align 536870912 "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i8* noalias nofree readnone returned align 536870912 "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i8* null ; entry: ret i8* %arg } - define internal i8* @bar(i8* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(8) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(8) "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i8* bitcast (i8** @GlobalVPtr to i8*) ; entry: ret i8* %arg } - define internal i8* @baz(i8* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-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____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i8* [[ARG]] ; entry: ret i8* %arg } - define internal i8* @buz(i8* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-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____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i8* [[ARG]] ; entry: ret i8* %arg } - !1 = !{i64 2, i64 3, i1 false} !0 = !{!1} +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. +; CHECK: [[META0:![0-9]+]] = !{!1} +; CHECK: [[META1:![0-9]+]] = !{i64 2, i64 3, i1 false} +;. 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 @@ -1,34 +1,35 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; 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____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: unreachable ; %Y = call i32 @foo( i32 %X ) ; [#uses=1] %Z = add i32 %Y, 1 ; [#uses=1] ret i32 %Z } - define void @bar() { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; call i32 @foo( i32 17 ) ; :1 [#uses=0] ret void } - +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +;. 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 @@ -1,25 +1,22 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 ; PR5596 - ; IPSCCP should propagate the 0 argument, eliminate the switch, and propagate ; the result. - ; FIXME: Remove obsolete calls/instructions - define i32 @main() noreturn nounwind { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@main -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 123 ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@main -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 123 ; @@ -27,11 +24,10 @@ %call2 = tail call i32 @wwrite(i64 0) nounwind ret i32 %call2 } - define internal i32 @wwrite(i64 %i) nounwind readnone { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@wwrite -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i64 3, label [[RETURN:%.*]] @@ -47,10 +43,14 @@ i64 3, label %return i64 10, label %return ] - sw.default: ret i32 123 - return: ret i32 0 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,14 +1,13 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -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=8 -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 - ;; 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____-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____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: @@ -22,7 +21,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; 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____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: @@ -36,24 +35,21 @@ ; %X = load i32, i32* %V br i1 %C, label %T, label %F - T: ; preds = %0 %X1 = add i32 %X, 1 store i32 %X1, i32* %V ret i32* %V - F: ; preds = %0 %X2 = sub i32 %X, 1 store i32 %X2, i32* %V ret i32* %V } - ;; 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____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (i32 noundef [[A:%.*]], i32 noundef [[B:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32 noundef [[A:%.*]], i32 noundef [[B:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: [[X:%.*]] = add i32 [[A]], [[B]] ; IS__TUNIT____-NEXT: [[Y:%.*]] = insertvalue { i32, i32 } undef, i32 [[A]], 0 ; IS__TUNIT____-NEXT: [[Z:%.*]] = insertvalue { i32, i32 } [[Y]], i32 [[X]], 1 @@ -61,7 +57,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i32 noundef [[A:%.*]], i32 noundef [[B:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i32 noundef [[A:%.*]], i32 noundef [[B:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: [[X:%.*]] = add i32 [[A]], [[B]] ; IS__CGSCC____-NEXT: [[Y:%.*]] = insertvalue { i32, i32 } undef, i32 [[A]], 0 ; IS__CGSCC____-NEXT: [[Z:%.*]] = insertvalue { i32, i32 } [[Y]], i32 [[X]], 1 @@ -72,16 +68,15 @@ %Z = insertvalue { i32, i32 } %Y, i32 %X, 1 ret { i32, i32 } %Z } - define void @caller(i1 %C) personality i32 (...)* @__gxx_personality_v0 { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR2:#.*]] personality i32 (...)* @__gxx_personality_v0 { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] 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: [[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: [[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) #[[ATTR1]] ; IS__TUNIT____-NEXT: br label [[OK:%.*]] ; IS__TUNIT____: OK: ; IS__TUNIT____-NEXT: [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0 @@ -95,12 +90,12 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] personality i32 (...)* @__gxx_personality_v0 { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] personality i32 (...)* @__gxx_personality_v0 { ; IS__CGSCC____-NEXT: [[Q:%.*]] = alloca i32, align 4 -; IS__CGSCC____-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__CGSCC____-NEXT: [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) [[ATTR3:#.*]] +; IS__CGSCC____-NEXT: [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]] +; IS__CGSCC____-NEXT: [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR3:[0-9]+]] ; IS__CGSCC____-NEXT: [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0 -; IS__CGSCC____-NEXT: [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) [[ATTR4:#.*]] +; IS__CGSCC____-NEXT: [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR4:[0-9]+]] ; IS__CGSCC____-NEXT: br label [[OK:%.*]] ; IS__CGSCC____: OK: ; IS__CGSCC____-NEXT: [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0 @@ -121,21 +116,28 @@ %S1 = call { i32, i32 } @foo(i32 1, i32 2) %X1 = extractvalue { i32, i32 } %S1, 0 %S2 = invoke { i32, i32 } @foo(i32 3, i32 4) to label %OK unwind label %LPAD - OK: %X2 = extractvalue { i32, i32 } %S2, 0 ;; Do some stuff with the returned values which we can grep for %Z = add i32 %X1, %X2 store i32 %Z, i32* %W br label %RET - LPAD: %exn = landingpad {i8*, i32} cleanup br label %RET - RET: ret void } - declare i32 @__gxx_personality_v0(...) +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR3]] = { willreturn } +; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind readnone willreturn } +;. 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 @@ -1,16 +1,14 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - ; 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____-LABEL: define {{[^@]+}}@invokecaller -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] personality i32 (...)* @__gxx_personality_v0 { -; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) [[ATTR1:#.*]] +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { +; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) #[[ATTR1:[0-9]+]] ; IS__TUNIT____-NEXT: br label [[OK:%.*]] ; IS__TUNIT____: OK: ; IS__TUNIT____-NEXT: ret i1 true @@ -19,8 +17,8 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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:#.*]] +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { +; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: br label [[OK:%.*]] ; IS__CGSCC____: OK: ; IS__CGSCC____-NEXT: ret i1 true @@ -36,11 +34,10 @@ cleanup ret i1 false } - define internal i32 @foo(i1 %C) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: ; IS__TUNIT____-NEXT: ret i32 undef @@ -49,7 +46,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: ; IS__CGSCC____-NEXT: ret i32 undef @@ -57,28 +54,31 @@ ; IS__CGSCC____-NEXT: ret i32 undef ; br i1 %C, label %T, label %F - T: ; preds = %0 ret i32 52 - F: ; preds = %0 ret i32 52 } - define i1 @caller(i1 %C) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 true ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 true ; %X = call i32 @foo( i1 %C ) ; [#uses=1] %Y = icmp ne i32 %X, 0 ; [#uses=1] ret i1 %Y } - declare i32 @__gxx_personality_v0(...) +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nounwind readnone } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nounwind readnone } +;. 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 @@ -1,17 +1,14 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -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=7 -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 - ;; FIXME: support for extractvalue and insertvalue missing. - %0 = type { i32, i32 } - define internal %0 @foo(i1 %Q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: ; IS__TUNIT____-NEXT: [[MRV:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 @@ -24,7 +21,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: ; IS__CGSCC____-NEXT: [[MRV:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 @@ -36,22 +33,19 @@ ; IS__CGSCC____-NEXT: ret [[TMP0]] [[MRV3]] ; br i1 %Q, label %T, label %F - T: ; preds = %0 %mrv = insertvalue %0 undef, i32 21, 0 %mrv1 = insertvalue %0 %mrv, i32 22, 1 ret %0 %mrv1 - F: ; preds = %0 %mrv2 = insertvalue %0 undef, i32 21, 0 %mrv3 = insertvalue %0 %mrv2, i32 23, 1 ret %0 %mrv3 } - define internal %0 @bar(i1 %Q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar -; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 ; IS__TUNIT____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: @@ -63,7 +57,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 ; IS__CGSCC____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: @@ -75,27 +69,24 @@ ; %A = insertvalue %0 undef, i32 21, 0 br i1 %Q, label %T, label %F - T: ; preds = %0 %B = insertvalue %0 %A, i32 22, 1 ret %0 %B - F: ; preds = %0 %C = insertvalue %0 %A, i32 23, 1 ret %0 %C } - 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:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR0]] ; IS__TUNIT____-NEXT: ret [[TMP0]] [[X]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller -; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) [[ATTR0]] { -; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) [[ATTR1:#.*]] +; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret [[TMP0]] [[X]] ; %X = call %0 @foo(i1 %Q) @@ -108,16 +99,15 @@ %N = add i32 %B, %D ret %0 %X } - ; Similar to @caller but the result of both calls are actually used. 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:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR0]] ; 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]]) #[[ATTR0]] ; 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 +117,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:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR1]] ; 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]]) #[[ATTR1]] ; IS__CGSCC____-NEXT: [[C:%.*]] = extractvalue [[TMP0]] [[Y]], 0 ; IS__CGSCC____-NEXT: [[D:%.*]] = extractvalue [[TMP0]] [[Y]], 1 ; IS__CGSCC____-NEXT: [[M:%.*]] = add i32 [[A]], [[C]] @@ -151,3 +141,9 @@ %R = add i32 %N, %M ret i32 %R } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { willreturn } +;. 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 @@ -1,13 +1,12 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 - define internal i32 @testf(i1 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@testf -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_COND:%.*]], label [[IF_END:%.*]] ; IS__CGSCC____: if.cond: @@ -19,21 +18,17 @@ ; entry: br i1 %c, label %if.cond, label %if.end - if.cond: br i1 undef, label %if.then, label %if.end - if.then: ; preds = %entry, %if.then ret i32 11 - if.end: ; preds = %if.then1, %entry ret i32 10 } - define internal i32 @test1(i1 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[IF_THEN:%.*]] ; IS__CGSCC____: if.then: @@ -45,30 +40,31 @@ ; entry: br label %if.then - if.then: ; preds = %entry, %if.then %call = call i32 @testf(i1 %c) %res = icmp eq i32 %call, 10 br i1 %res, label %ret1, label %ret2 - ret1: ; preds = %if.then, %entry ret i32 99 - ret2: ; preds = %if.then, %entry ret i32 0 } - define i32 @main(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@main -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32 99 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@main -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 99 ; %res = call i32 @test1(i1 %c) ret i32 %res } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -19,14 +19,16 @@ ; } ; target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" - @gtl = dso_local thread_local global i32 0, align 4 @gsh = dso_local global i32 0, align 4 - +;. +; CHECK: @[[GTL:[a-zA-Z0-9_$"\\.-]+]] = dso_local thread_local global i32 0, align 4 +; CHECK: @[[GSH:[a-zA-Z0-9_$"\\.-]+]] = 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____-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____-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:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP:%.*]] = load i32, i32* [[THREAD_LOCAL_PTR]], align 4 ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* @gsh, align 4 @@ -35,7 +37,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; 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____-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:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP:%.*]] = load i32, i32* [[THREAD_LOCAL_PTR]], align 4 ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* @gsh, align 4 @@ -48,7 +50,6 @@ %add = add nsw i32 %tmp, %tmp1 ret i32 %add } - define dso_local void @caller() { ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller() { ; IS__TUNIT____-NEXT: entry: @@ -64,8 +65,14 @@ call void @broker(i32* nonnull @gtl, i32 (i32*, i32*)* nonnull @callee, i32* nonnull @gsh) ret void } - declare !callback !0 dso_local void @broker(i32*, i32 (i32*, i32*)*, i32*) - !1 = !{i64 1, i64 0, i64 2, i1 false} !0 = !{!1} +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readonly willreturn } +;. +; CHECK: [[META0:![0-9]+]] = !{!1} +; CHECK: [[META1:![0-9]+]] = !{i64 1, i64 0, i64 2, i1 false} +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -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=9 -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 @@ -11,15 +11,20 @@ ; TEST 1 +;. +; CHECK: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 8 +; CHECK: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 16 +; CHECK: @[[CND:[a-zA-Z0-9_$"\\.-]+]] = external global i1 +;. define i32* @test1(i32* align 8 %0) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1 -; IS__TUNIT____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32* [[TMP0]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test1 -; IS__CGSCC____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32* [[TMP0]] ; ret i32* %0 @@ -29,12 +34,12 @@ define i32* @test2(i32* %0) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[TMP0]] ; ret i32* %0 @@ -44,13 +49,13 @@ 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____-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____-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____-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____-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]] ; IS__CGSCC____-NEXT: ret i32* [[RET]] ; @@ -62,13 +67,13 @@ 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____-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____-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____-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____-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]] ; IS__CGSCC____-NEXT: ret i32* [[RET]] ; @@ -104,14 +109,14 @@ define i32* @test6_1() #0 { ; NOT_CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test6_1 -; NOT_CGSCC_OPM-SAME: () [[ATTR1:#.*]] { -; NOT_CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_2() [[ATTR11:#.*]] +; NOT_CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { +; NOT_CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_2() #[[ATTR11:[0-9]+]] ; NOT_CGSCC_OPM-NEXT: unreachable ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test6_1 -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_2() [[ATTR12:#.*]] +; IS__CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_2() #[[ATTR12:[0-9]+]] ; IS__CGSCC_OPM-NEXT: unreachable ; %ret = tail call i32* @test6_2() @@ -121,14 +126,14 @@ define i32* @test6_2() #0 { ; NOT_CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test6_2 -; NOT_CGSCC_OPM-SAME: () [[ATTR1]] { -; NOT_CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_1() [[ATTR11]] +; NOT_CGSCC_OPM-SAME: () #[[ATTR1]] { +; NOT_CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_1() #[[ATTR11]] ; NOT_CGSCC_OPM-NEXT: unreachable ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test6_2 -; IS__CGSCC_OPM-SAME: () [[ATTR1]] { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_1() [[ATTR12]] +; IS__CGSCC_OPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_1() #[[ATTR12]] ; IS__CGSCC_OPM-NEXT: unreachable ; %ret = tail call i32* @test6_1() @@ -157,7 +162,7 @@ define internal i8* @f1(i8* readnone %0) local_unnamed_addr #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@f1 -; IS__TUNIT____-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { +; IS__TUNIT____-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { ; IS__TUNIT____-NEXT: br label [[TMP3:%.*]] ; IS__TUNIT____: 2: ; IS__TUNIT____-NEXT: unreachable @@ -166,7 +171,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC_OPM-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR2:#.*]] { +; IS__CGSCC_OPM-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br label [[TMP3:%.*]] ; IS__CGSCC_OPM: 2: ; IS__CGSCC_OPM-NEXT: unreachable @@ -175,7 +180,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC_NPM-SAME: () local_unnamed_addr [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]] ; IS__CGSCC_NPM: 1: ; IS__CGSCC_NPM-NEXT: unreachable @@ -233,13 +238,13 @@ define align 4 i8* @test7() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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____-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:[0-9]+]] ; IS__TUNIT____-NEXT: ret i8* [[C]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test7 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i8* @a1 ; %c = tail call i8* @f1(i8* align 8 dereferenceable(1) @a1) @@ -251,7 +256,7 @@ 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-LABEL: define {{[^@]+}}@f1b -; IS__CGSCC_OPM-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: br label [[TMP3:%.*]] ; IS__CGSCC_OPM: 2: ; IS__CGSCC_OPM-NEXT: unreachable @@ -260,7 +265,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1b -; IS__CGSCC_NPM-SAME: () local_unnamed_addr [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]] ; IS__CGSCC_NPM: 1: ; IS__CGSCC_NPM-NEXT: unreachable @@ -319,12 +324,12 @@ define align 4 i32* @test7b(i32* align 32 %p) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7b -; IS__TUNIT____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@test7b -; IS__CGSCC____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[P]] ; tail call i8* @f1b(i8* align 8 dereferenceable(1) @a1) @@ -337,18 +342,18 @@ ; NOT_CGSCC_OPM-NEXT: [[PTR0:%.*]] = tail call i32* @unknown() ; NOT_CGSCC_OPM-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown() ; NOT_CGSCC_OPM-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown() -; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) [[ATTR2:#.*]] -; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) [[ATTR2]] +; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) #[[ATTR2:[0-9]+]] +; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR2]] +; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR2]] ; NOT_CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test8_helper() { ; IS__CGSCC_OPM-NEXT: [[PTR0:%.*]] = tail call i32* @unknown() ; IS__CGSCC_OPM-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown() ; IS__CGSCC_OPM-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown() -; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) [[ATTR3:#.*]] -; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) [[ATTR3]] -; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) [[ATTR3]] +; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) #[[ATTR3:[0-9]+]] +; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR3]] +; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR3]] ; IS__CGSCC_OPM-NEXT: ret void ; %ptr0 = tail call i32* @unknown() @@ -365,18 +370,18 @@ define internal void @test8(i32* %a, i32* %b, i32* %c) { ; NOT_CGSCC_OPM: Function Attrs: nounwind ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test8 -; NOT_CGSCC_OPM-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) [[ATTR2]] { -; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) [[ATTR2]] +; NOT_CGSCC_OPM-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR2]] { +; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR2]] +; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR2]] +; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR2]] ; NOT_CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test8 -; IS__CGSCC_OPM-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) [[ATTR3]] { -; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) [[ATTR3]] -; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) [[ATTR3]] -; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) [[ATTR3]] +; IS__CGSCC_OPM-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR3]] { +; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR3]] +; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR3]] +; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR3]] ; IS__CGSCC_OPM-NEXT: ret void ; call void @user_i32_ptr(i32* %a) @@ -407,12 +412,12 @@ define i32* @test10a(i32* align 32 %p) { ; NOT_CGSCC_OPM: Function Attrs: nofree nosync nounwind ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test10a -; NOT_CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR3:#.*]] { +; NOT_CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3:[0-9]+]] { ; NOT_CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 ; NOT_CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 ; NOT_CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; NOT_CGSCC_OPM: t: -; NOT_CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) [[ATTR3]] +; NOT_CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3]] ; NOT_CGSCC_OPM-NEXT: store i32 1, i32* [[R]], align 32 ; NOT_CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 ; NOT_CGSCC_OPM-NEXT: br label [[E:%.*]] @@ -426,12 +431,12 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test10a -; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_OPM: t: -; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) [[ATTR4]] +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4]] ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[R]], align 32 ; IS__CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 ; IS__CGSCC_OPM-NEXT: br label [[E:%.*]] @@ -469,12 +474,12 @@ define i32* @test10b(i32* align 32 %p) { ; NOT_CGSCC_OPM: Function Attrs: nofree nosync nounwind ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test10b -; NOT_CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR3]] { +; NOT_CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] { ; NOT_CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 ; NOT_CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 ; NOT_CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; NOT_CGSCC_OPM: t: -; NOT_CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) [[ATTR3]] +; NOT_CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3]] ; NOT_CGSCC_OPM-NEXT: store i32 1, i32* [[R]], align 32 ; NOT_CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 ; NOT_CGSCC_OPM-NEXT: br label [[E:%.*]] @@ -488,12 +493,12 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test10b -; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR4]] { +; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4]] { ; IS__CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_OPM: t: -; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) [[ATTR4]] +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4]] ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[R]], align 32 ; IS__CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 ; IS__CGSCC_OPM-NEXT: br label [[E:%.*]] @@ -526,17 +531,24 @@ define i64 @test11(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test11 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) #[[ATTR4:[0-9]+]] { ; 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____-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* -; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8 -; IS__CGSCC____-NEXT: ret i64 [[RET]] +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test11 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) #[[ATTR5:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8 +; IS__CGSCC_OPM-NEXT: ret i64 [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test11 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8 +; IS__CGSCC_NPM-NEXT: ret i64 [[RET]] ; %p-cast = bitcast i32* %p to i64* %ret = load i64, i64* %p-cast, align 8 @@ -550,21 +562,30 @@ define i64 @test12-1(i32* align 4 %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-1 -; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 ; 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____-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* -; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 -; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 -; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16 -; IS__CGSCC____-NEXT: ret i64 [[RET]] +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-1 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR5]] { +; 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: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16 +; IS__CGSCC_OPM-NEXT: ret i64 [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-1 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR4]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16 +; IS__CGSCC_NPM-NEXT: ret i64 [[RET]] ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 1 @@ -576,19 +597,27 @@ define i64 @test12-2(i32* align 4 %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-2 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 ; 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____-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* -; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 -; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16 -; IS__CGSCC____-NEXT: ret i64 [[RET]] +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-2 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR5]] { +; 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: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16 +; IS__CGSCC_OPM-NEXT: ret i64 [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-2 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR4]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16 +; IS__CGSCC_NPM-NEXT: ret i64 [[RET]] ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 0 @@ -600,21 +629,30 @@ define void @test12-3(i32* align 4 %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-3 -; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) [[ATTR5:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 ; 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____-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* -; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 -; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 -; IS__CGSCC____-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-3 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) #[[ATTR6:[0-9]+]] { +; 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: store i64 0, i64* [[ARRAYIDX1]], align 16 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-3 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) #[[ATTR5:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 +; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16 +; IS__CGSCC_NPM-NEXT: ret void ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 1 @@ -626,19 +664,27 @@ define void @test12-4(i32* align 4 %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-4 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR5]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR5]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 ; 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____-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* -; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 -; IS__CGSCC____-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-4 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR6]] { +; 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: store i64 0, i64* [[ARRAYIDX0]], align 16 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-4 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR5]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 +; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16 +; IS__CGSCC_NPM-NEXT: ret void ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 0 @@ -651,20 +697,20 @@ define void @test12-5(i32* align 4 %p) { ; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test12-5 -; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR6:#.*]] { +; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR6:[0-9]+]] { ; 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-LABEL: define {{[^@]+}}@test12-5 -; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR7:[0-9]+]] { ; 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* @@ -677,18 +723,18 @@ define void @test12-6(i32* align 4 %p) { ; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test12-6 -; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR6]] { +; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR6]] { ; 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: 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-LABEL: define {{[^@]+}}@test12-6 -; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR7]] { +; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR7]] { ; 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]] +; IS__CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: ret void ; %p-cast = bitcast i32* %p to i64* @@ -700,7 +746,7 @@ define void @test13(i1 %c, i32* align 32 %dst) #0 { ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly ; 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:%.*]]) #[[ATTR7:[0-9]+]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -711,18 +757,31 @@ ; 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____-LABEL: define {{[^@]+}}@test13 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR7:#.*]] { -; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] -; IS__CGSCC____: truebb: -; IS__CGSCC____-NEXT: br label [[END:%.*]] -; IS__CGSCC____: falsebb: -; IS__CGSCC____-NEXT: br label [[END]] -; IS__CGSCC____: end: -; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ] -; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_OPM: truebb: +; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_OPM: falsebb: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ] +; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_NPM: truebb: +; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_NPM: falsebb: +; IS__CGSCC_NPM-NEXT: br label [[END]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ] +; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_NPM-NEXT: ret void ; br i1 %c, label %truebb, label %falsebb truebb: @@ -738,7 +797,7 @@ define void @test13-1(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -749,18 +808,31 @@ ; 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____-LABEL: define {{[^@]+}}@test13-1 -; 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:%.*]] -; IS__CGSCC____: falsebb: -; IS__CGSCC____-NEXT: br label [[END]] -; IS__CGSCC____: end: -; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ] -; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 16 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-1 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_OPM: truebb: +; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_OPM: falsebb: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ] +; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[PTR]], align 16 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-1 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_NPM: truebb: +; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_NPM: falsebb: +; IS__CGSCC_NPM-NEXT: br label [[END]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ] +; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[PTR]], align 16 +; IS__CGSCC_NPM-NEXT: ret void ; br i1 %c, label %truebb, label %falsebb truebb: @@ -776,7 +848,7 @@ define void @test13-2(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -787,18 +859,31 @@ ; 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____-LABEL: define {{[^@]+}}@test13-2 -; 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:%.*]] -; IS__CGSCC____: falsebb: -; IS__CGSCC____-NEXT: br label [[END]] -; IS__CGSCC____: end: -; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ] -; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-2 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_OPM: truebb: +; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_OPM: falsebb: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ] +; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-2 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_NPM: truebb: +; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_NPM: falsebb: +; IS__CGSCC_NPM-NEXT: br label [[END]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ] +; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_NPM-NEXT: ret void ; br i1 %c, label %truebb, label %falsebb truebb: @@ -814,7 +899,7 @@ define void @test13-3(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -825,18 +910,31 @@ ; 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____-LABEL: define {{[^@]+}}@test13-3 -; 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:%.*]] -; IS__CGSCC____: falsebb: -; IS__CGSCC____-NEXT: br label [[END]] -; IS__CGSCC____: end: -; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ] -; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-3 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_OPM: truebb: +; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_OPM: falsebb: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ] +; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-3 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_NPM: truebb: +; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_NPM: falsebb: +; IS__CGSCC_NPM-NEXT: br label [[END]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ] +; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_NPM-NEXT: ret void ; br i1 %c, label %truebb, label %falsebb truebb: @@ -853,15 +951,21 @@ define i64 @ptr2int(i32* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr2int -; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR9]] { ; 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____-LABEL: define {{[^@]+}}@ptr2int -; IS__CGSCC____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR9:#.*]] { -; IS__CGSCC____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 -; IS__CGSCC____-NEXT: ret i64 [[P2I]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ptr2int +; IS__CGSCC_OPM-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR10:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 +; IS__CGSCC_OPM-NEXT: ret i64 [[P2I]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ptr2int +; IS__CGSCC_NPM-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 +; IS__CGSCC_NPM-NEXT: ret i64 [[P2I]] ; %p2i = ptrtoint i32* %p to i64 ret i64 %p2i @@ -869,15 +973,21 @@ define i64* @int2ptr(i64 %i) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@int2ptr -; IS__TUNIT____-SAME: (i64 [[I:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i64 [[I:%.*]]) #[[ATTR9]] { ; 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____-LABEL: define {{[^@]+}}@int2ptr -; IS__CGSCC____-SAME: (i64 [[I:%.*]]) [[ATTR9]] { -; IS__CGSCC____-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* -; IS__CGSCC____-NEXT: ret i64* [[I2P]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@int2ptr +; IS__CGSCC_OPM-SAME: (i64 [[I:%.*]]) #[[ATTR10]] { +; IS__CGSCC_OPM-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* +; IS__CGSCC_OPM-NEXT: ret i64* [[I2P]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@int2ptr +; IS__CGSCC_NPM-SAME: (i64 [[I:%.*]]) #[[ATTR9]] { +; IS__CGSCC_NPM-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* +; IS__CGSCC_NPM-NEXT: ret i64* [[I2P]] ; %i2p = inttoptr i64 %i to i64* ret i64* %i2p @@ -887,15 +997,21 @@ define void @aligned_store(i8* %Value, i8** %Ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@aligned_store -; IS__TUNIT____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) [[ATTR5]] { +; IS__TUNIT____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef 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____-LABEL: define {{[^@]+}}@aligned_store -; IS__CGSCC____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) [[ATTR5]] { -; IS__CGSCC____-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@aligned_store +; IS__CGSCC_OPM-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) #[[ATTR6]] { +; IS__CGSCC_OPM-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@aligned_store +; IS__CGSCC_NPM-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) #[[ATTR5]] { +; IS__CGSCC_NPM-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 +; IS__CGSCC_NPM-NEXT: ret void ; store i8* %Value, i8** %Ptr, align 32 ret void @@ -917,17 +1033,24 @@ ; ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@align_store_after_bc -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) [[ATTR5]] { +; 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____-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* -; IS__CGSCC____-NEXT: store i8 0, i8* [[BC]], align 2048 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@align_store_after_bc +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) #[[ATTR6]] { +; IS__CGSCC_OPM-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8* +; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[BC]], align 2048 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@align_store_after_bc +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) #[[ATTR5]] { +; IS__CGSCC_NPM-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8* +; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[BC]], align 2048 +; IS__CGSCC_NPM-NEXT: ret void ; %bc = bitcast i32* %arg to i8* store i8 0, i8* %bc @@ -940,15 +1063,21 @@ define i32 @musttail_callee_1(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_callee_1 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef 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____-LABEL: define {{[^@]+}}@musttail_callee_1 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) [[ATTR4]] { -; IS__CGSCC____-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 -; IS__CGSCC____-NEXT: ret i32 [[V]] +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@musttail_callee_1 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) #[[ATTR5]] { +; IS__CGSCC_OPM-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 +; IS__CGSCC_OPM-NEXT: ret i32 [[V]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@musttail_callee_1 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) #[[ATTR4]] { +; IS__CGSCC_NPM-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 +; IS__CGSCC_NPM-NEXT: ret i32 [[V]] ; %v = load i32, i32* %p, align 32 ret i32 %v @@ -956,33 +1085,33 @@ define i32 @musttail_caller_1(i32* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR10:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR10:[0-9]+]] { ; 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]]) #[[ATTR10]] ; 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-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR11:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR11:[0-9]+]] { ; 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 noundef nonnull readonly dereferenceable(4) [[P]]) [[ATTR13:#.*]] +; IS__CGSCC_OPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR13:[0-9]+]] ; 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-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR10:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR10:[0-9]+]] { ; 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 noundef nonnull readonly dereferenceable(4) [[P]]) [[ATTR12:#.*]] +; IS__CGSCC_NPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR12:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[V]] ; IS__CGSCC_NPM: exit: ; IS__CGSCC_NPM-NEXT: ret i32 0 @@ -999,34 +1128,34 @@ define i32* @checkAndAdvance(i32* align(16) %p) { ; NOT_CGSCC_OPM: Function Attrs: nounwind ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@checkAndAdvance -; NOT_CGSCC_OPM-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR2]] { +; NOT_CGSCC_OPM-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR2]] { ; NOT_CGSCC_OPM-NEXT: entry: ; NOT_CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16 ; NOT_CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0 ; NOT_CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] ; NOT_CGSCC_OPM: if.then: ; NOT_CGSCC_OPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4 -; NOT_CGSCC_OPM-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) [[ATTR2]] +; NOT_CGSCC_OPM-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR2]] ; NOT_CGSCC_OPM-NEXT: br label [[RETURN]] ; NOT_CGSCC_OPM: return: ; NOT_CGSCC_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ] -; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) [[ATTR2]] +; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR2]] ; NOT_CGSCC_OPM-NEXT: ret i32* [[RETVAL_0]] ; ; IS__CGSCC_OPM: Function Attrs: nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@checkAndAdvance -; IS__CGSCC_OPM-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR3]] { +; IS__CGSCC_OPM-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16 ; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] ; IS__CGSCC_OPM: if.then: ; IS__CGSCC_OPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4 -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) [[ATTR3]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR3]] ; IS__CGSCC_OPM-NEXT: br label [[RETURN]] ; IS__CGSCC_OPM: return: ; IS__CGSCC_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ] -; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) [[ATTR3]] +; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR3]] ; IS__CGSCC_OPM-NEXT: ret i32* [[RETVAL_0]] ; entry: @@ -1062,3 +1191,46 @@ attributes #0 = { nounwind uwtable noinline } attributes #1 = { uwtable noinline } attributes #2 = { null_pointer_is_valid } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__TUNIT____: attributes #[[ATTR2]] = { nounwind } +; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind } +; IS__TUNIT____: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR6]] = { nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR7]] = { argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR8]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR10]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR11]] = { nofree noreturn nosync nounwind readnone } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nofree nosync nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR8]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR12]] = { nofree noreturn nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR13]] = { readonly willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR7]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR11]] = { nofree noreturn nosync nounwind readnone } +; IS__CGSCC_NPM: attributes #[[ATTR12]] = { readonly willreturn } +;. diff --git a/llvm/test/Transforms/Attributor/allow_list.ll b/llvm/test/Transforms/Attributor/allow_list.ll --- a/llvm/test/Transforms/Attributor/allow_list.ll +++ b/llvm/test/Transforms/Attributor/allow_list.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; REQUIRES: asserts ; RUN: opt -S -passes=attributor --attributor-seed-allow-list asd < %s | FileCheck %s --check-prefixes=CHECK_DISABLED ; RUN: opt -S -passes=attributor --attributor-seed-allow-list AAValueSimplify < %s | FileCheck %s --check-prefixes=CHECK_ENABLED @@ -16,21 +16,21 @@ define internal i32 @range_test(i32 %a) #0 { ; CHECK_DISABLED: Function Attrs: noinline nounwind uwtable ; CHECK_DISABLED-LABEL: define {{[^@]+}}@range_test -; CHECK_DISABLED-SAME: (i32 [[A:%.*]]) [[ATTR0:#.*]] { +; CHECK_DISABLED-SAME: (i32 [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK_DISABLED-NEXT: [[TMP1:%.*]] = icmp sgt i32 [[A]], 100 ; CHECK_DISABLED-NEXT: [[TMP2:%.*]] = zext i1 [[TMP1]] to i32 ; CHECK_DISABLED-NEXT: ret i32 [[TMP2]] ; ; CHECK_DISABLED_FUNCTION: Function Attrs: noinline nounwind uwtable ; CHECK_DISABLED_FUNCTION-LABEL: define {{[^@]+}}@range_test -; CHECK_DISABLED_FUNCTION-SAME: (i32 [[A:%.*]]) [[ATTR0:#.*]] { +; CHECK_DISABLED_FUNCTION-SAME: (i32 [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK_DISABLED_FUNCTION-NEXT: [[TMP1:%.*]] = icmp sgt i32 [[A]], 100 ; CHECK_DISABLED_FUNCTION-NEXT: [[TMP2:%.*]] = zext i1 [[TMP1]] to i32 ; CHECK_DISABLED_FUNCTION-NEXT: ret i32 [[TMP2]] ; ; CHECK_ENABLED_FUNCTION: Function Attrs: noinline nounwind readnone uwtable ; CHECK_ENABLED_FUNCTION-LABEL: define {{[^@]+}}@range_test -; CHECK_ENABLED_FUNCTION-SAME: () [[ATTR0:#.*]] { +; CHECK_ENABLED_FUNCTION-SAME: () #[[ATTR0:[0-9]+]] { ; CHECK_ENABLED_FUNCTION-NEXT: ret i32 1 ; %1 = icmp sgt i32 %a, 100 @@ -42,24 +42,24 @@ define i32 @range_use1() #0 { ; CHECK_DISABLED: Function Attrs: noinline nounwind uwtable ; CHECK_DISABLED-LABEL: define {{[^@]+}}@range_use1 -; CHECK_DISABLED-SAME: () [[ATTR0]] { +; CHECK_DISABLED-SAME: () #[[ATTR0]] { ; CHECK_DISABLED-NEXT: [[TMP1:%.*]] = call i32 @range_test(i32 123) ; CHECK_DISABLED-NEXT: ret i32 [[TMP1]] ; ; CHECK_ENABLED: Function Attrs: noinline nounwind uwtable ; CHECK_ENABLED-LABEL: define {{[^@]+}}@range_use1 -; CHECK_ENABLED-SAME: () [[ATTR0:#.*]] { +; CHECK_ENABLED-SAME: () #[[ATTR0:[0-9]+]] { ; CHECK_ENABLED-NEXT: ret i32 1 ; ; CHECK_DISABLED_FUNCTION: Function Attrs: noinline nounwind uwtable ; CHECK_DISABLED_FUNCTION-LABEL: define {{[^@]+}}@range_use1 -; CHECK_DISABLED_FUNCTION-SAME: () [[ATTR0]] { +; CHECK_DISABLED_FUNCTION-SAME: () #[[ATTR0]] { ; CHECK_DISABLED_FUNCTION-NEXT: [[TMP1:%.*]] = call i32 @range_test(i32 123) ; CHECK_DISABLED_FUNCTION-NEXT: ret i32 [[TMP1]] ; ; CHECK_ENABLED_FUNCTION: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; CHECK_ENABLED_FUNCTION-LABEL: define {{[^@]+}}@range_use1 -; CHECK_ENABLED_FUNCTION-SAME: () [[ATTR1:#.*]] { +; CHECK_ENABLED_FUNCTION-SAME: () #[[ATTR1:[0-9]+]] { ; CHECK_ENABLED_FUNCTION-NEXT: ret i32 1 ; %1 = call i32 @range_test(i32 123) @@ -70,24 +70,24 @@ define i32 @range_use2() #0 { ; CHECK_DISABLED: Function Attrs: noinline nounwind uwtable ; CHECK_DISABLED-LABEL: define {{[^@]+}}@range_use2 -; CHECK_DISABLED-SAME: () [[ATTR0]] { +; CHECK_DISABLED-SAME: () #[[ATTR0]] { ; CHECK_DISABLED-NEXT: [[TMP1:%.*]] = call i32 @range_test(i32 123) ; CHECK_DISABLED-NEXT: ret i32 [[TMP1]] ; ; CHECK_ENABLED: Function Attrs: noinline nounwind uwtable ; CHECK_ENABLED-LABEL: define {{[^@]+}}@range_use2 -; CHECK_ENABLED-SAME: () [[ATTR0]] { +; CHECK_ENABLED-SAME: () #[[ATTR0]] { ; CHECK_ENABLED-NEXT: ret i32 1 ; ; CHECK_DISABLED_FUNCTION: Function Attrs: noinline nounwind uwtable ; CHECK_DISABLED_FUNCTION-LABEL: define {{[^@]+}}@range_use2 -; CHECK_DISABLED_FUNCTION-SAME: () [[ATTR0]] { +; CHECK_DISABLED_FUNCTION-SAME: () #[[ATTR0]] { ; CHECK_DISABLED_FUNCTION-NEXT: [[TMP1:%.*]] = call i32 @range_test(i32 123) ; CHECK_DISABLED_FUNCTION-NEXT: ret i32 [[TMP1]] ; ; CHECK_ENABLED_FUNCTION: Function Attrs: noinline nounwind uwtable ; CHECK_ENABLED_FUNCTION-LABEL: define {{[^@]+}}@range_use2 -; CHECK_ENABLED_FUNCTION-SAME: () [[ATTR2:#.*]] { +; CHECK_ENABLED_FUNCTION-SAME: () #[[ATTR2:[0-9]+]] { ; CHECK_ENABLED_FUNCTION-NEXT: [[TMP1:%.*]] = call i32 @range_test() ; CHECK_ENABLED_FUNCTION-NEXT: ret i32 [[TMP1]] ; @@ -96,3 +96,14 @@ } attributes #0 = { nounwind uwtable noinline } +;. +; CHECK_DISABLED: attributes #[[ATTR0]] = { noinline nounwind uwtable } +;. +; CHECK_ENABLED: attributes #[[ATTR0]] = { noinline nounwind uwtable } +;. +; CHECK_DISABLED_FUNCTION: attributes #[[ATTR0]] = { noinline nounwind uwtable } +;. +; CHECK_ENABLED_FUNCTION: attributes #[[ATTR0]] = { noinline nounwind readnone uwtable } +; CHECK_ENABLED_FUNCTION: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; CHECK_ENABLED_FUNCTION: attributes #[[ATTR2]] = { noinline nounwind uwtable } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -12,13 +12,13 @@ define linkonce void @inner1() alwaysinline { ; IS__TUNIT____: Function Attrs: alwaysinline nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@inner1 -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: alwaysinline nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@inner1 -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret void ; @@ -29,13 +29,13 @@ define void @outer1() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@outer1 -; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@outer1 -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret void ; @@ -59,7 +59,7 @@ define i32 @outer2() { ; CHECK-LABEL: define {{[^@]+}}@outer2() { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[R:%.*]] = call i32 @inner2() [[ATTR2:#.*]] +; CHECK-NEXT: [[R:%.*]] = call i32 @inner2() #[[ATTR2:[0-9]+]] ; CHECK-NEXT: ret i32 [[R]] ; entry: @@ -73,7 +73,7 @@ define linkonce i32 @inner3(i8* %addr) alwaysinline { ; CHECK: Function Attrs: alwaysinline ; CHECK-LABEL: define {{[^@]+}}@inner3 -; CHECK-SAME: (i8* [[ADDR:%.*]]) [[ATTR2]] { +; CHECK-SAME: (i8* [[ADDR:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: indirectbr i8* [[ADDR]], [label [[ONE:%.*]], label %two] ; CHECK: one: @@ -104,3 +104,12 @@ %call = call i32 @inner3(i8* %addr) ret i32 %call } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { alwaysinline nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { alwaysinline } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { alwaysinline nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { alwaysinline } +;. diff --git a/llvm/test/Transforms/Attributor/callbacks.ll b/llvm/test/Transforms/Attributor/callbacks.ll --- a/llvm/test/Transforms/Attributor/callbacks.ll +++ b/llvm/test/Transforms/Attributor/callbacks.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; 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 @@ -181,7 +181,7 @@ ; ; IS________OPM: Function Attrs: nosync ; IS________OPM-LABEL: define {{[^@]+}}@t1_callback_callee -; IS________OPM-SAME: (i32* nocapture noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** nocapture noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) [[ATTR0:#.*]] { +; IS________OPM-SAME: (i32* nocapture noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** nocapture noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS________OPM-NEXT: entry: ; IS________OPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8 ; IS________OPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4 @@ -191,7 +191,7 @@ ; ; IS________NPM: Function Attrs: nosync ; IS________NPM-LABEL: define {{[^@]+}}@t1_callback_callee -; IS________NPM-SAME: (i32* nocapture noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) [[ATTR0:#.*]] { +; IS________NPM-SAME: (i32* nocapture noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8 ; IS________NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4 @@ -418,3 +418,9 @@ !0 = !{!1} !1 = !{i64 2, i64 -1, i64 -1, i1 true} +;. +; CHECK: attributes #[[ATTR0:[0-9]+]] = { nosync } +;. +; CHECK: [[META0:![0-9]+]] = !{!1} +; CHECK: [[META1:![0-9]+]] = !{i64 2, i64 -1, i64 -1, i1 true} +;. diff --git a/llvm/test/Transforms/Attributor/chain.ll b/llvm/test/Transforms/Attributor/chain.ll --- a/llvm/test/Transforms/Attributor/chain.ll +++ b/llvm/test/Transforms/Attributor/chain.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -attributor-max-initialization-chain-length=1 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK_1 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -attributor-max-initialization-chain-length=1 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK_1 ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -attributor-max-initialization-chain-length=1024 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK_5 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -passes=attributor-cgscc -S < %s 2>&1 | FileCheck %s --check-prefixes=CHECK ; RUN: opt -passes=attributor-cgscc -disable-output -attributor-print-dep < %s 2>&1 | FileCheck %s --check-prefixes=GRAPH ; RUN: opt -passes=attributor-cgscc -disable-output -attributor-dump-dep-graph -attributor-depgraph-dot-filename-prefix=%t < %s 2>/dev/null @@ -16,13 +16,13 @@ define i32* @checkAndAdvance(i32* align 16 %0) { ; CHECK: Function Attrs: argmemonly nofree nosync nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@checkAndAdvance -; CHECK-SAME: (i32* nofree noundef nonnull readonly align 16 dereferenceable(4) [[TMP0:%.*]]) [[ATTR0:#.*]] { +; CHECK-SAME: (i32* nofree noundef nonnull readonly align 16 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP0]], align 16 ; CHECK-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0 ; CHECK-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP7:%.*]] ; CHECK: 4: ; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 4 -; CHECK-NEXT: [[TMP6:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nofree nonnull readonly align 16 [[TMP5]]) [[ATTR1:#.*]] +; CHECK-NEXT: [[TMP6:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nofree nonnull readonly align 16 [[TMP5]]) #[[ATTR1:[0-9]+]] ; CHECK-NEXT: br label [[TMP8:%.*]] ; CHECK: 7: ; CHECK-NEXT: br label [[TMP8]] @@ -311,3 +311,7 @@ ; DOT-DAG: Node[[Node63]] -> Node[[Node17]] ; DOT-DAG: Node[[Node65]] -> Node[[Node22]] ; DOT-DAG: Node[[Node67]] -> Node[[Node23]] +;. +; CHECK: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly } +; CHECK: attributes #[[ATTR1]] = { nofree nosync nounwind readonly } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=17 -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=19 -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 @@ -13,14 +13,14 @@ 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____-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____-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:[0-9]+]] { ; 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____-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____-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:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP4:%.*]] = bitcast double* [[TMP1]] to i32* ; IS__CGSCC____-NEXT: [[TMP5:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP4]] ; IS__CGSCC____-NEXT: ret i32* [[TMP5]] @@ -34,14 +34,14 @@ 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____-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____-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____-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____-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* ; IS__CGSCC____-NEXT: [[TMP5:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP4]] ; IS__CGSCC____-NEXT: ret i32* [[TMP5]] @@ -56,13 +56,13 @@ define i32* @test3_1(i32* dereferenceable(8) %0) local_unnamed_addr { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-LABEL: define {{[^@]+}}@test3_1 -; IS__CGSCC____-SAME: (i32* nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { +; 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 ; IS__CGSCC____-NEXT: ret i32* [[RET]] ; @@ -73,13 +73,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____-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____-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____-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____-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 ; IS__CGSCC____-NEXT: ret i32* [[RET]] ; @@ -90,7 +90,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____-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____-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 ; IS__TUNIT____-NEXT: [[RET2:%.*]] = getelementptr inbounds i32, i32* [[TMP1]], i64 2 ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[RET1]], i32* [[RET2]] @@ -98,7 +98,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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____-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 ; IS__CGSCC____-NEXT: [[RET2:%.*]] = getelementptr inbounds i32, i32* [[TMP1]], i64 2 ; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[RET1]], i32* [[RET2]] @@ -116,12 +116,12 @@ define dereferenceable(4) i32* @test4(i32* dereferenceable(8) %0) local_unnamed_addr { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-LABEL: define {{[^@]+}}@test4 -; IS__CGSCC____-SAME: (i32* nofree nonnull readnone returned dereferenceable(8) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { +; 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]] ; ret i32* %0 @@ -236,8 +236,8 @@ define i32* @f7_0(i32* %ptr) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f7_0 -; CHECK-SAME: (i32* noundef nonnull returned dereferenceable(8) [[PTR:%.*]]) [[ATTR1:#.*]] { -; CHECK-NEXT: [[T:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull dereferenceable(8) [[PTR]]) [[ATTR1]] +; CHECK-SAME: (i32* noundef nonnull returned dereferenceable(8) [[PTR:%.*]]) #[[ATTR1:[0-9]+]] { +; CHECK-NEXT: [[T:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull dereferenceable(8) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: ret i32* [[PTR]] ; %T = tail call i32 @unkown_f(i32* dereferenceable(8) %ptr) @@ -247,14 +247,14 @@ define void @f7_1(i32* %ptr, i1 %c) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f7_1 -; CHECK-SAME: (i32* noundef nonnull align 4 dereferenceable(4) [[PTR:%.*]], i1 [[C:%.*]]) [[ATTR1]] { -; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) [[ATTR1]] -; CHECK-NEXT: [[B:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) [[ATTR1]] +; CHECK-SAME: (i32* noundef nonnull align 4 dereferenceable(4) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) #[[ATTR1]] +; CHECK-NEXT: [[B:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; CHECK: if.true: -; CHECK-NEXT: [[C:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) [[ATTR1]] -; CHECK-NEXT: [[D:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) [[ATTR1]] -; CHECK-NEXT: [[E:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) [[ATTR1]] +; CHECK-NEXT: [[C:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) #[[ATTR1]] +; CHECK-NEXT: [[D:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) #[[ATTR1]] +; CHECK-NEXT: [[E:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: ret void ; CHECK: if.false: ; CHECK-NEXT: ret void @@ -277,16 +277,16 @@ define void @f7_2(i1 %c) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f7_2 -; CHECK-SAME: (i1 [[C:%.*]]) [[ATTR1]] { -; CHECK-NEXT: [[PTR:%.*]] = tail call nonnull align 4 dereferenceable(4) i32* @unkown_ptr() [[ATTR1]] -; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) [[ATTR1]] +; CHECK-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[PTR:%.*]] = tail call nonnull align 4 dereferenceable(4) i32* @unkown_ptr() #[[ATTR1]] +; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: [[ARG_A_0:%.*]] = load i32, i32* [[PTR]], align 4 -; CHECK-NEXT: [[B:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) [[ATTR1]] +; CHECK-NEXT: [[B:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; CHECK: if.true: -; CHECK-NEXT: [[C:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) [[ATTR1]] -; CHECK-NEXT: [[D:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) [[ATTR1]] -; CHECK-NEXT: [[E:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) [[ATTR1]] +; CHECK-NEXT: [[C:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) #[[ATTR1]] +; CHECK-NEXT: [[D:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) #[[ATTR1]] +; CHECK-NEXT: [[E:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(8) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: ret void ; CHECK: if.false: ; CHECK-NEXT: ret void @@ -309,8 +309,8 @@ define i32* @f7_3() { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f7_3 -; CHECK-SAME: () [[ATTR1]] { -; CHECK-NEXT: [[PTR:%.*]] = tail call noundef nonnull align 16 dereferenceable(4) i32* @unkown_ptr() [[ATTR1]] +; CHECK-SAME: () #[[ATTR1]] { +; CHECK-NEXT: [[PTR:%.*]] = tail call noundef nonnull align 16 dereferenceable(4) i32* @unkown_ptr() #[[ATTR1]] ; CHECK-NEXT: store i32 10, i32* [[PTR]], align 16 ; CHECK-NEXT: ret i32* [[PTR]] ; @@ -323,14 +323,14 @@ define i32* @test_for_minus_index(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2:[0-9]+]] { ; 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____-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:%.*]]) #[[ATTR2:[0-9]+]] { ; 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]] @@ -343,13 +343,13 @@ 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____-LABEL: define {{[^@]+}}@deref_or_null_and_nonnull -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(100) [[TMP0:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(100) [[TMP0:%.*]]) #[[ATTR2]] { ; 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____-LABEL: define {{[^@]+}}@deref_or_null_and_nonnull -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(100) [[TMP0:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(100) [[TMP0:%.*]]) #[[ATTR2]] { ; 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:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: br label [[TMP1:%.*]] ; IS__TUNIT_OPM: 1: ; IS__TUNIT_OPM-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ] @@ -385,7 +385,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; 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:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br label [[TMP1:%.*]] ; IS__CGSCC_OPM: 1: ; IS__CGSCC_OPM-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ] @@ -419,7 +419,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP1:%.*]] ; IS__CGSCC_NPM: 1: ; IS__CGSCC_NPM-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ] @@ -454,7 +454,7 @@ define void @test8_neg(i32 %i, i8* %ptr) #0 { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; 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 @@ -462,7 +462,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; 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:%.*]]) #[[ATTR3]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__TUNIT_OPM-NEXT: br label [[FOR_BODY:%.*]] @@ -502,7 +502,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; 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:%.*]]) #[[ATTR3]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__CGSCC_OPM-NEXT: br label [[FOR_BODY:%.*]] @@ -536,7 +536,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; 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:%.*]]) #[[ATTR3]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__TUNIT_OPM-NEXT: br label [[FOR_BODY:%.*]] @@ -589,7 +589,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; 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:%.*]]) #[[ATTR3]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9 ; IS__CGSCC_OPM-NEXT: br label [[FOR_BODY:%.*]] @@ -623,7 +623,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; 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 noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) #[[ATTR4:[0-9]+]] { ; 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: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, !range [[RNG0:![0-9]+]] +; IS__TUNIT_OPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6:[0-9]+]] +; IS__TUNIT_OPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6]] ; 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 noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) #[[ATTR3:[0-9]+]] { ; 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: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, !range [[RNG0:![0-9]+]] +; IS__TUNIT_NPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6:[0-9]+]] +; IS__TUNIT_NPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6]] ; 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 noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) #[[ATTR4:[0-9]+]] { ; 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: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, !range [[RNG0:![0-9]+]] +; IS__CGSCC_OPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR7:[0-9]+]] +; IS__CGSCC_OPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@call_fill_range -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) #[[ATTR3:[0-9]+]] { ; 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: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, !range [[RNG0:![0-9]+]] +; IS__CGSCC_NPM-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6:[0-9]+]] +; IS__CGSCC_NPM-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6]] ; IS__CGSCC_NPM-NEXT: ret void ; entry: @@ -713,14 +713,14 @@ define void @simple-path(i8* %a, i8 * %b, i8 %c) { ; CHECK: Function Attrs: nounwind willreturn ; 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:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 ; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; CHECK: if.then: -; CHECK-NEXT: tail call void @use2(i8* nonnull dereferenceable(8) [[A]], i8* nonnull dereferenceable(8) [[B]]) [[ATTR1]] +; CHECK-NEXT: tail call void @use2(i8* nonnull dereferenceable(8) [[A]], i8* nonnull dereferenceable(8) [[B]]) #[[ATTR1]] ; CHECK-NEXT: ret void ; CHECK: if.else: -; CHECK-NEXT: tail call void @use2(i8* nonnull dereferenceable(4) [[A]], i8* [[B]]) [[ATTR1]] +; CHECK-NEXT: tail call void @use2(i8* nonnull dereferenceable(4) [[A]], i8* [[B]]) #[[ATTR1]] ; CHECK-NEXT: ret void ; %cmp = icmp eq i8 %c, 0 @@ -748,18 +748,18 @@ define void @complex-path(i8* %a, i8* %b, i8 %c) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@complex-path -; CHECK-SAME: (i8* noundef nonnull dereferenceable(12) [[A:%.*]], i8* nocapture nofree readnone [[B:%.*]], i8 [[C:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i8* noundef nonnull dereferenceable(12) [[A:%.*]], i8* nocapture nofree readnone [[B:%.*]], i8 [[C:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 -; CHECK-NEXT: tail call void @use1(i8* noundef nonnull dereferenceable(12) [[A]]) [[ATTR1]] +; CHECK-NEXT: tail call void @use1(i8* noundef nonnull dereferenceable(12) [[A]]) #[[ATTR1]] ; CHECK-NEXT: br i1 [[CMP]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]] ; CHECK: cont.then: -; CHECK-NEXT: tail call void @use1(i8* noundef nonnull dereferenceable(12) [[A]]) [[ATTR1]] +; CHECK-NEXT: tail call void @use1(i8* noundef nonnull dereferenceable(12) [[A]]) #[[ATTR1]] ; CHECK-NEXT: br label [[CONT2:%.*]] ; CHECK: cont.else: -; CHECK-NEXT: tail call void @use1(i8* noundef nonnull dereferenceable(16) [[A]]) [[ATTR1]] +; CHECK-NEXT: tail call void @use1(i8* noundef nonnull dereferenceable(16) [[A]]) #[[ATTR1]] ; CHECK-NEXT: br label [[CONT2]] ; CHECK: cont2: -; CHECK-NEXT: tail call void @use1(i8* noundef nonnull dereferenceable(12) [[A]]) [[ATTR1]] +; CHECK-NEXT: tail call void @use1(i8* noundef nonnull dereferenceable(12) [[A]]) #[[ATTR1]] ; CHECK-NEXT: ret void ; %cmp = icmp eq i8 %c, 0 @@ -794,7 +794,7 @@ 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____-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:%.*]]) #[[ATTR2]] { ; 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:%.*]] @@ -821,7 +821,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; 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:%.*]]) #[[ATTR3]] { ; 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]]) #[[ATTR6]] ; 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:%.*]]) #[[ATTR4:[0-9]+]] { ; 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]]) #[[ATTR7:[0-9]+]] ; 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:%.*]]) #[[ATTR5:[0-9]+]] { ; 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]]) #[[ATTR8:[0-9]+]] ; 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) #[[ATTR7:[0-9]+]] [ "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) #[[ATTR8:[0-9]+]] [ "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) #[[ATTR9:[0-9]+]] [ "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() #[[ATTR8:[0-9]+]] +; 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: 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]]) #[[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() ; 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() #[[ATTR9:[0-9]+]] +; 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: 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]]) #[[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() ; 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() #[[ATTR10:[0-9]+]] +; 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: 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]]) #[[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() ; IS__CGSCC_OPM-NEXT: ret void ; @@ -1148,3 +1148,50 @@ !0 = !{i64 10, i64 100} +;. +; IS__TUNIT_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR1]] = { nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR3]] = { argmemonly nofree nosync nounwind writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR5:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree nosync nounwind writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR7]] = { willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR8]] = { nounwind } +;. +; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR3]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR5:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR8]] = { willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR9]] = { nounwind } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR6:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nosync nounwind writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree nosync nounwind writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR9]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nounwind } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR5:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR8]] = { willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nounwind } +;. +; CHECK: [[META0:![0-9]+]] = !{i64 10, i64 100} +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -10,7 +10,7 @@ define <4 x double> @PR21780(double* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780 -; IS__TUNIT____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 1 ; IS__TUNIT____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 2 ; IS__TUNIT____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 3 @@ -27,7 +27,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780 -; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 1 ; IS__CGSCC____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 2 ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 3 @@ -65,14 +65,14 @@ define double @PR21780_only_access3_with_inbounds(double* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; 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____-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____-LABEL: define {{[^@]+}}@PR21780_only_access3_with_inbounds -; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { +; 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 ; IS__CGSCC____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__CGSCC____-NEXT: ret double [[T3]] @@ -86,14 +86,14 @@ define double @PR21780_only_access3_without_inbounds(double* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_only_access3_without_inbounds -; IS__TUNIT____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@PR21780_only_access3_without_inbounds -; IS__CGSCC____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 ; IS__CGSCC____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__CGSCC____-NEXT: ret double [[T3]] @@ -106,14 +106,14 @@ define double @PR21780_without_inbounds(double* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_without_inbounds -; IS__TUNIT____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (double* nocapture nofree noundef 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____-LABEL: define {{[^@]+}}@PR21780_without_inbounds -; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 ; IS__CGSCC____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__CGSCC____-NEXT: ret double [[T3]] @@ -136,7 +136,7 @@ define void @gep0(i8* %unused, i8* %other, i8* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep0 -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr i8, i8* [[PTR]], i64 2 ; IS__TUNIT____-NEXT: [[T2:%.*]] = load i8, i8* [[ARRAYIDX2]], align 1 ; IS__TUNIT____-NEXT: store i8 [[T2]], i8* [[OTHER]], align 1 @@ -144,7 +144,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@gep0 -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr i8, i8* [[PTR]], i64 2 ; IS__CGSCC____-NEXT: [[T2:%.*]] = load i8, i8* [[ARRAYIDX2]], align 1 ; IS__CGSCC____-NEXT: store i8 [[T2]], i8* [[OTHER]], align 1 @@ -166,12 +166,12 @@ define void @ordering(i8* %ptr1, i32* %ptr2) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR1:%.*]], i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR1:%.*]], i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: ret void ; %a20 = getelementptr i32, i32* %ptr2, i64 0 @@ -192,7 +192,7 @@ define void @not_entry_but_guaranteed_to_execute(i8* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_but_guaranteed_to_execute -; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[EXIT:%.*]] ; IS__TUNIT____: exit: @@ -200,7 +200,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_but_guaranteed_to_execute -; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[EXIT:%.*]] ; IS__CGSCC____: exit: @@ -223,7 +223,7 @@ define void @not_entry_not_guaranteed_to_execute(i8* %ptr, i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: loads: @@ -233,7 +233,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__CGSCC____: loads: @@ -260,7 +260,7 @@ define void @partial_in_entry(i16* %ptr, i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: loads: @@ -270,7 +270,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__CGSCC____: loads: @@ -298,14 +298,14 @@ define void @volatile_is_not_dereferenceable(i16* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@volatile_is_not_dereferenceable -; IS__TUNIT____-SAME: (i16* nofree align 2 [[PTR:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: (i16* nofree align 2 [[PTR:%.*]]) #[[ATTR3:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@volatile_is_not_dereferenceable -; IS__CGSCC____-SAME: (i16* nofree align 2 [[PTR:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC____-SAME: (i16* nofree align 2 [[PTR:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i16, i16* [[PTR]], i64 0 ; IS__CGSCC____-NEXT: [[T0:%.*]] = load volatile i16, i16* [[ARRAYIDX0]], align 2 ; IS__CGSCC____-NEXT: ret void @@ -324,12 +324,12 @@ define void @atomic_is_alright(i16* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomic_is_alright -; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@atomic_is_alright -; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx0 = getelementptr i16, i16* %ptr, i64 0 @@ -364,12 +364,12 @@ define void @variable_gep_index(i8* %unused, i8* %ptr, i64 %variable_index) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-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____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]], i64 [[VARIABLE_INDEX:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx1 = getelementptr i8, i8* %ptr, i64 %variable_index @@ -386,12 +386,12 @@ ; FIXME: %ptr should be dereferenceable(4) ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@multi_index_gep -; IS__TUNIT____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@multi_index_gep -; IS__CGSCC____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx00 = getelementptr <4 x i8>, <4 x i8>* %ptr, i64 0, i64 0 @@ -404,12 +404,12 @@ define void @not_byte_multiple(i9* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_byte_multiple -; IS__TUNIT____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@not_byte_multiple -; IS__CGSCC____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx0 = getelementptr i9, i9* %ptr, i64 0 @@ -422,12 +422,12 @@ define void @no_pointer_deref(i16* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@no_pointer_deref -; IS__TUNIT____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@no_pointer_deref -; IS__CGSCC____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx1 = getelementptr i16, i16* %ptr, i64 1 @@ -442,12 +442,12 @@ define void @non_consecutive(i32* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@non_consecutive -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@non_consecutive -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx1 = getelementptr i32, i32* %ptr, i64 1 @@ -464,12 +464,12 @@ define void @more_bytes(i32* dereferenceable(8) %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@more_bytes -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@more_bytes -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx3 = getelementptr i32, i32* %ptr, i64 3 @@ -488,12 +488,12 @@ define void @more_bytes_and_not_null(i32* dereferenceable_or_null(8) %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-LABEL: define {{[^@]+}}@more_bytes_and_not_null -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx3 = getelementptr i32, i32* %ptr, i64 3 @@ -512,12 +512,12 @@ define void @better_bytes(i32* dereferenceable(100) %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@better_bytes -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@better_bytes -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx3 = getelementptr i32, i32* %ptr, i64 3 @@ -534,12 +534,12 @@ define void @bitcast(i32* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcast -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@bitcast -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %ptr = bitcast i32* %arg to float* @@ -553,12 +553,12 @@ define void @bitcast_different_sizes(double* %arg1, i8* %arg2) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-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____-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 ; %ptr1 = bitcast double* %arg1 to float* @@ -580,12 +580,12 @@ define void @negative_offset(i32* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_offset -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@negative_offset -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %ptr = bitcast i32* %arg to float* @@ -599,7 +599,7 @@ define void @stores(i32* %arg) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@stores -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr float, float* [[PTR]], i64 0 ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr float, float* [[PTR]], i64 1 @@ -609,7 +609,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@stores -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* ; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr float, float* [[PTR]], i64 0 ; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr float, float* [[PTR]], i64 1 @@ -628,7 +628,7 @@ define void @load_store(i32* %arg) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_store -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr float, float* [[PTR]], i64 1 ; IS__TUNIT____-NEXT: store float 2.000000e+00, float* [[ARRAYIDX1]], align 4 @@ -636,7 +636,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_store -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* ; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr float, float* [[PTR]], i64 1 ; IS__CGSCC____-NEXT: store float 2.000000e+00, float* [[ARRAYIDX1]], align 4 @@ -653,7 +653,7 @@ define void @different_size1(i32* %arg) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@different_size1 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* ; IS__TUNIT____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 ; IS__TUNIT____-NEXT: store i32 0, i32* [[ARG]], align 8 @@ -661,7 +661,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@different_size1 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* ; IS__CGSCC____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 ; IS__CGSCC____-NEXT: store i32 0, i32* [[ARG]], align 8 @@ -676,7 +676,7 @@ define void @different_size2(i32* %arg) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@different_size2 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: store i32 0, i32* [[ARG]], align 8 ; IS__TUNIT____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* ; IS__TUNIT____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 @@ -684,7 +684,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@different_size2 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[ARG]], align 8 ; IS__CGSCC____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* ; IS__CGSCC____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 @@ -717,7 +717,7 @@ define i32 @require_cfg_analysis(i32 %c, i32* %p) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@require_cfg_analysis -; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT_OPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 ; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]] ; IS__TUNIT_OPM: l1: @@ -744,7 +744,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 ; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]] ; IS__TUNIT_NPM: l1: @@ -770,7 +770,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@require_cfg_analysis -; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4]] { ; IS__CGSCC_OPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]] ; IS__CGSCC_OPM: l1: @@ -797,7 +797,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR4]] { ; IS__CGSCC_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]] ; IS__CGSCC_NPM: l1: @@ -845,3 +845,16 @@ end: ret i32 1 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -10,7 +10,7 @@ define <4 x double> @PR21780(double* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780 -; IS__TUNIT____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 1 ; IS__TUNIT____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 2 ; IS__TUNIT____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 3 @@ -27,7 +27,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@PR21780 -; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 1 ; IS__CGSCC____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 2 ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds double, double* [[PTR]], i64 3 @@ -65,14 +65,14 @@ define double @PR21780_only_access3_with_inbounds(double* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; 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____-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____-LABEL: define {{[^@]+}}@PR21780_only_access3_with_inbounds -; IS__CGSCC____-SAME: (double* nocapture nofree nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { +; 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 ; IS__CGSCC____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__CGSCC____-NEXT: ret double [[T3]] @@ -86,14 +86,14 @@ define double @PR21780_only_access3_without_inbounds(double* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_only_access3_without_inbounds -; IS__TUNIT____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@PR21780_only_access3_without_inbounds -; IS__CGSCC____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (double* nocapture nofree readonly align 8 [[PTR:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 ; IS__CGSCC____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__CGSCC____-NEXT: ret double [[T3]] @@ -106,14 +106,14 @@ define double @PR21780_without_inbounds(double* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@PR21780_without_inbounds -; IS__TUNIT____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (double* nocapture nofree noundef 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____-LABEL: define {{[^@]+}}@PR21780_without_inbounds -; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(32) [[PTR:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX3:%.*]] = getelementptr double, double* [[PTR]], i64 3 ; IS__CGSCC____-NEXT: [[T3:%.*]] = load double, double* [[ARRAYIDX3]], align 8 ; IS__CGSCC____-NEXT: ret double [[T3]] @@ -136,7 +136,7 @@ define void @gep0(i8* %unused, i8* %other, i8* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep0 -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr i8, i8* [[PTR]], i64 2 ; IS__TUNIT____-NEXT: [[T2:%.*]] = load i8, i8* [[ARRAYIDX2]], align 1 ; IS__TUNIT____-NEXT: store i8 [[T2]], i8* [[OTHER]], align 1 @@ -144,7 +144,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@gep0 -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[OTHER:%.*]], i8* nocapture nofree nonnull readonly dereferenceable(3) [[PTR:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX2:%.*]] = getelementptr i8, i8* [[PTR]], i64 2 ; IS__CGSCC____-NEXT: [[T2:%.*]] = load i8, i8* [[ARRAYIDX2]], align 1 ; IS__CGSCC____-NEXT: store i8 [[T2]], i8* [[OTHER]], align 1 @@ -166,12 +166,12 @@ define void @ordering(i8* %ptr1, i32* %ptr2) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR1:%.*]], i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR1:%.*]], i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: ret void ; %a20 = getelementptr i32, i32* %ptr2, i64 0 @@ -192,7 +192,7 @@ define void @not_entry_but_guaranteed_to_execute(i8* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_but_guaranteed_to_execute -; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[EXIT:%.*]] ; IS__TUNIT____: exit: @@ -200,7 +200,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_but_guaranteed_to_execute -; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone dereferenceable(3) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[EXIT:%.*]] ; IS__CGSCC____: exit: @@ -223,7 +223,7 @@ define void @not_entry_not_guaranteed_to_execute(i8* %ptr, i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: loads: @@ -233,7 +233,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__CGSCC____: loads: @@ -260,7 +260,7 @@ define void @partial_in_entry(i16* %ptr, i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: loads: @@ -270,7 +270,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__CGSCC____: loads: @@ -298,14 +298,14 @@ define void @volatile_is_not_dereferenceable(i16* %ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@volatile_is_not_dereferenceable -; IS__TUNIT____-SAME: (i16* nofree align 2 [[PTR:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: (i16* nofree align 2 [[PTR:%.*]]) #[[ATTR3:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@volatile_is_not_dereferenceable -; IS__CGSCC____-SAME: (i16* nofree align 2 [[PTR:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC____-SAME: (i16* nofree align 2 [[PTR:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i16, i16* [[PTR]], i64 0 ; IS__CGSCC____-NEXT: [[T0:%.*]] = load volatile i16, i16* [[ARRAYIDX0]], align 2 ; IS__CGSCC____-NEXT: ret void @@ -324,12 +324,12 @@ define void @atomic_is_alright(i16* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomic_is_alright -; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@atomic_is_alright -; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx0 = getelementptr i16, i16* %ptr, i64 0 @@ -364,12 +364,12 @@ define void @variable_gep_index(i8* %unused, i8* %ptr, i64 %variable_index) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-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____-SAME: (i8* nocapture nofree readnone [[UNUSED:%.*]], i8* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]], i64 [[VARIABLE_INDEX:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx1 = getelementptr i8, i8* %ptr, i64 %variable_index @@ -386,12 +386,12 @@ ; FIXME: %ptr should be dereferenceable(4) ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@multi_index_gep -; IS__TUNIT____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@multi_index_gep -; IS__CGSCC____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (<4 x i8>* nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx00 = getelementptr <4 x i8>, <4 x i8>* %ptr, i64 0, i64 0 @@ -404,12 +404,12 @@ define void @not_byte_multiple(i9* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_byte_multiple -; IS__TUNIT____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@not_byte_multiple -; IS__CGSCC____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i9* nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx0 = getelementptr i9, i9* %ptr, i64 0 @@ -422,12 +422,12 @@ define void @no_pointer_deref(i16* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@no_pointer_deref -; IS__TUNIT____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@no_pointer_deref -; IS__CGSCC____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i16* nocapture nofree readnone align 2 [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx1 = getelementptr i16, i16* %ptr, i64 1 @@ -442,12 +442,12 @@ define void @non_consecutive(i32* %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@non_consecutive -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@non_consecutive -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx1 = getelementptr i32, i32* %ptr, i64 1 @@ -464,12 +464,12 @@ define void @more_bytes(i32* dereferenceable(8) %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@more_bytes -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@more_bytes -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx3 = getelementptr i32, i32* %ptr, i64 3 @@ -488,12 +488,12 @@ define void @more_bytes_and_not_null(i32* dereferenceable_or_null(8) %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-LABEL: define {{[^@]+}}@more_bytes_and_not_null -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx3 = getelementptr i32, i32* %ptr, i64 3 @@ -512,12 +512,12 @@ define void @better_bytes(i32* dereferenceable(100) %ptr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@better_bytes -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@better_bytes -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %arrayidx3 = getelementptr i32, i32* %ptr, i64 3 @@ -534,12 +534,12 @@ define void @bitcast(i32* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcast -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@bitcast -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %ptr = bitcast i32* %arg to float* @@ -553,12 +553,12 @@ define void @bitcast_different_sizes(double* %arg1, i8* %arg2) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-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____-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 ; %ptr1 = bitcast double* %arg1 to float* @@ -580,12 +580,12 @@ define void @negative_offset(i32* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_offset -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@negative_offset -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: ret void ; %ptr = bitcast i32* %arg to float* @@ -599,7 +599,7 @@ define void @stores(i32* %arg) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@stores -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr float, float* [[PTR]], i64 0 ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr float, float* [[PTR]], i64 1 @@ -609,7 +609,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@stores -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* ; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr float, float* [[PTR]], i64 0 ; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr float, float* [[PTR]], i64 1 @@ -628,7 +628,7 @@ define void @load_store(i32* %arg) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_store -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr float, float* [[PTR]], i64 1 ; IS__TUNIT____-NEXT: store float 2.000000e+00, float* [[ARRAYIDX1]], align 4 @@ -636,7 +636,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_store -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = bitcast i32* [[ARG]] to float* ; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr float, float* [[PTR]], i64 1 ; IS__CGSCC____-NEXT: store float 2.000000e+00, float* [[ARRAYIDX1]], align 4 @@ -653,7 +653,7 @@ define void @different_size1(i32* %arg) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@different_size1 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* ; IS__TUNIT____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 ; IS__TUNIT____-NEXT: store i32 0, i32* [[ARG]], align 8 @@ -661,7 +661,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@different_size1 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* ; IS__CGSCC____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 ; IS__CGSCC____-NEXT: store i32 0, i32* [[ARG]], align 8 @@ -676,7 +676,7 @@ define void @different_size2(i32* %arg) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@different_size2 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: store i32 0, i32* [[ARG]], align 8 ; IS__TUNIT____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* ; IS__TUNIT____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 @@ -684,7 +684,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@different_size2 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[ARG:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[ARG]], align 8 ; IS__CGSCC____-NEXT: [[ARG_CAST:%.*]] = bitcast i32* [[ARG]] to double* ; IS__CGSCC____-NEXT: store double 0.000000e+00, double* [[ARG_CAST]], align 8 @@ -717,7 +717,7 @@ define i32 @require_cfg_analysis(i32 %c, i32* %p) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@require_cfg_analysis -; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT_OPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 ; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]] ; IS__TUNIT_OPM: l1: @@ -744,7 +744,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 ; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]] ; IS__TUNIT_NPM: l1: @@ -770,7 +770,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@require_cfg_analysis -; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4]] { ; IS__CGSCC_OPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]] ; IS__CGSCC_OPM: l1: @@ -797,7 +797,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR4]] { ; IS__CGSCC_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]] ; IS__CGSCC_NPM: l1: @@ -845,3 +845,16 @@ end: ret i32 1 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +;. diff --git a/llvm/test/Transforms/Attributor/heap_to_stack.ll b/llvm/test/Transforms/Attributor/heap_to_stack.ll --- a/llvm/test/Transforms/Attributor/heap_to_stack.ll +++ b/llvm/test/Transforms/Attributor/heap_to_stack.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -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=5 -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 @@ -289,16 +289,16 @@ define void @test7() { ; IS________OPM: Function Attrs: noreturn ; IS________OPM-LABEL: define {{[^@]+}}@test7 -; IS________OPM-SAME: () [[ATTR3:#.*]] { +; IS________OPM-SAME: () #[[ATTR3:[0-9]+]] { ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4) -; IS________OPM-NEXT: [[TMP2:%.*]] = tail call i32 @no_return_call() [[ATTR3]] +; IS________OPM-NEXT: [[TMP2:%.*]] = tail call i32 @no_return_call() #[[ATTR3]] ; IS________OPM-NEXT: unreachable ; ; IS________NPM: Function Attrs: noreturn ; IS________NPM-LABEL: define {{[^@]+}}@test7 -; IS________NPM-SAME: () [[ATTR3:#.*]] { +; IS________NPM-SAME: () #[[ATTR3:[0-9]+]] { ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1 -; IS________NPM-NEXT: [[TMP2:%.*]] = tail call i32 @no_return_call() [[ATTR3]] +; IS________NPM-NEXT: [[TMP2:%.*]] = tail call i32 @no_return_call() #[[ATTR3]] ; IS________NPM-NEXT: unreachable ; %1 = tail call noalias i8* @malloc(i64 4) @@ -336,7 +336,7 @@ ; IS________OPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]]) ; IS________OPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32* ; IS________OPM-NEXT: store i32 10, i32* [[TMP2]], align 4 -; IS________OPM-NEXT: tail call void @foo_nounw(i32* nofree noundef align 4 [[TMP2]]) [[ATTR5:#.*]] +; IS________OPM-NEXT: tail call void @foo_nounw(i32* nofree noundef align 4 [[TMP2]]) #[[ATTR5:[0-9]+]] ; IS________OPM-NEXT: tail call void @free(i8* nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]]) ; IS________OPM-NEXT: ret void ; @@ -345,7 +345,7 @@ ; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[TMP1]]) ; IS________NPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32* ; IS________NPM-NEXT: store i32 10, i32* [[TMP2]], align 4 -; IS________NPM-NEXT: tail call void @foo_nounw(i32* nofree noundef align 4 [[TMP2]]) [[ATTR6:#.*]] +; IS________NPM-NEXT: tail call void @foo_nounw(i32* nofree noundef align 4 [[TMP2]]) #[[ATTR6:[0-9]+]] ; IS________NPM-NEXT: tail call void @free(i8* nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]]) ; IS________NPM-NEXT: ret void ; @@ -423,13 +423,13 @@ define void @test11() { ; IS________OPM-LABEL: define {{[^@]+}}@test11() { ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4) -; IS________OPM-NEXT: tail call void @sync_will_return(i8* [[TMP1]]) [[ATTR5]] +; IS________OPM-NEXT: tail call void @sync_will_return(i8* [[TMP1]]) #[[ATTR5]] ; IS________OPM-NEXT: tail call void @free(i8* nocapture [[TMP1]]) ; IS________OPM-NEXT: ret void ; ; IS________NPM-LABEL: define {{[^@]+}}@test11() { ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1 -; IS________NPM-NEXT: tail call void @sync_will_return(i8* [[TMP1]]) [[ATTR6]] +; IS________NPM-NEXT: tail call void @sync_will_return(i8* [[TMP1]]) #[[ATTR6]] ; IS________NPM-NEXT: ret void ; %1 = tail call noalias i8* @malloc(i64 4) @@ -732,7 +732,7 @@ ; IS________OPM-SAME: (i8 [[V:%.*]], i8** nocapture writeonly [[P:%.*]]) { ; IS________OPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4) ; IS________OPM-NEXT: store i8* [[TMP1]], i8** [[P]], align 8 -; IS________OPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[TMP1]]) [[ATTR5]] +; IS________OPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[TMP1]]) #[[ATTR5]] ; IS________OPM-NEXT: tail call void @free(i8* nocapture [[TMP1]]) ; IS________OPM-NEXT: ret void ; @@ -740,7 +740,7 @@ ; IS________NPM-SAME: (i8 [[V:%.*]], i8** nocapture writeonly [[P:%.*]]) { ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 4, align 1 ; IS________NPM-NEXT: store i8* [[TMP1]], i8** [[P]], align 8 -; IS________NPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[TMP1]]) [[ATTR6]] +; IS________NPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[TMP1]]) #[[ATTR6]] ; IS________NPM-NEXT: ret void ; %1 = tail call noalias i8* @malloc(i64 4) @@ -761,3 +761,19 @@ store i8* %1, i8** %P ret void } +;. +; IS________OPM: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn } +; IS________OPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync willreturn } +; IS________OPM: attributes #[[ATTR2:[0-9]+]] = { nofree nounwind } +; IS________OPM: attributes #[[ATTR3]] = { noreturn } +; IS________OPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS________OPM: attributes #[[ATTR5]] = { nounwind } +;. +; IS________NPM: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn } +; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync willreturn } +; IS________NPM: attributes #[[ATTR2:[0-9]+]] = { nofree nounwind } +; IS________NPM: attributes #[[ATTR3]] = { noreturn } +; IS________NPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS________NPM: attributes #[[ATTR5:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS________NPM: attributes #[[ATTR6]] = { nounwind } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -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=9 -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 @@ -7,28 +7,28 @@ 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____-LABEL: define {{[^@]+}}@visible -; IS__TUNIT____-SAME: (i32* noalias nocapture nofree readonly [[A:%.*]], i32* noalias nocapture nofree readonly [[B:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* noalias nocapture nofree readonly [[A:%.*]], i32* noalias nocapture nofree readonly [[B:%.*]]) #[[ATTR0:[0-9]+]] { ; 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]]) #[[ATTR3:[0-9]+]] +; 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: [[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-LABEL: define {{[^@]+}}@visible -; 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-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:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(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: [[CALL2:%.*]] = call i32 @noalias_args_argmem(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: [[CALL1:%.*]] = call i32 @noalias_args(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:[0-9]+]] +; IS__CGSCC_OPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(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: [[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-LABEL: define {{[^@]+}}@visible -; IS__CGSCC_NPM-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_NPM-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:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: -; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4:#.*]] -; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4]] +; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] +; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4]] ; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] ; IS__CGSCC_NPM-NEXT: ret i32 [[ADD]] ; @@ -42,34 +42,34 @@ define private i32 @noalias_args(i32* %A, i32* %B) #0 { ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args -; IS__TUNIT____-SAME: (i32* 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____-SAME: (i32* 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____-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 noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR3]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR3]] ; 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-LABEL: define {{[^@]+}}@noalias_args -; IS__CGSCC_OPM-SAME: (i32* 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-SAME: (i32* 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: entry: ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 ; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4:#.*]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]] ; 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-LABEL: define {{[^@]+}}@noalias_args -; IS__CGSCC_NPM-SAME: (i32* 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_NPM-SAME: (i32* 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_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 ; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]] -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR5:#.*]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]] ; IS__CGSCC_NPM-NEXT: ret i32 [[ADD2]] ; @@ -86,7 +86,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____-LABEL: define {{[^@]+}}@noalias_args_argmem -; IS__TUNIT____-SAME: (i32* 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____-SAME: (i32* 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____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 @@ -95,7 +95,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem -; IS__CGSCC____-SAME: (i32* 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____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 @@ -112,34 +112,34 @@ define dso_local i32 @visible_local(i32* %A) #0 { ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local -; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[A:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; 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]]) #[[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: [[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-LABEL: define {{[^@]+}}@visible_local -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 5, i32* [[B]], align 4 -; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4]] -; IS__CGSCC_OPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR4]] +; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4]] +; IS__CGSCC_OPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4]] ; 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-LABEL: define {{[^@]+}}@visible_local -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 5, i32* [[B]], align 4 -; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR5]] -; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) [[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5]] +; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5]] ; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]] ; IS__CGSCC_NPM-NEXT: ret i32 [[ADD]] ; @@ -155,7 +155,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-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-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 ; IS__TUNIT_OPM-NEXT: [[T1:%.*]] = load i32, i32* [[B]], align 4 ; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]] @@ -163,7 +163,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro -; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[B_PRIV]], align 4 ; IS__TUNIT_NPM-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4 @@ -175,7 +175,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn ; 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-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 ; IS__CGSCC_OPM-NEXT: [[T1:%.*]] = load i32, i32* [[B]], align 4 ; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]] @@ -183,7 +183,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro -; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP1]], i32* [[B_PRIV]], align 4 ; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4 @@ -202,38 +202,38 @@ define i32 @visible_local_2() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@visible_local_2 -; IS__TUNIT_OPM-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] { ; 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]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32 [[CALL]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@visible_local_2 -; IS__TUNIT_NPM-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; 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]]) #[[ATTR4:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32 [[CALL]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible_local_2 -; IS__CGSCC_OPM-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR2:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 5, i32* [[B]], align 4 -; 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: [[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:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local_2 -; IS__CGSCC_NPM-SAME: () [[ATTR3:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 5, i32* [[B]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[B]], align 4 -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 [[TMP1]], i32 [[TMP2]]) [[ATTR6:#.*]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 [[TMP1]], i32 [[TMP2]]) #[[ATTR6:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]] ; %B = alloca i32, align 4 @@ -245,14 +245,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____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn -; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn -; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4 ; IS__CGSCC____-NEXT: store i32 0, i32* [[B]], align 4 ; IS__CGSCC____-NEXT: ret i32 [[T0]] @@ -265,26 +265,26 @@ define i32 @visible_local_3() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local_3 -; IS__TUNIT____-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] { ; 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]]) #[[ATTR5:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 [[CALL]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@visible_local_3 -; IS__CGSCC_OPM-SAME: () [[ATTR2]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 5, i32* [[B]], align 4 -; 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: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR6:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local_3 -; IS__CGSCC_NPM-SAME: () [[ATTR3]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR3]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 5, i32* [[B]], align 4 -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) [[ATTR7:#.*]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR7:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]] ; %B = alloca i32, align 4 @@ -295,3 +295,28 @@ attributes #0 = { noinline nounwind uwtable willreturn } attributes #1 = { argmemonly noinline nounwind uwtable willreturn} +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree noinline nosync nounwind readonly uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree noinline nosync nounwind uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind readonly } +; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nounwind readonly } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nosync nounwind readonly } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nounwind willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nounwind readonly } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nosync nounwind readonly } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nounwind willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes --check-globals ; Deep Wrapper disabled ; RUN: opt -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM,CHECK_DISABLED,NOT_CGSCC_NPM_DISABLED,NOT_CGSCC_OPM_DISABLED,NOT_TUNIT_NPM_DISABLED,IS__TUNIT_____DISABLED,IS________OPM_DISABLED,IS__TUNIT_OPM_DISABLED @@ -137,12 +137,12 @@ ; ; IS__TUNIT_____ENABLED: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT_____ENABLED-LABEL: define {{[^@]+}}@unused_arg_caller -; IS__TUNIT_____ENABLED-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT_____ENABLED-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT_____ENABLED-NEXT: unreachable ; ; IS__CGSCC_____ENABLED: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC_____ENABLED-LABEL: define {{[^@]+}}@unused_arg_caller -; IS__CGSCC_____ENABLED-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC_____ENABLED-SAME: () #[[ATTR2:[0-9]+]] { ; IS__CGSCC_____ENABLED-NEXT: unreachable ; call void @unused_arg(i8 0) @@ -159,3 +159,12 @@ unreachable } +;. +; IS__TUNIT_____ENABLED: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_____ENABLED: attributes #[[ATTR1]] = { nofree noreturn nosync nounwind readnone willreturn } +; IS__TUNIT_____ENABLED: attributes #[[ATTR2:[0-9]+]] = { nounwind readnone } +;. +; IS__CGSCC_____ENABLED: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC_____ENABLED: attributes #[[ATTR1:[0-9]+]] = { nofree noreturn nosync nounwind readnone willreturn } +; IS__CGSCC_____ENABLED: attributes #[[ATTR2]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +;. 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 @@ -1,12 +1,10 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=35 -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=37 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM ; TODO: The old pass manager cgscc run is disabled as it causes a crash on windows which is under investigation: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23151 ; 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 -; NOT_CGSCC_OPM: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] -; IS__CGSCC_OPM: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, %lab0), i8* blockaddress(@dead_with_blockaddress_users, %end)] @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, %lab0), i8* blockaddress(@dead_with_blockaddress_users, %end)] declare void @no_return_call() nofree noreturn nounwind nosync @@ -26,10 +24,17 @@ ; This internal function has no live call sites, so all its BBs are considered dead, ; and nothing should be deduced for it. +;. +; CHECK: @[[DEAD_WITH_BLOCKADDRESS_USERS_L:[a-zA-Z0-9_$"\\.-]+]] = constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] +; CHECK: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 8 +; CHECK: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 16 +; CHECK: @[[E:[a-zA-Z0-9_$"\\.-]+]] = global %struct.a* null +; CHECK: @[[P:[a-zA-Z0-9_$"\\.-]+]] = global i8 0 +;. define internal i32 @dead_internal_func(i32 %0) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_internal_func -; IS__CGSCC____-SAME: () [[ATTR6:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR6:[0-9]+]] { ; IS__CGSCC____-NEXT: br label [[TMP2:%.*]] ; IS__CGSCC____: 1: ; IS__CGSCC____-NEXT: ret i32 undef @@ -58,11 +63,17 @@ } define i32 @volatile_load(i32*) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn -; CHECK-LABEL: define {{[^@]+}}@volatile_load -; CHECK-SAME: (i32* nofree align 4 [[TMP0:%.*]]) [[ATTR7:#.*]] { -; CHECK-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4 -; CHECK-NEXT: ret i32 [[TMP2]] +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@volatile_load +; NOT_CGSCC_NPM-SAME: (i32* nofree align 4 [[TMP0:%.*]]) #[[ATTR6:[0-9]+]] { +; NOT_CGSCC_NPM-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4 +; NOT_CGSCC_NPM-NEXT: ret i32 [[TMP2]] +; +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@volatile_load +; IS__CGSCC____-SAME: (i32* nofree align 4 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4 +; IS__CGSCC____-NEXT: ret i32 [[TMP2]] ; %2 = load volatile i32, i32* %0, align 4 ret i32 %2 @@ -71,7 +82,7 @@ define internal i32 @internal_load(i32*) norecurse nounwind uwtable { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_load -; IS__CGSCC____-SAME: () [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR8:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 undef ; %2 = load i32, i32* %0, align 4 @@ -82,9 +93,9 @@ define i32 @first_block_no_return(i32 %a, i32* nonnull %ptr1, i32* %ptr2) #0 { ; CHECK: Function Attrs: nofree noreturn nosync nounwind ; CHECK-LABEL: define {{[^@]+}}@first_block_no_return -; CHECK-SAME: (i32 [[A:%.*]], i32* nocapture nofree nonnull readnone [[PTR1:%.*]], i32* nocapture nofree readnone [[PTR2:%.*]]) [[ATTR0:#.*]] { +; CHECK-SAME: (i32 [[A:%.*]], i32* nocapture nofree nonnull readnone [[PTR1:%.*]], i32* nocapture nofree readnone [[PTR2:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: call void @no_return_call() [[ATTR3:#.*]] +; CHECK-NEXT: call void @no_return_call() #[[ATTR3:[0-9]+]] ; CHECK-NEXT: unreachable ; CHECK: cond.true: ; CHECK-NEXT: unreachable @@ -123,21 +134,37 @@ ; dead block and check if it is deduced. define i32 @dead_block_present(i32 %a, i32* %ptr1) #0 { -; CHECK: Function Attrs: nosync -; CHECK-LABEL: define {{[^@]+}}@dead_block_present -; CHECK-SAME: (i32 [[A:%.*]], i32* nocapture nofree readnone [[PTR1:%.*]]) [[ATTR9:#.*]] { -; CHECK-NEXT: entry: -; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 -; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] -; CHECK: cond.true: -; CHECK-NEXT: call void @no_return_call() [[ATTR3]] -; CHECK-NEXT: unreachable -; CHECK: cond.false: -; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL1:%.*]] = call i32 @bar() -; CHECK-NEXT: br label [[COND_END:%.*]] -; CHECK: cond.end: -; CHECK-NEXT: ret i32 [[CALL1]] +; NOT_CGSCC_NPM: Function Attrs: nosync +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@dead_block_present +; NOT_CGSCC_NPM-SAME: (i32 [[A:%.*]], i32* nocapture nofree readnone [[PTR1:%.*]]) #[[ATTR7:[0-9]+]] { +; NOT_CGSCC_NPM-NEXT: entry: +; NOT_CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] +; NOT_CGSCC_NPM: cond.true: +; NOT_CGSCC_NPM-NEXT: call void @no_return_call() #[[ATTR3]] +; NOT_CGSCC_NPM-NEXT: unreachable +; NOT_CGSCC_NPM: cond.false: +; NOT_CGSCC_NPM-NEXT: call void @normal_call() +; NOT_CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @bar() +; NOT_CGSCC_NPM-NEXT: br label [[COND_END:%.*]] +; NOT_CGSCC_NPM: cond.end: +; NOT_CGSCC_NPM-NEXT: ret i32 [[CALL1]] +; +; IS__CGSCC____: Function Attrs: nosync +; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_block_present +; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32* nocapture nofree readnone [[PTR1:%.*]]) #[[ATTR9:[0-9]+]] { +; 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:%.*]] +; IS__CGSCC____: cond.true: +; IS__CGSCC____-NEXT: call void @no_return_call() #[[ATTR3]] +; IS__CGSCC____-NEXT: unreachable +; IS__CGSCC____: cond.false: +; IS__CGSCC____-NEXT: call void @normal_call() +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @bar() +; IS__CGSCC____-NEXT: br label [[COND_END:%.*]] +; IS__CGSCC____: cond.end: +; IS__CGSCC____-NEXT: ret i32 [[CALL1]] ; entry: %cmp = icmp eq i32 %a, 0 @@ -163,15 +190,15 @@ define i32 @all_dead(i32 %a) #0 { ; CHECK: Function Attrs: nofree noreturn nosync nounwind ; CHECK-LABEL: define {{[^@]+}}@all_dead -; CHECK-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; CHECK-SAME: (i32 [[A:%.*]]) #[[ATTR0]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: -; CHECK-NEXT: call void @no_return_call() [[ATTR3]] +; CHECK-NEXT: call void @no_return_call() #[[ATTR3]] ; CHECK-NEXT: unreachable ; CHECK: cond.false: -; CHECK-NEXT: call void @no_return_call() [[ATTR3]] +; CHECK-NEXT: call void @no_return_call() #[[ATTR3]] ; CHECK-NEXT: unreachable ; CHECK: cond.end: ; CHECK-NEXT: unreachable @@ -209,7 +236,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn() [[ATTR4:#.*]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn() #[[ATTR4:[0-9]+]] ; CHECK-NEXT: unreachable ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -247,7 +274,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = invoke i32 @foo_noreturn() [[ATTR4]] +; CHECK-NEXT: [[CALL:%.*]] = invoke i32 @foo_noreturn() #[[ATTR4]] ; CHECK-NEXT: to label [[CONTINUE:%.*]] unwind label [[CLEANUP:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -300,7 +327,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn_nounwind() [[ATTR3]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn_nounwind() #[[ATTR3]] ; CHECK-NEXT: unreachable ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -350,7 +377,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() [[ATTR2:#.*]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2:[0-9]+]] ; CHECK-NEXT: br label [[CONTINUE:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -400,7 +427,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2]] ; CHECK-NEXT: br label [[CONTINUE:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -444,7 +471,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2]] ; CHECK-NEXT: br label [[CONTINUE:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -485,7 +512,7 @@ define void @ub(i32* %0) { ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@ub -; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) [[ATTR8:#.*]] { +; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: [[POISON:%.*]] = sub nuw i32 0, 1 ; NOT_CGSCC_NPM-NEXT: [[STILL_POISON:%.*]] = and i32 [[POISON]], 0 ; NOT_CGSCC_NPM-NEXT: [[POISON_YET_AGAIN:%.*]] = getelementptr i32, i32* [[TMP0]], i32 [[STILL_POISON]] @@ -494,7 +521,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@ub -; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) [[ATTR10:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] { ; IS__CGSCC____-NEXT: [[POISON:%.*]] = sub nuw i32 0, 1 ; IS__CGSCC____-NEXT: [[STILL_POISON:%.*]] = and i32 [[POISON]], 0 ; IS__CGSCC____-NEXT: [[POISON_YET_AGAIN:%.*]] = getelementptr i32, i32* [[TMP0]], i32 [[STILL_POISON]] @@ -511,7 +538,7 @@ define void @inf_loop() #0 { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@inf_loop -; NOT_CGSCC_NPM-SAME: () [[ATTR9:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR9:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: br label [[WHILE_BODY:%.*]] ; NOT_CGSCC_NPM: while.body: @@ -519,7 +546,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@inf_loop -; IS__CGSCC____-SAME: () [[ATTR11:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR11:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__CGSCC____: while.body: @@ -538,7 +565,7 @@ define i32 @test5(i32, i32) #0 { ; CHECK: Function Attrs: nosync readnone ; CHECK-LABEL: define {{[^@]+}}@test5 -; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR5:#.*]] { +; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] { ; CHECK-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], [[TMP1]] ; CHECK-NEXT: br i1 [[TMP3]], label [[COND_IF:%.*]], label [[COND_ELSEIF:%.*]] ; CHECK: cond.if: @@ -575,13 +602,13 @@ define void @rec() #0 { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@rec -; NOT_CGSCC_NPM-SAME: () [[ATTR10:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR10:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@rec -; IS__CGSCC____-SAME: () [[ATTR12:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR12:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -597,7 +624,7 @@ define i32 @test6(i32, i32) #0 { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6 -; NOT_CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR10]] { +; NOT_CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR10]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; NOT_CGSCC_NPM: cond.if: ; NOT_CGSCC_NPM-NEXT: unreachable @@ -610,7 +637,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test6 -; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR12]] { +; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR12]] { ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: cond.if: ; IS__CGSCC____-NEXT: unreachable @@ -788,16 +815,16 @@ define void @test_unreachable() { ; 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 @test_unreachable() [[ATTR0]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR0]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14:[0-9]+]] +; 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 @test_unreachable() [[ATTR0]] +; IS__CGSCC____-SAME: () #[[ATTR0]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16:[0-9]+]] +; IS__CGSCC____-NEXT: call void @test_unreachable() #[[ATTR0]] ; IS__CGSCC____-NEXT: unreachable ; call void @sink() @@ -807,22 +834,22 @@ define linkonce_odr void @non_exact1() { ; CHECK-LABEL: define {{[^@]+}}@non_exact1() { -; CHECK-NEXT: call void @non_dead_a0() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a1() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a2() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a3() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a4() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a5() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a6() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a7() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a8() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a9() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a10() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a11() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a12() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a13() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a14() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a15() [[ATTR2]] +; CHECK-NEXT: call void @non_dead_a0() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a1() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a2() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a3() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a4() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a5() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a6() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a7() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a8() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a9() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a10() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a11() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a12() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a13() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a14() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a15() #[[ATTR2]] ; CHECK-NEXT: call void @middle() ; CHECK-NEXT: ret void ; @@ -848,28 +875,28 @@ define internal void @middle() { ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@middle() { ; NOT_CGSCC_NPM-NEXT: bb0: -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b0() [[ATTR11:#.*]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b1() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b2() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b3() [[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b0() #[[ATTR11:[0-9]+]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b1() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b2() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b3() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: br label [[BB1:%.*]] ; NOT_CGSCC_NPM: bb1: -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b4() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b5() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b6() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b7() [[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b4() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b5() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b6() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b7() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: br label [[BB2:%.*]] ; NOT_CGSCC_NPM: bb2: -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b8() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b9() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b10() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b11() [[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b8() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b9() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b10() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b11() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: br label [[BB3:%.*]] ; NOT_CGSCC_NPM: bb3: -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b12() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b13() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b14() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b15() [[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b12() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b13() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b14() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b15() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: br label [[BB4:%.*]] ; NOT_CGSCC_NPM: bb4: ; NOT_CGSCC_NPM-NEXT: call void @non_exact2() @@ -877,28 +904,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() #[[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: 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() #[[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: 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() #[[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: 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() #[[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: br label [[BB4:%.*]] ; IS__CGSCC____: bb4: ; IS__CGSCC____-NEXT: call void @non_exact2() @@ -934,22 +961,22 @@ } define linkonce_odr void @non_exact2() { ; CHECK-LABEL: define {{[^@]+}}@non_exact2() { -; CHECK-NEXT: call void @non_dead_c0() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c1() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c2() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c3() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c4() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c5() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c6() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c7() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c8() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c9() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c10() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c11() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c12() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c13() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c14() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c15() [[ATTR2]] +; CHECK-NEXT: call void @non_dead_c0() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c1() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c2() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c3() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c4() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c5() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c6() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c7() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c8() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c9() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c10() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c11() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c12() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c13() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c14() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c15() #[[ATTR2]] ; CHECK-NEXT: call void @non_exact3() ; CHECK-NEXT: ret void ; @@ -974,23 +1001,23 @@ } define linkonce_odr void @non_exact3() { ; CHECK-LABEL: define {{[^@]+}}@non_exact3() { -; CHECK-NEXT: call void @non_dead_d0() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d1() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d2() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d3() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d4() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d5() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d6() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d7() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d8() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d9() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d10() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d11() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d12() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d13() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d14() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d15() [[ATTR2]] -; CHECK-NEXT: [[NR:%.*]] = call i32 @foo_noreturn() [[ATTR4]] +; CHECK-NEXT: call void @non_dead_d0() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d1() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d2() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d3() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d4() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d5() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d6() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d7() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d8() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d9() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d10() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d11() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d12() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d13() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d14() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d15() #[[ATTR2]] +; CHECK-NEXT: [[NR:%.*]] = call i32 @foo_noreturn() #[[ATTR4]] ; CHECK-NEXT: unreachable ; call void @non_dead_d0() @@ -1017,14 +1044,14 @@ define internal void @non_dead_a0() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a0 -; IS__CGSCC____-SAME: () [[ATTR13:#.*]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13:[0-9]+]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1033,14 +1060,14 @@ define internal void @non_dead_a1() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1049,14 +1076,14 @@ define internal void @non_dead_a2() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1065,14 +1092,14 @@ define internal void @non_dead_a3() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1081,14 +1108,14 @@ define internal void @non_dead_a4() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1097,14 +1124,14 @@ define internal void @non_dead_a5() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1113,14 +1140,14 @@ define internal void @non_dead_a6() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1129,14 +1156,14 @@ define internal void @non_dead_a7() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1145,14 +1172,14 @@ define internal void @non_dead_a8() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1161,14 +1188,14 @@ define internal void @non_dead_a9() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1177,14 +1204,14 @@ define internal void @non_dead_a10() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1193,14 +1220,14 @@ define internal void @non_dead_a11() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1209,14 +1236,14 @@ define internal void @non_dead_a12() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1225,14 +1252,14 @@ define internal void @non_dead_a13() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1241,14 +1268,14 @@ define internal void @non_dead_a14() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1257,14 +1284,14 @@ define internal void @non_dead_a15() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1273,14 +1300,14 @@ define internal void @non_dead_b0() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1289,14 +1316,14 @@ define internal void @non_dead_b1() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1305,14 +1332,14 @@ define internal void @non_dead_b2() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1321,14 +1348,14 @@ define internal void @non_dead_b3() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1337,14 +1364,14 @@ define internal void @non_dead_b4() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1353,14 +1380,14 @@ define internal void @non_dead_b5() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1369,14 +1396,14 @@ define internal void @non_dead_b6() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1385,14 +1412,14 @@ define internal void @non_dead_b7() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1401,14 +1428,14 @@ define internal void @non_dead_b8() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1417,14 +1444,14 @@ define internal void @non_dead_b9() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1433,14 +1460,14 @@ define internal void @non_dead_b10() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1449,14 +1476,14 @@ define internal void @non_dead_b11() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1465,14 +1492,14 @@ define internal void @non_dead_b12() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1481,14 +1508,14 @@ define internal void @non_dead_b13() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1497,14 +1524,14 @@ define internal void @non_dead_b14() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1513,14 +1540,14 @@ define internal void @non_dead_b15() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1529,14 +1556,14 @@ define internal void @non_dead_c0() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1545,14 +1572,14 @@ define internal void @non_dead_c1() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1561,14 +1588,14 @@ define internal void @non_dead_c2() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1577,14 +1604,14 @@ define internal void @non_dead_c3() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1593,14 +1620,14 @@ define internal void @non_dead_c4() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1609,14 +1636,14 @@ define internal void @non_dead_c5() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1625,14 +1652,14 @@ define internal void @non_dead_c6() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1641,14 +1668,14 @@ define internal void @non_dead_c7() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1657,14 +1684,14 @@ define internal void @non_dead_c8() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1673,14 +1700,14 @@ define internal void @non_dead_c9() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1689,14 +1716,14 @@ define internal void @non_dead_c10() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1705,14 +1732,14 @@ define internal void @non_dead_c11() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1721,14 +1748,14 @@ define internal void @non_dead_c12() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1737,14 +1764,14 @@ define internal void @non_dead_c13() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1753,14 +1780,14 @@ define internal void @non_dead_c14() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1769,14 +1796,14 @@ define internal void @non_dead_c15() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1785,14 +1812,14 @@ define internal void @non_dead_d0() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1801,14 +1828,14 @@ define internal void @non_dead_d1() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1817,14 +1844,14 @@ define internal void @non_dead_d2() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1833,14 +1860,14 @@ define internal void @non_dead_d3() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1849,14 +1876,14 @@ define internal void @non_dead_d4() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1865,14 +1892,14 @@ define internal void @non_dead_d5() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1881,14 +1908,14 @@ define internal void @non_dead_d6() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1897,14 +1924,14 @@ define internal void @non_dead_d7() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1913,14 +1940,14 @@ define internal void @non_dead_d8() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1929,14 +1956,14 @@ define internal void @non_dead_d9() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1945,14 +1972,14 @@ define internal void @non_dead_d10() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1961,14 +1988,14 @@ define internal void @non_dead_d11() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1977,14 +2004,14 @@ define internal void @non_dead_d12() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1993,14 +2020,14 @@ define internal void @non_dead_d13() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2009,14 +2036,14 @@ define internal void @non_dead_d14() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2025,14 +2052,14 @@ define internal void @non_dead_d15() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2062,14 +2089,14 @@ define void @live_with_dead_entry_lp() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@live_with_dead_entry_lp -; CHECK-SAME: () [[ATTR2]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { +; CHECK-SAME: () #[[ATTR2]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK-NEXT: entry: -; CHECK-NEXT: invoke void @blowup() [[ATTR4]] +; CHECK-NEXT: invoke void @blowup() #[[ATTR4]] ; CHECK-NEXT: to label [[LIVE_WITH_DEAD_ENTRY_DEAD:%.*]] unwind label [[LP1:%.*]] ; CHECK: lp1: ; CHECK-NEXT: [[LP:%.*]] = landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* null -; CHECK-NEXT: invoke void @blowup() [[ATTR4]] +; CHECK-NEXT: invoke void @blowup() #[[ATTR4]] ; CHECK-NEXT: to label [[LIVE_WITH_DEAD_ENTRY_DEAD1:%.*]] unwind label [[LP2:%.*]] ; CHECK: lp2: ; CHECK-NEXT: [[TMP0:%.*]] = landingpad { i8*, i32 } @@ -2097,14 +2124,14 @@ define internal void @useless_arg_sink(i32* %a) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_sink -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2114,14 +2141,14 @@ define internal void @useless_arg_almost_sink(i32* %a) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_almost_sink -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @useless_arg_sink() [[ATTR11]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; 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____-LABEL: define {{[^@]+}}@useless_arg_almost_sink -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @useless_arg_sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @useless_arg_sink() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret void ; call void @useless_arg_sink(i32* %a) @@ -2132,7 +2159,7 @@ define weak_odr void @useless_arg_ext(i32* %a) { ; CHECK-LABEL: define {{[^@]+}}@useless_arg_ext ; CHECK-SAME: (i32* [[A:%.*]]) { -; CHECK-NEXT: call void @useless_arg_almost_sink() [[ATTR2]] +; CHECK-NEXT: call void @useless_arg_almost_sink() #[[ATTR2]] ; CHECK-NEXT: ret void ; call void @useless_arg_almost_sink(i32* %a) @@ -2164,28 +2191,28 @@ define internal i32 @switch_default(i64 %i) nounwind { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { ; 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() #[[ATTR14]] ; 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____-LABEL: define {{[^@]+}}@switch_default -; IS__CGSCC____-SAME: () [[ATTR13]] { +; IS__CGSCC____-SAME: () #[[ATTR13]] { ; 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() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret i32 undef ; IS__CGSCC____: return: ; IS__CGSCC____-NEXT: unreachable @@ -2207,14 +2234,14 @@ define i32 @switch_default_caller() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_caller -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() [[ATTR11]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; 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____-LABEL: define {{[^@]+}}@switch_default_caller -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR16]] ; IS__CGSCC____-NEXT: ret i32 123 ; %call2 = tail call i32 @switch_default(i64 0) @@ -2224,7 +2251,7 @@ define internal i32 @switch_default_dead(i64 %i) nounwind { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead -; IS__CGSCC____-SAME: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i64 3, label [[RETURN:%.*]] @@ -2251,12 +2278,12 @@ define i32 @switch_default_dead_caller() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_dead_caller -; NOT_CGSCC_NPM-SAME: () [[ATTR12:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR12:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: ret i32 123 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead_caller -; IS__CGSCC____-SAME: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: ret i32 123 ; %call2 = tail call i32 @switch_default_dead(i64 0) @@ -2492,12 +2519,12 @@ define i32 @h(i32 %i) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@h -; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) [[ATTR12]] { +; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) #[[ATTR12]] { ; NOT_CGSCC_NPM-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@h -; IS__CGSCC____-SAME: (i32 [[I:%.*]]) [[ATTR6]] { +; IS__CGSCC____-SAME: (i32 [[I:%.*]]) #[[ATTR6]] { ; IS__CGSCC____-NEXT: ret i32 0 ; ret i32 0 @@ -2511,11 +2538,11 @@ define void @bad_gep() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@bad_gep -; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR12]] { ; 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]]) #[[ATTR15:[0-9]+]] ; NOT_CGSCC_NPM-NEXT: br label [[EXIT:%.*]] ; NOT_CGSCC_NPM: while.body: ; NOT_CGSCC_NPM-NEXT: unreachable @@ -2524,16 +2551,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]]) #[[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bad_gep -; IS__CGSCC____-SAME: () [[ATTR14:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR14:[0-9]+]] { ; 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]]) #[[ATTR17:[0-9]+]] ; IS__CGSCC____-NEXT: br label [[EXIT:%.*]] ; IS__CGSCC____: while.body: ; IS__CGSCC____-NEXT: unreachable @@ -2542,7 +2569,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]]) #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; entry: @@ -2575,3 +2602,40 @@ declare void @llvm.lifetime.start.p0i8(i64 %0, i8* %1) declare void @llvm.lifetime.end.p0i8(i64 %0, i8* %1) +;. +; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind } +; NOT_CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { readnone } +; NOT_CGSCC_NPM: attributes #[[ATTR2]] = { nounwind } +; NOT_CGSCC_NPM: attributes #[[ATTR3]] = { noreturn nounwind } +; NOT_CGSCC_NPM: attributes #[[ATTR4]] = { noreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR5]] = { nosync readnone } +; NOT_CGSCC_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nounwind uwtable willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR7]] = { nosync } +; NOT_CGSCC_NPM: attributes #[[ATTR8]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree noreturn nosync nounwind readnone } +; NOT_CGSCC_NPM: attributes #[[ATTR10]] = { nofree noreturn nosync nounwind readnone willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR13:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR14]] = { nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR15]] = { willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind } +; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { readnone } +; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind } +; IS__CGSCC____: attributes #[[ATTR3]] = { noreturn nounwind } +; IS__CGSCC____: attributes #[[ATTR4]] = { noreturn } +; IS__CGSCC____: attributes #[[ATTR5]] = { nosync readnone } +; IS__CGSCC____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR7]] = { argmemonly nofree norecurse nounwind uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR9]] = { nosync } +; IS__CGSCC____: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR11]] = { nofree norecurse noreturn nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR12]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR13]] = { nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR14]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR15:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR16]] = { nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR17]] = { willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -11,12 +11,12 @@ define i32 @chain_dead(i32 %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@chain_dead -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@chain_dead -; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 0 ; %init = call i32 @source() @@ -36,8 +36,8 @@ define i32 @chain_alive(i32 %arg) { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@chain_alive -; CHECK-SAME: (i32 [[ARG:%.*]]) [[ATTR0:#.*]] { -; CHECK-NEXT: [[INIT:%.*]] = call i32 @source() [[ATTR0]] +; CHECK-SAME: (i32 [[ARG:%.*]]) #[[ATTR0:[0-9]+]] { +; CHECK-NEXT: [[INIT:%.*]] = call i32 @source() #[[ATTR0]] ; CHECK-NEXT: [[V0:%.*]] = add i32 [[ARG]], [[INIT]] ; CHECK-NEXT: [[V1:%.*]] = add i32 [[INIT]], [[V0]] ; CHECK-NEXT: [[V2:%.*]] = add i32 [[V0]], [[V1]] @@ -63,3 +63,10 @@ %v9 = add i32 %v7, %v8 ret i32 %v9 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nounwind readonly } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nounwind readonly } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=17 -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=19 -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 @@ -7,7 +7,7 @@ define i8 @test1(i32 %a, i32 %length) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test1 -; IS__TUNIT_OPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_OPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[LOOP:%.*]] ; IS__TUNIT_OPM: loop: @@ -23,7 +23,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test1 -; IS__TUNIT_NPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]] ; IS__TUNIT_NPM: loop: @@ -38,7 +38,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test1 -; IS__CGSCC_OPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] ; IS__CGSCC_OPM: loop: @@ -54,7 +54,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test1 -; IS__CGSCC_NPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] ; IS__CGSCC_NPM: loop: @@ -87,7 +87,7 @@ define i8 @test2(i32 %n) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) [[ATTR0]] { +; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[LOOP:%.*]] ; IS__TUNIT_OPM: loop: @@ -109,7 +109,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]] ; IS__TUNIT_NPM: loop: @@ -131,7 +131,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) [[ATTR0]] { +; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] ; IS__CGSCC_OPM: loop: @@ -153,7 +153,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] ; IS__CGSCC_NPM: loop: @@ -279,10 +279,10 @@ ; CHECK-NEXT: [[C1:%.*]] = icmp ne i32 [[I]], -42 ; CHECK-NEXT: br i1 [[C1]], label [[EXIT2:%.*]], label [[EXIT]] ; CHECK: cont: -; CHECK-NEXT: call void @dummy(i1 [[F]]) [[ATTR2:#.*]] +; CHECK-NEXT: call void @dummy(i1 [[F]]) #[[ATTR2:[0-9]+]] ; CHECK-NEXT: br label [[EXIT2]] ; CHECK: do: -; CHECK-NEXT: call void @dummy(i1 [[F]]) [[ATTR2]] +; CHECK-NEXT: call void @dummy(i1 [[F]]) #[[ATTR2]] ; CHECK-NEXT: [[CONSUME:%.*]] = call i32 @exit() ; CHECK-NEXT: call void @llvm.assume(i1 noundef [[F]]) ; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[F]], false @@ -318,3 +318,24 @@ declare void @llvm.assume(i1) nounwind declare void @dummy(i1) nounwind declare void @llvm.experimental.guard(i1, ...) +;. +; IS__TUNIT_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone } +; IS__TUNIT_OPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR2]] = { nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync willreturn } +;. +; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nounwind } +; IS__TUNIT_NPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -9,7 +9,7 @@ define i32 @test-ashr(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test-ashr -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: chk65: ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[C]], 65 ; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[RETURN:%.*]], label [[CHK0:%.*]] @@ -30,7 +30,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test-ashr -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: chk65: ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[C]], 65 ; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[RETURN:%.*]], label [[CHK0:%.*]] @@ -71,3 +71,8 @@ %retval = phi i32 [0, %chk65], [1, %chk0], [%., %bb_then], [4, %bb_if] ret i32 %retval } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -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=9 -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 @@ -7,13 +7,15 @@ @G = external dso_local global i32, align 4 -; CHECK: Function Attrs: inaccessiblememonly declare noalias i8* @malloc(i64) inaccessiblememonly +;. +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4 +;. define dso_local i8* @internal_only(i32 %arg) { ; CHECK: Function Attrs: inaccessiblememonly ; CHECK-LABEL: define {{[^@]+}}@internal_only -; CHECK-SAME: (i32 [[ARG:%.*]]) [[ATTR0:#.*]] { +; CHECK-SAME: (i32 [[ARG:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64 ; CHECK-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) @@ -28,7 +30,7 @@ define dso_local i8* @internal_only_rec(i32 %arg) { ; CHECK: Function Attrs: inaccessiblememonly ; CHECK-LABEL: define {{[^@]+}}@internal_only_rec -; CHECK-SAME: (i32 [[ARG:%.*]]) [[ATTR0]] { +; CHECK-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[REM:%.*]] = srem i32 [[ARG]], 2 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[REM]], 1 @@ -68,7 +70,7 @@ define dso_local i8* @internal_only_rec_static_helper(i32 %arg) { ; CHECK: Function Attrs: inaccessiblememonly ; CHECK-LABEL: define {{[^@]+}}@internal_only_rec_static_helper -; CHECK-SAME: (i32 [[ARG:%.*]]) [[ATTR0]] { +; CHECK-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CALL:%.*]] = call noalias i8* @internal_only_rec_static(i32 [[ARG]]) ; CHECK-NEXT: ret i8* [[CALL]] @@ -81,7 +83,7 @@ define internal i8* @internal_only_rec_static(i32 %arg) { ; CHECK: Function Attrs: inaccessiblememonly ; CHECK-LABEL: define {{[^@]+}}@internal_only_rec_static -; CHECK-SAME: (i32 [[ARG:%.*]]) [[ATTR0]] { +; CHECK-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[REM:%.*]] = srem i32 [[ARG]], 2 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[REM]], 1 @@ -176,7 +178,7 @@ define dso_local i8* @internal_argmem_only_read(i32* %arg) { ; CHECK: Function Attrs: inaccessiblemem_or_argmemonly ; CHECK-LABEL: define {{[^@]+}}@internal_argmem_only_read -; CHECK-SAME: (i32* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR1:#.*]] { +; CHECK-SAME: (i32* nocapture noundef nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TMP:%.*]] = load i32, i32* [[ARG]], align 4 ; CHECK-NEXT: [[CONV:%.*]] = sext i32 [[TMP]] to i64 @@ -193,7 +195,7 @@ define dso_local i8* @internal_argmem_only_write(i32* %arg) { ; CHECK: Function Attrs: inaccessiblemem_or_argmemonly ; CHECK-LABEL: define {{[^@]+}}@internal_argmem_only_write -; CHECK-SAME: (i32* nocapture noundef nonnull writeonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i32* nocapture noundef nonnull writeonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: store i32 10, i32* [[ARG]], align 4 ; CHECK-NEXT: [[CALL:%.*]] = call noalias dereferenceable_or_null(10) i8* @malloc(i64 noundef 10) @@ -208,14 +210,14 @@ define dso_local i8* @internal_argmem_only_rec(i32* %arg) { ; IS__TUNIT____: Function Attrs: inaccessiblemem_or_argmemonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_argmem_only_rec -; IS__TUNIT____-SAME: (i32* nocapture [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture [[ARG:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CALL:%.*]] = call noalias i8* @internal_argmem_only_rec_1(i32* nocapture align 4 [[ARG]]) ; IS__TUNIT____-NEXT: ret i8* [[CALL]] ; ; IS__CGSCC____: Function Attrs: inaccessiblemem_or_argmemonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_argmem_only_rec -; IS__CGSCC____-SAME: (i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[CALL:%.*]] = call noalias i8* @internal_argmem_only_rec_1(i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG]]) ; IS__CGSCC____-NEXT: ret i8* [[CALL]] @@ -228,7 +230,7 @@ define internal i8* @internal_argmem_only_rec_1(i32* %arg) { ; IS__TUNIT____: Function Attrs: inaccessiblemem_or_argmemonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_argmem_only_rec_1 -; IS__TUNIT____-SAME: (i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP:%.*]] = load i32, i32* [[ARG]], align 4 ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0 @@ -254,7 +256,7 @@ ; ; IS__CGSCC____: Function Attrs: inaccessiblemem_or_argmemonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_argmem_only_rec_1 -; IS__CGSCC____-SAME: (i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP:%.*]] = load i32, i32* [[ARG]], align 4 ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0 @@ -310,7 +312,7 @@ define internal i8* @internal_argmem_only_rec_2(i32* %arg) { ; CHECK: Function Attrs: inaccessiblemem_or_argmemonly ; CHECK-LABEL: define {{[^@]+}}@internal_argmem_only_rec_2 -; CHECK-SAME: (i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i32* nocapture noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: store i32 0, i32* [[ARG]], align 4 ; CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 -1 @@ -332,7 +334,7 @@ define void @callerA1(i8* %arg) { ; CHECK: Function Attrs: argmemonly ; CHECK-LABEL: define {{[^@]+}}@callerA1 -; CHECK-SAME: (i8* [[ARG:%.*]]) [[ATTR3:#.*]] { +; CHECK-SAME: (i8* [[ARG:%.*]]) #[[ATTR3:[0-9]+]] { ; CHECK-NEXT: [[TMP1:%.*]] = call i8* @argmem_only(i8* [[ARG]]) ; CHECK-NEXT: ret void ; @@ -342,7 +344,7 @@ define void @callerA2(i8* %arg) { ; CHECK: Function Attrs: inaccessiblemem_or_argmemonly ; CHECK-LABEL: define {{[^@]+}}@callerA2 -; CHECK-SAME: (i8* [[ARG:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i8* [[ARG:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: [[TMP1:%.*]] = call i8* @inaccesible_argmem_only_decl(i8* [[ARG]]) ; CHECK-NEXT: ret void ; @@ -352,7 +354,7 @@ define void @callerB1() { ; CHECK: Function Attrs: readnone ; CHECK-LABEL: define {{[^@]+}}@callerB1 -; CHECK-SAME: () [[ATTR2:#.*]] { +; CHECK-SAME: () #[[ATTR2:[0-9]+]] { ; CHECK-NEXT: [[STACK:%.*]] = alloca i8, align 1 ; CHECK-NEXT: [[TMP1:%.*]] = call i8* @argmem_only(i8* noundef nonnull dereferenceable(1) [[STACK]]) ; CHECK-NEXT: ret void @@ -364,7 +366,7 @@ define void @callerB2() { ; CHECK: Function Attrs: inaccessiblememonly ; CHECK-LABEL: define {{[^@]+}}@callerB2 -; CHECK-SAME: () [[ATTR0]] { +; CHECK-SAME: () #[[ATTR0]] { ; CHECK-NEXT: [[STACK:%.*]] = alloca i8, align 1 ; CHECK-NEXT: [[TMP1:%.*]] = call i8* @inaccesible_argmem_only_decl(i8* noundef nonnull dereferenceable(1) [[STACK]]) ; CHECK-NEXT: ret void @@ -417,12 +419,12 @@ define void @callerE(i8* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@callerE -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) [[ATTR5:#.*]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@callerE -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) [[ATTR5:#.*]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__CGSCC____-NEXT: ret void ; call void @llvm.lifetime.start.p0i8(i64 4, i8* %arg) @@ -433,13 +435,13 @@ define void @write_global() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@write_global -; IS__TUNIT____-SAME: () [[ATTR6:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR6:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@write_global -; IS__CGSCC____-SAME: () [[ATTR6:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR6:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 0, i32* @G, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -449,13 +451,13 @@ define void @write_global_via_arg(i32* %GPtr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@write_global_via_arg -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[GPTR:%.*]]) [[ATTR7:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[GPTR:%.*]]) #[[ATTR7:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@write_global_via_arg -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[GPTR:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[GPTR:%.*]]) #[[ATTR7:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[GPTR]], align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -465,13 +467,13 @@ define internal void @write_global_via_arg_internal(i32* %GPtr) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@write_global_via_arg_internal -; IS__TUNIT____-SAME: () [[ATTR6]] { +; 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____-LABEL: define {{[^@]+}}@write_global_via_arg_internal -; IS__CGSCC____-SAME: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: store i32 0, i32* @G, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -482,14 +484,14 @@ define void @writeonly_global() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@writeonly_global -; IS__TUNIT____-SAME: () [[ATTR6]] { -; IS__TUNIT____-NEXT: call void @write_global() [[ATTR6]] +; IS__TUNIT____-SAME: () #[[ATTR6]] { +; IS__TUNIT____-NEXT: call void @write_global() #[[ATTR6]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@writeonly_global -; IS__CGSCC____-SAME: () [[ATTR6]] { -; IS__CGSCC____-NEXT: call void @write_global() [[ATTR10:#.*]] +; IS__CGSCC____-SAME: () #[[ATTR6]] { +; IS__CGSCC____-NEXT: call void @write_global() #[[ATTR10:[0-9]+]] ; IS__CGSCC____-NEXT: ret void ; call void @write_global() @@ -498,14 +500,14 @@ define void @writeonly_global_via_arg() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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____-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: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; 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]] +; 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]] ; IS__CGSCC____-NEXT: ret void ; call void @write_global_via_arg(i32* @G) @@ -516,14 +518,14 @@ ; ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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____-SAME: () #[[ATTR6]] { +; IS__TUNIT____-NEXT: call void @write_global_via_arg_internal() #[[ATTR6]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@writeonly_global_via_arg_internal -; IS__CGSCC____-SAME: () [[ATTR6]] { -; IS__CGSCC____-NEXT: call void @write_global_via_arg_internal() [[ATTR10]] +; IS__CGSCC____-SAME: () #[[ATTR6]] { +; IS__CGSCC____-NEXT: call void @write_global_via_arg_internal() #[[ATTR10]] ; IS__CGSCC____-NEXT: ret void ; call void @write_global_via_arg_internal(i32* @G) @@ -533,11 +535,11 @@ 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____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] { ; 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: [[TMP1:%.*]] = call i8 @recursive_not_readnone(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR10:[0-9]+]] ; IS__TUNIT____-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 ; IS__TUNIT____-NEXT: ret i8 [[R]] ; IS__TUNIT____: f: @@ -546,11 +548,11 @@ ; ; 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____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] { ; 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: [[TMP1:%.*]] = call i8 @recursive_not_readnone(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11:[0-9]+]] ; IS__CGSCC____-NEXT: [[R:%.*]] = load i8, i8* [[ALLOC]], align 1 ; IS__CGSCC____-NEXT: ret i8 [[R]] ; IS__CGSCC____: f: @@ -571,11 +573,11 @@ 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____-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: [[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: @@ -584,11 +586,11 @@ ; ; 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____-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: [[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: @@ -609,16 +611,16 @@ define i8 @readnone_caller(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR9:#.*]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR9:[0-9]+]] { ; 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]]) #[[ATTR10]] ; IS__TUNIT____-NEXT: ret i8 [[R]] ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR9:#.*]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i8, align 1 -; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) [[ATTR12:#.*]] +; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR12:[0-9]+]] ; IS__CGSCC____-NEXT: ret i8 [[R]] ; %a = alloca i8 @@ -629,11 +631,11 @@ 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____-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: [[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: @@ -642,11 +644,11 @@ ; ; 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____-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: [[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: @@ -667,14 +669,14 @@ define i8 @readnone_caller2(i1 %c) { ; 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____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] { +; IS__TUNIT____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR10]] ; IS__TUNIT____-NEXT: ret i8 [[R]] ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR9]] { -; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal2(i8* undef, i1 [[C]]) [[ATTR12]] +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] { +; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: ret i8 [[R]] ; %r = call i8 @recursive_not_readnone_internal2(i8* undef, i1 %c) @@ -684,13 +686,13 @@ define internal void @argmemonly_before_ipconstprop(i32* %p) argmemonly { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@argmemonly_before_ipconstprop -; IS__TUNIT____-SAME: () [[ATTR6]] { +; 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____-LABEL: define {{[^@]+}}@argmemonly_before_ipconstprop -; IS__CGSCC____-SAME: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: store i32 0, i32* @G, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -701,16 +703,43 @@ define void @argmemonky_caller() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@argmemonky_caller -; IS__TUNIT____-SAME: () [[ATTR6]] { -; IS__TUNIT____-NEXT: call void @argmemonly_before_ipconstprop() [[ATTR6]] +; IS__TUNIT____-SAME: () #[[ATTR6]] { +; IS__TUNIT____-NEXT: call void @argmemonly_before_ipconstprop() #[[ATTR6]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@argmemonky_caller -; IS__CGSCC____-SAME: () [[ATTR6]] { -; IS__CGSCC____-NEXT: call void @argmemonly_before_ipconstprop() [[ATTR10]] +; IS__CGSCC____-SAME: () #[[ATTR6]] { +; IS__CGSCC____-NEXT: call void @argmemonly_before_ipconstprop() #[[ATTR10]] ; IS__CGSCC____-NEXT: ret void ; call void @argmemonly_before_ipconstprop(i32* @G) ret void } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { inaccessiblememonly } +; IS__TUNIT____: attributes #[[ATTR1]] = { inaccessiblemem_or_argmemonly } +; IS__TUNIT____: attributes #[[ATTR2]] = { readnone } +; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly } +; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR7]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR8]] = { argmemonly nofree nosync nounwind } +; IS__TUNIT____: attributes #[[ATTR9]] = { nofree nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR10]] = { nofree nosync nounwind } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { inaccessiblememonly } +; IS__CGSCC____: attributes #[[ATTR1]] = { inaccessiblemem_or_argmemonly } +; IS__CGSCC____: attributes #[[ATTR2]] = { readnone } +; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly } +; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR8]] = { argmemonly nofree nosync nounwind } +; IS__CGSCC____: attributes #[[ATTR9]] = { nofree nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR10]] = { nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR11]] = { nofree nosync nounwind } +; IS__CGSCC____: attributes #[[ATTR12]] = { nounwind } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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 @@ -13,7 +13,7 @@ ; IS__TUNIT____-SAME: (void (i8*)* nonnull [[FP:%.*]]) { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i32, align 4 -; IS__TUNIT____-NEXT: call void @foo(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) [[ATTR1:#.*]] +; IS__TUNIT____-NEXT: call void @foo(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR1:[0-9]+]] ; IS__TUNIT____-NEXT: call void [[FP]](i8* bitcast (void (i32*)* @foo to i8*)) ; IS__TUNIT____-NEXT: call void @callback1(void (i32*)* noundef nonnull @foo) ; IS__TUNIT____-NEXT: call void @callback2(void (i8*)* noundef bitcast (void (i32*)* @foo to void (i8*)*)) @@ -26,7 +26,7 @@ ; IS__CGSCC____-SAME: (void (i8*)* noundef nonnull [[FP:%.*]]) { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4 -; IS__CGSCC____-NEXT: call void @foo(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) [[ATTR1:#.*]] +; IS__CGSCC____-NEXT: call void @foo(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: call void [[FP]](i8* bitcast (void (i32*)* @foo to i8*)) ; IS__CGSCC____-NEXT: call void @callback1(void (i32*)* noundef nonnull @foo) ; IS__CGSCC____-NEXT: call void @callback2(void (i8*)* noundef bitcast (void (i32*)* @foo to void (i8*)*)) @@ -55,7 +55,7 @@ ; IS__TUNIT____-SAME: (void (i8*)* [[FP:%.*]]) { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i32, align 4 -; IS__TUNIT____-NEXT: call void @foo(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) [[ATTR1]] +; IS__TUNIT____-NEXT: call void @foo(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR1]] ; IS__TUNIT____-NEXT: call void @callback1(void (i32*)* noundef nonnull @foo) ; IS__TUNIT____-NEXT: call void @callback2(void (i8*)* noundef bitcast (void (i32*)* @foo to void (i8*)*)) ; IS__TUNIT____-NEXT: call void @callback2(void (i8*)* [[FP]]) @@ -69,7 +69,7 @@ ; IS__CGSCC____-SAME: (void (i8*)* [[FP:%.*]]) { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4 -; IS__CGSCC____-NEXT: call void @foo(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) [[ATTR1]] +; IS__CGSCC____-NEXT: call void @foo(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR1]] ; IS__CGSCC____-NEXT: call void @callback1(void (i32*)* noundef nonnull @foo) ; IS__CGSCC____-NEXT: call void @callback2(void (i8*)* noundef bitcast (void (i32*)* @foo to void (i8*)*)) ; IS__CGSCC____-NEXT: call void @callback2(void (i8*)* [[FP]]) @@ -97,14 +97,14 @@ ; ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: store i32 0, i32* [[A]], align 4 ; IS__CGSCC____-NEXT: ret void @@ -116,3 +116,10 @@ declare void @callback1(void (i32*)*) declare void @callback2(void (i8*)*) +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR1]] = { nounwind willreturn writeonly } +;. 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 @@ -1,14 +1,18 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -S %s | FileCheck %s ; RUN: opt -passes=attributor -S %s | FileCheck %s @var1 = internal global [1 x i32] undef @var2 = internal global i32 0 +;. +; CHECK: @[[VAR1:[a-zA-Z0-9_$"\\.-]+]] = internal global [1 x i32] undef +; CHECK: @[[VAR2:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 0 +;. define i32 addrspace(1)* @foo(i32 addrspace(4)* %arg) { ; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn ; CHECK-LABEL: define {{[^@]+}}@foo -; CHECK-SAME: (i32 addrspace(4)* nofree readnone [[ARG:%.*]]) [[ATTR0:#.*]] { +; CHECK-SAME: (i32 addrspace(4)* nofree readnone [[ARG:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TMP0:%.*]] = addrspacecast i32 addrspace(4)* [[ARG]] to i32 addrspace(1)* ; CHECK-NEXT: ret i32 addrspace(1)* [[TMP0]] @@ -21,8 +25,8 @@ define i32* @func1() { ; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn ; CHECK-LABEL: define {{[^@]+}}@func1 -; CHECK-SAME: () [[ATTR0]] { -; CHECK-NEXT: [[PTR:%.*]] = call i32* @func1a() [[ATTR0]] +; CHECK-SAME: () #[[ATTR0]] { +; CHECK-NEXT: [[PTR:%.*]] = call i32* @func1a() #[[ATTR0]] ; CHECK-NEXT: ret i32* [[PTR]] ; %ptr = call i32* @func1a([1 x i32]* @var1) @@ -41,7 +45,7 @@ define internal void @func2a(i32* %0) { ; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly ; CHECK-LABEL: define {{[^@]+}}@func2a -; CHECK-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]]) [[ATTR1:#.*]] { +; CHECK-SAME: (i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] { ; CHECK-NEXT: store i32 0, i32* @var2, align 4 ; CHECK-NEXT: ret void ; @@ -112,3 +116,7 @@ ; CHECK-LABEL: declare {{[^@]+}}@func6 ; CHECK-SAME: (i8*) declare void @func6(i8*) +;. +; CHECK: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; CHECK: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn writeonly } +;. diff --git a/llvm/test/Transforms/Attributor/new_attributes.ll b/llvm/test/Transforms/Attributor/new_attributes.ll --- a/llvm/test/Transforms/Attributor/new_attributes.ll +++ b/llvm/test/Transforms/Attributor/new_attributes.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt < %s -attributor -attributor-annotate-decl-cs -attributor-max-iterations=2 -S | FileCheck %s ; RUN: opt < %s -attributor -attributor-annotate-decl-cs -attributor-max-iterations=3 -S | FileCheck %s ; RUN: opt < %s -attributor -attributor-annotate-decl-cs -attributor-max-iterations=4 -S | FileCheck %s 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -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=5 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM ; TODO: The old pass manager cgscc run is disabled as it causes a crash on windows which is under investigation: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/25479/steps/test-check-all/logs/FAIL%3A%20LLVM%3A%3Anoalias.ll @@ -16,6 +16,10 @@ @G = external global i8* +;. +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external global i8* +; CHECK: @[[ALIAS_OF_P:[a-zA-Z0-9_$"\\.-]+]] = external global i32* +;. define i8* @foo() { ; CHECK-LABEL: define {{[^@]+}}@foo() { ; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4) @@ -44,12 +48,12 @@ define void @nocapture(i8* %a){ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nocapture -; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree readnone [[A:%.*]]) [[ATTR0:#.*]] { +; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree readnone [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocapture -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[A:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[A:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret void ; ret void @@ -106,8 +110,8 @@ define i8* @bar() nounwind uwtable { ; CHECK: Function Attrs: nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@bar -; CHECK-SAME: () [[ATTR1:#.*]] { -; CHECK-NEXT: [[TMP1:%.*]] = tail call i8* (...) @baz() [[ATTR2:#.*]] +; CHECK-SAME: () #[[ATTR1:[0-9]+]] { +; CHECK-NEXT: [[TMP1:%.*]] = tail call i8* (...) @baz() #[[ATTR2:[0-9]+]] ; CHECK-NEXT: ret i8* [[TMP1]] ; %1 = tail call i8* (...) @baz() @@ -117,11 +121,11 @@ define i8* @foo1(i32 %0) nounwind uwtable { ; CHECK: Function Attrs: nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@foo1 -; CHECK-SAME: (i32 [[TMP0:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0 ; CHECK-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]] ; CHECK: 3: -; CHECK-NEXT: [[TMP4:%.*]] = tail call i8* (...) @baz() [[ATTR2]] +; CHECK-NEXT: [[TMP4:%.*]] = tail call i8* (...) @baz() #[[ATTR2]] ; CHECK-NEXT: br label [[TMP5]] ; CHECK: 5: ; CHECK-NEXT: [[TMP6:%.*]] = tail call noalias i8* @malloc(i64 noundef 4) @@ -147,12 +151,12 @@ define i8** @getter() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@getter -; NOT_CGSCC_NPM-SAME: () [[ATTR0]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR0]] { ; NOT_CGSCC_NPM-NEXT: ret i8** @G ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@getter -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i8** @G ; ret i8** @G @@ -162,12 +166,12 @@ define i8** @calle1(){ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@calle1 -; NOT_CGSCC_NPM-SAME: () [[ATTR0]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR0]] { ; NOT_CGSCC_NPM-NEXT: ret i8** @G ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@calle1 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i8** @G ; %1 = call i8** @getter() @@ -180,13 +184,13 @@ define i8* @test6() nounwind uwtable ssp { ; CHECK: Function Attrs: nounwind ssp uwtable ; CHECK-LABEL: define {{[^@]+}}@test6 -; CHECK-SAME: () [[ATTR3:#.*]] { +; CHECK-SAME: () #[[ATTR3:[0-9]+]] { ; CHECK-NEXT: [[X:%.*]] = alloca [2 x i8], align 1 ; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 0 ; CHECK-NEXT: store i8 97, i8* [[ARRAYIDX]], align 1 ; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 1 ; CHECK-NEXT: store i8 0, i8* [[ARRAYIDX1]], align 1 -; CHECK-NEXT: [[CALL:%.*]] = call noalias i8* @strdup(i8* nocapture noundef nonnull dereferenceable(2) [[ARRAYIDX]]) [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call noalias i8* @strdup(i8* nocapture noundef nonnull dereferenceable(2) [[ARRAYIDX]]) #[[ATTR2]] ; CHECK-NEXT: ret i8* [[CALL]] ; %x = alloca [2 x i8], align 1 @@ -203,9 +207,9 @@ define i8* @test7() nounwind { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@test7 -; CHECK-SAME: () [[ATTR2]] { +; CHECK-SAME: () #[[ATTR2]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[A:%.*]] = call noalias i8* @malloc(i64 noundef 4) [[ATTR2]] +; CHECK-NEXT: [[A:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR2]] ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8* [[A]], null ; CHECK-NEXT: br i1 [[TOBOOL]], label [[RETURN:%.*]], label [[IF_END:%.*]] ; CHECK: if.end: @@ -234,7 +238,7 @@ define i8* @test8(i32* %0) nounwind uwtable { ; CHECK: Function Attrs: nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@test8 -; CHECK-SAME: (i32* [[TMP0:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: [[TMP2:%.*]] = tail call noalias i8* @malloc(i64 noundef 4) ; CHECK-NEXT: [[TMP3:%.*]] = icmp ne i32* [[TMP0]], null ; CHECK-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]] @@ -506,13 +510,13 @@ define internal i32 @p2i(i32* %arg) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@p2i -; NOT_CGSCC_NPM-SAME: (i32* noalias nofree readnone [[ARG:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@p2i -; IS__CGSCC____-SAME: (i32* noalias nofree readnone [[ARG:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* noalias nofree readnone [[ARG:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[ARG]] to i32 ; IS__CGSCC____-NEXT: ret i32 [[P2I]] ; @@ -523,20 +527,20 @@ define i32 @i2p(i32* %arg) { ; 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-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { +; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) #[[ATTR0]] ; 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]] +; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @ret(i32* nocapture nofree readonly align 4 [[BC]]) #[[ATTR4]] ; NOT_CGSCC_NPM-NEXT: ret i32 [[CALL]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@i2p -; IS__CGSCC____-SAME: (i32* nofree readonly [[ARG:%.*]]) [[ATTR4:#.*]] { -; IS__CGSCC____-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) [[ATTR10:#.*]] +; IS__CGSCC____-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__CGSCC____-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) #[[ATTR10:[0-9]+]] ; IS__CGSCC____-NEXT: [[I2P:%.*]] = inttoptr i32 [[C]] to i8* ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i8* [[I2P]] to i32* -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @ret(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[BC]]) [[ATTR11:#.*]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @ret(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[BC]]) #[[ATTR11:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[CALL]] ; %c = call i32 @p2i(i32* %arg) @@ -548,13 +552,13 @@ define internal i32 @ret(i32* %arg) { ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@ret -; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR5:#.*]] { +; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR5:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@ret -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) [[ATTR5:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* [[ARG]], align 4 ; IS__CGSCC____-NEXT: ret i32 [[L]] ; @@ -577,7 +581,7 @@ ; 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 void @llvm.lifetime.start.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) #[[ATTR10:[0-9]+]] ; 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) @@ -632,13 +636,13 @@ define void @make_alias(i32* %p) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@make_alias -; NOT_CGSCC_NPM-SAME: (i32* nofree writeonly [[P:%.*]]) [[ATTR7:#.*]] { +; NOT_CGSCC_NPM-SAME: (i32* nofree writeonly [[P:%.*]]) #[[ATTR7:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@make_alias -; IS__CGSCC____-SAME: (i32* nofree writeonly [[P:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree writeonly [[P:%.*]]) #[[ATTR7:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32* [[P]], i32** @alias_of_p, align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -649,13 +653,13 @@ define void @only_store(i32* %p) { ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@only_store -; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR8:#.*]] { +; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR8:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@only_store -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[P]], align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -666,26 +670,26 @@ define void @test15_caller(i32* noalias %p, i32 %c) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test15_caller -; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { +; 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]]) #[[ATTR7]] ; 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]]) #[[ATTR7]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@test15_caller -; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { +; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR7]] { ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] ; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: tail call void @only_store(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) [[ATTR12:#.*]] +; IS__CGSCC____-NEXT: tail call void @only_store(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR12:[0-9]+]] ; IS__CGSCC____-NEXT: br label [[IF_END]] ; IS__CGSCC____: if.end: -; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) [[ATTR12]] +; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: ret void ; %tobool = icmp eq i32 %c, 0 @@ -723,36 +727,36 @@ 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-LABEL: define {{[^@]+}}@test16_sub -; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]]) [[ATTR7]] { +; 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]]) #[[ATTR7]] +; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly align 4 [[P]]) #[[ATTR7]] ; 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]]) #[[ATTR7]] ; 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____-LABEL: define {{[^@]+}}@test16_sub -; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]]) [[ATTR7]] { +; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]]) #[[ATTR7]] { ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C1]], 0 ; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] ; IS__CGSCC____: if.then: -; IS__CGSCC____-NEXT: tail call void @only_store(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) [[ATTR12]] -; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree nonnull writeonly align 4 dereferenceable(4) [[P]]) [[ATTR12]] +; IS__CGSCC____-NEXT: tail call void @only_store(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR12]] +; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: br label [[IF_END]] ; IS__CGSCC____: if.end: ; IS__CGSCC____-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C2]], 0 ; IS__CGSCC____-NEXT: br i1 [[TOBOOL1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]] ; IS__CGSCC____: if.then2: -; IS__CGSCC____-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) [[ATTR12]] +; IS__CGSCC____-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: br label [[IF_END3]] ; IS__CGSCC____: if.end3: ; IS__CGSCC____-NEXT: ret void @@ -780,14 +784,14 @@ define void @test16_caller(i32* %p, i32 %c) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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-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: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; 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]] +; 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]] ; IS__CGSCC____-NEXT: ret void ; tail call void @test16_sub(i32* %p, i32 %c, i32 %c) @@ -816,30 +820,30 @@ define void @test17_caller(i32* noalias %p, i32 %c) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test17_caller -; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { +; 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]]) #[[ATTR7]] ; 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]]) #[[ATTR7]] ; 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____-LABEL: define {{[^@]+}}@test17_caller -; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { +; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR7]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[L1:%.*]], label [[L2:%.*]] ; IS__CGSCC____: l1: -; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) [[ATTR12]] +; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: br label [[L3:%.*]] ; IS__CGSCC____: l2: -; IS__CGSCC____-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) [[ATTR12]] +; IS__CGSCC____-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: br label [[L3]] ; IS__CGSCC____: l3: ; IS__CGSCC____-NEXT: ret void @@ -874,12 +878,12 @@ define void @noreturn() { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@noreturn -; NOT_CGSCC_NPM-SAME: () [[ATTR9:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR9:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@noreturn -; IS__CGSCC____-SAME: () [[ATTR9:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR9:[0-9]+]] { ; IS__CGSCC____-NEXT: unreachable ; call void @noreturn() @@ -889,28 +893,28 @@ 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:%.*]]) #[[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]]) #[[ATTR7]] ; 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]]) #[[ATTR7]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@test18_caller -; IS__CGSCC____-SAME: (i32* noalias nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[C:%.*]]) [[ATTR7]] { +; IS__CGSCC____-SAME: (i32* noalias nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[C:%.*]]) #[[ATTR7]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[L1:%.*]], label [[L2:%.*]] ; IS__CGSCC____: l1: -; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree nonnull writeonly align 4 dereferenceable(4) [[P]]) [[ATTR12]] +; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: l2: -; IS__CGSCC____-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) [[ATTR12]] +; IS__CGSCC____-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: ret void ; entry: @@ -926,3 +930,30 @@ tail call void @only_store(i32* %p) ret void } +;. +; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR1]] = { nounwind uwtable } +; NOT_CGSCC_NPM: attributes #[[ATTR2]] = { nounwind } +; NOT_CGSCC_NPM: attributes #[[ATTR3]] = { nounwind ssp uwtable } +; NOT_CGSCC_NPM: attributes #[[ATTR4]] = { nofree nosync nounwind readonly willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind readonly willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR6:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR7]] = { nofree nosync nounwind willreturn writeonly } +; NOT_CGSCC_NPM: attributes #[[ATTR8]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree noreturn nosync nounwind readnone willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR10]] = { willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nounwind uwtable } +; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind } +; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind ssp uwtable } +; IS__CGSCC____: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR8]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR9]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR10]] = { willreturn } +; IS__CGSCC____: attributes #[[ATTR11]] = { readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR12]] = { nounwind willreturn writeonly } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -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=6 -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 @@ -6,15 +6,21 @@ @g = global i32* null ; [#uses=1] +;. +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = global i32* null +; CHECK: @[[LOOKUP_TABLE:[a-zA-Z0-9_$"\\.-]+]] = global [2 x i1] [i1 false, i1 true] +; CHECK: @[[G2:[a-zA-Z0-9_$"\\.-]+]] = global i8* null +; CHECK: @[[G3:[a-zA-Z0-9_$"\\.-]+]] = global i8* null +;. define i32* @c1(i32* %q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@c1 -; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[Q:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[Q:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32* [[Q]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@c1 -; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[Q:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[Q:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32* [[Q]] ; ret i32* %q @@ -24,13 +30,13 @@ define void @c2(i32* %q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@c2 -; IS__TUNIT____-SAME: (i32* nofree writeonly [[Q:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@c2 -; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32* [[Q]], i32** @g, align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -41,14 +47,14 @@ define void @c3(i32* %q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1]] { +; IS__TUNIT____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR1]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@c3 -; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) [[ATTR1]] { -; IS__CGSCC____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) [[ATTR17:#.*]] +; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1]] { +; IS__CGSCC____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR17:[0-9]+]] ; IS__CGSCC____-NEXT: ret void ; call void @c2(i32* %q) @@ -58,7 +64,7 @@ define i1 @c4(i32* %q, i32 %bitno) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@c4 -; IS__TUNIT____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]] ; IS__TUNIT____-NEXT: [[BIT:%.*]] = trunc i32 [[TMP2]] to i1 @@ -70,7 +76,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@c4 -; IS__CGSCC____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]] ; IS__CGSCC____-NEXT: [[BIT:%.*]] = trunc i32 [[TMP2]] to i1 @@ -94,7 +100,7 @@ define i1 @c4b(i32* %q, i32 %bitno) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@c4b -; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]] ; IS__TUNIT____-NEXT: [[BIT:%.*]] = trunc i32 [[TMP2]] to i1 @@ -106,7 +112,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@c4b -; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]] ; IS__CGSCC____-NEXT: [[BIT:%.*]] = trunc i32 [[TMP2]] to i1 @@ -131,7 +137,7 @@ define i1 @c5(i32* %q, i32 %bitno) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@c5 -; IS__TUNIT____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]] ; IS__TUNIT____-NEXT: [[BIT:%.*]] = and i32 [[TMP2]], 1 @@ -141,7 +147,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@c5 -; IS__CGSCC____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]] ; IS__CGSCC____-NEXT: [[BIT:%.*]] = and i32 [[TMP2]], 1 @@ -163,8 +169,8 @@ define i1 @c6(i8* %q, i8 %bit) personality i32 (...)* @__gxx_personality_v0 { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@c6 -; CHECK-SAME: (i8* readonly [[Q:%.*]], i8 [[BIT:%.*]]) [[ATTR4:#.*]] personality i32 (...)* @__gxx_personality_v0 { -; CHECK-NEXT: invoke void @throw_if_bit_set(i8* readonly [[Q]], i8 [[BIT]]) [[ATTR3:#.*]] +; CHECK-SAME: (i8* readonly [[Q:%.*]], i8 [[BIT:%.*]]) #[[ATTR4:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { +; CHECK-NEXT: invoke void @throw_if_bit_set(i8* readonly [[Q]], i8 [[BIT]]) #[[ATTR3:[0-9]+]] ; CHECK-NEXT: to label [[RET0:%.*]] unwind label [[RET1:%.*]] ; CHECK: ret0: ; CHECK-NEXT: ret i1 false @@ -188,7 +194,7 @@ define i1* @lookup_bit(i32* %q, i32 %bitno) readnone nounwind { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@lookup_bit -; IS__TUNIT____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]] ; IS__TUNIT____-NEXT: [[BIT:%.*]] = and i32 [[TMP2]], 1 @@ -197,7 +203,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@lookup_bit -; IS__CGSCC____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]] ; IS__CGSCC____-NEXT: [[BIT:%.*]] = and i32 [[TMP2]], 1 @@ -214,15 +220,15 @@ define i1 @c7(i32* %q, i32 %bitno) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; 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]]) [[ATTR15:#.*]] +; 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]]) #[[ATTR15:[0-9]+]] ; 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____-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]]) [[ATTR18:#.*]] +; 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]]) #[[ATTR18:[0-9]+]] ; IS__CGSCC____-NEXT: [[VAL:%.*]] = load i1, i1* [[PTR]], align 1 ; IS__CGSCC____-NEXT: ret i1 [[VAL]] ; @@ -235,7 +241,7 @@ define i32 @nc1(i32* %q, i32* %p, i1 %b) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc1 -; IS__TUNIT____-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) [[ATTR5:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__TUNIT____-NEXT: e: ; IS__TUNIT____-NEXT: br label [[L:%.*]] ; IS__TUNIT____: l: @@ -250,7 +256,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc1 -; IS__CGSCC____-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) [[ATTR5:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__CGSCC____-NEXT: e: ; IS__CGSCC____-NEXT: br label [[L:%.*]] ; IS__CGSCC____: l: @@ -279,7 +285,7 @@ define i32 @nc1_addrspace(i32* %q, i32 addrspace(1)* %p, i1 %b) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc1_addrspace -; IS__TUNIT____-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) [[ATTR5]] { +; IS__TUNIT____-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5]] { ; IS__TUNIT____-NEXT: e: ; IS__TUNIT____-NEXT: br label [[L:%.*]] ; IS__TUNIT____: l: @@ -294,7 +300,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc1_addrspace -; IS__CGSCC____-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) [[ATTR5]] { +; IS__CGSCC____-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5]] { ; IS__CGSCC____-NEXT: e: ; IS__CGSCC____-NEXT: br label [[L:%.*]] ; IS__CGSCC____: l: @@ -323,14 +329,14 @@ define void @nc2(i32* %p, i32* %q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn ; 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____-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: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; 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) [[ATTR14:#.*]] +; 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) #[[ATTR14:[0-9]+]] ; IS__CGSCC____-NEXT: ret void ; %1 = call i32 @nc1(i32* %q, i32* %p, i1 0) ; [#uses=0] @@ -354,14 +360,14 @@ define void @nc4(i8* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc4 -; IS__TUNIT____-SAME: (i8* [[P:%.*]]) [[ATTR6:#.*]] { -; IS__TUNIT____-NEXT: call void @external(i8* readonly [[P]]) [[ATTR16:#.*]] +; IS__TUNIT____-SAME: (i8* [[P:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__TUNIT____-NEXT: call void @external(i8* readonly [[P]]) #[[ATTR16:[0-9]+]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: argmemonly nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc4 -; IS__CGSCC____-SAME: (i8* [[P:%.*]]) [[ATTR6:#.*]] { -; IS__CGSCC____-NEXT: call void @external(i8* readonly [[P]]) [[ATTR19:#.*]] +; IS__CGSCC____-SAME: (i8* [[P:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__CGSCC____-NEXT: call void @external(i8* readonly [[P]]) #[[ATTR19:[0-9]+]] ; IS__CGSCC____-NEXT: ret void ; call void @external(i8* %p) @@ -383,8 +389,8 @@ define void @test1_1(i8* %x1_1, i8* %y1_1, i1 %c) { ; CHECK: Function Attrs: nofree nosync nounwind writeonly ; CHECK-LABEL: define {{[^@]+}}@test1_1 -; CHECK-SAME: (i8* nocapture nofree readnone [[X1_1:%.*]], i8* nocapture nofree readnone [[Y1_1:%.*]], i1 [[C:%.*]]) [[ATTR7:#.*]] { -; CHECK-NEXT: [[TMP1:%.*]] = call i8* @test1_2(i8* noalias nocapture nofree readnone undef, i8* noalias nofree readnone "no-capture-maybe-returned" [[Y1_1]], i1 [[C]]) [[ATTR7]] +; CHECK-SAME: (i8* nocapture nofree readnone [[X1_1:%.*]], i8* nocapture nofree readnone [[Y1_1:%.*]], i1 [[C:%.*]]) #[[ATTR7:[0-9]+]] { +; CHECK-NEXT: [[TMP1:%.*]] = call i8* @test1_2(i8* noalias nocapture nofree readnone undef, i8* noalias nofree readnone "no-capture-maybe-returned" [[Y1_1]], i1 [[C]]) #[[ATTR7]] ; CHECK-NEXT: store i32* null, i32** @g, align 8 ; CHECK-NEXT: ret void ; @@ -396,10 +402,10 @@ define i8* @test1_2(i8* %x1_2, i8* %y1_2, i1 %c) { ; IS________OPM: Function Attrs: nofree nosync nounwind writeonly ; IS________OPM-LABEL: define {{[^@]+}}@test1_2 -; IS________OPM-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) [[ATTR7:#.*]] { +; IS________OPM-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { ; IS________OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS________OPM: t: -; IS________OPM-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 [[C]]) [[ATTR7]] +; IS________OPM-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 [[C]]) #[[ATTR7]] ; IS________OPM-NEXT: store i32* null, i32** @g, align 8 ; IS________OPM-NEXT: br label [[F]] ; IS________OPM: f: @@ -407,10 +413,10 @@ ; ; IS________NPM: Function Attrs: nofree nosync nounwind writeonly ; IS________NPM-LABEL: define {{[^@]+}}@test1_2 -; IS________NPM-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) [[ATTR7:#.*]] { +; IS________NPM-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { ; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS________NPM: t: -; IS________NPM-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 noundef [[C]]) [[ATTR7]] +; IS________NPM-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 noundef [[C]]) #[[ATTR7]] ; IS________NPM-NEXT: store i32* null, i32** @g, align 8 ; IS________NPM-NEXT: br label [[F]] ; IS________NPM: f: @@ -428,12 +434,12 @@ define void @test2(i8* %x2) { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[X2:%.*]]) [[ATTR8:#.*]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[X2:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[X2:%.*]]) [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[X2:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__CGSCC____-NEXT: unreachable ; call void @test2(i8* %x2) @@ -444,12 +450,12 @@ define void @test3(i8* %x3, i8* %y3, i8* %z3) { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test3 -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[X3:%.*]], i8* nocapture nofree readnone [[Y3:%.*]], i8* nocapture nofree readnone [[Z3:%.*]]) [[ATTR8]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[X3:%.*]], i8* nocapture nofree readnone [[Y3:%.*]], i8* nocapture nofree readnone [[Z3:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test3 -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[X3:%.*]], i8* nocapture nofree readnone [[Y3:%.*]], i8* nocapture nofree readnone [[Z3:%.*]]) [[ATTR8]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[X3:%.*]], i8* nocapture nofree readnone [[Y3:%.*]], i8* nocapture nofree readnone [[Z3:%.*]]) #[[ATTR8]] { ; IS__CGSCC____-NEXT: unreachable ; call void @test3(i8* %z3, i8* %y3, i8* %x3) @@ -460,8 +466,8 @@ define void @test4_1(i8* %x4_1, i1 %c) { ; CHECK: Function Attrs: nofree nosync nounwind writeonly ; CHECK-LABEL: define {{[^@]+}}@test4_1 -; CHECK-SAME: (i8* nocapture nofree readnone [[X4_1:%.*]], i1 [[C:%.*]]) [[ATTR7]] { -; CHECK-NEXT: [[TMP1:%.*]] = call i8* @test4_2(i8* noalias nocapture nofree readnone undef, i8* noalias nofree readnone "no-capture-maybe-returned" [[X4_1]], i8* noalias nocapture nofree readnone undef, i1 [[C]]) [[ATTR7]] +; CHECK-SAME: (i8* nocapture nofree readnone [[X4_1:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { +; CHECK-NEXT: [[TMP1:%.*]] = call i8* @test4_2(i8* noalias nocapture nofree readnone undef, i8* noalias nofree readnone "no-capture-maybe-returned" [[X4_1]], i8* noalias nocapture nofree readnone undef, i1 [[C]]) #[[ATTR7]] ; CHECK-NEXT: store i32* null, i32** @g, align 8 ; CHECK-NEXT: ret void ; @@ -473,10 +479,10 @@ define i8* @test4_2(i8* %x4_2, i8* %y4_2, i8* %z4_2, i1 %c) { ; IS________OPM: Function Attrs: nofree nosync nounwind writeonly ; IS________OPM-LABEL: define {{[^@]+}}@test4_2 -; IS________OPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) [[ATTR7]] { +; IS________OPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { ; IS________OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS________OPM: t: -; IS________OPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 536870912 null, i1 [[C]]) [[ATTR7]] +; IS________OPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 536870912 null, i1 [[C]]) #[[ATTR7]] ; IS________OPM-NEXT: store i32* null, i32** @g, align 8 ; IS________OPM-NEXT: br label [[F]] ; IS________OPM: f: @@ -484,10 +490,10 @@ ; ; IS________NPM: Function Attrs: nofree nosync nounwind writeonly ; IS________NPM-LABEL: define {{[^@]+}}@test4_2 -; IS________NPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) [[ATTR7]] { +; IS________NPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { ; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS________NPM: t: -; IS________NPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 536870912 null, i1 noundef [[C]]) [[ATTR7]] +; IS________NPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 536870912 null, i1 noundef [[C]]) #[[ATTR7]] ; IS________NPM-NEXT: store i32* null, i32** @g, align 8 ; IS________NPM-NEXT: br label [[F]] ; IS________NPM: f: @@ -533,13 +539,13 @@ define void @test_cmpxchg(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_cmpxchg -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) [[ATTR9:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = cmpxchg i32* [[P]], i32 0, i32 1 acquire monotonic, align 4 ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_cmpxchg -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) [[ATTR9:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = cmpxchg i32* [[P]], i32 0, i32 1 acquire monotonic, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -550,13 +556,13 @@ define void @test_cmpxchg_ptr(i32** %p, i32* %q) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_cmpxchg_ptr -; IS__TUNIT____-SAME: (i32** nocapture nofree noundef nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i32** nocapture nofree noundef nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR9]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = cmpxchg i32** [[P]], i32* null, i32* [[Q]] acquire monotonic, align 8 ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_cmpxchg_ptr -; IS__CGSCC____-SAME: (i32** nocapture nofree noundef nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) [[ATTR9]] { +; IS__CGSCC____-SAME: (i32** nocapture nofree noundef nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR9]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = cmpxchg i32** [[P]], i32* null, i32* [[Q]] acquire monotonic, align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -567,13 +573,13 @@ define void @test_atomicrmw(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_atomicrmw -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR9]] { ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = atomicrmw add i32* [[P]], i32 1 seq_cst, align 4 ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_atomicrmw -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) [[ATTR9]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR9]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = atomicrmw add i32* [[P]], i32 1 seq_cst, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -584,7 +590,7 @@ define void @test_volatile(i32* %x) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_volatile -; IS__TUNIT____-SAME: (i32* nofree align 4 [[X:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i32* nofree align 4 [[X:%.*]]) #[[ATTR9]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[GEP:%.*]] = getelementptr i32, i32* [[X]], i64 1 ; IS__TUNIT____-NEXT: store volatile i32 0, i32* [[GEP]], align 4 @@ -592,7 +598,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_volatile -; IS__CGSCC____-SAME: (i32* nofree align 4 [[X:%.*]]) [[ATTR9]] { +; IS__CGSCC____-SAME: (i32* nofree align 4 [[X:%.*]]) #[[ATTR9]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[GEP:%.*]] = getelementptr i32, i32* [[X]], i64 1 ; IS__CGSCC____-NEXT: store volatile i32 0, i32* [[GEP]], align 4 @@ -607,17 +613,17 @@ 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____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR5]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) [[ATTR17:#.*]] +; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR17:[0-9]+]] ; 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____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR10:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) [[ATTR18]] +; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR18]] ; IS__CGSCC____-NEXT: store i8 42, i8* [[B]], align 1 ; IS__CGSCC____-NEXT: ret void ; @@ -631,15 +637,15 @@ 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]]) [[ATTR17]] +; IS__TUNIT____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR5]] { +; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR17]] ; 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]]) [[ATTR18]] +; IS__CGSCC____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR10]] { +; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR18]] ; IS__CGSCC____-NEXT: store i8* [[B]], i8** @g2, align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -651,17 +657,17 @@ 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____-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]]) [[ATTR17]] +; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR17]] ; 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____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR11:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) [[ATTR18]] +; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR18]] ; IS__CGSCC____-NEXT: store i8 42, i8* [[B]], align 1 ; IS__CGSCC____-NEXT: ret void ; @@ -675,15 +681,15 @@ 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]]) [[ATTR17]] +; IS__TUNIT____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR1]] { +; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR17]] ; 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]]) [[ATTR18]] +; IS__CGSCC____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR11]] { +; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR18]] ; IS__CGSCC____-NEXT: store i8* [[B]], i8** @g3, align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -695,13 +701,13 @@ define i1 @captureICmp(i32* %x) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureICmp -; IS__TUNIT____-SAME: (i32* nofree readnone [[X:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@captureICmp -; IS__CGSCC____-SAME: (i32* nofree readnone [[X:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone [[X:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = icmp eq i32* [[X]], null ; IS__CGSCC____-NEXT: ret i1 [[TMP1]] ; @@ -712,13 +718,13 @@ define i1 @captureICmpRev(i32* %x) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureICmpRev -; IS__TUNIT____-SAME: (i32* nofree readnone [[X:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@captureICmpRev -; IS__CGSCC____-SAME: (i32* nofree readnone [[X:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone [[X:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = icmp eq i32* null, [[X]] ; IS__CGSCC____-NEXT: ret i1 [[TMP1]] ; @@ -729,12 +735,12 @@ define i1 @nocaptureInboundsGEPICmp(i32* %x) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureInboundsGEPICmp -; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@nocaptureInboundsGEPICmp -; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false ; %1 = getelementptr inbounds i32, i32* %x, i32 5 @@ -746,12 +752,12 @@ define i1 @nocaptureInboundsGEPICmpRev(i32* %x) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureInboundsGEPICmpRev -; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@nocaptureInboundsGEPICmpRev -; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[X:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 true ; %1 = getelementptr inbounds i32, i32* %x, i32 5 @@ -763,14 +769,14 @@ define i1 @nocaptureDereferenceableOrNullICmp(i32* dereferenceable_or_null(4) %x) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureDereferenceableOrNullICmp -; IS__TUNIT____-SAME: (i32* nocapture nofree readnone dereferenceable_or_null(4) [[X:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@nocaptureDereferenceableOrNullICmp -; IS__CGSCC____-SAME: (i32* nocapture nofree readnone dereferenceable_or_null(4) [[X:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8* ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null ; IS__CGSCC____-NEXT: ret i1 [[TMP2]] @@ -783,14 +789,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____-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp -; IS__TUNIT____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) [[ATTR10:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR10:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp -; IS__CGSCC____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) [[ATTR12:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR12:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8* ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null ; IS__CGSCC____-NEXT: ret i1 [[TMP2]] @@ -817,7 +823,7 @@ define i8* @test_returned1(i8* %A, i8* returned %B) nounwind readonly { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@test_returned1 -; CHECK-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) [[ATTR4]] { +; CHECK-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR4]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* [[A]], i8* [[B]]) ; CHECK-NEXT: ret i8* [[P]] @@ -830,9 +836,9 @@ define i8* @test_returned2(i8* %A, i8* %B) { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@test_returned2 -; CHECK-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) [[ATTR4]] { +; CHECK-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR4]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* readonly [[A]], i8* readonly [[B]]) [[ATTR4]] +; CHECK-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* readonly [[A]], i8* readonly [[B]]) #[[ATTR4]] ; CHECK-NEXT: ret i8* [[P]] ; entry: @@ -846,11 +852,17 @@ ; FIXME: Both pointers should be nocapture define void @ptr_uses(i8* %ptr, i8* %wptr) { -; CHECK: Function Attrs: nounwind willreturn -; CHECK-LABEL: define {{[^@]+}}@ptr_uses -; CHECK-SAME: (i8* [[PTR:%.*]], i8* nocapture noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) [[ATTR14:#.*]] { -; CHECK-NEXT: store i8 0, i8* [[WPTR]], align 1 -; CHECK-NEXT: ret void +; IS__TUNIT____: Function Attrs: nounwind willreturn +; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_uses +; IS__TUNIT____-SAME: (i8* [[PTR:%.*]], i8* nocapture noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR12:[0-9]+]] { +; IS__TUNIT____-NEXT: store i8 0, i8* [[WPTR]], align 1 +; IS__TUNIT____-NEXT: ret void +; +; IS__CGSCC____: Function Attrs: nounwind willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_uses +; IS__CGSCC____-SAME: (i8* [[PTR:%.*]], i8* nocapture noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR14]] { +; IS__CGSCC____-NEXT: store i8 0, i8* [[WPTR]], align 1 +; IS__CGSCC____-NEXT: ret void ; %call_ptr = call i8* @maybe_returned_ptr(i8* %ptr) %call_val = call i8 @maybe_returned_val(i8* %call_ptr) @@ -861,3 +873,44 @@ declare i8* @llvm.launder.invariant.group.p0i8(i8*) declare i8* @llvm.strip.invariant.group.p0i8(i8*) +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR3]] = { readonly } +; IS__TUNIT____: attributes #[[ATTR4]] = { nounwind readonly } +; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR6]] = { argmemonly nounwind } +; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } +; IS__TUNIT____: attributes #[[ATTR8]] = { nofree noreturn nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR9]] = { argmemonly nofree nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR10]] = { nofree nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR11:[0-9]+]] = { nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR12]] = { nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR13:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind speculatable willreturn } +; IS__TUNIT____: attributes #[[ATTR14:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__TUNIT____: attributes #[[ATTR15]] = { nofree nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR16]] = { nounwind } +; IS__TUNIT____: attributes #[[ATTR17]] = { willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR3]] = { readonly } +; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind readonly } +; IS__CGSCC____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR6]] = { argmemonly nounwind } +; IS__CGSCC____: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } +; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nofree norecurse nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR12]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR13:[0-9]+]] = { nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR14]] = { nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR15:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind speculatable willreturn } +; IS__CGSCC____: attributes #[[ATTR16:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC____: attributes #[[ATTR17]] = { nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR18]] = { willreturn } +; IS__CGSCC____: attributes #[[ATTR19]] = { nounwind } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -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=8 -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 @@ -20,7 +20,7 @@ define i32 @is_null_return(i32* %p) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@is_null_return -; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[P]], null ; IS__TUNIT____-NEXT: [[CONV:%.*]] = zext i1 [[CMP]] to i32 @@ -28,7 +28,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@is_null_return -; IS__CGSCC____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[P]], null ; IS__CGSCC____-NEXT: [[CONV:%.*]] = zext i1 [[CMP]] to i32 @@ -54,7 +54,7 @@ define i32 @is_null_control(i32* %p) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@is_null_control -; IS__TUNIT____-SAME: (i32* nofree [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree [[P:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[P]], null @@ -77,7 +77,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@is_null_control -; IS__CGSCC____-SAME: (i32* nofree [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree [[P:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[P]], null @@ -134,13 +134,13 @@ define double* @srec0(double* %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@srec0 -; IS__TUNIT____-SAME: (double* nocapture nofree readnone [[A:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (double* nocapture nofree readnone [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@srec0 -; IS__CGSCC____-SAME: (double* nocapture nofree readnone [[A:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (double* nocapture nofree readnone [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -165,13 +165,13 @@ define i32* @srec16(i32* %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@srec16 -; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[A:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[A:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@srec16 -; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[A:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -211,17 +211,17 @@ define float* @scc_A(i32* dereferenceable_or_null(4) %a) { ; CHECK: Function Attrs: nofree nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@scc_A -; CHECK-SAME: (i32* nofree readnone returned dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR2:#.*]] { +; CHECK-SAME: (i32* nofree readnone returned dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i32* [[A]], null ; CHECK-NEXT: br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[A]] to i16* -; CHECK-NEXT: [[CALL:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP0]]) [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]] ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[CALL]] to double* -; CHECK-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(8) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) [[ATTR2]] +; CHECK-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(8) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]] ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i32* -; CHECK-NEXT: [[CALL2:%.*]] = call float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP2]]) [[ATTR2]] +; CHECK-NEXT: [[CALL2:%.*]] = call float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]] ; CHECK-NEXT: [[TMP3:%.*]] = bitcast float* [[CALL2]] to i32* ; CHECK-NEXT: br label [[COND_END:%.*]] ; CHECK: cond.false: @@ -257,17 +257,17 @@ define i64* @scc_B(double* dereferenceable_or_null(8) %a) { ; CHECK: Function Attrs: nofree nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@scc_B -; CHECK-SAME: (double* nofree readnone returned dereferenceable_or_null(8) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR2]] { +; CHECK-SAME: (double* nofree readnone returned dereferenceable_or_null(8) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne double* [[A]], null ; CHECK-NEXT: br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: [[TMP0:%.*]] = bitcast double* [[A]] to i32* -; CHECK-NEXT: [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP0]]) [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]] ; CHECK-NEXT: [[TMP1:%.*]] = bitcast float* [[CALL]] to double* -; CHECK-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(8) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) [[ATTR2]] +; CHECK-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(8) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]] ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i16* -; CHECK-NEXT: [[CALL2:%.*]] = call i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP2]]) [[ATTR2]] +; CHECK-NEXT: [[CALL2:%.*]] = call i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]] ; CHECK-NEXT: br label [[COND_END:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: [[TMP3:%.*]] = bitcast double* [[A]] to i8* @@ -303,25 +303,25 @@ define i8* @scc_C(i16* dereferenceable_or_null(2) %a) { ; CHECK: Function Attrs: nofree nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@scc_C -; CHECK-SAME: (i16* nofree readnone returned dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR2]] { +; CHECK-SAME: (i16* nofree readnone returned dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[BC:%.*]] = bitcast i16* [[A]] to i32* -; CHECK-NEXT: [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[BC]]) [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[BC]]) #[[ATTR2]] ; CHECK-NEXT: [[BC2:%.*]] = bitcast float* [[CALL]] to i8* ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i8* [[BC2]], null ; CHECK-NEXT: br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i16* [[A]] to double* -; CHECK-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(8) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP0]]) [[ATTR2]] +; CHECK-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(8) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]] ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i64* [[CALL1]] to i8* ; CHECK-NEXT: br label [[COND_END:%.*]] ; CHECK: cond.false: -; CHECK-NEXT: [[CALL2:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[A]]) [[ATTR2]] +; CHECK-NEXT: [[CALL2:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[A]]) #[[ATTR2]] ; CHECK-NEXT: br label [[COND_END]] ; CHECK: cond.end: ; CHECK-NEXT: [[COND:%.*]] = phi i8* [ [[TMP1]], [[COND_TRUE]] ], [ [[CALL2]], [[COND_FALSE]] ] ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[COND]] to i32* -; CHECK-NEXT: [[CALL3:%.*]] = call float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) [[ATTR2]] +; CHECK-NEXT: [[CALL3:%.*]] = call float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]] ; CHECK-NEXT: [[TMP3:%.*]] = bitcast float* [[CALL3]] to i8* ; CHECK-NEXT: ret i8* [[TMP3]] ; @@ -363,7 +363,7 @@ define void @test_external_no_capture(i32* %p) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@test_external_no_capture -; CHECK-SAME: (i32* nocapture [[P:%.*]]) [[ATTR3:#.*]] { +; CHECK-SAME: (i32* nocapture [[P:%.*]]) #[[ATTR3:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: call void @external_no_capture(i32* nocapture [[P]]) ; CHECK-NEXT: ret void @@ -382,7 +382,7 @@ define void @test_var_arg_call(i8* %p, i32 %a) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@test_var_arg_call -; CHECK-SAME: (i8* nocapture [[P:%.*]], i32 [[A:%.*]]) [[ATTR3]] { +; CHECK-SAME: (i8* nocapture [[P:%.*]], i32 [[A:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CALL:%.*]] = call i32 (i8*, ...) @printf(i8* nocapture [[P]], i32 [[A]]) ; CHECK-NEXT: ret void @@ -406,14 +406,14 @@ define i64* @not_captured_but_returned_0(i64* %a) #0 { ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_but_returned_0 -; IS__TUNIT____-SAME: (i64* nofree noundef nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT____-SAME: (i64* nofree noundef nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@not_captured_but_returned_0 -; IS__CGSCC____-SAME: (i64* nofree noundef nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC____-SAME: (i64* nofree noundef nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: store i64 0, i64* [[A]], align 8 ; IS__CGSCC____-NEXT: ret i64* [[A]] @@ -434,7 +434,7 @@ define i64* @not_captured_but_returned_1(i64* %a) #0 { ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly ; 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____-SAME: (i64* nofree nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i64, i64* [[A]], i64 1 ; IS__TUNIT____-NEXT: store i64 1, i64* [[ADD_PTR]], align 8 @@ -442,7 +442,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly ; 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____-SAME: (i64* nofree nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i64, i64* [[A]], i64 1 ; IS__CGSCC____-NEXT: store i64 1, i64* [[ADD_PTR]], align 8 @@ -464,18 +464,18 @@ 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____-LABEL: define {{[^@]+}}@test_not_captured_but_returned_calls -; IS__TUNIT____-SAME: (i64* nocapture nofree writeonly align 8 [[A:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i64* nocapture nofree writeonly align 8 [[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: [[CALL1:%.*]] = call i64* @not_captured_but_returned_1(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) [[ATTR9]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9:[0-9]+]] +; 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____-LABEL: define {{[^@]+}}@test_not_captured_but_returned_calls -; IS__CGSCC____-SAME: (i64* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i64* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A]]) [[ATTR9:#.*]] -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A]]) [[ATTR9]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A]]) #[[ATTR9:[0-9]+]] +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A]]) #[[ATTR9]] ; IS__CGSCC____-NEXT: ret void ; entry: @@ -494,16 +494,16 @@ 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____-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____-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: [[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____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0a -; IS__CGSCC____-SAME: (i64* nofree noundef nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i64* nofree noundef nonnull returned writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A]]) [[ATTR9]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A]]) #[[ATTR9]] ; IS__CGSCC____-NEXT: ret i64* [[CALL]] ; entry: @@ -521,18 +521,18 @@ 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____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0b -; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 [[A:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 [[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: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9]] ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64 ; 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____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0b -; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A]]) [[ATTR9]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) "no-capture-maybe-returned" [[A]]) #[[ATTR9]] ; IS__CGSCC____-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64 ; IS__CGSCC____-NEXT: store i64 [[TMP0]], i64* [[A]], align 8 ; IS__CGSCC____-NEXT: ret void @@ -554,16 +554,16 @@ 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____-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____-SAME: (i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call noundef 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: [[CALL:%.*]] = call noundef 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____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1a -; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR4]] { +; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call noundef nonnull align 8 dereferenceable(8) i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A]]) [[ATTR9]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call noundef nonnull align 8 dereferenceable(8) i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A]]) #[[ATTR9]] ; IS__CGSCC____-NEXT: ret i64* [[CALL]] ; entry: @@ -581,18 +581,18 @@ 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____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1b -; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 [[A:%.*]]) [[ATTR5:#.*]] { +; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 [[A:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call align 8 i64* @not_captured_but_returned_1(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) [[ATTR9]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call align 8 i64* @not_captured_but_returned_1(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9]] ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64 ; 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____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1b -; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) [[ATTR5:#.*]] { +; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call align 8 i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A]]) [[ATTR9]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call align 8 i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) "no-capture-maybe-returned" [[A]]) #[[ATTR9]] ; IS__CGSCC____-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64 ; IS__CGSCC____-NEXT: store i64 [[TMP0]], i64* [[CALL]], align 8 ; IS__CGSCC____-NEXT: ret void @@ -618,7 +618,7 @@ define i32* @ret_arg_or_unknown(i32* %b) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@ret_arg_or_unknown -; CHECK-SAME: (i32* [[B:%.*]]) [[ATTR3]] { +; CHECK-SAME: (i32* [[B:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null ; CHECK-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]] @@ -643,7 +643,7 @@ define i32* @ret_arg_or_unknown_through_phi(i32* %b) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi -; CHECK-SAME: (i32* [[B:%.*]]) [[ATTR3]] { +; CHECK-SAME: (i32* [[B:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null ; CHECK-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]] @@ -680,9 +680,9 @@ define void @not_captured_by_readonly_call(i32* %b) #0 { ; CHECK: Function Attrs: noinline nounwind readonly uwtable ; CHECK-LABEL: define {{[^@]+}}@not_captured_by_readonly_call -; CHECK-SAME: (i32* nocapture readonly [[B:%.*]]) [[ATTR7:#.*]] { +; CHECK-SAME: (i32* nocapture readonly [[B:%.*]]) #[[ATTR7:[0-9]+]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[B]]) [[ATTR6:#.*]] +; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[B]]) #[[ATTR6:[0-9]+]] ; CHECK-NEXT: ret void ; entry: @@ -698,9 +698,9 @@ define i32* @not_captured_by_readonly_call_not_returned_either1(i32* %b, i32* returned %r) { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either1 -; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) [[ATTR8:#.*]] { +; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8:[0-9]+]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[R]]) [[ATTR8]] +; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR8]] ; CHECK-NEXT: ret i32* [[CALL]] ; entry: @@ -712,9 +712,9 @@ define i32* @not_captured_by_readonly_call_not_returned_either2(i32* %b, i32* %r) { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either2 -; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) [[ATTR8]] { +; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) [[ATTR8]] +; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR8]] ; CHECK-NEXT: ret i32* [[CALL]] ; entry: @@ -726,9 +726,9 @@ define i32* @not_captured_by_readonly_call_not_returned_either3(i32* %b, i32* %r) { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either3 -; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) [[ATTR8]] { +; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) [[ATTR8]] +; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) #[[ATTR8]] ; CHECK-NEXT: ret i32* [[CALL]] ; entry: @@ -739,9 +739,9 @@ define i32* @not_captured_by_readonly_call_not_returned_either4(i32* %b, i32* %r) nounwind { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either4 -; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) [[ATTR8]] { +; CHECK-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) [[ATTR6]] +; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR6]] ; CHECK-NEXT: ret i32* [[CALL]] ; entry: @@ -770,7 +770,7 @@ ; CHECK-LABEL: define {{[^@]+}}@nocapture_is_not_subsumed_2 ; CHECK-SAME: (i32* nocapture [[B:%.*]]) { ; CHECK-NEXT: entry: -; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_i32p(i32* readonly [[B]]) [[ATTR6]] +; CHECK-NEXT: [[CALL:%.*]] = call i32* @readonly_i32p(i32* readonly [[B]]) #[[ATTR6]] ; CHECK-NEXT: store i32 0, i32* [[CALL]], align 4 ; CHECK-NEXT: ret void ; @@ -781,3 +781,26 @@ } attributes #0 = { noinline nounwind uwtable } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR3]] = { noinline nounwind uwtable } +; IS__TUNIT____: attributes #[[ATTR4]] = { argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR5]] = { nofree noinline nosync nounwind uwtable willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR6]] = { readonly } +; IS__TUNIT____: attributes #[[ATTR7]] = { noinline nounwind readonly uwtable } +; IS__TUNIT____: attributes #[[ATTR8]] = { nounwind readonly } +; IS__TUNIT____: attributes #[[ATTR9]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR3]] = { noinline nounwind uwtable } +; IS__CGSCC____: attributes #[[ATTR4]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR5]] = { nofree noinline norecurse nosync nounwind uwtable willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR6]] = { readonly } +; IS__CGSCC____: attributes #[[ATTR7]] = { noinline nounwind readonly uwtable } +; IS__CGSCC____: attributes #[[ATTR8]] = { nounwind readonly } +; IS__CGSCC____: attributes #[[ATTR9]] = { nounwind willreturn writeonly } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -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=3 -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 @@ -19,12 +19,12 @@ define void @only_return() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@only_return -; IS__TUNIT____-SAME: () [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@only_return -; IS__CGSCC____-SAME: () [[ATTR3:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] { ; IS__CGSCC____-NEXT: ret void ; ret void @@ -40,8 +40,8 @@ define void @only_free(i8* nocapture %0) local_unnamed_addr #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@only_free -; CHECK-SAME: (i8* nocapture [[TMP0:%.*]]) local_unnamed_addr [[ATTR1:#.*]] { -; CHECK-NEXT: tail call void @free(i8* nocapture [[TMP0]]) [[ATTR0:#.*]] +; CHECK-SAME: (i8* nocapture [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] { +; CHECK-NEXT: tail call void @free(i8* nocapture [[TMP0]]) #[[ATTR0:[0-9]+]] ; CHECK-NEXT: ret void ; tail call void @free(i8* %0) #1 @@ -63,8 +63,8 @@ define void @free_in_scc1(i8* nocapture %0) local_unnamed_addr #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@free_in_scc1 -; CHECK-SAME: (i8* nocapture [[TMP0:%.*]]) local_unnamed_addr [[ATTR1]] { -; CHECK-NEXT: tail call void @free_in_scc2(i8* nocapture [[TMP0]]) [[ATTR0]] +; CHECK-SAME: (i8* nocapture [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] { +; CHECK-NEXT: tail call void @free_in_scc2(i8* nocapture [[TMP0]]) #[[ATTR0]] ; CHECK-NEXT: ret void ; tail call void @free_in_scc2(i8* %0) #1 @@ -75,14 +75,14 @@ define void @free_in_scc2(i8* nocapture %0) local_unnamed_addr #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@free_in_scc2 -; CHECK-SAME: (i8* nocapture [[TMP0:%.*]]) local_unnamed_addr [[ATTR1]] { +; CHECK-SAME: (i8* nocapture [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] { ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8* [[TMP0]], null ; CHECK-NEXT: br i1 [[CMP]], label [[REC:%.*]], label [[CALL:%.*]] ; CHECK: call: -; CHECK-NEXT: tail call void @free(i8* nocapture [[TMP0]]) [[ATTR0]] +; CHECK-NEXT: tail call void @free(i8* nocapture [[TMP0]]) #[[ATTR0]] ; CHECK-NEXT: br label [[END:%.*]] ; CHECK: rec: -; CHECK-NEXT: tail call void @free_in_scc1(i8* nocapture [[TMP0]]) [[ATTR0]] +; CHECK-NEXT: tail call void @free_in_scc1(i8* nocapture [[TMP0]]) #[[ATTR0]] ; CHECK-NEXT: br label [[END]] ; CHECK: end: ; CHECK-NEXT: ret void @@ -113,12 +113,12 @@ define void @mutual_recursion1() #0 { ; NOT_CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; NOT_CGSCC_NPM-SAME: () [[ATTR4:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR4:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__CGSCC_NPM-SAME: () [[ATTR4:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR4:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: unreachable ; call void @mutual_recursion2() @@ -128,12 +128,12 @@ define void @mutual_recursion2() #0 { ; NOT_CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion2 -; NOT_CGSCC_NPM-SAME: () [[ATTR4]] { +; 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-LABEL: define {{[^@]+}}@mutual_recursion2 -; IS__CGSCC_NPM-SAME: () [[ATTR4]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR4]] { ; IS__CGSCC_NPM-NEXT: unreachable ; call void @mutual_recursion1() @@ -150,11 +150,11 @@ define void @_Z9delete_opPc(i8* %0) local_unnamed_addr #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@_Z9delete_opPc -; CHECK-SAME: (i8* [[TMP0:%.*]]) local_unnamed_addr [[ATTR1]] { +; CHECK-SAME: (i8* [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] { ; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null ; CHECK-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]] ; CHECK: 3: -; CHECK-NEXT: tail call void @_ZdaPv(i8* nonnull [[TMP0]]) [[ATTR2:#.*]] +; CHECK-NEXT: tail call void @_ZdaPv(i8* nonnull [[TMP0]]) #[[ATTR2:[0-9]+]] ; CHECK-NEXT: br label [[TMP4]] ; CHECK: 4: ; CHECK-NEXT: ret void @@ -176,8 +176,8 @@ define noalias i8* @call_realloc(i8* nocapture %0, i64 %1) local_unnamed_addr #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@call_realloc -; CHECK-SAME: (i8* nocapture [[TMP0:%.*]], i64 [[TMP1:%.*]]) local_unnamed_addr [[ATTR1]] { -; CHECK-NEXT: [[RET:%.*]] = tail call i8* @realloc(i8* nocapture [[TMP0]], i64 [[TMP1]]) [[ATTR2]] +; CHECK-SAME: (i8* nocapture [[TMP0:%.*]], i64 [[TMP1:%.*]]) local_unnamed_addr #[[ATTR1]] { +; CHECK-NEXT: [[RET:%.*]] = tail call i8* @realloc(i8* nocapture [[TMP0]], i64 [[TMP1]]) #[[ATTR2]] ; CHECK-NEXT: ret i8* [[RET]] ; %ret = tail call i8* @realloc(i8* %0, i64 %1) #2 @@ -196,12 +196,12 @@ define void @call_nofree_function() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_nofree_function -; IS__TUNIT____-SAME: () [[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR3]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_nofree_function -; IS__CGSCC____-SAME: () [[ATTR3]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: ret void ; tail call void @nofree_function() @@ -220,8 +220,8 @@ define void @call_maybe_free() #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@call_maybe_free -; CHECK-SAME: () [[ATTR1]] { -; CHECK-NEXT: tail call void @maybe_free() [[ATTR0]] +; CHECK-SAME: () #[[ATTR1]] { +; CHECK-NEXT: tail call void @maybe_free() #[[ATTR0]] ; CHECK-NEXT: ret void ; tail call void @maybe_free() @@ -235,8 +235,8 @@ define void @call_both() #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@call_both -; CHECK-SAME: () [[ATTR1]] { -; CHECK-NEXT: tail call void @maybe_free() [[ATTR0]] +; CHECK-SAME: () #[[ATTR1]] { +; CHECK-NEXT: tail call void @maybe_free() #[[ATTR0]] ; CHECK-NEXT: ret void ; tail call void @maybe_free() @@ -254,12 +254,12 @@ define void @call_floor(float %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_floor -; IS__TUNIT____-SAME: (float [[A:%.*]]) [[ATTR3]] { +; 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____-LABEL: define {{[^@]+}}@call_floor -; IS__CGSCC____-SAME: (float [[A:%.*]]) [[ATTR3]] { +; IS__CGSCC____-SAME: (float [[A:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: ret void ; tail call float @llvm.floor.f32(float %a) @@ -269,14 +269,14 @@ define float @call_floor2(float %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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____-SAME: (float [[A:%.*]]) #[[ATTR3]] { +; IS__TUNIT____-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR11:[0-9]+]] ; IS__TUNIT____-NEXT: ret float [[C]] ; ; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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:#.*]] +; IS__CGSCC____-SAME: (float [[A:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__CGSCC____-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR12:[0-9]+]] ; IS__CGSCC____-NEXT: ret float [[C]] ; %c = tail call float @llvm.floor.f32(float %a) @@ -289,12 +289,12 @@ define void @f1() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@f1 -; IS__TUNIT____-SAME: () [[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR3]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC____-SAME: () [[ATTR3]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: ret void ; tail call void @nofree_function() @@ -304,12 +304,12 @@ define void @f2() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@f2 -; IS__TUNIT____-SAME: () [[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR3]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@f2 -; IS__CGSCC____-SAME: () [[ATTR3]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: ret void ; tail call void @f1() @@ -318,13 +318,21 @@ ; TEST 12 NoFree argument - positive. define double @test12(double* nocapture readonly %a) { -; CHECK: Function Attrs: nofree nounwind -; CHECK-LABEL: define {{[^@]+}}@test12 -; CHECK-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]]) [[ATTR8:#.*]] { -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = load double, double* [[A]], align 8 -; CHECK-NEXT: [[CALL:%.*]] = tail call double @cos(double [[TMP0]]) [[ATTR2]] -; CHECK-NEXT: ret double [[CALL]] +; IS__TUNIT____: Function Attrs: nofree nounwind +; IS__TUNIT____-LABEL: define {{[^@]+}}@test12 +; IS__TUNIT____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__TUNIT____-NEXT: entry: +; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load double, double* [[A]], align 8 +; IS__TUNIT____-NEXT: [[CALL:%.*]] = tail call double @cos(double [[TMP0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: ret double [[CALL]] +; +; IS__CGSCC____: Function Attrs: nofree nounwind +; IS__CGSCC____-LABEL: define {{[^@]+}}@test12 +; IS__CGSCC____-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__CGSCC____-NEXT: entry: +; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load double, double* [[A]], align 8 +; IS__CGSCC____-NEXT: [[CALL:%.*]] = tail call double @cos(double [[TMP0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: ret double [[CALL]] ; entry: %0 = load double, double* %a, align 8 @@ -339,10 +347,10 @@ define noalias i32* @test13(i64* nocapture readonly %a) { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@test13 -; CHECK-SAME: (i64* nocapture noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]]) [[ATTR0]] { +; CHECK-SAME: (i64* nocapture noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR0]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TMP0:%.*]] = load i64, i64* [[A]], align 8 -; CHECK-NEXT: [[CALL:%.*]] = tail call noalias i8* @malloc(i64 [[TMP0]]) [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = tail call noalias i8* @malloc(i64 [[TMP0]]) #[[ATTR2]] ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[CALL]] to i32* ; CHECK-NEXT: ret i32* [[TMP1]] ; @@ -356,8 +364,8 @@ define void @test14(i8* nocapture %0, i8* nocapture %1) { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@test14 -; CHECK-SAME: (i8* nocapture [[TMP0:%.*]], i8* nocapture nofree readnone [[TMP1:%.*]]) [[ATTR0]] { -; CHECK-NEXT: tail call void @free(i8* nocapture [[TMP0]]) [[ATTR0]] +; CHECK-SAME: (i8* nocapture [[TMP0:%.*]], i8* nocapture nofree readnone [[TMP1:%.*]]) #[[ATTR0]] { +; CHECK-NEXT: tail call void @free(i8* nocapture [[TMP0]]) #[[ATTR0]] ; CHECK-NEXT: ret void ; tail call void @free(i8* %0) #1 @@ -375,13 +383,13 @@ ; ; IS__TUNIT____-LABEL: define {{[^@]+}}@nonnull_assume_pos ; IS__TUNIT____-SAME: (i8* nofree [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* nofree [[ARG3:%.*]], i8* [[ARG4:%.*]]) { -; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR11]] [ "nofree"(i8* [[ARG1]]), "nofree"(i8* [[ARG3]]) ] +; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR11]] [ "nofree"(i8* [[ARG1]]), "nofree"(i8* [[ARG3]]) ] ; IS__TUNIT____-NEXT: call void @unknown(i8* nofree [[ARG1]], i8* [[ARG2]], i8* nofree [[ARG3]], i8* [[ARG4]]) ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____-LABEL: define {{[^@]+}}@nonnull_assume_pos ; IS__CGSCC____-SAME: (i8* nofree [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* nofree [[ARG3:%.*]], i8* [[ARG4:%.*]]) { -; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef true) [[ATTR12]] [ "nofree"(i8* [[ARG1]]), "nofree"(i8* [[ARG3]]) ] +; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12]] [ "nofree"(i8* [[ARG1]]), "nofree"(i8* [[ARG3]]) ] ; IS__CGSCC____-NEXT: call void @unknown(i8* nofree [[ARG1]], i8* [[ARG2]], i8* nofree [[ARG3]], i8* [[ARG4]]) ; IS__CGSCC____-NEXT: ret void ; @@ -425,16 +433,16 @@ ; CHECK-LABEL: define {{[^@]+}}@nonnull_assume_call ; CHECK-SAME: (i8* [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* [[ARG3:%.*]], i8* [[ARG4:%.*]]) { ; CHECK-NEXT: call void @unknown(i8* [[ARG1]], i8* [[ARG2]], i8* [[ARG3]], i8* [[ARG4]]) -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture readnone [[ARG1]]) [[ATTR0]] -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture readnone [[ARG2]]) [[ATTR0]] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture readnone [[ARG1]]) #[[ATTR0]] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture readnone [[ARG2]]) #[[ATTR0]] ; CHECK-NEXT: call void @llvm.assume(i1 noundef true) [ "nofree"(i8* [[ARG1]]), "nofree"(i8* [[ARG3]]) ] -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG3]]) [[ATTR0]] -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture readnone [[ARG4]]) [[ATTR0]] -; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree readnone [[ARG1]]) [[ATTR0]] -; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture readnone [[ARG2]]) [[ATTR0]] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG3]]) #[[ATTR0]] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture readnone [[ARG4]]) #[[ATTR0]] +; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree readnone [[ARG1]]) #[[ATTR0]] +; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture readnone [[ARG2]]) #[[ATTR0]] ; CHECK-NEXT: call void @llvm.assume(i1 noundef true) [ "nofree"(i8* [[ARG1]]), "nofree"(i8* [[ARG4]]) ] -; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree readnone [[ARG3]]) [[ATTR0]] -; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree readnone [[ARG4]]) [[ATTR0]] +; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree readnone [[ARG3]]) #[[ATTR0]] +; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree readnone [[ARG4]]) #[[ATTR0]] ; CHECK-NEXT: ret void ; call void @unknown(i8* %arg1, i8* %arg2, i8* %arg3, i8* %arg4) @@ -460,3 +468,45 @@ attributes #0 = { nounwind uwtable noinline } attributes #1 = { nounwind } attributes #2 = { nobuiltin nounwind } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nounwind } +; IS__TUNIT____: attributes #[[ATTR1]] = { noinline nounwind uwtable } +; IS__TUNIT____: attributes #[[ATTR2]] = { nobuiltin nounwind } +; IS__TUNIT____: attributes #[[ATTR3]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR4]] = { nofree noinline noreturn nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR5:[0-9]+]] = { nofree noinline nounwind readnone uwtable } +; IS__TUNIT____: attributes #[[ATTR6:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nounwind } +; IS__TUNIT____: attributes #[[ATTR8:[0-9]+]] = { nobuiltin nofree nounwind } +; IS__TUNIT____: attributes #[[ATTR9:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR10:[0-9]+]] = { nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR11]] = { willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { noinline nounwind uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nobuiltin nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nofree noinline noreturn nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR5:[0-9]+]] = { nofree noinline nounwind readnone uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR6:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR9:[0-9]+]] = { nobuiltin nofree nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR10:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR11:[0-9]+]] = { nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR12]] = { willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { noinline nounwind uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nobuiltin nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR5:[0-9]+]] = { nofree noinline nounwind readnone uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR6:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR9:[0-9]+]] = { nobuiltin nofree nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR10:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR11:[0-9]+]] = { nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR12]] = { willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -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=16 -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 @@ -24,12 +24,12 @@ define i8* @test2(i8* nonnull %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT____-SAME: (i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i8* [[P]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC____-SAME: (i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i8* [[P]] ; ret i8* %p @@ -39,24 +39,24 @@ ; 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-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0:[0-9]+]] { ; 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: call void @llvm.assume(i1 noundef true) #[[ATTR12:[0-9]+]] [ "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: 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-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0:[0-9]+]] { ; 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: call void @llvm.assume(i1 noundef true) #[[ATTR13:[0-9]+]] [ "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: call void @llvm.assume(i1 noundef true) #[[ATTR13]] [ "nonnull"(i8* [[RET]]) ] ; IS__CGSCC_OPM-NEXT: ret i8* [[RET]] ; br i1 %c, label %A, label %B @@ -72,24 +72,24 @@ ; 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-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: 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: 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-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: 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: call void @llvm.assume(i1 noundef true) #[[ATTR13]] [ "dereferenceable"(i8* [[RET]], i32 4) ] ; IS__CGSCC_OPM-NEXT: ret i8* [[RET]] ; br i1 %c, label %A, label %B @@ -148,8 +148,8 @@ define i8* @test4_helper() { ; CHECK: Function Attrs: nofree noreturn nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@test4_helper -; CHECK-SAME: () [[ATTR2:#.*]] { -; CHECK-NEXT: [[RET:%.*]] = call i8* @test4() [[ATTR2]] +; CHECK-SAME: () #[[ATTR2:[0-9]+]] { +; CHECK-NEXT: [[RET:%.*]] = call i8* @test4() #[[ATTR2]] ; CHECK-NEXT: unreachable ; %ret = call i8* @test4() @@ -159,8 +159,8 @@ define i8* @test4() { ; CHECK: Function Attrs: nofree noreturn nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@test4 -; CHECK-SAME: () [[ATTR2]] { -; CHECK-NEXT: [[RET:%.*]] = call i8* @test4_helper() [[ATTR2]] +; CHECK-SAME: () #[[ATTR2]] { +; CHECK-NEXT: [[RET:%.*]] = call i8* @test4_helper() #[[ATTR2]] ; CHECK-NEXT: unreachable ; %ret = call i8* @test4_helper() @@ -170,18 +170,27 @@ ; Given a mutual recursive set of functions which *can* return null ; make sure we haven't marked them as nonnull. 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-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__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____-LABEL: define {{[^@]+}}@test5_helper +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT____-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] +; IS__TUNIT____: rec: +; IS__TUNIT____-NEXT: br label [[END]] +; IS__TUNIT____: end: +; IS__TUNIT____-NEXT: ret i8* null +; +; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test5_helper +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] +; IS__CGSCC_OPM: rec: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: ret i8* null ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test5_helper -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__CGSCC_NPM: rec: ; IS__CGSCC_NPM-NEXT: br label [[END]] @@ -197,14 +206,19 @@ } 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-NEXT: ret i8* null +; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT____-LABEL: define {{[^@]+}}@test5 +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT____-NEXT: ret i8* null +; +; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test5 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR3]] { +; IS__CGSCC_OPM-NEXT: ret i8* null ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test5 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: ret i8* null ; %ret = call i8* @test5_helper(i1 %c) @@ -213,16 +227,27 @@ ; Local analysis, but going through a self recursive phi define i8* @test6a() { -; CHECK: Function Attrs: noreturn -; CHECK-LABEL: define {{[^@]+}}@test6a -; CHECK-SAME: () [[ATTR3:#.*]] { -; CHECK-NEXT: entry: -; CHECK-NEXT: [[RET:%.*]] = call i8* @ret_nonnull() -; CHECK-NEXT: br label [[LOOP:%.*]] -; CHECK: loop: -; CHECK-NEXT: unreachable -; CHECK: exit: -; CHECK-NEXT: unreachable +; NOT_CGSCC_OPM: Function Attrs: noreturn +; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test6a +; NOT_CGSCC_OPM-SAME: () #[[ATTR3:[0-9]+]] { +; NOT_CGSCC_OPM-NEXT: entry: +; NOT_CGSCC_OPM-NEXT: [[RET:%.*]] = call i8* @ret_nonnull() +; NOT_CGSCC_OPM-NEXT: br label [[LOOP:%.*]] +; NOT_CGSCC_OPM: loop: +; NOT_CGSCC_OPM-NEXT: unreachable +; NOT_CGSCC_OPM: exit: +; NOT_CGSCC_OPM-NEXT: unreachable +; +; IS__CGSCC_OPM: Function Attrs: noreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test6a +; IS__CGSCC_OPM-SAME: () #[[ATTR4:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i8* @ret_nonnull() +; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] +; IS__CGSCC_OPM: loop: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: exit: +; IS__CGSCC_OPM-NEXT: unreachable ; entry: %ret = call i8* @ret_nonnull() @@ -259,13 +284,13 @@ define i8* @test7(i8* %a) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7 -; IS__TUNIT____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@test7 -; IS__CGSCC____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 0 ; IS__CGSCC____-NEXT: ret i8* [[B]] ; @@ -276,13 +301,13 @@ define i8* @test8(i8* %a) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test8 -; IS__TUNIT____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@test8 -; IS__CGSCC____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 1 ; IS__CGSCC____-NEXT: ret i8* [[B]] ; @@ -293,13 +318,13 @@ define i8* @test9(i8* %a, i64 %n) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test9 -; IS__TUNIT____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@test9 -; IS__CGSCC____-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) [[ATTR1]] { +; 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]] ; IS__CGSCC____-NEXT: ret i8* [[B]] ; @@ -312,15 +337,15 @@ 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-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-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]] ; @@ -379,15 +404,15 @@ ; 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: 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:[0-9]+]] +; 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: 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:[0-9]+]] +; 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 ; %nonnullptr = tail call i8* @ret_nonnull() @@ -399,18 +424,18 @@ 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-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-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 ; call void @use_i8_ptr(i8* %a) @@ -437,7 +462,7 @@ ; 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-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5:[0-9]+]] { ; 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:%.*]] @@ -447,11 +472,11 @@ ; 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: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) #[[ATTR13:[0-9]+]] ; 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: [[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:%.*]] ] @@ -459,7 +484,7 @@ ; ; 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-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR6:[0-9]+]] { ; 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:%.*]] @@ -469,11 +494,11 @@ ; 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: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) #[[ATTR14:[0-9]+]] ; 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: [[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:%.*]] ] @@ -507,16 +532,16 @@ 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-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: [[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-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: [[TMP:%.*]] = tail call nonnull i32* @f1(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) #[[ATTR14]] ; IS__CGSCC_OPM-NEXT: ret i32* [[TMP]] ; bb: @@ -528,16 +553,16 @@ ; 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-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: [[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-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: [[TMP:%.*]] = call nonnull i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]] ; IS__CGSCC_OPM-NEXT: ret i32* [[TMP]] ; bb: @@ -571,26 +596,26 @@ 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-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR6:[0-9]+]] { ; 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: 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: 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-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR7:[0-9]+]] { ; 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: 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: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: ret void ; %cmp = icmp eq i8 %c, 0 @@ -612,32 +637,32 @@ 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-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: 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: 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: 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-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: 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: 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: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: ret void ; %cmp = icmp eq i8 %c, 0 @@ -666,50 +691,50 @@ 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-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: 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: 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: 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: 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: 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-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: 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: 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: 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: 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: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR7]] ; IS__CGSCC_OPM-NEXT: ret void ; %cmp1 = icmp eq i8 %c, 0 @@ -739,32 +764,32 @@ 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-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: 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: 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-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: 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: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR5]] ; IS__CGSCC_OPM-NEXT: ret void ; br label %loop.header @@ -900,13 +925,13 @@ 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: [[RET:%.*]] = call i8 @use1safecall(i8* nonnull readonly [[A]]) #[[ATTR14:[0-9]+]] ; NOT_CGSCC_OPM-NEXT: call void @use1nonnull(i8* nonnull [[A]]) ; NOT_CGSCC_OPM-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: [[RET:%.*]] = call i8 @use1safecall(i8* nonnull readonly [[A]]) #[[ATTR15:[0-9]+]] ; IS__CGSCC_OPM-NEXT: call void @use1nonnull(i8* nonnull [[A]]) ; IS__CGSCC_OPM-NEXT: ret i8 [[RET]] ; @@ -922,18 +947,31 @@ declare i32 @esfp(...) 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-NEXT: entry: -; CHECK-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]]) -; CHECK-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]] -; CHECK: cont: -; CHECK-NEXT: ret i1 false -; CHECK: exc: -; CHECK-NEXT: [[LP:%.*]] = landingpad { i8*, i32 } -; CHECK-NEXT: filter [0 x i8*] zeroinitializer -; CHECK-NEXT: unreachable +; NOT_CGSCC_OPM: Function Attrs: nounwind +; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@parent8 +; NOT_CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) #[[ATTR4]] personality i8* bitcast (i32 (...)* @esfp to i8*) { +; NOT_CGSCC_OPM-NEXT: entry: +; NOT_CGSCC_OPM-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]]) +; NOT_CGSCC_OPM-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]] +; NOT_CGSCC_OPM: cont: +; NOT_CGSCC_OPM-NEXT: ret i1 false +; NOT_CGSCC_OPM: exc: +; NOT_CGSCC_OPM-NEXT: [[LP:%.*]] = landingpad { i8*, i32 } +; NOT_CGSCC_OPM-NEXT: filter [0 x i8*] zeroinitializer +; NOT_CGSCC_OPM-NEXT: unreachable +; +; IS__CGSCC_OPM: Function Attrs: nounwind +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@parent8 +; IS__CGSCC_OPM-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) #[[ATTR5]] personality i8* bitcast (i32 (...)* @esfp to i8*) { +; IS__CGSCC_OPM-NEXT: entry: +; IS__CGSCC_OPM-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]]) +; IS__CGSCC_OPM-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]] +; IS__CGSCC_OPM: cont: +; IS__CGSCC_OPM-NEXT: ret i1 false +; IS__CGSCC_OPM: exc: +; IS__CGSCC_OPM-NEXT: [[LP:%.*]] = landingpad { i8*, i32 } +; IS__CGSCC_OPM-NEXT: filter [0 x i8*] zeroinitializer +; IS__CGSCC_OPM-NEXT: unreachable ; entry: @@ -953,13 +991,13 @@ define i32* @gep1(i32* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep1 -; IS__TUNIT____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@gep1 -; IS__CGSCC____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 ; IS__CGSCC____-NEXT: ret i32* [[Q]] ; @@ -971,15 +1009,21 @@ ; 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____-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:%.*]]) #[[ATTR8:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@gep1_no_null_opt -; IS__CGSCC____-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR8:#.*]] { -; IS__CGSCC____-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 -; IS__CGSCC____-NEXT: ret i32* [[Q]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@gep1_no_null_opt +; IS__CGSCC_OPM-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 +; IS__CGSCC_OPM-NEXT: ret i32* [[Q]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@gep1_no_null_opt +; IS__CGSCC_NPM-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 +; IS__CGSCC_NPM-NEXT: ret i32* [[Q]] ; %q = getelementptr inbounds i32, i32* %p, i32 1 ret i32* %q @@ -988,13 +1032,13 @@ define i32 addrspace(3)* @gep2(i32 addrspace(3)* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@gep2 -; IS__TUNIT____-SAME: (i32 addrspace(3)* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@gep2 -; IS__CGSCC____-SAME: (i32 addrspace(3)* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { +; 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 ; IS__CGSCC____-NEXT: ret i32 addrspace(3)* [[Q]] ; @@ -1006,12 +1050,12 @@ define i32 addrspace(3)* @as(i32 addrspace(3)* dereferenceable(4) %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-LABEL: define {{[^@]+}}@as -; IS__CGSCC____-SAME: (i32 addrspace(3)* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { +; 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]] ; ret i32 addrspace(3)* %p @@ -1021,7 +1065,7 @@ define internal i32* @g2() { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@g2 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32* undef ; ret i32* inttoptr (i64 4 to i32*) @@ -1030,12 +1074,12 @@ define i32* @g1() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@g1 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@g1 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32* inttoptr (i64 4 to i32*) ; %c = call i32* @g2() @@ -1046,14 +1090,14 @@ 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-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-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 ; call void @use_i32_ptr(i32* %a) @@ -1064,12 +1108,12 @@ 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: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR4]] ; NOT_CGSCC_OPM-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: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR5]] ; IS__CGSCC_OPM-NEXT: ret void ; call void @called_by_weak(i32* %a) @@ -1080,14 +1124,14 @@ 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 noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) [[ATTR4]] { -; NOT_CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR4]] +; NOT_CGSCC_OPM-SAME: (i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] { +; NOT_CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef 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 noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) [[ATTR5]] { -; IS__CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR5]] +; IS__CGSCC_OPM-SAME: (i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] { +; IS__CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR5]] ; IS__CGSCC_OPM-NEXT: ret void ; call void @use_i32_ptr(i32* %a) @@ -1095,22 +1139,34 @@ } ; Avoid nonnull as we do not touch naked functions 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-NEXT: call void @use_i32_ptr(i32* [[A]]) -; CHECK-NEXT: ret void +; NOT_CGSCC_OPM: Function Attrs: naked +; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@naked +; NOT_CGSCC_OPM-SAME: (i32* dereferenceable(4) [[A:%.*]]) #[[ATTR9:[0-9]+]] { +; NOT_CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* [[A]]) +; NOT_CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_OPM: Function Attrs: naked +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@naked +; IS__CGSCC_OPM-SAME: (i32* dereferenceable(4) [[A:%.*]]) #[[ATTR10:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* [[A]]) +; IS__CGSCC_OPM-NEXT: ret void ; call void @use_i32_ptr(i32* %a) ret void } ; Avoid nonnull as we do not touch optnone 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-NEXT: call void @use_i32_ptr(i32* [[A]]) -; CHECK-NEXT: ret void +; NOT_CGSCC_OPM: Function Attrs: noinline optnone +; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@optnone +; NOT_CGSCC_OPM-SAME: (i32* dereferenceable(4) [[A:%.*]]) #[[ATTR10:[0-9]+]] { +; NOT_CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* [[A]]) +; NOT_CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_OPM: Function Attrs: noinline optnone +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@optnone +; IS__CGSCC_OPM-SAME: (i32* dereferenceable(4) [[A:%.*]]) #[[ATTR11:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: call void @use_i32_ptr(i32* [[A]]) +; IS__CGSCC_OPM-NEXT: ret void ; call void @use_i32_ptr(i32* %a) ret void @@ -1119,14 +1175,14 @@ ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@make_live ; NOT_CGSCC_OPM-SAME: (i32* noundef nonnull align 16 dereferenceable(8) [[A:%.*]]) { ; NOT_CGSCC_OPM-NEXT: call void @naked(i32* noundef nonnull align 16 dereferenceable(8) [[A]]) -; NOT_CGSCC_OPM-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR4]] +; NOT_CGSCC_OPM-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR4]] ; NOT_CGSCC_OPM-NEXT: call void @optnone(i32* noundef nonnull align 16 dereferenceable(8) [[A]]) ; NOT_CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@make_live ; IS__CGSCC_OPM-SAME: (i32* noundef nonnull align 16 dereferenceable(8) [[A:%.*]]) { ; IS__CGSCC_OPM-NEXT: call void @naked(i32* noundef nonnull align 16 dereferenceable(8) [[A]]) -; IS__CGSCC_OPM-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) [[ATTR5]] +; IS__CGSCC_OPM-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR5]] ; IS__CGSCC_OPM-NEXT: call void @optnone(i32* noundef nonnull align 16 dereferenceable(8) [[A]]) ; IS__CGSCC_OPM-NEXT: ret void ; @@ -1149,48 +1205,48 @@ ; ; 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-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: [[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: 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-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: [[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: 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-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: [[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: 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]] @@ -1215,16 +1271,16 @@ ; ; 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-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: [[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: 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 @@ -1233,16 +1289,16 @@ ; ; IS________NPM: Function Attrs: nounwind willreturn ; IS________NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b -; IS________NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) [[ATTR6]] { +; 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: [[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: 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 @@ -1251,16 +1307,16 @@ ; ; 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-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: [[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: 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 @@ -1290,32 +1346,32 @@ ; ; 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-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: [[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: 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-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: [[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: 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]] @@ -1340,16 +1396,16 @@ ; ; 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-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: [[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: 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 @@ -1358,16 +1414,16 @@ ; ; 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-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: [[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: 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 @@ -1511,8 +1567,8 @@ define i8* @mybasename(i8* nofree readonly %str) { ; NOT_CGSCC_OPM: Function Attrs: nofree nounwind readonly willreturn ; 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-SAME: (i8* nofree readonly [[STR:%.*]]) #[[ATTR11:[0-9]+]] { +; 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]] @@ -1520,8 +1576,8 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree nounwind readonly willreturn ; 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-SAME: (i8* nofree readonly [[STR:%.*]]) #[[ATTR12:[0-9]+]] { +; 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]] @@ -1544,15 +1600,15 @@ ; ; 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: 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 ; ; 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: 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 ; @@ -1577,25 +1633,25 @@ ; 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 @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: 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 @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: 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 @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: 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 @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: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]] ; IS__CGSCC_OPM-NEXT: ret void ; call i8* @unknown() @@ -1614,13 +1670,13 @@ define i8* @nonnull_function_ptr_1() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nonnull_function_ptr_1 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@nonnull_function_ptr_1 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i8* ()* @nonnull_function_ptr_1 to i8* ; IS__CGSCC____-NEXT: ret i8* [[BC]] ; @@ -1632,13 +1688,13 @@ define i8* @nonnull_function_ptr_2() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nonnull_function_ptr_2 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@nonnull_function_ptr_2 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i8* ()* @function_decl to i8* ; IS__CGSCC____-NEXT: ret i8* [[BC]] ; @@ -1661,3 +1717,53 @@ attributes #0 = { null_pointer_is_valid } attributes #1 = { nounwind willreturn} +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree noreturn nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR3]] = { noreturn } +; IS__TUNIT____: attributes #[[ATTR4]] = { nounwind } +; IS__TUNIT____: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind readonly } +; IS__TUNIT____: attributes #[[ATTR6]] = { nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR7:[0-9]+]] = { nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR8]] = { nofree nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR9]] = { naked } +; IS__TUNIT____: attributes #[[ATTR10]] = { noinline optnone } +; IS__TUNIT____: attributes #[[ATTR11]] = { nofree nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR12]] = { willreturn } +; IS__TUNIT____: attributes #[[ATTR13]] = { nofree nosync nounwind readonly } +; IS__TUNIT____: attributes #[[ATTR14]] = { readonly willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree noreturn nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { noreturn } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { argmemonly nofree nosync nounwind readonly } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR8:[0-9]+]] = { nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR10]] = { naked } +; IS__CGSCC_OPM: attributes #[[ATTR11]] = { noinline optnone } +; IS__CGSCC_OPM: attributes #[[ATTR12]] = { nofree nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR13]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nofree nosync nounwind readonly } +; IS__CGSCC_OPM: attributes #[[ATTR15]] = { readonly willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree noreturn nosync nounwind readnone } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { noreturn } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind readonly } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR7:[0-9]+]] = { nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR9]] = { naked } +; IS__CGSCC_NPM: attributes #[[ATTR10]] = { noinline optnone } +; IS__CGSCC_NPM: attributes #[[ATTR11]] = { nofree nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR12]] = { willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR13]] = { nofree nosync nounwind readonly } +; IS__CGSCC_NPM: attributes #[[ATTR14]] = { readonly willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -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=7 -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 @@ -7,12 +7,12 @@ define i32 @leaf() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@leaf -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32 1 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@leaf -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 1 ; ret i32 1 @@ -21,12 +21,12 @@ define i32 @self_rec() { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@self_rec -; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@self_rec -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: unreachable ; %a = call i32 @self_rec() @@ -36,8 +36,8 @@ define i32 @indirect_rec() { ; CHECK: Function Attrs: nofree noreturn nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@indirect_rec -; CHECK-SAME: () [[ATTR2:#.*]] { -; CHECK-NEXT: [[A:%.*]] = call i32 @indirect_rec2() [[ATTR2]] +; CHECK-SAME: () #[[ATTR2:[0-9]+]] { +; CHECK-NEXT: [[A:%.*]] = call i32 @indirect_rec2() #[[ATTR2]] ; CHECK-NEXT: unreachable ; %a = call i32 @indirect_rec2() @@ -46,8 +46,8 @@ define i32 @indirect_rec2() { ; CHECK: Function Attrs: nofree noreturn nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@indirect_rec2 -; CHECK-SAME: () [[ATTR2]] { -; CHECK-NEXT: [[A:%.*]] = call i32 @indirect_rec() [[ATTR2]] +; CHECK-SAME: () #[[ATTR2]] { +; CHECK-NEXT: [[A:%.*]] = call i32 @indirect_rec() #[[ATTR2]] ; CHECK-NEXT: unreachable ; %a = call i32 @indirect_rec() @@ -57,7 +57,7 @@ define i32 @extern() { ; CHECK: Function Attrs: nosync readnone ; CHECK-LABEL: define {{[^@]+}}@extern -; CHECK-SAME: () [[ATTR3:#.*]] { +; CHECK-SAME: () #[[ATTR3:[0-9]+]] { ; CHECK-NEXT: [[A:%.*]] = call i32 @k() ; CHECK-NEXT: ret i32 [[A]] ; @@ -72,8 +72,8 @@ define void @intrinsic(i8* %dest, i8* %src, i32 %len) { ; CHECK: Function Attrs: argmemonly nofree nosync nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@intrinsic -; CHECK-SAME: (i8* nocapture nofree writeonly [[DEST:%.*]], i8* nocapture nofree readonly [[SRC:%.*]], i32 [[LEN:%.*]]) [[ATTR5:#.*]] { -; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[DEST]], i8* noalias nocapture nofree readonly [[SRC]], i32 [[LEN]], i1 noundef false) [[ATTR10:#.*]] +; CHECK-SAME: (i8* nocapture nofree writeonly [[DEST:%.*]], i8* nocapture nofree readonly [[SRC:%.*]], i32 [[LEN:%.*]]) #[[ATTR5:[0-9]+]] { +; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[DEST]], i8* noalias nocapture nofree readonly [[SRC]], i32 [[LEN]], i1 noundef false) #[[ATTR10:[0-9]+]] ; CHECK-NEXT: ret void ; call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 %len, i1 false) @@ -87,13 +87,13 @@ define internal i32 @called_by_norecurse() { ; IS__TUNIT____: Function Attrs: nosync readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@called_by_norecurse -; IS__TUNIT____-SAME: () [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR3]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @k() ; IS__TUNIT____-NEXT: ret i32 undef ; ; IS__CGSCC____: Function Attrs: norecurse nosync readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@called_by_norecurse -; IS__CGSCC____-SAME: () [[ATTR6:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR6:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @k() ; IS__CGSCC____-NEXT: ret i32 undef ; @@ -103,13 +103,13 @@ define void @m() norecurse { ; IS__TUNIT____: Function Attrs: norecurse nosync readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@m -; IS__TUNIT____-SAME: () [[ATTR6:#.*]] { -; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse() [[ATTR3]] +; IS__TUNIT____-SAME: () #[[ATTR6:[0-9]+]] { +; 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: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse() ; IS__CGSCC____-NEXT: ret void ; @@ -120,7 +120,7 @@ define internal i32 @called_by_norecurse_indirectly() { ; CHECK: Function Attrs: nosync readnone ; CHECK-LABEL: define {{[^@]+}}@called_by_norecurse_indirectly -; CHECK-SAME: () [[ATTR3]] { +; CHECK-SAME: () #[[ATTR3]] { ; CHECK-NEXT: [[A:%.*]] = call i32 @k() ; CHECK-NEXT: ret i32 [[A]] ; @@ -130,13 +130,13 @@ define internal i32 @o() { ; IS__TUNIT____: Function Attrs: nosync readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@o -; IS__TUNIT____-SAME: () [[ATTR3]] { -; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse_indirectly() [[ATTR3]] +; IS__TUNIT____-SAME: () #[[ATTR3]] { +; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse_indirectly() #[[ATTR3]] ; IS__TUNIT____-NEXT: ret i32 [[A]] ; ; IS__CGSCC____: Function Attrs: norecurse nosync readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@o -; IS__CGSCC____-SAME: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse_indirectly() ; IS__CGSCC____-NEXT: ret i32 [[A]] ; @@ -146,13 +146,13 @@ define i32 @p() norecurse { ; IS__TUNIT____: Function Attrs: norecurse nosync readnone ; IS__TUNIT____-LABEL: define {{[^@]+}}@p -; IS__TUNIT____-SAME: () [[ATTR6]] { -; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @o() [[ATTR3]] +; IS__TUNIT____-SAME: () #[[ATTR6]] { +; 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: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @o() ; IS__CGSCC____-NEXT: ret i32 [[A]] ; @@ -163,7 +163,7 @@ define void @f(i32 %x) { ; CHECK: Function Attrs: nofree nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@f -; CHECK-SAME: (i32 [[X:%.*]]) [[ATTR7:#.*]] { +; CHECK-SAME: (i32 [[X:%.*]]) #[[ATTR7:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4 ; CHECK-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 @@ -171,7 +171,7 @@ ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0 ; CHECK-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] ; CHECK: if.then: -; CHECK-NEXT: call void @g() [[ATTR8:#.*]] +; CHECK-NEXT: call void @g() #[[ATTR8:[0-9]+]] ; CHECK-NEXT: br label [[IF_END]] ; CHECK: if.end: ; CHECK-NEXT: ret void @@ -194,9 +194,9 @@ define void @g() norecurse { ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone ; CHECK-LABEL: define {{[^@]+}}@g -; CHECK-SAME: () [[ATTR8]] { +; CHECK-SAME: () #[[ATTR8]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: call void @f(i32 noundef 0) [[ATTR7]] +; CHECK-NEXT: call void @f(i32 noundef 0) #[[ATTR7]] ; CHECK-NEXT: ret void ; entry: @@ -225,7 +225,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 noundef [[TMP0:%.*]], i32 [[TMP1:%.*]]) local_unnamed_addr [[ATTR9:#.*]] { +; CHECK-SAME: (i32 (i32)* nocapture nofree noundef [[TMP0:%.*]], i32 [[TMP1:%.*]]) local_unnamed_addr #[[ATTR9:[0-9]+]] { ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 [[TMP0]](i32 [[TMP1]]) ; CHECK-NEXT: ret i32 [[TMP3]] ; @@ -238,14 +238,14 @@ define i32 @call_unknown_in_dead_block() local_unnamed_addr { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@call_unknown_in_dead_block -; IS__TUNIT____-SAME: () local_unnamed_addr [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@call_unknown_in_dead_block -; IS__CGSCC____-SAME: () local_unnamed_addr [[ATTR0]] { +; IS__CGSCC____-SAME: () local_unnamed_addr #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 0 ; IS__CGSCC____: Dead: ; IS__CGSCC____-NEXT: unreachable @@ -256,3 +256,28 @@ ret i32 1 } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noreturn nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree noreturn nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR3]] = { nosync readnone } +; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { readnone } +; IS__TUNIT____: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR6]] = { norecurse nosync readnone } +; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR9]] = { null_pointer_is_valid } +; IS__TUNIT____: attributes #[[ATTR10]] = { willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree noreturn nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR3]] = { nosync readnone } +; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { readnone } +; IS__CGSCC____: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR6]] = { norecurse nosync readnone } +; IS__CGSCC____: attributes #[[ATTR7]] = { nofree nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR9]] = { null_pointer_is_valid } +; IS__CGSCC____: attributes #[[ATTR10]] = { willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -19,13 +19,13 @@ define void @srec0() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@srec0 -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@srec0 -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -44,7 +44,7 @@ define i32 @srec16(i32 %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@srec16 -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: exit: @@ -52,7 +52,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@srec16 -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: exit: @@ -91,7 +91,7 @@ define i32 @endless_loop(i32 %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@endless_loop -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__TUNIT____: while.body: @@ -99,7 +99,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@endless_loop -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__CGSCC____: while.body: @@ -124,7 +124,7 @@ define i32 @dead_return(i32 %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@dead_return -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__TUNIT____: while.body: @@ -134,7 +134,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_return -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__CGSCC____: while.body: @@ -162,7 +162,7 @@ define i32 @multiple_noreturn_calls(i32 %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@multiple_noreturn_calls -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 ; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] @@ -175,7 +175,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@multiple_noreturn_calls -; IS__CGSCC____-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]]) #[[ATTR0]] { ; 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:%.*]] @@ -210,7 +210,7 @@ define i32 @endless_loop_but_willreturn() willreturn { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@endless_loop_but_willreturn -; IS__TUNIT____-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__TUNIT____: while.body: @@ -218,7 +218,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@endless_loop_but_willreturn -; IS__CGSCC____-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__CGSCC____: while.body: @@ -235,13 +235,13 @@ define i32 @UB_and_willreturn() willreturn { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@UB_and_willreturn -; IS__TUNIT____-SAME: () [[ATTR2]] { +; 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____-LABEL: define {{[^@]+}}@UB_and_willreturn -; IS__CGSCC____-SAME: () [[ATTR2]] { +; IS__CGSCC____-SAME: () #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -250,3 +250,12 @@ } attributes #0 = { noinline nounwind uwtable } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline noreturn nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree noreturn nosync nounwind readnone willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +;. diff --git a/llvm/test/Transforms/Attributor/noreturn_async.ll b/llvm/test/Transforms/Attributor/noreturn_async.ll --- a/llvm/test/Transforms/Attributor/noreturn_async.ll +++ b/llvm/test/Transforms/Attributor/noreturn_async.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s ; ; This file is the same as noreturn_sync.ll but with a personality which @@ -47,7 +47,7 @@ ; CHECK: invoke void @"?overflow@@YAXXZ"() ; CHECK: to label %invoke.cont unwind label %catch.dispatch invoke void @"?overflow@@YAXXZ"() - to label %invoke.cont unwind label %catch.dispatch + to label %invoke.cont unwind label %catch.dispatch invoke.cont: ; preds = %entry ; CHECK: invoke.cont: @@ -106,7 +106,7 @@ ; CHECK: invoke void @"?overflow@@YAXXZ_may_throw"() ; CHECK: to label %invoke.cont unwind label %catch.dispatch invoke void @"?overflow@@YAXXZ_may_throw"() - to label %invoke.cont unwind label %catch.dispatch + to label %invoke.cont unwind label %catch.dispatch invoke.cont: ; preds = %entry ; CHECK: invoke.cont: @@ -143,3 +143,10 @@ declare dso_local i32 @printf(i8* %_Format, ...) declare i32 @llvm.eh.exceptioncode(token) +;. +; CHECK: attributes #[[ATTR0:[0-9]+]] = { nofree noreturn nosync nounwind } +; CHECK: attributes #[[ATTR1:[0-9]+]] = { nofree nosync } +; CHECK: attributes #[[ATTR2:[0-9]+]] = { noreturn } +; CHECK: attributes #[[ATTR3:[0-9]+]] = { nounwind readnone } +; CHECK: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind } +;. diff --git a/llvm/test/Transforms/Attributor/noreturn_sync.ll b/llvm/test/Transforms/Attributor/noreturn_sync.ll --- a/llvm/test/Transforms/Attributor/noreturn_sync.ll +++ b/llvm/test/Transforms/Attributor/noreturn_sync.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s ; ; This file is the same as noreturn_async.ll but with a personality which @@ -43,7 +43,7 @@ %retval = alloca i32, align 4 %__exception_code = alloca i32, align 4 invoke void @"?overflow@@YAXXZ"() - to label %invoke.cont unwind label %catch.dispatch + to label %invoke.cont unwind label %catch.dispatch ; CHECK: call void @"?overflow@@YAXXZ"() ; CHECK-NEXT: unreachable @@ -102,7 +102,7 @@ ; CHECK: invoke void @"?overflow@@YAXXZ_may_throw"() ; CHECK: to label %invoke.cont unwind label %catch.dispatch invoke void @"?overflow@@YAXXZ_may_throw"() - to label %invoke.cont unwind label %catch.dispatch + to label %invoke.cont unwind label %catch.dispatch invoke.cont: ; preds = %entry ; CHECK: invoke.cont: @@ -139,3 +139,9 @@ declare dso_local i32 @printf(i8* %_Format, ...) declare i32 @llvm.eh.exceptioncode(token) +;. +; CHECK: attributes #[[ATTR0:[0-9]+]] = { nofree noreturn nosync nounwind } +; CHECK: attributes #[[ATTR1:[0-9]+]] = { noreturn } +; CHECK: attributes #[[ATTR2:[0-9]+]] = { nounwind readnone } +; CHECK: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; 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 @@ -28,17 +28,20 @@ %struct.RT = type { i8, [10 x [20 x i32]], i8 } %struct.ST = type { i32, double, %struct.RT } +;. +; CHECK: @[[A:[a-zA-Z0-9_$"\\.-]+]] = common global i32 0, align 4 +;. 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____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (%struct.ST* nofree readnone "no-capture-maybe-returned" [[S:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (%struct.ST* nofree readnone "no-capture-maybe-returned" [[S:%.*]]) #[[ATTR0:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (%struct.ST* nofree readnone "no-capture-maybe-returned" [[S:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (%struct.ST* nofree readnone "no-capture-maybe-returned" [[S:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.ST* [[S]], i64 1, i32 2, i32 1, i64 5, i64 13 ; IS__CGSCC____-NEXT: ret i32* [[ARRAYIDX]] @@ -58,7 +61,7 @@ define i32 @load_monotonic(i32* nocapture readonly %0) norecurse nounwind uwtable { ; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@load_monotonic -; CHECK-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[TMP0:%.*]]) [[ATTR1:#.*]] { +; CHECK-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] { ; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0]] monotonic, align 4 ; CHECK-NEXT: ret i32 [[TMP2]] ; @@ -76,7 +79,7 @@ define void @store_monotonic(i32* nocapture %0) norecurse nounwind uwtable { ; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@store_monotonic -; CHECK-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]]) [[ATTR1]] { +; CHECK-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: store atomic i32 10, i32* [[TMP0]] monotonic, align 4 ; CHECK-NEXT: ret void ; @@ -94,7 +97,7 @@ define i32 @load_acquire(i32* nocapture readonly %0) norecurse nounwind uwtable { ; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@load_acquire -; CHECK-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[TMP0:%.*]]) [[ATTR2:#.*]] { +; CHECK-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR2:[0-9]+]] { ; CHECK-NEXT: [[TMP2:%.*]] = load atomic i32, i32* [[TMP0]] acquire, align 4 ; CHECK-NEXT: ret i32 [[TMP2]] ; @@ -111,7 +114,7 @@ define void @load_release(i32* nocapture %0) norecurse nounwind uwtable { ; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@load_release -; CHECK-SAME: (i32* nocapture nofree noundef writeonly align 4 [[TMP0:%.*]]) [[ATTR2]] { +; CHECK-SAME: (i32* nocapture nofree noundef writeonly align 4 [[TMP0:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0]] release, align 4 ; CHECK-NEXT: ret void ; @@ -124,7 +127,7 @@ define void @load_volatile_release(i32* nocapture %0) norecurse nounwind uwtable { ; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@load_volatile_release -; CHECK-SAME: (i32* nocapture nofree noundef writeonly align 4 [[TMP0:%.*]]) [[ATTR2]] { +; CHECK-SAME: (i32* nocapture nofree noundef writeonly align 4 [[TMP0:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: store atomic volatile i32 10, i32* [[TMP0]] release, align 4 ; CHECK-NEXT: ret void ; @@ -141,7 +144,7 @@ define void @volatile_store(i32* %0) norecurse nounwind uwtable { ; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@volatile_store -; CHECK-SAME: (i32* nofree noundef align 4 [[TMP0:%.*]]) [[ATTR2]] { +; CHECK-SAME: (i32* nofree noundef align 4 [[TMP0:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: store volatile i32 14, i32* [[TMP0]], align 4 ; CHECK-NEXT: ret void ; @@ -159,7 +162,7 @@ define i32 @volatile_load(i32* %0) norecurse nounwind uwtable { ; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@volatile_load -; CHECK-SAME: (i32* nofree align 4 [[TMP0:%.*]]) [[ATTR2]] { +; CHECK-SAME: (i32* nofree align 4 [[TMP0:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4 ; CHECK-NEXT: ret i32 [[TMP2]] ; @@ -176,8 +179,8 @@ define void @call_nosync_function() nounwind uwtable noinline { ; CHECK: Function Attrs: noinline nosync nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@call_nosync_function -; CHECK-SAME: () [[ATTR3:#.*]] { -; CHECK-NEXT: tail call void @nosync_function() [[ATTR4:#.*]] +; CHECK-SAME: () #[[ATTR3:[0-9]+]] { +; CHECK-NEXT: tail call void @nosync_function() #[[ATTR4:[0-9]+]] ; CHECK-NEXT: ret void ; tail call void @nosync_function() noinline nounwind uwtable @@ -193,8 +196,8 @@ define void @call_might_sync() nounwind uwtable noinline { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@call_might_sync -; CHECK-SAME: () [[ATTR4]] { -; CHECK-NEXT: tail call void @might_sync() [[ATTR4]] +; CHECK-SAME: () #[[ATTR4]] { +; CHECK-NEXT: tail call void @might_sync() #[[ATTR4]] ; CHECK-NEXT: ret void ; tail call void @might_sync() noinline nounwind uwtable @@ -207,12 +210,12 @@ define i32 @scc1(i32* %0) noinline nounwind uwtable { ; NOT_CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@scc1 -; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) [[ATTR5:#.*]] { +; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1 -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) [[ATTR5:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: unreachable ; tail call void @scc2(i32* %0); @@ -223,12 +226,12 @@ define void @scc2(i32* %0) noinline nounwind uwtable { ; NOT_CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@scc2 -; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) [[ATTR5]] { +; 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-LABEL: define {{[^@]+}}@scc2 -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) [[ATTR5]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR5]] { ; IS__CGSCC_NPM-NEXT: unreachable ; tail call i32 @scc1(i32* %0); @@ -257,7 +260,7 @@ define void @foo1(i32* %0, %"struct.std::atomic"* %1) { ; IS__TUNIT____: Function Attrs: nofree nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo1 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR6:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] { ; IS__TUNIT____-NEXT: store i32 100, i32* [[TMP0]], align 4 ; IS__TUNIT____-NEXT: fence release ; IS__TUNIT____-NEXT: [[TMP3:%.*]] = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* [[TMP1]], i64 0, i32 0, i32 0 @@ -266,7 +269,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo1 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR6:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 100, i32* [[TMP0]], align 4 ; IS__CGSCC____-NEXT: fence release ; IS__CGSCC____-NEXT: [[TMP3:%.*]] = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* [[TMP1]], i64 0, i32 0, i32 0 @@ -283,7 +286,7 @@ define void @bar(i32* %0, %"struct.std::atomic"* %1) { ; IS__TUNIT____: Function Attrs: nofree nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar -; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull readonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR7:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull readonly dereferenceable(1) [[TMP1:%.*]]) #[[ATTR7:[0-9]+]] { ; IS__TUNIT____-NEXT: [[TMP3:%.*]] = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* [[TMP1]], i64 0, i32 0, i32 0 ; IS__TUNIT____-NEXT: br label [[TMP4:%.*]] ; IS__TUNIT____: 4: @@ -297,7 +300,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull readonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull readonly dereferenceable(1) [[TMP1:%.*]]) #[[ATTR7:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP3:%.*]] = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* [[TMP1]], i64 0, i32 0, i32 0 ; IS__CGSCC____-NEXT: br label [[TMP4:%.*]] ; IS__CGSCC____: 4: @@ -327,7 +330,7 @@ define void @foo1_singlethread(i32* %0, %"struct.std::atomic"* %1) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo1_singlethread -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR8:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__TUNIT____-NEXT: store i32 100, i32* [[TMP0]], align 4 ; IS__TUNIT____-NEXT: fence syncscope("singlethread") release ; IS__TUNIT____-NEXT: [[TMP3:%.*]] = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* [[TMP1]], i64 0, i32 0, i32 0 @@ -336,7 +339,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo1_singlethread -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull writeonly dereferenceable(1) [[TMP1:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 100, i32* [[TMP0]], align 4 ; IS__CGSCC____-NEXT: fence syncscope("singlethread") release ; IS__CGSCC____-NEXT: [[TMP3:%.*]] = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* [[TMP1]], i64 0, i32 0, i32 0 @@ -353,7 +356,7 @@ define void @bar_singlethread(i32* %0, %"struct.std::atomic"* %1) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar_singlethread -; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull readonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR9:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull readonly dereferenceable(1) [[TMP1:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__TUNIT____-NEXT: [[TMP3:%.*]] = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* [[TMP1]], i64 0, i32 0, i32 0 ; IS__TUNIT____-NEXT: br label [[TMP4:%.*]] ; IS__TUNIT____: 4: @@ -367,7 +370,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar_singlethread -; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull readonly dereferenceable(1) [[TMP1:%.*]]) [[ATTR9:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]], %"struct.std::atomic"* nocapture nofree nonnull readonly dereferenceable(1) [[TMP1:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__CGSCC____-NEXT: [[TMP3:%.*]] = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* [[TMP1]], i64 0, i32 0, i32 0 ; IS__CGSCC____-NEXT: br label [[TMP4:%.*]] ; IS__CGSCC____: 4: @@ -403,14 +406,14 @@ define i32 @memcpy_volatile(i8* %ptr1, i8* %ptr2) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn ; 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____-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8* nocapture nofree readonly [[PTR2:%.*]]) #[[ATTR10:[0-9]+]] { +; 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:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 4 ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn ; 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____-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8* nocapture nofree readonly [[PTR2:%.*]]) #[[ATTR10:[0-9]+]] { +; 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:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 4 ; call void @llvm.memcpy(i8* %ptr1, i8* %ptr2, i32 8, i1 1) @@ -424,14 +427,14 @@ define i32 @memset_non_volatile(i8* %ptr1, i8 %val) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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____-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8 [[VAL:%.*]]) #[[ATTR11:[0-9]+]] { +; IS__TUNIT____-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) #[[ATTR18:[0-9]+]] ; IS__TUNIT____-NEXT: ret i32 4 ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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____-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8 [[VAL:%.*]]) #[[ATTR11:[0-9]+]] { +; IS__CGSCC____-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) #[[ATTR19:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 4 ; call void @llvm.memset(i8* %ptr1, i8 %val, i32 8, i1 0) @@ -456,7 +459,7 @@ define void @convergent_readnone(){ ; CHECK: Function Attrs: readnone ; CHECK-LABEL: define {{[^@]+}}@convergent_readnone -; CHECK-SAME: () [[ATTR13:#.*]] { +; CHECK-SAME: () #[[ATTR13:[0-9]+]] { ; CHECK-NEXT: call void @readnone_test() ; CHECK-NEXT: ret void ; @@ -474,7 +477,7 @@ define void @i_totally_sync() { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@i_totally_sync -; CHECK-SAME: () [[ATTR14:#.*]] { +; CHECK-SAME: () #[[ATTR14:[0-9]+]] { ; CHECK-NEXT: tail call void @llvm.x86.sse2.clflush(i8* noundef nonnull align 4 dereferenceable(4) bitcast (i32* @a to i8*)) ; CHECK-NEXT: ret void ; @@ -489,12 +492,12 @@ define i32 @cos_test(float %x) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cos_test -; IS__TUNIT____-SAME: (float [[X:%.*]]) [[ATTR15:#.*]] { +; IS__TUNIT____-SAME: (float [[X:%.*]]) #[[ATTR15:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32 4 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cos_test -; IS__CGSCC____-SAME: (float [[X:%.*]]) [[ATTR15:#.*]] { +; IS__CGSCC____-SAME: (float [[X:%.*]]) #[[ATTR15:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 4 ; call float @llvm.cos(float %x) @@ -504,16 +507,79 @@ define float @cos_test2(float %x) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-SAME: (float [[X:%.*]]) #[[ATTR15]] { +; IS__TUNIT____-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) #[[ATTR17]] ; IS__TUNIT____-NEXT: ret float [[C]] ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-SAME: (float [[X:%.*]]) #[[ATTR16:[0-9]+]] { +; IS__CGSCC____-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) #[[ATTR18]] ; IS__CGSCC____-NEXT: ret float [[C]] ; %c = call float @llvm.cos(float %x) ret float %c } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind optsize readnone ssp uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { argmemonly nofree norecurse nounwind uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR3]] = { noinline nosync nounwind uwtable } +; IS__TUNIT____: attributes #[[ATTR4]] = { noinline nounwind uwtable } +; IS__TUNIT____: attributes #[[ATTR5]] = { nofree noinline noreturn nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR6]] = { nofree nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nounwind } +; IS__TUNIT____: attributes #[[ATTR8]] = { nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR9]] = { nofree nosync nounwind } +; IS__TUNIT____: attributes #[[ATTR10]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR12:[0-9]+]] = { convergent readnone } +; IS__TUNIT____: attributes #[[ATTR13]] = { readnone } +; IS__TUNIT____: attributes #[[ATTR14]] = { nounwind } +; IS__TUNIT____: attributes #[[ATTR15]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR16:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__TUNIT____: attributes #[[ATTR17]] = { willreturn } +; IS__TUNIT____: attributes #[[ATTR18]] = { willreturn writeonly } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind optsize readnone ssp uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nounwind uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { noinline nosync nounwind uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { noinline nounwind uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nofree noinline noreturn nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nofree norecurse nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nofree norecurse nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR10]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR12:[0-9]+]] = { convergent readnone } +; IS__CGSCC_OPM: attributes #[[ATTR13]] = { readnone } +; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR15]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR16]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR17:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR18]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR19]] = { willreturn writeonly } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind optsize readnone ssp uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nounwind uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { noinline nosync nounwind uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { noinline nounwind uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nofree norecurse nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR10]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR12:[0-9]+]] = { convergent readnone } +; IS__CGSCC_NPM: attributes #[[ATTR13]] = { readnone } +; IS__CGSCC_NPM: attributes #[[ATTR14]] = { nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR15]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR16]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR17:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR18]] = { willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR19]] = { willreturn writeonly } +;. diff --git a/llvm/test/Transforms/Attributor/noundef.ll b/llvm/test/Transforms/Attributor/noundef.ll --- a/llvm/test/Transforms/Attributor/noundef.ll +++ b/llvm/test/Transforms/Attributor/noundef.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -124,3 +124,7 @@ declare !callback !0 void @callback_broker(void (i8*)*, i8*) !1 = !{i64 0, i64 1, i1 false} !0 = !{!1} +;. +; CHECK: [[META0:![0-9]+]] = !{!1} +; CHECK: [[META1:![0-9]+]] = !{i64 0, i64 1, i1 false} +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -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=1 -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 @@ -8,12 +8,12 @@ define i32 @foo1() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo1 -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32 1 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo1 -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 1 ; ret i32 1 @@ -23,12 +23,12 @@ define i32 @scc1_foo() { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_foo -; NOT_CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_foo -; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: unreachable ; %1 = call i32 @scc1_bar() @@ -40,12 +40,12 @@ define i32 @scc1_bar() { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_bar -; NOT_CGSCC_NPM-SAME: () [[ATTR1]] { +; 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-LABEL: define {{[^@]+}}@scc1_bar -; IS__CGSCC_NPM-SAME: () [[ATTR1]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: unreachable ; %1 = call i32 @scc1_foo() @@ -147,3 +147,13 @@ declare i8* @__cxa_begin_catch(i8*) declare void @__cxa_end_catch() +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noreturn nosync nounwind readnone willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree noreturn nosync nounwind readnone willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -enable-new-pm=0 -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=20 -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=19 -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 -enable-new-pm=0 -attributor-cgscc -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 @@ -13,7 +13,7 @@ define internal i1 @iszero1(i32 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero1 -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i1 undef ; %cmp = icmp eq i32 %c, 0 @@ -23,12 +23,12 @@ define i1 @potential_test1(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i1 false ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false ; %arg = select i1 %c, i32 -1, i32 1 @@ -48,7 +48,7 @@ define internal i32 @iszero2(i32 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero2 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 undef ; %cmp = icmp eq i32 %c, 0 @@ -59,7 +59,7 @@ define internal i32 @call_with_two_values(i32 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@call_with_two_values -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 undef ; %csret1 = call i32 @iszero2(i32 %c) @@ -72,12 +72,12 @@ 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:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 0 ; %csret1 = call i32 @call_with_two_values(i32 1) @@ -100,14 +100,14 @@ define internal i32 @iszero3(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@iszero3 -; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@iszero3 -; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC____-NEXT: [[RET:%.*]] = zext i1 [[CMP]] to i32 ; IS__CGSCC____-NEXT: ret i32 [[RET]] @@ -120,14 +120,14 @@ define internal i32 @less_than_two(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@less_than_two -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@less_than_two -; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 2 ; IS__CGSCC____-NEXT: [[RET:%.*]] = zext i1 [[CMP]] to i32 ; IS__CGSCC____-NEXT: ret i32 [[RET]] @@ -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: () #[[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-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: () #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[CMP1:%.*]] = call i32 @iszero3(i32 noundef 0) #[[ATTR0]], !range [[RNG0:![0-9]+]] +; IS__TUNIT_NPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 [[CMP1]]) #[[ATTR0]], !range [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[CMP2:%.*]] = call i32 @iszero3(i32 noundef 1) #[[ATTR0]], !range [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 [[CMP2]]) #[[ATTR0]], !range [[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: () #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[CMP1:%.*]] = call noundef i32 @iszero3(i32 noundef 0) #[[ATTR2:[0-9]+]] +; IS__CGSCC_OPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 noundef [[CMP1]]) #[[ATTR2]], !range [[RNG0:![0-9]+]] +; 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]], !range [[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: () #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = call noundef i32 @iszero3(i32 noundef 0) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]] +; IS__CGSCC_NPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 noundef [[CMP1]]) #[[ATTR1]], !range [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = call noundef i32 @iszero3(i32 noundef 1) #[[ATTR1]], !range [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 noundef [[CMP2]]) #[[ATTR1]], !range [[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:%.*]]) #[[ATTR0]] { ; 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:%.*]]) #[[ATTR0]] { ; 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:%.*]]) #[[ATTR0]] { ; 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:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 0 ; %csret1 = call i32 @return1or3(i32 %c) @@ -235,29 +235,29 @@ define i1 @potential_test6(i32 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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]]) #[[ATTR0]], !range [[RNG0:![0-9]+]] ; 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-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]]) #[[ATTR0]], !range [[RNG1:![0-9]+]] ; 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-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]]) #[[ATTR2]], !range [[RNG1:![0-9]+]] ; 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-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]]) #[[ATTR1]], !range [[RNG1:![0-9]+]] ; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3 ; IS__CGSCC_NPM-NEXT: ret i1 [[RET]] ; @@ -269,33 +269,33 @@ define i1 @potential_test7(i32 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR0]], !range [[RNG0]] +; IS__TUNIT_OPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR0]], !range [[RNG1:![0-9]+]] ; 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-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-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR0]], !range [[RNG1]] +; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR0]], !range [[RNG2:![0-9]+]] ; 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:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]], !range [[RNG1]] +; IS__CGSCC_OPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR2]], !range [[RNG2:![0-9]+]] ; 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:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]], !range [[RNG1]] +; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR1]], !range [[RNG2:![0-9]+]] ; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]] ; IS__CGSCC_NPM-NEXT: ret i1 [[RET]] ; @@ -308,14 +308,14 @@ define internal i32 @return1or3(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@return1or3 -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@return1or3 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[CMP]], i32 1, i32 3 ; IS__CGSCC____-NEXT: ret i32 [[RET]] @@ -328,7 +328,7 @@ define internal i32 @return2or4(i32 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@return2or4 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 undef ; %cmp = icmp eq i32 %c, 0 @@ -339,14 +339,14 @@ define internal i32 @return3or4(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@return3or4 -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@return3or4 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0 ; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[CMP]], i32 3, i32 4 ; IS__CGSCC____-NEXT: ret i32 [[RET]] @@ -363,7 +363,7 @@ define internal i1 @cmp_with_four(i32 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cmp_with_four -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 undef ; %cmp = icmp eq i32 %c, 4 @@ -373,7 +373,7 @@ define internal i1 @wrapper(i32 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@wrapper -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 undef ; %ret = call i1 @cmp_with_four(i32 %c) @@ -383,12 +383,12 @@ 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: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 false ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test8 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false ; %res1 = call i1 @wrapper(i32 1) @@ -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: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[COND:%.*]] ; IS__TUNIT_OPM: cond: @@ -421,7 +421,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test9 -; IS__TUNIT_NPM-SAME: () [[ATTR0]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: br label [[COND:%.*]] ; IS__TUNIT_NPM: cond: @@ -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: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[COND:%.*]] ; IS__CGSCC_OPM: cond: @@ -459,7 +459,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test9 -; IS__CGSCC_NPM-SAME: () [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: br label [[COND:%.*]] ; IS__CGSCC_NPM: cond: @@ -512,12 +512,12 @@ 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:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 false ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test10 -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false ; %ret = call i32 @may_return_undef(i32 %c) @@ -528,7 +528,7 @@ define i32 @optimize_undef_1(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i32 0 @@ -537,7 +537,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 0 @@ -555,7 +555,7 @@ define i32 @optimize_undef_2(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i32 0 @@ -564,7 +564,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 0 @@ -582,7 +582,7 @@ define i32 @optimize_undef_3(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_3 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i32 0 @@ -591,7 +591,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_3 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 0 @@ -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:%.*]]) #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR0]], !range [[RNG2:![0-9]+]] +; IS__TUNIT_OPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR0]], !range [[RNG3:![0-9]+]] ; 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:%.*]]) #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR0]], !range [[RNG0]] +; IS__TUNIT_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR0]], !range [[RNG3:![0-9]+]] ; 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-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-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR2]], !range [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR2]], !range [[RNG3:![0-9]+]] +; IS__CGSCC_OPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR2]], !range [[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-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-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR1]], !range [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR1]], !range [[RNG3:![0-9]+]] +; IS__CGSCC_NPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR1]], !range [[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]] @@ -659,7 +659,7 @@ define i32 @optimize_poison_1(i1 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@optimize_poison_1 -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT_OPM: t: ; IS__TUNIT_OPM-NEXT: ret i32 0 @@ -668,7 +668,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@optimize_poison_1 -; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT_NPM: t: ; IS__TUNIT_NPM-NEXT: ret i32 0 @@ -677,7 +677,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@optimize_poison_1 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_OPM: t: ; IS__CGSCC_OPM-NEXT: ret i32 0 @@ -686,7 +686,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@optimize_poison_1 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_NPM: t: ; IS__CGSCC_NPM-NEXT: ret i32 0 @@ -705,24 +705,24 @@ define i32 @potential_test12(i1 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[ZERO:%.*]] = call noundef i32 @optimize_poison_1(i1 [[C]]) #[[ATTR0]], !range [[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:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: ret i32 0 ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[ZERO:%.*]] = call i32 @optimize_poison_1(i1 [[C]]) #[[ATTR2]], !range [[RNG3]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ZERO]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test12 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: ret i32 0 ; %zero = call i32 @optimize_poison_1(i1 %c) @@ -737,13 +737,13 @@ define internal i32 @potential_test13_callee(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test13_callee -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@potential_test13_callee -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET:%.*]] = and i32 [[C]], 3 ; IS__CGSCC____-NEXT: ret i32 [[RET]] ; @@ -754,26 +754,26 @@ define i32 @potential_test13_caller1() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR0]], !range [[RNG2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR0]], !range [[RNG0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR2]], !range [[RNG0]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR1]], !range [[RNG0]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET]] ; %ret = call i32 @potential_test13_callee(i32 0) @@ -783,26 +783,26 @@ define i32 @potential_test13_caller2() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR0]], !range [[RNG2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR0]], !range [[RNG0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR2]], !range [[RNG0]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR1]], !range [[RNG0]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET]] ; %ret = call i32 @potential_test13_callee(i32 1) @@ -812,26 +812,26 @@ define i32 @potential_test13_caller3() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR0]], !range [[RNG2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR0]], !range [[RNG0]] ; IS__TUNIT_NPM-NEXT: ret i32 [[RET]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR2]], !range [[RNG0]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-SAME: () #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR1]], !range [[RNG0]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET]] ; %ret = call i32 @potential_test13_callee(i32 undef) @@ -841,7 +841,7 @@ define i1 @potential_test14(i1 %c0, i1 %c1, i1 %c2, i1 %c3) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test14 -; IS__TUNIT____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[X0:%.*]] = select i1 [[C0]], i32 0, i32 1 ; IS__TUNIT____-NEXT: [[X1:%.*]] = select i1 [[C1]], i32 [[X0]], i32 undef ; IS__TUNIT____-NEXT: [[Y2:%.*]] = select i1 [[C2]], i32 0, i32 7 @@ -851,7 +851,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test14 -; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[X0:%.*]] = select i1 [[C0]], i32 0, i32 1 ; IS__CGSCC____-NEXT: [[X1:%.*]] = select i1 [[C1]], i32 [[X0]], i32 undef ; IS__CGSCC____-NEXT: [[Y2:%.*]] = select i1 [[C2]], i32 0, i32 7 @@ -870,12 +870,12 @@ define i1 @potential_test15(i1 %c0, i1 %c1) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test15 -; IS__TUNIT____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@potential_test15 -; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false ; %x0 = select i1 %c0, i32 0, i32 1 @@ -887,12 +887,12 @@ define i1 @potential_test16(i1 %c0, i1 %c1) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test16 -; IS__TUNIT____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@potential_test16 -; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C0:%.*]], i1 [[C1:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 false ; %x0 = select i1 %c0, i32 0, i32 undef @@ -900,15 +900,26 @@ %ret = icmp eq i32 %x1, 7 ret i1 %ret } - -; IS__TUNIT_NPM: !0 = !{i32 0, i32 2} -; IS__TUNIT_NPM: !1 = !{i32 1, i32 4} -; IS__TUNIT_NPM: !2 = !{i32 3, i32 5} -; IS__TUNIT_NPM: !3 = !{i32 -1, i32 1} -; IS__TUNIT_NPM-NOT: !4 - -; IS__TUNIT_OPM: !0 = !{i32 1, i32 4} -; IS__TUNIT_OPM: !1 = !{i32 3, i32 5} -; IS__TUNIT_OPM: !2 = !{i32 0, i32 2} -; IS__TUNIT_OPM: !3 = !{i32 -1, i32 1} -; IS__TUNIT_OPM-NOT: !4 +;. +; IS__TUNIT_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone } +;. +; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { willreturn } +;. +; IS__TUNIT_OPM: [[RNG0]] = !{i32 1, i32 4} +; IS__TUNIT_OPM: [[RNG1]] = !{i32 3, i32 5} +; IS__TUNIT_OPM: [[RNG2]] = !{i32 0, i32 2} +; IS__TUNIT_OPM: [[RNG3]] = !{i32 -1, i32 1} +;. +; NOT_TUNIT_OPM: [[META0:![0-9]+]] = !{i32 0, i32 2} +; NOT_TUNIT_OPM: [[META1:![0-9]+]] = !{i32 1, i32 4} +; NOT_TUNIT_OPM: [[META2:![0-9]+]] = !{i32 3, i32 5} +; NOT_TUNIT_OPM: [[META3:![0-9]+]] = !{i32 -1, i32 1} +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=23 -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=27 -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 @@ -9,14 +9,14 @@ define i32 @test0(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test0 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef 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 noundef 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____-LABEL: define {{[^@]+}}@test0 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef 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 noundef 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 @@ -26,26 +26,26 @@ define i32 @test0-range-check(i32* %p) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; 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]]) #[[ATTR3:[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-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]]) #[[ATTR2:[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-LABEL: define {{[^@]+}}@test0-range-check -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0:#.*]] { -; IS__CGSCC_OPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR3:#.*]], [[RNG0:!range !.*]] +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR3:[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-LABEL: define {{[^@]+}}@test0-range-check -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0:#.*]] { -; IS__CGSCC_NPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR2:#.*]], [[RNG0:!range !.*]] +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR2:[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]]) #[[ATTR3]], !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]]) #[[ATTR2]], !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 noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR3]], [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR3]], !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 noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) { -; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR2]], [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR2]], !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 @@ -341,16 +341,16 @@ define i32 @test1(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef 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 noundef 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____-LABEL: define {{[^@]+}}@test1 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef 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 noundef 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]] @@ -365,29 +365,29 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; 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]]) #[[ATTR3]], !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-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]]) #[[ATTR2]], !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-LABEL: define {{[^@]+}}@test1-check -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR3]], [[RNG2:!range !.*]] +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR3]], !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-LABEL: define {{[^@]+}}@test1-check -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) [[ATTR2]], [[RNG2:!range !.*]] +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR2]], !range [[RNG2:![0-9]+]] ; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500 ; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]] ; @@ -411,7 +411,7 @@ define i32 @test2(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef 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 @@ -420,7 +420,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef 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 @@ -437,7 +437,7 @@ define i32 @test2_check(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; 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: @@ -449,7 +449,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_check -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef 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 @@ -543,7 +543,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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() [[ATTR4:#.*]], [[RNG3:!range !.*]] +; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = tail call i32 @r1() #[[ATTR4:[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: @@ -611,7 +611,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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,29 +641,53 @@ ; } ; } define dso_local i32 @test4-f1(i32 %u) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@test4-f1 -; IS__TUNIT____-SAME: (i32 [[U:%.*]]) [[ATTR1:#.*]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 -; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] -; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: br label [[RETURN]] -; IS__TUNIT____: return: -; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ] -; IS__TUNIT____-NEXT: ret i32 [[RETVAL_0]] +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test4-f1 +; IS__TUNIT_OPM-SAME: (i32 [[U:%.*]]) #[[ATTR2:[0-9]+]] { +; IS__TUNIT_OPM-NEXT: entry: +; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 +; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] +; IS__TUNIT_OPM: if.then: +; IS__TUNIT_OPM-NEXT: br label [[RETURN]] +; IS__TUNIT_OPM: return: +; IS__TUNIT_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ] +; IS__TUNIT_OPM-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__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4-f1 +; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 +; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] +; IS__TUNIT_NPM: if.then: +; IS__TUNIT_NPM-NEXT: br label [[RETURN]] +; IS__TUNIT_NPM: return: +; IS__TUNIT_NPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ] +; IS__TUNIT_NPM-NEXT: ret i32 [[RETVAL_0]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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: @@ -682,30 +706,30 @@ define dso_local i32 @test4-g1(i32 %u) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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]]) #[[ATTR2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[CALL]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4-g1 -; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] { ; 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-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]]) [[ATTR5:#.*]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR5:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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]]) #[[ATTR3:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]] ; ; FIXME: %call should have range [0, inf] @@ -724,35 +748,65 @@ ; } ; } define dso_local i32 @test4-f2(i32 %u) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@test4-f2 -; IS__TUNIT____-SAME: (i32 [[U:%.*]]) [[ATTR1]] { -; 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:%.*]] -; IS__TUNIT____: if.then: -; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nuw nsw i32 [[U]], 1 -; IS__TUNIT____-NEXT: br label [[RETURN:%.*]] -; IS__TUNIT____: if.else: -; IS__TUNIT____-NEXT: br label [[RETURN]] -; IS__TUNIT____: return: -; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ] -; IS__TUNIT____-NEXT: ret i32 [[RETVAL_0]] +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test4-f2 +; IS__TUNIT_OPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: entry: +; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 +; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__TUNIT_OPM: if.then: +; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add nuw nsw i32 [[U]], 1 +; IS__TUNIT_OPM-NEXT: br label [[RETURN:%.*]] +; IS__TUNIT_OPM: if.else: +; IS__TUNIT_OPM-NEXT: br label [[RETURN]] +; IS__TUNIT_OPM: return: +; IS__TUNIT_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ] +; IS__TUNIT_OPM-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__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4-f2 +; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1 +; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] +; IS__TUNIT_NPM: if.then: +; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add nuw nsw i32 [[U]], 1 +; IS__TUNIT_NPM-NEXT: br label [[RETURN:%.*]] +; IS__TUNIT_NPM: if.else: +; IS__TUNIT_NPM-NEXT: br label [[RETURN]] +; IS__TUNIT_NPM: return: +; IS__TUNIT_NPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ] +; IS__TUNIT_NPM-NEXT: ret i32 [[RETVAL_0]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 @@ -774,30 +828,30 @@ define dso_local i32 @test4-g2(i32 %u) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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]]) #[[ATTR2]] ; IS__TUNIT_OPM-NEXT: ret i32 [[CALL]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4-g2 -; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] { ; 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-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]]) [[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR5]] ; IS__CGSCC_OPM-NEXT: ret i32 [[CALL]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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]]) #[[ATTR3]], !range [[RNG3:![0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]] ; entry: @@ -808,12 +862,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,57 +931,109 @@ ; 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____-LABEL: define {{[^@]+}}@phi -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: bb: -; IS__TUNIT____-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5 -; IS__TUNIT____-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]] -; IS__TUNIT____: bb1: -; IS__TUNIT____-NEXT: br label [[BB3:%.*]] -; IS__TUNIT____: bb2: -; IS__TUNIT____-NEXT: br label [[BB3]] -; IS__TUNIT____: bb3: -; IS__TUNIT____-NEXT: [[TMP4:%.*]] = icmp sgt i32 [[ARG]], 10 -; IS__TUNIT____-NEXT: br i1 [[TMP4]], label [[BB5:%.*]], label [[BB7:%.*]] -; IS__TUNIT____: bb5: -; IS__TUNIT____-NEXT: br label [[BB9:%.*]] -; IS__TUNIT____: bb7: -; IS__TUNIT____-NEXT: br label [[BB9]] -; IS__TUNIT____: bb9: -; IS__TUNIT____-NEXT: br label [[BB12:%.*]] -; IS__TUNIT____: bb11: -; IS__TUNIT____-NEXT: unreachable -; IS__TUNIT____: bb12: -; IS__TUNIT____-NEXT: br label [[BB13:%.*]] -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi +; IS__TUNIT_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: bb: +; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5 +; IS__TUNIT_OPM-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]] +; IS__TUNIT_OPM: bb1: +; IS__TUNIT_OPM-NEXT: br label [[BB3:%.*]] +; IS__TUNIT_OPM: bb2: +; IS__TUNIT_OPM-NEXT: br label [[BB3]] +; IS__TUNIT_OPM: bb3: +; IS__TUNIT_OPM-NEXT: [[TMP4:%.*]] = icmp sgt i32 [[ARG]], 10 +; IS__TUNIT_OPM-NEXT: br i1 [[TMP4]], label [[BB5:%.*]], label [[BB7:%.*]] +; IS__TUNIT_OPM: bb5: +; IS__TUNIT_OPM-NEXT: br label [[BB9:%.*]] +; IS__TUNIT_OPM: bb7: +; IS__TUNIT_OPM-NEXT: br label [[BB9]] +; IS__TUNIT_OPM: bb9: +; IS__TUNIT_OPM-NEXT: br label [[BB12:%.*]] +; IS__TUNIT_OPM: bb11: +; IS__TUNIT_OPM-NEXT: unreachable +; IS__TUNIT_OPM: bb12: +; IS__TUNIT_OPM-NEXT: br label [[BB13:%.*]] +; IS__TUNIT_OPM: bb13: +; IS__TUNIT_OPM-NEXT: ret i1 false +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi +; IS__TUNIT_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: bb: +; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5 +; IS__TUNIT_NPM-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]] +; IS__TUNIT_NPM: bb1: +; IS__TUNIT_NPM-NEXT: br label [[BB3:%.*]] +; IS__TUNIT_NPM: bb2: +; IS__TUNIT_NPM-NEXT: br label [[BB3]] +; IS__TUNIT_NPM: bb3: +; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = icmp sgt i32 [[ARG]], 10 +; IS__TUNIT_NPM-NEXT: br i1 [[TMP4]], label [[BB5:%.*]], label [[BB7:%.*]] +; IS__TUNIT_NPM: bb5: +; IS__TUNIT_NPM-NEXT: br label [[BB9:%.*]] +; IS__TUNIT_NPM: bb7: +; IS__TUNIT_NPM-NEXT: br label [[BB9]] +; IS__TUNIT_NPM: bb9: +; IS__TUNIT_NPM-NEXT: br label [[BB12:%.*]] +; IS__TUNIT_NPM: bb11: +; IS__TUNIT_NPM-NEXT: unreachable +; IS__TUNIT_NPM: bb12: +; IS__TUNIT_NPM-NEXT: br label [[BB13:%.*]] +; IS__TUNIT_NPM: bb13: +; IS__TUNIT_NPM-NEXT: ret i1 false +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 +1075,29 @@ } define dso_local i1 @select(i32 %a) local_unnamed_addr #0 { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@select -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: ret i1 false +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@select +; IS__TUNIT_OPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: entry: +; IS__TUNIT_OPM-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__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@select +; IS__TUNIT_NPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: ret i1 false +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 +1110,29 @@ } define dso_local i32 @select_zext(i32 %a) local_unnamed_addr #0 { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@select_zext -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { -; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: ret i32 0 +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@select_zext +; IS__TUNIT_OPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: entry: +; IS__TUNIT_OPM-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__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@select_zext +; IS__TUNIT_NPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: ret i32 0 +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 +1147,41 @@ ; 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____-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int -; IS__TUNIT____-SAME: (i32 [[A:%.*]]) local_unnamed_addr [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int +; IS__TUNIT_OPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: entry: +; IS__TUNIT_OPM-NEXT: [[I2P:%.*]] = inttoptr i1 false to i1* +; IS__TUNIT_OPM-NEXT: [[BC:%.*]] = bitcast i1* [[I2P]] to i32* +; IS__TUNIT_OPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[BC]] to i64 +; IS__TUNIT_OPM-NEXT: ret i64 [[P2I]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int +; IS__TUNIT_NPM-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: [[I2P:%.*]] = inttoptr i1 false to i1* +; IS__TUNIT_NPM-NEXT: [[BC:%.*]] = bitcast i1* [[I2P]] to i32* +; IS__TUNIT_NPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[BC]] to i64 +; IS__TUNIT_NPM-NEXT: ret i64 [[P2I]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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,76 +1199,132 @@ ; } define i1 @f_fcmp(float %a, float %b) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@f_fcmp -; IS__TUNIT____-SAME: (float [[A:%.*]], float [[B:%.*]]) [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f_fcmp +; IS__TUNIT_OPM-SAME: (float [[A:%.*]], float [[B:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[R:%.*]] = fcmp uge float [[A]], [[B]] +; IS__TUNIT_OPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__TUNIT_OPM-NEXT: ret i1 [[S]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f_fcmp +; IS__TUNIT_NPM-SAME: (float [[A:%.*]], float [[B:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[R:%.*]] = fcmp uge float [[A]], [[B]] +; IS__TUNIT_NPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__TUNIT_NPM-NEXT: ret i1 [[S]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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____-LABEL: define {{[^@]+}}@d_fcmp -; IS__TUNIT____-SAME: (double [[A:%.*]], double [[B:%.*]]) [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@d_fcmp +; IS__TUNIT_OPM-SAME: (double [[A:%.*]], double [[B:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[R:%.*]] = fcmp oeq double [[A]], [[B]] +; IS__TUNIT_OPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__TUNIT_OPM-NEXT: ret i1 [[S]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@d_fcmp +; IS__TUNIT_NPM-SAME: (double [[A:%.*]], double [[B:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[R:%.*]] = fcmp oeq double [[A]], [[B]] +; IS__TUNIT_NPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__TUNIT_NPM-NEXT: ret i1 [[S]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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____-LABEL: define {{[^@]+}}@dp_icmp -; IS__TUNIT____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@dp_icmp +; IS__TUNIT_OPM-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[R:%.*]] = icmp sge double* [[A]], [[B]] +; IS__TUNIT_OPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__TUNIT_OPM-NEXT: ret i1 [[S]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@dp_icmp +; IS__TUNIT_NPM-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[R:%.*]] = icmp sge double* [[A]], [[B]] +; IS__TUNIT_NPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__TUNIT_NPM-NEXT: ret i1 [[S]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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____-LABEL: define {{[^@]+}}@ip_icmp -; IS__TUNIT____-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@ip_icmp +; IS__TUNIT_OPM-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[R:%.*]] = icmp ult i8* [[A]], [[B]] +; IS__TUNIT_OPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__TUNIT_OPM-NEXT: ret i1 [[S]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ip_icmp +; IS__TUNIT_NPM-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[R:%.*]] = icmp ult i8* [[A]], [[B]] +; IS__TUNIT_NPM-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false +; IS__TUNIT_NPM-NEXT: ret i1 [[S]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 @@ -1129,11 +1333,11 @@ 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-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]]) #[[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-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]] ; IS__TUNIT_OPM-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]] ; IS__TUNIT_OPM-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]] @@ -1141,11 +1345,11 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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:%.*]]) #[[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-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]] ; IS__TUNIT_NPM-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]] ; IS__TUNIT_NPM-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]] @@ -1153,11 +1357,11 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) [[ATTR5]] +; 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]]) #[[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR5]] ; 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]] @@ -1165,11 +1369,11 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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]]) #[[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-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 +1390,73 @@ } define i8 @ret_two() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_two -; IS__TUNIT____-SAME: () [[ATTR1]] { -; IS__TUNIT____-NEXT: ret i8 2 +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@ret_two +; IS__TUNIT_OPM-SAME: () #[[ATTR2]] { +; IS__TUNIT_OPM-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__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret_two +; IS__TUNIT_NPM-SAME: () #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: ret i8 2 +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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____-LABEL: define {{[^@]+}}@ret_undef -; IS__TUNIT____-SAME: () [[ATTR1]] { -; IS__TUNIT____-NEXT: ret i8 undef +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@ret_undef +; IS__TUNIT_OPM-SAME: () #[[ATTR2]] { +; IS__TUNIT_OPM-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__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret_undef +; IS__TUNIT_NPM-SAME: () #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: ret i8 undef +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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: () #[[ATTR2]] { +; 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_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@undef_collapse_1 +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +1465,25 @@ ; 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____-LABEL: define {{[^@]+}}@undef_collapse_2 -; 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_2 +; IS__TUNIT_OPM-SAME: () #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: ret i8 0 +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@undef_collapse_2 +; 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_2 -; IS__CGSCC____-SAME: () [[ATTR1]] { -; IS__CGSCC____-NEXT: ret i8 0 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 +1492,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: () #[[ATTR2]] { +; IS__TUNIT_OPM-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 +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@undef_collapse_caller +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_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__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +1519,54 @@ } define i32 @ret1or2(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@ret1or2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@ret1or2 +; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2 +; IS__TUNIT_OPM-NEXT: ret i32 [[S]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret1or2 +; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2 +; IS__TUNIT_NPM-NEXT: ret i32 [[S]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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:%.*]]) #[[ATTR2]] { +; 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:%.*]]) #[[ATTR2]] { +; 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:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i1 true ; %r1 = call i32 @ret1or2(i1 %c1) %r2 = call i32 @ret1or2(i1 %c2) @@ -1306,9 +1582,9 @@ ; ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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]]) #[[ATTR2]], !range [[RNG4:![0-9]+]] +; IS__TUNIT_OPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR2]], !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 @@ -1317,9 +1593,9 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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:%.*]]) #[[ATTR1]] { +; 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 @@ -1328,9 +1604,9 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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]]) [[ATTR5]], [[RNG5:!range !.*]] -; IS__CGSCC_OPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) [[ATTR5]], [[RNG5]] +; IS__CGSCC_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR5]], !range [[RNG5:![0-9]+]] +; IS__CGSCC_OPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR5]], !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 @@ -1339,9 +1615,9 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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]]) #[[ATTR3]], !range [[RNG5:![0-9]+]] +; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR3]], !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,15 +1635,25 @@ define i32 @ret100() { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@ret100 -; IS__TUNIT____-SAME: () [[ATTR1]] { -; IS__TUNIT____-NEXT: ret i32 100 +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@ret100 +; IS__TUNIT_OPM-SAME: () #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: ret i32 100 +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret100 +; IS__TUNIT_NPM-SAME: () #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: ret i32 100 +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ret100 +; IS__CGSCC_OPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_OPM-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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ret100 +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: ret i32 100 ; ret i32 100 } @@ -1376,7 +1662,7 @@ ; ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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: @@ -1390,7 +1676,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ctx_adjustment -; IS__TUNIT_NPM-SAME: (i32 [[V:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i32 [[V:%.*]]) #[[ATTR1]] { ; 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: @@ -1402,7 +1688,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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: @@ -1416,7 +1702,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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,17 +1727,29 @@ define i32 @func(i1 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@func -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@func +; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1 +; IS__TUNIT_OPM-NEXT: ret i32 [[RET]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@func +; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1 +; IS__TUNIT_NPM-NEXT: ret i32 [[RET]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 @@ -1460,50 +1758,50 @@ define i32 @simplify_callsite_argument(i1 %d) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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]]) #[[ATTR2]], !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) #[[ATTR2]], !range [[RNG3]] ; IS__TUNIT_OPM-NEXT: ret i32 [[RET2]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@simplify_callsite_argument -; IS__TUNIT_NPM-SAME: (i1 [[D:%.*]]) [[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i1 [[D:%.*]]) #[[ATTR1]] { ; 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-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]]) [[ATTR5]], [[RNG4:!range !.*]] +; IS__CGSCC_OPM-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) #[[ATTR5]], !range [[RNG4]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET1]] ; IS__CGSCC_OPM: f: -; IS__CGSCC_OPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) [[ATTR5]], [[RNG4]] +; IS__CGSCC_OPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR5]], !range [[RNG4]] ; IS__CGSCC_OPM-NEXT: ret i32 [[RET2]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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) #[[ATTR3]], !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) #[[ATTR3]], !range [[RNG4]] ; IS__CGSCC_NPM-NEXT: ret i32 [[RET2]] ; %c = select i1 %d, i1 true, i1 false @@ -1517,34 +1815,58 @@ } define internal i32 @less_than_65536(i32 %arg) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@less_than_65536 -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@less_than_65536 +; IS__TUNIT_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536 +; IS__TUNIT_OPM-NEXT: ret i32 [[SHRINKED]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@less_than_65536 +; IS__TUNIT_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536 +; IS__TUNIT_NPM-NEXT: ret i32 [[SHRINKED]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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____-LABEL: define {{[^@]+}}@is_less_than_65536 -; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) [[ATTR1]] { -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@is_less_than_65536 +; IS__TUNIT_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536 +; IS__TUNIT_OPM-NEXT: ret i1 [[CMP]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@is_less_than_65536 +; IS__TUNIT_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536 +; IS__TUNIT_NPM-NEXT: ret i1 [[CMP]] +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 +1876,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:%.*]]) #[[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-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) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) [[ATTR5]] -; IS__CGSCC_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) [[ATTR5]] +; IS__CGSCC_OPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) #[[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) #[[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) #[[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) #[[ATTR5]] ; 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:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) #[[ATTR3]], !range [[RNG6:![0-9]+]] +; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) #[[ATTR3]], !range [[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-NEXT: [[RET:%.*]] = and i1 [[TRUE1]], [[TRUE2]] ; IS__CGSCC_NPM-NEXT: ret i1 [[RET]] ; @@ -1603,14 +1925,19 @@ define internal i32 @cast_and_return(i1 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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 +; 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 +; 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 @@ -1619,14 +1946,19 @@ define internal i1 @is_less_than_3(i32 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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 +; 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 +; 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 +1968,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:%.*]]) #[[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-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]]) #[[ATTR2]] ; 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:%.*]]) #[[ATTR2]] { +; 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:%.*]]) #[[ATTR1]] { +; 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 +1998,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 +; 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 +; 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 +2082,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 +; 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 +; 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:%.*]]) #[[ATTR2]] { +; 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 +; 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 +; 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,63 +2123,121 @@ } define internal i32 @less_than_100_2(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@less_than_100_2 -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ -; IS__TUNIT____-NEXT: i32 0, label [[ONZERO:%.*]] -; IS__TUNIT____-NEXT: i32 1, label [[ONONE:%.*]] -; IS__TUNIT____-NEXT: i32 2, label [[ONTWO:%.*]] -; IS__TUNIT____-NEXT: i32 3, label [[ONTHREE:%.*]] -; IS__TUNIT____-NEXT: i32 4, label [[ONFOUR:%.*]] -; IS__TUNIT____-NEXT: i32 5, label [[ONFIVE:%.*]] -; IS__TUNIT____-NEXT: i32 6, label [[ONSIX:%.*]] -; IS__TUNIT____-NEXT: ] -; IS__TUNIT____: onzero: -; IS__TUNIT____-NEXT: ret i32 0 -; IS__TUNIT____: onone: -; IS__TUNIT____-NEXT: ret i32 1 -; IS__TUNIT____: ontwo: -; IS__TUNIT____-NEXT: ret i32 2 -; IS__TUNIT____: onthree: -; IS__TUNIT____-NEXT: ret i32 3 -; IS__TUNIT____: onfour: -; IS__TUNIT____-NEXT: ret i32 4 -; IS__TUNIT____: onfive: -; IS__TUNIT____-NEXT: ret i32 5 -; IS__TUNIT____: onsix: -; IS__TUNIT____-NEXT: ret i32 6 -; 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__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@less_than_100_2 +; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ +; IS__TUNIT_OPM-NEXT: i32 0, label [[ONZERO:%.*]] +; IS__TUNIT_OPM-NEXT: i32 1, label [[ONONE:%.*]] +; IS__TUNIT_OPM-NEXT: i32 2, label [[ONTWO:%.*]] +; IS__TUNIT_OPM-NEXT: i32 3, label [[ONTHREE:%.*]] +; IS__TUNIT_OPM-NEXT: i32 4, label [[ONFOUR:%.*]] +; IS__TUNIT_OPM-NEXT: i32 5, label [[ONFIVE:%.*]] +; IS__TUNIT_OPM-NEXT: i32 6, label [[ONSIX:%.*]] +; IS__TUNIT_OPM-NEXT: ] +; IS__TUNIT_OPM: onzero: +; IS__TUNIT_OPM-NEXT: ret i32 0 +; IS__TUNIT_OPM: onone: +; IS__TUNIT_OPM-NEXT: ret i32 1 +; IS__TUNIT_OPM: ontwo: +; IS__TUNIT_OPM-NEXT: ret i32 2 +; IS__TUNIT_OPM: onthree: +; IS__TUNIT_OPM-NEXT: ret i32 3 +; IS__TUNIT_OPM: onfour: +; IS__TUNIT_OPM-NEXT: ret i32 4 +; IS__TUNIT_OPM: onfive: +; IS__TUNIT_OPM-NEXT: ret i32 5 +; IS__TUNIT_OPM: onsix: +; IS__TUNIT_OPM-NEXT: ret i32 6 +; IS__TUNIT_OPM: otherwise: +; IS__TUNIT_OPM-NEXT: ret i32 99 +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@less_than_100_2 +; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ +; IS__TUNIT_NPM-NEXT: i32 0, label [[ONZERO:%.*]] +; IS__TUNIT_NPM-NEXT: i32 1, label [[ONONE:%.*]] +; IS__TUNIT_NPM-NEXT: i32 2, label [[ONTWO:%.*]] +; IS__TUNIT_NPM-NEXT: i32 3, label [[ONTHREE:%.*]] +; IS__TUNIT_NPM-NEXT: i32 4, label [[ONFOUR:%.*]] +; IS__TUNIT_NPM-NEXT: i32 5, label [[ONFIVE:%.*]] +; IS__TUNIT_NPM-NEXT: i32 6, label [[ONSIX:%.*]] +; IS__TUNIT_NPM-NEXT: ] +; IS__TUNIT_NPM: onzero: +; IS__TUNIT_NPM-NEXT: ret i32 0 +; IS__TUNIT_NPM: onone: +; IS__TUNIT_NPM-NEXT: ret i32 1 +; IS__TUNIT_NPM: ontwo: +; IS__TUNIT_NPM-NEXT: ret i32 2 +; IS__TUNIT_NPM: onthree: +; IS__TUNIT_NPM-NEXT: ret i32 3 +; IS__TUNIT_NPM: onfour: +; IS__TUNIT_NPM-NEXT: ret i32 4 +; IS__TUNIT_NPM: onfive: +; IS__TUNIT_NPM-NEXT: ret i32 5 +; IS__TUNIT_NPM: onsix: +; IS__TUNIT_NPM-NEXT: ret i32 6 +; IS__TUNIT_NPM: otherwise: +; IS__TUNIT_NPM-NEXT: ret i32 99 +; +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; 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 +; 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 +2265,27 @@ } define internal i1 @is_less_than_100_2(i32 %c) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@is_less_than_100_2 -; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) [[ATTR1]] { -; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100 -; IS__TUNIT____-NEXT: ret i1 [[CMP]] +; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@is_less_than_100_2 +; IS__TUNIT_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100 +; IS__TUNIT_OPM-NEXT: ret i1 [[CMP]] +; +; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@is_less_than_100_2 +; IS__TUNIT_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100 +; IS__TUNIT_NPM-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 +; 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 +; 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 +2295,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:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-NEXT: [[CSRET1:%.*]] = call noundef i32 @less_than_100_2(i32 noundef 0) #[[ATTR2]], !range [[RNG5:![0-9]+]] +; 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]], !range [[RNG5]] +; IS__TUNIT_OPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR2]] ; 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:%.*]]) #[[ATTR2]] { +; 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:%.*]]) #[[ATTR1]] { +; 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) @@ -1879,19 +2334,19 @@ define internal i1 @non_zero(i8 %v) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; 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-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-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 +2357,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 noundef nonnull readonly dereferenceable(1) [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT_OPM-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] { ; 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]]) #[[ATTR2]] ; 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 noundef nonnull readonly dereferenceable(1) [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] { ; 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 +2380,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 noundef nonnull readonly dereferenceable(1) [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC_OPM-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] { ; 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]]) [[ATTR5]] +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) #[[ATTR5]] ; 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 noundef nonnull readonly dereferenceable(1) [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] { ; 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:%.*]] @@ -2026,25 +2481,56 @@ !0 = !{i32 0, i32 10} !1 = !{i32 10, i32 100} - -; NOT_TUNIT____: !0 = !{i32 0, i32 10} -; NOT_TUNIT____: !1 = !{i32 10, i32 100} -; NOT_TUNIT____-NOT: !2 - -; IS__TUNIT_OPM: !0 = !{i32 0, i32 10} -; IS__TUNIT_OPM: !1 = !{i32 10, i32 100} -; IS__TUNIT_OPM: !2 = !{i32 200, i32 1091} -; IS__TUNIT_OPM: !3 = !{i32 0, i32 2} -; IS__TUNIT_OPM: !4 = !{i32 1, i32 3} -; IS__TUNIT_OPM: !5 = !{i32 0, i32 100} -; IS__TUNIT_OPM-NOT: !6 - -; IS__TUNIT_NPM: !0 = !{i32 0, i32 10} -; IS__TUNIT_NPM: !1 = !{i32 10, i32 100} -; IS__TUNIT_NPM: !2 = !{i32 200, i32 1091} -; IS__TUNIT_NPM: !3 = !{i32 1, i32 -2147483648} -; IS__TUNIT_NPM: !4 = !{i32 0, i32 2} -; IS__TUNIT_NPM: !5 = !{i32 1, i32 3} -; IS__TUNIT_NPM: !6 = !{i32 0, i32 65536} -; IS__TUNIT_NPM: !7 = !{i32 0, i32 100} -; IS__TUNIT_NPM-NOT: !8 +;. +; IS__TUNIT_OPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone } +; IS__TUNIT_OPM: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__TUNIT_NPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind readonly willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { willreturn } +;. +; IS__TUNIT_OPM: [[RNG0]] = !{i32 0, i32 10} +; IS__TUNIT_OPM: [[RNG1]] = !{i32 10, i32 100} +; IS__TUNIT_OPM: [[RNG2]] = !{i32 200, i32 1091} +; IS__TUNIT_OPM: [[RNG3]] = !{i32 0, i32 2} +; IS__TUNIT_OPM: [[RNG4]] = !{i32 1, i32 3} +; IS__TUNIT_OPM: [[RNG5]] = !{i32 0, i32 100} +;. +; IS__TUNIT_NPM: [[RNG0]] = !{i32 0, i32 10} +; IS__TUNIT_NPM: [[RNG1]] = !{i32 10, i32 100} +; IS__TUNIT_NPM: [[RNG2]] = !{i32 200, i32 1091} +; IS__TUNIT_NPM: [[RNG3]] = !{i32 1, i32 -2147483648} +; IS__TUNIT_NPM: [[RNG4]] = !{i32 0, i32 2} +; IS__TUNIT_NPM: [[RNG5]] = !{i32 1, i32 3} +; IS__TUNIT_NPM: [[RNG6]] = !{i32 0, i32 65536} +; IS__TUNIT_NPM: [[RNG7]] = !{i32 0, i32 100} +;. +; IS__CGSCC_OPM: [[RNG0]] = !{i32 0, i32 10} +; IS__CGSCC_OPM: [[RNG1]] = !{i32 10, i32 100} +; IS__CGSCC_OPM: [[RNG2]] = !{i32 200, i32 1091} +; IS__CGSCC_OPM: [[RNG3]] = !{i32 10, i32 21} +; IS__CGSCC_OPM: [[RNG4]] = !{i32 0, i32 2} +; IS__CGSCC_OPM: [[RNG5]] = !{i32 1, i32 3} +;. +; IS__CGSCC_NPM: [[RNG0]] = !{i32 0, i32 10} +; IS__CGSCC_NPM: [[RNG1]] = !{i32 10, i32 100} +; IS__CGSCC_NPM: [[RNG2]] = !{i32 200, i32 1091} +; IS__CGSCC_NPM: [[RNG3]] = !{i32 1, i32 -2147483648} +; IS__CGSCC_NPM: [[RNG4]] = !{i32 0, i32 2} +; IS__CGSCC_NPM: [[RNG5]] = !{i32 1, i32 3} +; IS__CGSCC_NPM: [[RNG6]] = !{i32 0, i32 65536} +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=10 -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=10 -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 @@ -37,22 +37,22 @@ define i32* @external_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@external_ret2_nrw -; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) [[ATTR2:#.*]] -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree [[R0]], i32* nofree [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) [[ATTR3:#.*]] -; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) [[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR2:[0-9]+]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR3:[0-9]+]] +; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: ret i32* [[CALL3]] ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@external_ret2_nrw -; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) [[ATTR2:#.*]] -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) [[ATTR3:#.*]] -; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) [[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR2:[0-9]+]] +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR3:[0-9]+]] +; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]] ; IS__CGSCC____-NEXT: ret i32* [[CALL3]] ; entry: @@ -66,7 +66,7 @@ define internal i32* @internal_ret0_nw(i32* %n0, i32* %w0) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_ret0_nw -; IS__TUNIT____-SAME: (i32* nofree returned [[N0:%.*]], i32* nofree [[W0:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree returned [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[R0:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: [[R1:%.*]] = alloca i32, align 4 @@ -78,12 +78,12 @@ ; IS__TUNIT____-NEXT: store i32 3, i32* [[R0]], align 4 ; IS__TUNIT____-NEXT: store i32 5, i32* [[R1]], align 4 ; IS__TUNIT____-NEXT: store i32 1, i32* [[W0]], align 4 -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R1]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R1]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: br label [[RETURN]] ; IS__TUNIT____: return: ; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL5]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ] @@ -91,7 +91,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_ret0_nw -; IS__CGSCC____-SAME: (i32* nofree returned [[N0:%.*]], i32* nofree [[W0:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree returned [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[R0:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: [[R1:%.*]] = alloca i32, align 4 @@ -103,12 +103,12 @@ ; IS__CGSCC____-NEXT: store i32 3, i32* [[R0]], align 4 ; IS__CGSCC____-NEXT: store i32 5, i32* [[R1]], align 4 ; IS__CGSCC____-NEXT: store i32 1, i32* [[W0]], align 4 -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR4:#.*]] -; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R1]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR4]] -; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR4:[0-9]+]] +; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R1]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR4]] +; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] ; IS__CGSCC____-NEXT: br label [[RETURN]] ; IS__CGSCC____: return: ; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL5]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ] @@ -143,7 +143,7 @@ define internal i32* @internal_ret1_rrw(i32* %r0, i32* %r1, i32* %w0) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_ret1_rrw -; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree returned [[R1:%.*]], i32* nofree [[W0:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree returned [[R1:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4 ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0 @@ -151,19 +151,19 @@ ; IS__TUNIT____: if.then: ; IS__TUNIT____-NEXT: br label [[RETURN:%.*]] ; IS__TUNIT____: if.end: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) [[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* [[R0]], align 4 ; IS__TUNIT____-NEXT: [[TMP2:%.*]] = load i32, i32* [[R1]], align 4 ; IS__TUNIT____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], [[TMP2]] ; IS__TUNIT____-NEXT: store i32 [[ADD]], i32* [[W0]], align 4 -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32* @external_ret2_nrw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[R1]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32* @external_ret2_nrw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[R1]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: br label [[RETURN]] ; IS__TUNIT____: return: ; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL8]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ] @@ -171,7 +171,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_ret1_rrw -; IS__CGSCC____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree nonnull returned align 4 dereferenceable(4) [[R1:%.*]], i32* nofree [[W0:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree nonnull returned align 4 dereferenceable(4) [[R1:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4 ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0 @@ -179,19 +179,19 @@ ; IS__CGSCC____: if.then: ; IS__CGSCC____-NEXT: br label [[RETURN:%.*]] ; IS__CGSCC____: if.end: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) [[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]] ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* [[R0]], align 4 ; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load i32, i32* [[R1]], align 4 ; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], [[TMP2]] ; IS__CGSCC____-NEXT: store i32 [[ADD]], i32* [[W0]], align 4 -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32* @external_ret2_nrw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[R1]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR4]] -; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR4]] -; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32* @external_ret2_nrw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[R1]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR4]] +; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR4]] +; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] ; IS__CGSCC____-NEXT: br label [[RETURN]] ; IS__CGSCC____: return: ; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL8]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ] @@ -229,7 +229,7 @@ define i32* @external_sink_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn ; 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____-SAME: (i32* nofree [[N0:%.*]], i32* nocapture nofree readonly [[R0:%.*]], i32* nofree returned writeonly "no-capture-maybe-returned" [[W0:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32* [[N0]], null ; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] @@ -244,7 +244,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; 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____-SAME: (i32* nofree [[N0:%.*]], i32* nocapture nofree readonly [[R0:%.*]], i32* nofree returned writeonly "no-capture-maybe-returned" [[W0:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32* [[N0]], null ; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] @@ -276,7 +276,7 @@ define internal i32* @internal_ret1_rw(i32* %r0, i32* %w0) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_ret1_rw -; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree returned [[W0:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4 ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0 @@ -284,13 +284,13 @@ ; IS__TUNIT____: if.then: ; IS__TUNIT____-NEXT: br label [[RETURN:%.*]] ; IS__TUNIT____: if.end: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) [[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* [[R0]], align 4 ; IS__TUNIT____-NEXT: store i32 [[TMP1]], i32* [[W0]], align 4 -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR2]] -; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: br label [[RETURN]] ; IS__TUNIT____: return: ; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL4]], [[IF_END]] ], [ [[W0]], [[IF_THEN]] ] @@ -298,7 +298,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_ret1_rw -; IS__CGSCC____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree returned [[W0:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4 ; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0 @@ -306,13 +306,13 @@ ; IS__CGSCC____: if.then: ; IS__CGSCC____-NEXT: br label [[RETURN:%.*]] ; IS__CGSCC____: if.end: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) [[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]] ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* [[R0]], align 4 ; IS__CGSCC____-NEXT: store i32 [[TMP1]], i32* [[W0]], align 4 -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] -; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) [[ATTR4]] -; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) [[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] +; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR4]] +; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]] ; IS__CGSCC____-NEXT: br label [[RETURN]] ; IS__CGSCC____: return: ; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL4]], [[IF_END]] ], [ [[W0]], [[IF_THEN]] ] @@ -344,18 +344,18 @@ define i32* @external_source_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@external_source_ret2_nrw -; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) [[ATTR3]] -; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) [[ATTR2]] +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR3]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: ret i32* [[CALL1]] ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@external_source_ret2_nrw -; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) [[ATTR3]] -; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) [[ATTR4]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR3]] +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR4]] ; IS__CGSCC____-NEXT: ret i32* [[CALL1]] ; entry: @@ -363,20 +363,15 @@ %call1 = call i32* @external_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) ret i32* %call1 } - -; Verify that we see only expected attribute sets, the above lines only check -; for a subset relation. -; -; IS__CGSCC____-NOT: attributes # -; IS__CGSCC____: attributes #{{.*}} = { argmemonly nofree nosync nounwind } -; IS__CGSCC____: attributes #{{.*}} = { argmemonly nofree norecurse nosync nounwind willreturn } -; IS__CGSCC____: attributes #{{.*}} = { nofree nosync nounwind } -; IS__CGSCC____: attributes #{{.*}} = { nounwind } -; IS__CGSCC____-NOT: attributes # - -; IS__TUNIT____-NOT: attributes # -; IS__TUNIT____: attributes #{{.*}} = { argmemonly nofree nosync nounwind } -; IS__TUNIT____: attributes #{{.*}} = { argmemonly nofree nosync nounwind willreturn } -; IS__TUNIT____: attributes #{{.*}} = { nofree nosync nounwind } -; IS__TUNIT____: attributes #{{.*}} = { nofree nosync nounwind willreturn } -; IS__TUNIT____-NOT: attributes # +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind } +; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind } +; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind } +; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind } +; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; 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 @@ -11,6 +11,10 @@ ; NOTE: readonly for %y1_2 would be OK here but not for the similar situation in test13. ; +;. +; CHECK: @[[X:[a-zA-Z0-9_$"\\.-]+]] = global i32 0 +; CHECK: @[[CONSTANT_MEM:[a-zA-Z0-9_$"\\.-]+]] = external dso_local constant i32, align 4 +;. define void @test1_2(i8* %x1_2, i8* %y1_2, i8* %z1_2) { ; CHECK-LABEL: define {{[^@]+}}@test1_2 ; CHECK-SAME: (i8* [[X1_2:%.*]], i8* [[Y1_2:%.*]], i8* [[Z1_2:%.*]]) { @@ -26,13 +30,13 @@ define i8* @test2(i8* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i8* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 0, i32* @x, align 4 ; IS__CGSCC____-NEXT: ret i8* [[P]] ; @@ -43,13 +47,13 @@ define i1 @test3(i8* %p, i8* %q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test3 -; IS__TUNIT____-SAME: (i8* nofree readnone [[P:%.*]], i8* nofree readnone [[Q:%.*]]) [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: (i8* nofree readnone [[P:%.*]], i8* nofree readnone [[Q:%.*]]) #[[ATTR1:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@test3 -; IS__CGSCC____-SAME: (i8* nofree readnone [[P:%.*]], i8* nofree readnone [[Q:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: (i8* nofree readnone [[P:%.*]], i8* nofree readnone [[Q:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = icmp ult i8* [[P]], [[Q]] ; IS__CGSCC____-NEXT: ret i1 [[A]] ; @@ -62,8 +66,8 @@ define void @test4_2(i8* %p) { ; CHECK: Function Attrs: readonly ; CHECK-LABEL: define {{[^@]+}}@test4_2 -; CHECK-SAME: (i8* nocapture readonly [[P:%.*]]) [[ATTR2:#.*]] { -; CHECK-NEXT: call void @test4_1(i8* nocapture readonly [[P]]) [[ATTR2]] +; CHECK-SAME: (i8* nocapture readonly [[P:%.*]]) #[[ATTR2:[0-9]+]] { +; CHECK-NEXT: call void @test4_1(i8* nocapture readonly [[P]]) #[[ATTR2]] ; CHECK-NEXT: ret void ; call void @test4_1(i8* %p) @@ -74,13 +78,13 @@ define void @test5(i8** %p, i8* %q) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test5 -; IS__TUNIT____-SAME: (i8** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[P:%.*]], i8* nofree writeonly [[Q:%.*]]) [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: (i8** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[P:%.*]], i8* nofree writeonly [[Q:%.*]]) #[[ATTR3:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@test5 -; IS__CGSCC____-SAME: (i8** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[P:%.*]], i8* nofree writeonly [[Q:%.*]]) [[ATTR3:#.*]] { +; IS__CGSCC____-SAME: (i8** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[P:%.*]], i8* nofree writeonly [[Q:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__CGSCC____-NEXT: store i8* [[Q]], i8** [[P]], align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -106,12 +110,12 @@ define void @test7_1(i32* inalloca %a) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7_1 -; IS__TUNIT____-SAME: (i32* inalloca nocapture nofree nonnull writeonly dereferenceable(4) [[A:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@test7_1 -; IS__CGSCC____-SAME: (i32* inalloca nocapture nofree nonnull writeonly dereferenceable(4) [[A:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32* inalloca nocapture nofree nonnull writeonly dereferenceable(4) [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret void ; ret void @@ -120,13 +124,13 @@ define i32* @test8_1(i32* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test8_1 -; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@test8_1 -; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32* [[P]] ; @@ -137,17 +141,17 @@ define void @test8_2(i32* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test8_2 -; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR0]] { +; 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]]) #[[ATTR1]] ; 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____-LABEL: define {{[^@]+}}@test8_2 -; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) [[ATTR3]] { +; 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]]) #[[ATTR11:[0-9]+]] ; IS__CGSCC____-NEXT: store i32 10, i32* [[CALL]], align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -165,14 +169,14 @@ define void @test9(<4 x i32*> %ptrs, <4 x i32>%val) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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____-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:[0-9]+]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR4:[0-9]+]] { +; 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:[0-9]+]] ; 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>) @@ -184,14 +188,14 @@ define <4 x i32> @test10(<4 x i32*> %ptrs) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; 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:%.*]]) #[[ATTR4:[0-9]+]] { +; 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:[0-9]+]] ; IS__TUNIT____-NEXT: ret <4 x i32> [[RES]] ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readonly willreturn ; 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:%.*]]) #[[ATTR5:[0-9]+]] { +; 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:[0-9]+]] ; 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,14 +207,14 @@ define <4 x i32> @test11_2(<4 x i32*> %ptrs) { ; IS__TUNIT____: Function Attrs: argmemonly nounwind readonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test11_2 -; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR5:#.*]] { -; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) [[ATTR9:#.*]] +; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR5:[0-9]+]] { +; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) #[[ATTR9:[0-9]+]] ; IS__TUNIT____-NEXT: ret <4 x i32> [[RES]] ; ; IS__CGSCC____: Function Attrs: argmemonly nounwind readonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@test11_2 -; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) [[ATTR6:#.*]] { -; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) [[ATTR10:#.*]] +; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) #[[ATTR10:[0-9]+]] ; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @test11_1(<4 x i32*> %ptrs) @@ -222,14 +226,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:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR12:[0-9]+]] ; 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:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR14:[0-9]+]] ; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @test12_1(<4 x i32*> %ptrs) @@ -239,13 +243,13 @@ define i32 @volatile_load(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@volatile_load -; IS__TUNIT____-SAME: (i32* nofree noundef align 4 [[P:%.*]]) [[ATTR7:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree noundef align 4 [[P:%.*]]) #[[ATTR7:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@volatile_load -; IS__CGSCC____-SAME: (i32* nofree noundef align 4 [[P:%.*]]) [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree noundef align 4 [[P:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__CGSCC____-NEXT: [[LOAD:%.*]] = load volatile i32, i32* [[P]], align 4 ; IS__CGSCC____-NEXT: ret i32 [[LOAD]] ; @@ -301,7 +305,7 @@ define void @byval_not_readonly_1(i8* byval(i8) %written) readonly { ; CHECK: Function Attrs: readonly ; CHECK-LABEL: define {{[^@]+}}@byval_not_readonly_1 -; CHECK-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR2]] { +; CHECK-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]]) ; CHECK-NEXT: ret void ; @@ -312,13 +316,13 @@ define void @byval_not_readonly_2(i8* byval(i8) %written) readonly { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@byval_not_readonly_2 -; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef 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____-LABEL: define {{[^@]+}}@byval_not_readonly_2 -; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 ; IS__CGSCC____-NEXT: ret void ; @@ -327,11 +331,17 @@ } 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-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]]) -; CHECK-NEXT: ret void +; IS__TUNIT____: Function Attrs: readnone +; IS__TUNIT____-LABEL: define {{[^@]+}}@byval_not_readnone_1 +; IS__TUNIT____-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__TUNIT____-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]]) +; IS__TUNIT____-NEXT: ret void +; +; IS__CGSCC____: Function Attrs: readnone +; IS__CGSCC____-LABEL: define {{[^@]+}}@byval_not_readnone_1 +; IS__CGSCC____-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC____-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]]) +; IS__CGSCC____-NEXT: ret void ; call void @escape_i8(i8* %written) ret void @@ -340,13 +350,13 @@ define void @byval_not_readnone_2(i8* byval(i8) %written) readnone { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@byval_not_readnone_2 -; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef 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____-LABEL: define {{[^@]+}}@byval_not_readnone_2 -; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 ; IS__CGSCC____-NEXT: ret void ; @@ -357,13 +367,13 @@ define void @byval_no_fnarg(i8* byval(i8) %written) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@byval_no_fnarg -; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef 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____-LABEL: define {{[^@]+}}@byval_no_fnarg -; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: store i8 0, i8* [[WRITTEN]], align 1 ; IS__CGSCC____-NEXT: ret void ; @@ -374,14 +384,14 @@ define void @testbyval(i8* %read_only) { ; IS__TUNIT____-LABEL: define {{[^@]+}}@testbyval ; IS__TUNIT____-SAME: (i8* nocapture readonly [[READ_ONLY:%.*]]) { -; IS__TUNIT____-NEXT: call void @byval_not_readonly_1(i8* nocapture readonly [[READ_ONLY]]) [[ATTR2:#.*]] +; IS__TUNIT____-NEXT: call void @byval_not_readonly_1(i8* nocapture readonly [[READ_ONLY]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: call void @byval_not_readnone_1(i8* noalias nocapture readnone [[READ_ONLY]]) ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: readonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@testbyval -; IS__CGSCC____-SAME: (i8* nocapture noundef nonnull readonly dereferenceable(1) [[READ_ONLY:%.*]]) [[ATTR2:#.*]] { -; IS__CGSCC____-NEXT: call void @byval_not_readonly_1(i8* noalias nocapture noundef nonnull readonly dereferenceable(1) [[READ_ONLY]]) [[ATTR2]] +; IS__CGSCC____-SAME: (i8* nocapture noundef nonnull readonly dereferenceable(1) [[READ_ONLY:%.*]]) #[[ATTR2]] { +; IS__CGSCC____-NEXT: call void @byval_not_readonly_1(i8* noalias nocapture noundef nonnull readonly dereferenceable(1) [[READ_ONLY]]) #[[ATTR2]] ; IS__CGSCC____-NEXT: call void @byval_not_readnone_1(i8* noalias nocapture noundef nonnull readnone dereferenceable(1) [[READ_ONLY]]) ; IS__CGSCC____-NEXT: ret void ; @@ -401,16 +411,16 @@ define void @ptr_uses(i8* %ptr) { ; IS__TUNIT____: Function Attrs: nounwind readonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_uses -; IS__TUNIT____-SAME: (i8* nocapture readonly [[PTR:%.*]]) [[ATTR9:#.*]] { -; IS__TUNIT____-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) [[ATTR9]] -; IS__TUNIT____-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) [[ATTR9]] +; IS__TUNIT____-SAME: (i8* nocapture readonly [[PTR:%.*]]) #[[ATTR9]] { +; IS__TUNIT____-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) #[[ATTR9]] +; IS__TUNIT____-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) #[[ATTR9]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nounwind readonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_uses -; IS__CGSCC____-SAME: (i8* nocapture readonly [[PTR:%.*]]) [[ATTR10]] { -; IS__CGSCC____-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) [[ATTR10]] -; IS__CGSCC____-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) [[ATTR10]] +; IS__CGSCC____-SAME: (i8* nocapture readonly [[PTR:%.*]]) #[[ATTR10]] { +; IS__CGSCC____-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) #[[ATTR10]] +; IS__CGSCC____-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) #[[ATTR10]] ; IS__CGSCC____-NEXT: ret void ; %call_ptr = call i8* @maybe_returned_ptr(i8* %ptr) @@ -469,16 +479,47 @@ define i32 @read_only_constant_mem() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@read_only_constant_mem -; IS__TUNIT____-SAME: () [[ATTR1]] { +; 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____-LABEL: define {{[^@]+}}@read_only_constant_mem -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @constant_mem, align 4 ; IS__CGSCC____-NEXT: ret i32 [[L]] ; %l = load i32, i32* @constant_mem ret i32 %l } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { readonly } +; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR5]] = { argmemonly nounwind readonly } +; IS__TUNIT____: attributes #[[ATTR6]] = { argmemonly nounwind } +; IS__TUNIT____: attributes #[[ATTR7]] = { argmemonly nofree nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR8]] = { readnone } +; IS__TUNIT____: attributes #[[ATTR9]] = { nounwind readonly } +; IS__TUNIT____: attributes #[[ATTR10]] = { willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR11]] = { readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR12]] = { nounwind } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { readonly } +; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR5]] = { nofree nosync nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR6]] = { argmemonly nounwind readonly } +; IS__CGSCC____: attributes #[[ATTR7]] = { argmemonly nounwind } +; IS__CGSCC____: attributes #[[ATTR8]] = { argmemonly nofree norecurse nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR9]] = { readnone } +; IS__CGSCC____: attributes #[[ATTR10]] = { nounwind readonly } +; IS__CGSCC____: attributes #[[ATTR11]] = { willreturn } +; IS__CGSCC____: attributes #[[ATTR12]] = { willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR13]] = { readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR14]] = { nounwind } +;. diff --git a/llvm/test/Transforms/Attributor/reduced/register_benchmark_test.ll b/llvm/test/Transforms/Attributor/reduced/register_benchmark_test.ll --- a/llvm/test/Transforms/Attributor/reduced/register_benchmark_test.ll +++ b/llvm/test/Transforms/Attributor/reduced/register_benchmark_test.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s ; RUN: opt -passes=attributor -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -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=6 -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 @@ -37,16 +37,21 @@ ; } target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +;. +; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external global i8 +; CHECK: @[[_ZTI1X:[a-zA-Z0-9_$"\\.-]+]] = external dso_local constant { i8*, i8* }, align 8 +; CHECK: @[[_ZTI1Y:[a-zA-Z0-9_$"\\.-]+]] = external dso_local constant { i8*, i8*, i8* }, align 8 +;. define i32 @sink_r0(i32 %r) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@sink_r0 -; IS__TUNIT____-SAME: (i32 returned [[R:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32 returned [[R:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 [[R]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@sink_r0 -; IS__CGSCC____-SAME: (i32 returned [[R:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32 returned [[R:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 [[R]] ; @@ -57,18 +62,18 @@ 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____-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] { ; 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: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) #[[ATTR5:[0-9]+]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[CALL]]) #[[ATTR6:[0-9]+]] ; 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____-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] { ; 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: [[CALL:%.*]] = call i32 @sink_r0(i32 [[R]]) #[[ATTR6:[0-9]+]] +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[CALL]]) #[[ATTR7:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[CALL1]] ; entry: @@ -80,25 +85,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]]) #[[ATTR5]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[CALL]]) #[[ATTR6]] ; 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]]) #[[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: br label [[RETURN]] ; IS__TUNIT____: if.end12: ; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]] @@ -106,7 +111,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]]) #[[ATTR6]] ; IS__TUNIT____-NEXT: br label [[COND_END]] ; IS__TUNIT____: cond.end: ; IS__TUNIT____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -117,25 +122,25 @@ ; ; 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]] ; IS__CGSCC____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]] ; IS__CGSCC____: if.then3: ; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32 @sink_r0(i32 [[B]]) -; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR7]] -; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) [[ATTR7]] -; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[CALL6]], i32 undef) [[ATTR7]] -; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR7]] -; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[CALL5]], i32 [[CALL7]], i32 [[CALL8]]) [[ATTR7]] -; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[CALL4]], i32 [[CALL9]], i32 undef) [[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[CALL6]], i32 undef) #[[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[CALL5]], i32 [[CALL7]], i32 [[CALL8]]) #[[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[CALL4]], i32 [[CALL9]], i32 undef) #[[ATTR7]] ; IS__CGSCC____-NEXT: br label [[RETURN]] ; IS__CGSCC____: if.end12: ; IS__CGSCC____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]] @@ -143,7 +148,7 @@ ; IS__CGSCC____: cond.true: ; IS__CGSCC____-NEXT: br label [[COND_END:%.*]] ; IS__CGSCC____: cond.false: -; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR7]] ; IS__CGSCC____-NEXT: br label [[COND_END]] ; IS__CGSCC____: cond.end: ; IS__CGSCC____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -199,25 +204,25 @@ define i32 @scc_rX(i32 %a, i32 %b, i32 %r) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@scc_rX -; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[R:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[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]]) #[[ATTR5]] +; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[CALL]]) #[[ATTR6]] ; 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]]) #[[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: br label [[RETURN]] ; IS__TUNIT____: if.end12: ; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]] @@ -225,7 +230,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]]) #[[ATTR6]] ; IS__TUNIT____-NEXT: br label [[COND_END]] ; IS__TUNIT____: cond.end: ; IS__TUNIT____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -236,25 +241,25 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@scc_rX -; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[R:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[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]]) [[ATTR8:#.*]] +; 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]]) #[[ATTR8:[0-9]+]] ; IS__CGSCC____-NEXT: br label [[RETURN:%.*]] ; IS__CGSCC____: if.end: ; IS__CGSCC____-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]] ; IS__CGSCC____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]] ; IS__CGSCC____: if.then3: ; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32 @sink_r0(i32 [[B]]) -; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR8]] -; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) [[ATTR8]] -; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[CALL6]], i32 undef) [[ATTR8]] -; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) [[ATTR8]] -; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[CALL5]], i32 [[CALL7]], i32 [[CALL8]]) [[ATTR8]] -; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[CALL4]], i32 [[CALL9]], i32 undef) [[ATTR8]] +; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR8]] +; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR8]] +; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[CALL6]], i32 undef) #[[ATTR8]] +; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR8]] +; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[CALL5]], i32 [[CALL7]], i32 [[CALL8]]) #[[ATTR8]] +; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[CALL4]], i32 [[CALL9]], i32 undef) #[[ATTR8]] ; IS__CGSCC____-NEXT: br label [[RETURN]] ; IS__CGSCC____: if.end12: ; IS__CGSCC____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]] @@ -262,7 +267,7 @@ ; IS__CGSCC____: cond.true: ; IS__CGSCC____-NEXT: br label [[COND_END:%.*]] ; IS__CGSCC____: cond.false: -; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) [[ATTR8]] +; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR8]] ; IS__CGSCC____-NEXT: br label [[COND_END]] ; IS__CGSCC____: cond.end: ; IS__CGSCC____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -339,13 +344,13 @@ define double* @ptr_sink_r0(double* %r) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_sink_r0 -; IS__TUNIT____-SAME: (double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@ptr_sink_r0 -; IS__CGSCC____-SAME: (double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret double* [[R]] ; @@ -356,18 +361,18 @@ 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____-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: [[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____-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: [[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]] ; entry: @@ -379,25 +384,25 @@ define double* @ptr_scc_r2(double* %a, double* %b, double* %r) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_scc_r2 -; IS__TUNIT____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]], double* nofree readnone returned [[R:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]], double* nofree readnone returned [[R:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: entry: ; 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]]) #[[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: 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]]) #[[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: br label [[RETURN]] ; IS__TUNIT____: if.end12: ; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]] @@ -405,7 +410,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]]) #[[ATTR6]] ; IS__TUNIT____-NEXT: br label [[COND_END]] ; IS__TUNIT____: cond.end: ; IS__TUNIT____-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -416,25 +421,25 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable ; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_scc_r2 -; IS__CGSCC____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]], double* nofree readnone returned [[R:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]], double* nofree readnone returned [[R:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp ugt double* [[A]], [[B]] ; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] ; IS__CGSCC____: if.then: -; 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 [[B]], double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL]]) [[ATTR7]] +; 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 [[B]], double* noalias nofree readnone [[A]], double* noalias nofree readnone [[CALL]]) #[[ATTR7]] ; IS__CGSCC____-NEXT: br label [[RETURN:%.*]] ; IS__CGSCC____: if.end: ; IS__CGSCC____-NEXT: [[CMP2:%.*]] = icmp ult double* [[A]], [[B]] ; IS__CGSCC____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]] ; IS__CGSCC____: if.then3: ; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call double* @ptr_sink_r0(double* noalias nofree readnone "no-capture-maybe-returned" [[B]]) -; IS__CGSCC____-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__CGSCC____-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[R]], double* noalias nofree readnone [[R]], double* noalias nofree readnone [[R]]) [[ATTR7]] -; IS__CGSCC____-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__CGSCC____-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nofree readnone [[R]]) [[ATTR7]] -; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[CALL5]], double* noalias nofree readnone [[CALL7]], double* noalias nofree readnone [[CALL8]]) [[ATTR7]] -; IS__CGSCC____-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__CGSCC____-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__CGSCC____-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[R]], double* noalias nofree readnone [[R]], double* noalias nofree readnone [[R]]) #[[ATTR7]] +; IS__CGSCC____-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__CGSCC____-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nofree readnone [[R]]) #[[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[CALL5]], double* noalias nofree readnone [[CALL7]], double* noalias nofree readnone [[CALL8]]) #[[ATTR7]] +; IS__CGSCC____-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__CGSCC____-NEXT: br label [[RETURN]] ; IS__CGSCC____: if.end12: ; IS__CGSCC____-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]] @@ -442,7 +447,7 @@ ; IS__CGSCC____: cond.true: ; IS__CGSCC____-NEXT: br label [[COND_END:%.*]] ; IS__CGSCC____: cond.false: -; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nofree readnone [[R]]) [[ATTR7]] +; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nofree readnone [[R]]) #[[ATTR7]] ; IS__CGSCC____-NEXT: br label [[COND_END]] ; IS__CGSCC____: cond.end: ; IS__CGSCC____-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ] @@ -505,13 +510,13 @@ define i32* @rt0(i32* %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@rt0 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@rt0 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -532,13 +537,13 @@ define i32* @rt1(i32* %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@rt1 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) [[ATTR2]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@rt1 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -555,16 +560,16 @@ 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____-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: [[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____-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: [[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]] ; entry: @@ -575,12 +580,12 @@ 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____-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: [[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]] ] @@ -588,12 +593,12 @@ ; ; 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____-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: [[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]] ] @@ -617,16 +622,16 @@ 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____-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: [[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____-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: [[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]] ; entry: @@ -637,12 +642,12 @@ 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____-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: [[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]] ] @@ -650,12 +655,12 @@ ; ; 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____-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: [[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]] ] @@ -688,14 +693,14 @@ 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____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__TUNIT____-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) #[[ATTR7:[0-9]+]] ; 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) [[ATTR9:#.*]] +; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__CGSCC____-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) #[[ATTR9:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32* [[R]] ; tail call void @unknown_fn(i32* (i32*)* nonnull @calls_unknown_fn) @@ -719,7 +724,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:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: ret i32* [[R]] ; @@ -730,16 +735,16 @@ 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____-SAME: (i32* returned [[R:%.*]]) #[[ATTR3]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) [[ATTR7]] +; 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____-SAME: (i32* returned [[R:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) [[ATTR9]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) #[[ATTR9]] ; IS__CGSCC____-NEXT: ret i32* [[R]] ; entry: @@ -762,7 +767,7 @@ define linkonce_odr i32* @maybe_redefined_fn2(i32* %r) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@maybe_redefined_fn2 -; CHECK-SAME: (i32* [[R:%.*]]) [[ATTR3]] { +; CHECK-SAME: (i32* [[R:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: ret i32* [[R]] ; @@ -773,16 +778,16 @@ 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____-SAME: (i32* [[R:%.*]]) #[[ATTR3]] { ; IS__TUNIT____-NEXT: entry: -; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) [[ATTR7]] +; 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____-SAME: (i32* [[R:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) [[ATTR9]] +; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) #[[ATTR9]] ; IS__CGSCC____-NEXT: ret i32* [[CALL]] ; entry: @@ -803,7 +808,7 @@ define double @select_and_phi(double %b) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@select_and_phi -; IS__TUNIT____-SAME: (double returned [[B:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (double returned [[B:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[CMP:%.*]] = fcmp ogt double [[B]], 0.000000e+00 ; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] @@ -817,7 +822,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@select_and_phi -; IS__CGSCC____-SAME: (double returned [[B:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (double returned [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[CMP:%.*]] = fcmp ogt double [[B]], 0.000000e+00 ; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] @@ -856,13 +861,13 @@ 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____-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: [[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:%.*]] ] @@ -872,13 +877,13 @@ ; ; 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____-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: [[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:%.*]] ] @@ -912,14 +917,14 @@ define double* @bitcast(i32* %b) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcast -; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@bitcast -; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__CGSCC____-NEXT: ret double* [[BC0]] @@ -942,7 +947,7 @@ define double* @bitcasts_select_and_phi(i32* %b) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bitcasts_select_and_phi -; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq double* [[BC0]], null @@ -961,7 +966,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bitcasts_select_and_phi -; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq double* [[BC0]], null @@ -1011,7 +1016,7 @@ define double* @ret_arg_arg_undef(i32* %b) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_arg_arg_undef -; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq double* [[BC0]], null @@ -1028,7 +1033,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_arg_arg_undef -; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq double* [[BC0]], null @@ -1076,7 +1081,7 @@ define double* @ret_undef_arg_arg(i32* %b) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef_arg_arg -; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq double* [[BC0]], null @@ -1093,7 +1098,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef_arg_arg -; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq double* [[BC0]], null @@ -1141,7 +1146,7 @@ define double* @ret_undef_arg_undef(i32* %b) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef_arg_undef -; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned [[B:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq double* [[BC0]], null @@ -1157,7 +1162,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef_arg_undef -; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[BC0:%.*]] = bitcast i32* [[B]] to double* ; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq double* [[BC0]], null @@ -1204,7 +1209,7 @@ define i32* @ret_arg_or_unknown(i32* %b) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@ret_arg_or_unknown -; CHECK-SAME: (i32* [[B:%.*]]) [[ATTR3]] { +; CHECK-SAME: (i32* [[B:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null ; CHECK-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]] @@ -1229,7 +1234,7 @@ define i32* @ret_arg_or_unknown_through_phi(i32* %b) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi -; CHECK-SAME: (i32* [[B:%.*]]) [[ATTR3]] { +; CHECK-SAME: (i32* [[B:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null ; CHECK-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]] @@ -1263,7 +1268,7 @@ define i32 @deadblockcall1(i32 %A) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockcall1 -; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 [[A]] ; IS__TUNIT____: unreachableblock: @@ -1271,7 +1276,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockcall1 -; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 [[A]] ; IS__CGSCC____: unreachableblock: @@ -1289,7 +1294,7 @@ define i32 @deadblockcall2(i32 %A) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockcall2 -; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 [[A]] ; IS__TUNIT____: unreachableblock1: @@ -1299,7 +1304,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockcall2 -; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 [[A]] ; IS__CGSCC____: unreachableblock1: @@ -1320,7 +1325,7 @@ define i32 @deadblockphi1(i32 %A) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockphi1 -; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[R:%.*]] ; IS__TUNIT____: unreachableblock1: @@ -1332,7 +1337,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockphi1 -; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[R:%.*]] ; IS__CGSCC____: unreachableblock1: @@ -1358,7 +1363,7 @@ define i32 @deadblockphi2(i32 %A) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockphi2 -; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br label [[R:%.*]] ; IS__TUNIT____: unreachableblock1: @@ -1372,7 +1377,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockphi2 -; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[R:%.*]] ; IS__CGSCC____: unreachableblock1: @@ -1405,11 +1410,11 @@ define i32 @deadblockphi3(i32 %A, i1 %c) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@deadblockphi3 -; CHECK-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) [[ATTR3]] { +; CHECK-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]] ; CHECK: unreachablecall: -; CHECK-NEXT: call void @noreturn() [[ATTR4:#.*]] +; CHECK-NEXT: call void @noreturn() #[[ATTR4:[0-9]+]] ; CHECK-NEXT: unreachable ; CHECK: unreachableblock2: ; CHECK-NEXT: unreachable @@ -1507,13 +1512,13 @@ define i32* @ret_const() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_const -; IS__TUNIT____-SAME: () [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@ret_const -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i8* @G to i32* ; IS__CGSCC____-NEXT: ret i32* [[BC]] ; @@ -1523,12 +1528,12 @@ define i32* @use_const() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@use_const -; IS__TUNIT____-SAME: () [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@use_const -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* bitcast (i8* @G to i32*) ; %c = call i32* @ret_const() @@ -1537,14 +1542,14 @@ define i32* @dont_use_const() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@dont_use_const -; IS__TUNIT____-SAME: () [[ATTR0]] { -; IS__TUNIT____-NEXT: [[C:%.*]] = musttail call i32* @ret_const() [[ATTR5]] +; IS__TUNIT____-SAME: () #[[ATTR0]] { +; IS__TUNIT____-NEXT: [[C:%.*]] = musttail call i32* @ret_const() #[[ATTR5]] ; IS__TUNIT____-NEXT: ret i32* [[C]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@dont_use_const -; IS__CGSCC____-SAME: () [[ATTR0]] { -; IS__CGSCC____-NEXT: [[C:%.*]] = musttail call i32* @ret_const() [[ATTR6]] +; IS__CGSCC____-SAME: () #[[ATTR0]] { +; IS__CGSCC____-NEXT: [[C:%.*]] = musttail call i32* @ret_const() #[[ATTR6]] ; IS__CGSCC____-NEXT: ret i32* [[C]] ; %c = musttail call i32* @ret_const() @@ -1595,3 +1600,25 @@ ; UTC_ARGS: --enable attributes #0 = { noinline nounwind uwtable } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree noinline noreturn nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR3]] = { noinline nounwind uwtable } +; IS__TUNIT____: attributes #[[ATTR4]] = { noreturn } +; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR6]] = { nofree nosync nounwind readnone } +; IS__TUNIT____: attributes #[[ATTR7]] = { nounwind } +; IS__TUNIT____: attributes #[[ATTR8:[0-9]+]] = { nounwind readnone } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR3]] = { noinline nounwind uwtable } +; IS__CGSCC____: attributes #[[ATTR4]] = { noreturn } +; IS__CGSCC____: attributes #[[ATTR5:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR6]] = { willreturn } +; IS__CGSCC____: attributes #[[ATTR7]] = { nofree nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR8]] = { nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR9]] = { nounwind } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -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=5 -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 @@ -15,12 +15,12 @@ define void @load_wholly_unreachable() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_wholly_unreachable -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_wholly_unreachable -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: unreachable ; %a = load i32, i32* null @@ -30,12 +30,12 @@ define void @loads_wholly_unreachable() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@loads_wholly_unreachable -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@loads_wholly_unreachable -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; %a = load i32, i32* null @@ -47,7 +47,7 @@ define void @load_single_bb_unreachable(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_single_bb_unreachable -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -56,7 +56,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_single_bb_unreachable -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -76,12 +76,12 @@ 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____-LABEL: define {{[^@]+}}@load_null_pointer_is_defined -; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_null_pointer_is_defined -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: ret void ; %a = load i32, i32* null @@ -91,7 +91,7 @@ define internal i32* @ret_null() { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_null -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* undef ; ret i32* null @@ -100,12 +100,12 @@ define void @load_null_propagated() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_null_propagated -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_null_propagated -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; %ptr = call i32* @ret_null() @@ -118,12 +118,12 @@ define void @store_wholly_unreachable() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_wholly_unreachable -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_wholly_unreachable -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; store i32 5, i32* null @@ -133,7 +133,7 @@ define void @store_single_bb_unreachable(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_single_bb_unreachable -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -142,7 +142,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_single_bb_unreachable -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -160,13 +160,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____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined -; IS__TUNIT____-SAME: () [[ATTR2:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined -; IS__CGSCC____-SAME: () [[ATTR2:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 5, i32* null, align 536870912 ; IS__CGSCC____-NEXT: ret void ; @@ -180,12 +180,12 @@ ; ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_null_propagated -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_null_propagated -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; %ptr = call i32* @ret_null() @@ -198,12 +198,12 @@ define void @atomicrmw_wholly_unreachable() { ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_wholly_unreachable -; IS__TUNIT____-SAME: () [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_wholly_unreachable -; IS__CGSCC____-SAME: () [[ATTR3:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] { ; IS__CGSCC____-NEXT: unreachable ; %a = atomicrmw add i32* null, i32 1 acquire @@ -213,7 +213,7 @@ define void @atomicrmw_single_bb_unreachable(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR3]] { +; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -222,7 +222,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR3]] { +; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -240,13 +240,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____-LABEL: define {{[^@]+}}@atomicrmw_null_pointer_is_defined -; IS__TUNIT____-SAME: () [[ATTR4:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR4:[0-9]+]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = atomicrmw add i32* null, i32 1 acquire, align 4 ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_null_pointer_is_defined -; IS__CGSCC____-SAME: () [[ATTR4:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR4:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = atomicrmw add i32* null, i32 1 acquire, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -260,12 +260,12 @@ ; ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_null_propagated -; IS__TUNIT____-SAME: () [[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR3]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_null_propagated -; IS__CGSCC____-SAME: () [[ATTR3]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: unreachable ; %ptr = call i32* @ret_null() @@ -278,12 +278,12 @@ define void @atomiccmpxchg_wholly_unreachable() { ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_wholly_unreachable -; IS__TUNIT____-SAME: () [[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR3]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_wholly_unreachable -; IS__CGSCC____-SAME: () [[ATTR3]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: unreachable ; %a = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic @@ -293,7 +293,7 @@ define void @atomiccmpxchg_single_bb_unreachable(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR3]] { +; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -302,7 +302,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR3]] { +; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -320,13 +320,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____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_pointer_is_defined -; IS__TUNIT____-SAME: () [[ATTR4]] { +; IS__TUNIT____-SAME: () #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic, align 4 ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_pointer_is_defined -; IS__CGSCC____-SAME: () [[ATTR4]] { +; IS__CGSCC____-SAME: () #[[ATTR4]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -340,12 +340,12 @@ ; ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_propagated -; IS__TUNIT____-SAME: () [[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR3]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_propagated -; IS__CGSCC____-SAME: () [[ATTR3]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: unreachable ; %ptr = call i32* @ret_null() @@ -360,7 +360,7 @@ define i32 @cond_br_on_undef() { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef -; IS__TUNIT____-SAME: () [[ATTR5:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR5:[0-9]+]] { ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -369,7 +369,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef -; IS__CGSCC____-SAME: () [[ATTR5:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR5:[0-9]+]] { ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -389,7 +389,7 @@ define void @cond_br_on_undef2(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef2 -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T1:%.*]], label [[E1:%.*]] ; IS__TUNIT____: t1: ; IS__TUNIT____-NEXT: unreachable @@ -402,7 +402,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef2 -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T1:%.*]], label [[E1:%.*]] ; IS__CGSCC____: t1: ; IS__CGSCC____-NEXT: unreachable @@ -427,12 +427,12 @@ define i1 @ret_undef() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i1 undef ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 undef ; ret i1 undef @@ -441,7 +441,7 @@ define void @cond_br_on_undef_interproc() { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc -; IS__TUNIT____-SAME: () [[ATTR5]] { +; IS__TUNIT____-SAME: () #[[ATTR5]] { ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -450,7 +450,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc -; IS__CGSCC____-SAME: () [[ATTR5]] { +; IS__CGSCC____-SAME: () #[[ATTR5]] { ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -468,7 +468,7 @@ define i1 @ret_undef2() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_undef2 -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 true, label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i1 undef @@ -477,7 +477,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_undef2 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 true, label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i1 undef @@ -495,7 +495,7 @@ define void @cond_br_on_undef_interproc2() { ; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc2 -; IS__TUNIT____-SAME: () [[ATTR5]] { +; IS__TUNIT____-SAME: () #[[ATTR5]] { ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -504,7 +504,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc2 -; IS__CGSCC____-SAME: () [[ATTR5]] { +; IS__CGSCC____-SAME: () #[[ATTR5]] { ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -524,7 +524,7 @@ define i32 @cond_br_on_undef3() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef3 -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: br label [[T:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i32 1 @@ -533,7 +533,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef3 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: br label [[T:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 1 @@ -553,7 +553,7 @@ define i32 @cond_br_on_undef_uninit() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_uninit -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i1, align 1 ; IS__TUNIT____-NEXT: [[COND:%.*]] = load i1, i1* [[ALLOC]], align 1 ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -564,7 +564,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_uninit -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i1, align 1 ; IS__CGSCC____-NEXT: [[COND:%.*]] = load i1, i1* [[ALLOC]], align 1 ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] @@ -590,7 +590,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: T: @@ -612,12 +612,12 @@ define i32 @foo() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32 1 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 1 ; %X = call i32 @callee(i1 false, i32* null) @@ -631,13 +631,13 @@ define void @arg_nonnull_1(i32* nonnull %a) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_1 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR6:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR6:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@arg_nonnull_1 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR6:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR6:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 0, i32* [[A]], align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -648,13 +648,13 @@ define void @arg_nonnull_1_noundef_1(i32* nonnull noundef %a) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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____-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____-LABEL: define {{[^@]+}}@arg_nonnull_1_noundef_1 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) [[ATTR6]] { +; 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 ; IS__CGSCC____-NEXT: ret void ; @@ -665,7 +665,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____-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____-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 ; IS__TUNIT____-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: @@ -679,7 +679,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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____-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 ; IS__CGSCC____-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: @@ -706,7 +706,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____-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____-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 ; IS__TUNIT____-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: @@ -720,7 +720,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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____-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 ; IS__CGSCC____-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: @@ -748,12 +748,12 @@ define void @arg_nonnull_violation1_1() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_1 -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_1 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; call void @arg_nonnull_1(i32* null) @@ -763,12 +763,12 @@ define void @arg_nonnull_violation1_2() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_2 -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_2 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; call void @arg_nonnull_1_noundef_1(i32* null) @@ -779,12 +779,12 @@ define void @arg_nonnull_violation2_1(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; %null = getelementptr i32, i32* null, i32 0 @@ -796,12 +796,12 @@ define void @arg_nonnull_violation2_2(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; %null = getelementptr i32, i32* null, i32 0 @@ -814,12 +814,12 @@ define void @arg_nonnull_violation3_1(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: -; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) [[ATTR7:#.*]] -; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 536870912 null) [[ATTR7]] +; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7:[0-9]+]] +; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 536870912 null) #[[ATTR7]] ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: f: ; IS__TUNIT____-NEXT: unreachable @@ -828,12 +828,12 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: -; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) [[ATTR7:#.*]] -; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 536870912 null) [[ATTR7]] +; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7:[0-9]+]] +; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 536870912 null) #[[ATTR7]] ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: f: ; IS__CGSCC____-NEXT: unreachable @@ -861,12 +861,12 @@ define void @arg_nonnull_violation3_2(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: -; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) [[ATTR7]] -; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 536870912 null) [[ATTR7]] +; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7]] +; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 536870912 null) #[[ATTR7]] ; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____: f: ; IS__TUNIT____-NEXT: unreachable @@ -875,12 +875,12 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: -; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) [[ATTR7]] -; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 536870912 null) [[ATTR7]] +; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7]] +; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 536870912 null) #[[ATTR7]] ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: f: ; IS__CGSCC____-NEXT: unreachable @@ -910,7 +910,7 @@ define nonnull i32* @returned_nonnnull(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_nonnnull -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__TUNIT____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT____-NEXT: i32 1, label [[ONONE:%.*]] @@ -925,7 +925,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_nonnnull -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC____-NEXT: i32 1, label [[ONONE:%.*]] @@ -952,7 +952,7 @@ define noundef i32* @returned_noundef(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_noundef -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__TUNIT____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT____-NEXT: i32 1, label [[ONONE:%.*]] @@ -967,7 +967,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_noundef -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC____-NEXT: i32 1, label [[ONONE:%.*]] @@ -994,7 +994,7 @@ define nonnull noundef i32* @returned_nonnnull_noundef(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__TUNIT____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT____-NEXT: i32 1, label [[ONONE:%.*]] @@ -1009,7 +1009,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC____-NEXT: i32 1, label [[ONONE:%.*]] @@ -1036,12 +1036,12 @@ define noundef i32 @returned_nonnnull_noundef_int() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef_int -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef_int -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 0 ; ret i32 0 @@ -1071,12 +1071,12 @@ define i32 @argument_noundef1(i32 noundef %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@argument_noundef1 -; IS__TUNIT____-SAME: (i32 noundef returned [[C:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@argument_noundef1 -; IS__CGSCC____-SAME: (i32 noundef returned [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef returned [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32 [[C]] ; ret i32 %c @@ -1085,12 +1085,12 @@ define i32 @violate_noundef_nonpointer() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@violate_noundef_nonpointer -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@violate_noundef_nonpointer -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; %ret = call i32 @argument_noundef1(i32 undef) @@ -1100,12 +1100,12 @@ define i32* @argument_noundef2(i32* noundef %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@argument_noundef2 -; IS__TUNIT____-SAME: (i32* nofree noundef readnone returned "no-capture-maybe-returned" [[C:%.*]]) [[ATTR0]] { +; 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____-LABEL: define {{[^@]+}}@argument_noundef2 -; IS__CGSCC____-SAME: (i32* nofree noundef readnone returned "no-capture-maybe-returned" [[C:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree noundef readnone returned "no-capture-maybe-returned" [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[C]] ; ret i32* %c @@ -1114,14 +1114,33 @@ define i32* @violate_noundef_pointer() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@violate_noundef_pointer -; IS__TUNIT____-SAME: () [[ATTR0]] { +; IS__TUNIT____-SAME: () #[[ATTR0]] { ; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@violate_noundef_pointer -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: unreachable ; %ret = call i32* @argument_noundef2(i32* undef) ret i32* %ret } +;. +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind null_pointer_is_valid willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nounwind null_pointer_is_valid willreturn } +; IS__TUNIT____: attributes #[[ATTR5]] = { nofree noreturn nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR6]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR3]] = { nofree norecurse nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR4]] = { nofree norecurse nounwind null_pointer_is_valid willreturn } +; IS__CGSCC____: attributes #[[ATTR5]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR7]] = { nounwind willreturn writeonly } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -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=16 -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 @@ -10,6 +10,9 @@ declare i8* @llvm.call.preallocated.arg(token, i32) ; Test1: Replace argument with constant +;. +; CHECK: @[[S:[a-zA-Z0-9_$"\\.-]+]] = external global [[STRUCT_X:%.*]] +;. define internal void @test1(i32 %a) { ; CHECK-LABEL: define {{[^@]+}}@test1() { ; CHECK-NEXT: tail call void @f(i32 noundef 1) @@ -32,12 +35,12 @@ define i32 @return0() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@return0 -; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@return0 -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 0 ; ret i32 0 @@ -46,12 +49,12 @@ define i32 @return1() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@return1 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 1 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@return1 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 1 ; ret i32 1 @@ -60,7 +63,7 @@ define i32 @test2_1(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; IS__TUNIT____: if.true: ; IS__TUNIT____-NEXT: [[RET0:%.*]] = add i32 0, 1 @@ -73,7 +76,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; IS__CGSCC____: if.true: ; IS__CGSCC____-NEXT: [[RET0:%.*]] = add i32 0, 1 @@ -104,12 +107,12 @@ define i32 @test2_2(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 1 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 1 ; %ret = tail call i32 @test2_1(i1 %c) @@ -203,7 +206,7 @@ define i32 @ipccp1(i32 %a) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp1 -; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) [[ATTR1]] { +; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: br i1 true, label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i32 [[A]] @@ -212,7 +215,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp1 -; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: br i1 true, label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 [[A]] @@ -230,7 +233,7 @@ 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____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: br label [[T:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i1 undef @@ -248,12 +251,12 @@ define i1 @ipccp2() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp2 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i1 true ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i1 true ; %r = call i1 @ipccp2i(i1 true) @@ -263,7 +266,7 @@ 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____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: br label [[T:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i1 undef @@ -281,12 +284,12 @@ define i1 @ipccp2b() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp2b -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i1 true ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2b -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i1 true ; %r = call i1 @ipccp2ib(i1 true) @@ -296,7 +299,7 @@ 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____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: br label [[T:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 undef @@ -315,12 +318,12 @@ define i32 @ipccp3() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp3 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i32 7 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp3 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 7 ; %r = call i32 @ipccp3i(i32 7) @@ -332,12 +335,12 @@ define internal i32* @test_inalloca(i32* inalloca %a) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-LABEL: define {{[^@]+}}@test_inalloca -; IS__CGSCC____-SAME: (i32* inalloca noalias nofree noundef nonnull returned writeonly dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) [[ATTR1]] { +; IS__CGSCC____-SAME: (i32* inalloca noalias nofree noundef nonnull returned writeonly dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32* [[A]] ; ret i32* %a @@ -345,20 +348,20 @@ define i32* @complicated_args_inalloca(i32* %arg) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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: ret i32* [[CALL]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_inalloca -; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR1:#.*]] { -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) [[ATTR5:#.*]] +; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] { +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) #[[ATTR5:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32* [[CALL]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_inalloca -; IS__CGSCC_NPM-SAME: (i32* nofree noundef nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[ARG:%.*]]) [[ATTR1:#.*]] { -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) [[ATTR4:#.*]] +; IS__CGSCC_NPM-SAME: (i32* nofree noundef nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) #[[ATTR4:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32* [[CALL]] ; %call = call i32* @test_inalloca(i32* %arg) @@ -368,12 +371,12 @@ define internal i32* @test_preallocated(i32* preallocated(i32) %a) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-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____-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]] ; ret i32* %a @@ -381,30 +384,30 @@ define i32* @complicated_args_preallocated() { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR0:[0-9]+]] { +; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]] +; 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-NEXT: ret i32* [[CALL]] ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR0:[0-9]+]] { +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR4:[0-9]+]] +; 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-NEXT: ret i32* [[CALL]] ; ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR0:[0-9]+]] { +; 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:[0-9]+]] [ "preallocated"(token [[C]]) ] ; IS__CGSCC_OPM-NEXT: ret i32* [[CALL]] ; ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; 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: () #[[ATTR0:[0-9]+]] { +; 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:[0-9]+]] [ "preallocated"(token [[C]]) ] ; IS__CGSCC_NPM-NEXT: ret i32* [[CALL]] ; %c = call token @llvm.call.preallocated.setup(i32 1) @@ -416,13 +419,13 @@ ; ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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 noundef 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 noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] { ; 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____-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 noundef 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 noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -434,19 +437,19 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[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:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[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:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@complicated_args_sret -; IS__CGSCC____-SAME: (%struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) [[ATTR2]] { +; IS__CGSCC____-SAME: (%struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: unreachable ; call void @test_sret(%struct.X* null, %struct.X** %b) @@ -456,12 +459,12 @@ define internal %struct.X* @test_nest(%struct.X* nest %a) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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____-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____-SAME: (%struct.X* nest noalias nofree noundef readnone returned align 536870912 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret %struct.X* [[A]] ; ret %struct.X* %a @@ -469,20 +472,20 @@ define %struct.X* @complicated_args_nest() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; 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____-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: ret %struct.X* [[CALL]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-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: ret %struct.X* [[CALL]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; 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-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: ret %struct.X* [[CALL]] ; %call = call %struct.X* @test_nest(%struct.X* null) @@ -493,14 +496,14 @@ 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-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-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-LABEL: define {{[^@]+}}@test_byval -; IS__CGSCC_NPM-SAME: (i8* noalias nocapture nofree readnone [[TMP0:%.*]]) [[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i8* noalias nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8 ; IS__CGSCC_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8** ; IS__CGSCC_NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8 @@ -515,17 +518,17 @@ define void @complicated_args_byval() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_byval -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_byval -; IS__CGSCC_OPM-SAME: () [[ATTR1]] { +; 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-LABEL: define {{[^@]+}}@complicated_args_byval -; IS__CGSCC_NPM-SAME: () [[ATTR3:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: ret void ; call void @test_byval(%struct.X* @S) @@ -535,14 +538,14 @@ define internal i8*@test_byval2(%struct.X* byval(%struct.X) %a) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_byval2 -; IS__TUNIT____-SAME: () [[ATTR3:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] { ; 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____-LABEL: define {{[^@]+}}@test_byval2 -; IS__CGSCC____-SAME: () [[ATTR3:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] { ; 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]] @@ -554,20 +557,20 @@ 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____-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__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: () #[[ATTR3]] { +; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i8* @test_byval2() #[[ATTR7:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i8* [[C]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; 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: () #[[ATTR3]] { +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i8* @test_byval2() #[[ATTR6:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i8* [[C]] ; %c = call i8* @test_byval2(%struct.X* @S) @@ -577,7 +580,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:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_OPM: for.cond: @@ -600,7 +603,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_NPM: for.cond: @@ -623,7 +626,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:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_OPM: for.cond: @@ -646,7 +649,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; 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:%.*]]) #[[ATTR2]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_NPM: for.cond: @@ -697,12 +700,12 @@ define i8 @caller0() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller0 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i8 49 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller0 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 ; %c = call i8 @callee(i8 undef) @@ -711,12 +714,12 @@ define i8 @caller1() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller1 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i8 49 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller1 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 ; %c = call i8 @callee(i8 undef) @@ -725,12 +728,12 @@ define i8 @caller2() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i8 49 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 ; %c = call i8 @callee(i8 undef) @@ -739,12 +742,12 @@ 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: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i8 49 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller_middle -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 ; %c = call i8 @callee(i8 42) @@ -753,12 +756,12 @@ define i8 @caller3() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller3 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i8 49 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller3 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 ; %c = call i8 @callee(i8 undef) @@ -767,12 +770,12 @@ define i8 @caller4() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller4 -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i8 49 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller4 -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 49 ; %c = call i8 @callee(i8 undef) @@ -781,7 +784,7 @@ define internal i8 @callee(i8 %a) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i8 undef ; %c = add i8 %a, 7 @@ -792,14 +795,47 @@ define i1 @icmp() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@icmp -; IS__TUNIT____-SAME: () [[ATTR1]] { +; IS__TUNIT____-SAME: () #[[ATTR1]] { ; IS__TUNIT____-NEXT: ret i1 true ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@icmp -; IS__CGSCC____-SAME: () [[ATTR1]] { +; IS__CGSCC____-SAME: () #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i1 true ; %c = icmp eq i8* null, null ret i1 %c } +;. +; IS__TUNIT_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR5]] = { willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR4]] = { willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { readonly willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { readonly willreturn } +;. 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 @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=18 -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=20 -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 @@ -14,12 +14,12 @@ define void @only_return() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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____-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]]) #[[ATTR16:[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]]) #[[ATTR16]] ; 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]]) #[[ATTR21:[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]]) #[[ATTR21]] ; 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: @@ -205,7 +205,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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: @@ -237,7 +237,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; 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() #[[ATTR11:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) #[[ATTR16:[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() #[[ATTR11:[0-9]+]] +; IS__TUNIT_NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR18:[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() #[[ATTR14:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) #[[ATTR20:[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() #[[ATTR14:[0-9]+]] +; IS__CGSCC_NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR22:[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]]) #[[ATTR16]] ; 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]]) #[[ATTR18]] ; 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]]) #[[ATTR20]] ; 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]]) #[[ATTR22]] ; 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 @@ -462,12 +462,12 @@ define void @call_floor(float %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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____-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) @@ -477,26 +477,26 @@ define float @call_floor2(float %a) #0 { ; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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]]) #[[ATTR17:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret float [[C]] ; ; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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]]) #[[ATTR19:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret float [[C]] ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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]]) #[[ATTR21:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret float [[C]] ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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]]) #[[ATTR23:[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() #[[ATTR18:[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() #[[ATTR20:[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() #[[ATTR22:[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() #[[ATTR24:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret void ; tail call void @maybe_noreturn() @@ -552,26 +552,26 @@ define void @f1() #0 { ; IS__TUNIT_OPM: Function Attrs: noinline nounwind uwtable willreturn ; 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() #[[ATTR17]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: noinline nounwind uwtable willreturn ; 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() #[[ATTR19]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: noinline norecurse nounwind uwtable willreturn ; 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() #[[ATTR21]] ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM: Function Attrs: noinline norecurse nounwind uwtable willreturn ; 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() #[[ATTR23]] ; IS__CGSCC_NPM-NEXT: ret void ; tail call void @will_return() @@ -581,14 +581,14 @@ 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____-SAME: () #[[ATTR9:[0-9]+]] { +; IS__TUNIT____-NEXT: tail call void @f1() #[[ATTR11:[0-9]+]] ; IS__TUNIT____-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____-SAME: () #[[ATTR11:[0-9]+]] { +; IS__CGSCC____-NEXT: tail call void @f1() #[[ATTR14:[0-9]+]] ; IS__CGSCC____-NEXT: ret void ; tail call void @f1() @@ -602,7 +602,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 +612,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() @@ -639,8 +639,8 @@ define void @invoke_test() personality i32 (...)* @__gxx_personality_v0 { ; IS__TUNIT_OPM: Function Attrs: nounwind willreturn ; 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]] personality i32 (...)* @__gxx_personality_v0 { +; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR17]] ; IS__TUNIT_OPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS__TUNIT_OPM: N: ; IS__TUNIT_OPM-NEXT: ret void @@ -651,8 +651,8 @@ ; ; IS__TUNIT_NPM: Function Attrs: nounwind willreturn ; 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]] personality i32 (...)* @__gxx_personality_v0 { +; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR19]] ; IS__TUNIT_NPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS__TUNIT_NPM: N: ; IS__TUNIT_NPM-NEXT: ret void @@ -663,8 +663,8 @@ ; ; IS__CGSCC_OPM: Function Attrs: nounwind willreturn ; 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]] personality i32 (...)* @__gxx_personality_v0 { +; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR21]] ; IS__CGSCC_OPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS__CGSCC_OPM: N: ; IS__CGSCC_OPM-NEXT: ret void @@ -675,8 +675,8 @@ ; ; IS__CGSCC_NPM: Function Attrs: nounwind willreturn ; 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]] personality i32 (...)* @__gxx_personality_v0 { +; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR23]] ; IS__CGSCC_NPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS__CGSCC_NPM: N: ; IS__CGSCC_NPM-NEXT: ret void @@ -711,7 +711,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:%.*]] @@ -727,7 +727,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn ; 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 +743,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:%.*]] @@ -759,7 +759,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn ; 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 +801,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 +911,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: @@ -894,7 +932,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable willreturn ; 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 +953,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: @@ -936,7 +974,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn ; 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: @@ -983,7 +1021,7 @@ define i32 @multiple_return(i32 %a) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; 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: @@ -993,7 +1031,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; 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: @@ -1017,32 +1055,32 @@ define void @unreachable_exit_positive1() #0 { ; IS__TUNIT_OPM: Function Attrs: noinline nounwind uwtable willreturn ; 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() #[[ATTR17]] ; 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-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() #[[ATTR19]] ; 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-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() #[[ATTR21]] ; 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-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() #[[ATTR23]] ; IS__CGSCC_NPM-NEXT: ret void ; IS__CGSCC_NPM: unreachable_label: ; IS__CGSCC_NPM-NEXT: unreachable @@ -1058,7 +1096,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 +1114,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 #[[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: @@ -1094,7 +1132,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 +1150,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 #[[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: @@ -1154,16 +1192,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 +1215,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: () #[[ATTR14:[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: () #[[ATTR17:[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 +1277,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 +1303,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:%.*]]) #[[ATTR16]] { +; 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:%.*]]) #[[ATTR19:[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 +1429,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: @@ -1356,7 +1458,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bounded_nested_loops -; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) [[ATTR17:#.*]] { +; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_NPM: for.cond: @@ -1385,7 +1487,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: @@ -1414,7 +1516,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bounded_nested_loops -; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) [[ATTR20:#.*]] { +; 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: @@ -1489,67 +1591,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:%.*]]) #[[ATTR16]] { +; 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:%.*]]) #[[ATTR19]] { +; 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 +1768,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:%.*]]) #[[ATTR16]] { +; 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:%.*]]) #[[ATTR19]] { +; 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 +1950,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 +1960,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 +1968,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 +1980,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:%.*]]) #[[ATTR16]] { ; 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]]) #[[ATTR16]] ; 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 +1990,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]]) #[[ATTR16]] ; 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 +1998,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]]) #[[ATTR16]] ; 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: @@ -1786,9 +2010,9 @@ ; ; 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-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) [[ATTR23:#.*]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR23:[0-9]+]] ; 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: @@ -1796,7 +2020,7 @@ ; 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]]) [[ATTR23]] +; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR23]] ; 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: @@ -1804,7 +2028,7 @@ ; 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]]) [[ATTR23]] +; IS__CGSCC_OPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR23]] ; 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: @@ -1816,7 +2040,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@non_loop_cycle -; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) [[ATTR19:#.*]] { +; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR19]] { ; 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 @@ -1883,3 +2107,97 @@ attributes #0 = { nounwind uwtable noinline } attributes #1 = { uwtable noinline } +;. +; IS__TUNIT_OPM: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable } +; IS__TUNIT_OPM: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree noinline nosync nounwind uwtable } +; IS__TUNIT_OPM: attributes #[[ATTR4]] = { noreturn } +; IS__TUNIT_OPM: attributes #[[ATTR5]] = { noinline noreturn nounwind uwtable } +; IS__TUNIT_OPM: attributes #[[ATTR6]] = { noinline nounwind uwtable } +; IS__TUNIT_OPM: attributes #[[ATTR7:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR8:[0-9]+]] = { norecurse willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR9]] = { noinline nounwind uwtable willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR10:[0-9]+]] = { noinline uwtable willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR11]] = { nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR12]] = { argmemonly nofree noinline nosync nounwind readonly uwtable } +; IS__TUNIT_OPM: attributes #[[ATTR13]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__TUNIT_OPM: attributes #[[ATTR14:[0-9]+]] = { noreturn nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR15]] = { nofree nosync nounwind readnone } +; IS__TUNIT_OPM: attributes #[[ATTR16]] = { nofree nosync nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR17]] = { willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR18]] = { nounwind } +;. +; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable } +; IS__TUNIT_NPM: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree noinline nosync nounwind uwtable } +; IS__TUNIT_NPM: attributes #[[ATTR4]] = { noreturn } +; IS__TUNIT_NPM: attributes #[[ATTR5]] = { noinline noreturn nounwind uwtable } +; IS__TUNIT_NPM: attributes #[[ATTR6]] = { noinline nounwind uwtable } +; IS__TUNIT_NPM: attributes #[[ATTR7:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR8:[0-9]+]] = { norecurse willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR9]] = { noinline nounwind uwtable willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR10:[0-9]+]] = { noinline uwtable willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR11]] = { nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR12]] = { argmemonly nofree noinline nosync nounwind readonly uwtable willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR13]] = { argmemonly nofree noinline nosync nounwind readonly uwtable } +; IS__TUNIT_NPM: attributes #[[ATTR14]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__TUNIT_NPM: attributes #[[ATTR15:[0-9]+]] = { noreturn nounwind } +; IS__TUNIT_NPM: attributes #[[ATTR16]] = { nofree nosync nounwind readnone } +; IS__TUNIT_NPM: attributes #[[ATTR17]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR18]] = { nofree nosync nounwind } +; IS__TUNIT_NPM: attributes #[[ATTR19]] = { willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR20]] = { nounwind } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nofree noinline nosync nounwind uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { noreturn } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { noinline noreturn nounwind uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { noinline nounwind uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR8:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR10:[0-9]+]] = { norecurse willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR11]] = { noinline norecurse nounwind uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR12]] = { noinline norecurse noreturn nounwind uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR13:[0-9]+]] = { noinline uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR15]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR16]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR17:[0-9]+]] = { noreturn nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR18]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR19]] = { nofree nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR20]] = { nofree nosync nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR21]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR22]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR23]] = { nounwind readnone } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree noinline nosync nounwind uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { noreturn } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { noinline noreturn nounwind uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR7]] = { noinline nounwind uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR8:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR10:[0-9]+]] = { norecurse willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR11]] = { noinline norecurse nounwind uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR12]] = { noinline norecurse noreturn nounwind uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR13:[0-9]+]] = { noinline uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR14]] = { nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR15]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR16]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR17]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR18:[0-9]+]] = { noreturn nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR19]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC_NPM: attributes #[[ATTR20]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR21]] = { nofree nosync nounwind readnone } +; IS__CGSCC_NPM: attributes #[[ATTR22]] = { nofree nosync nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR23]] = { willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR24]] = { nounwind } +;.