; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define internal i32 @deref(i32* %x) nounwind {
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@deref
-; 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
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP2]]
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@deref
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]], align 4
+; CGSCC-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4
+; CGSCC-NEXT: ret i32 [[TMP2]]
;
entry:
%tmp2 = load i32, i32* %x, align 4
}
define i32 @f(i32 %x) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@f
-; IS__TUNIT____-SAME: (i32 returned [[X:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
-; IS__TUNIT____-NEXT: ret i32 [[X]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@f
+; TUNIT-SAME: (i32 returned [[X:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
+; TUNIT-NEXT: ret i32 [[X]]
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f
-; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) #[[ATTR1:[0-9]+]] {
-; 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: [[TMP1:%.*]] = call i32 @deref(i32 [[X]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP1]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f
+; CGSCC-SAME: (i32 [[X:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[X]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[TMP1]]
;
entry:
%x_addr = alloca i32
ret i32 %tmp1
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { nounwind readonly willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; PR2498
; This test tries to convince CHECK about promoting the load from %A + 2,
}
define i32 @foo(i32* %A) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[X]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (i32* nocapture nofree readonly [[A:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree readonly align 4 [[A]]) #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[X]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[X]]
;
%X = call i32 @callee(i1 false, i32* %A) ; <i32> [#uses=1]
ret i32 %X
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readonly willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@hash
+; CGSCC-SAME: () #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: unreachable
;
entry:
unreachable
}
define void @encode(i32* %m, i32* %ts, i32* %new) nounwind {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@encode
+; TUNIT-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree 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:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@encode
+; CGSCC-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: unreachable
;
entry:
%0 = call fastcc i32 @hash( i32* %ts, i32 0 ) nounwind ; <i32> [#uses=0]
unreachable
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noreturn nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree noreturn nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br i1 false, label [[BB:%.*]], label [[BB5:%.*]]
-; IS__CGSCC____: bb:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: bb5:
-; IS__CGSCC____-NEXT: ret i32 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@term_SharingList
+; CGSCC-SAME: () #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br i1 false, label [[BB:%.*]], label [[BB5:%.*]]
+; CGSCC: bb:
+; CGSCC-NEXT: unreachable
+; CGSCC: bb5:
+; CGSCC-NEXT: ret i32 undef
;
entry:
br i1 false, label %bb, label %bb5
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Test that we only promote arguments when the caller/callee have compatible
; function attrubtes.
target triple = "x86_64-unknown-linux-gnu"
define internal fastcc void @no_promote_avx2(<4 x i64>* %arg, <4 x i64>* readonly %arg1) #0 {
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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:[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
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@no_promote_avx2
+; CHECK-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]+]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[TMP:%.*]] = load <4 x i64>, <4 x i64>* [[ARG1]], align 32
+; CHECK-NEXT: store <4 x i64> [[TMP]], <4 x i64>* [[ARG]], align 32
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <4 x i64>, <4 x i64>* %arg1
}
define void @no_promote(<4 x i64>* %arg) #1 {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@no_promote
-; 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:[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
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@no_promote
+; TUNIT-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8*
+; TUNIT-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]+]]
+; TUNIT-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]+]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32
+; TUNIT-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn uwtable
-; 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:[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:[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
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@no_promote
+; CGSCC-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8*
+; CGSCC-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]+]]
+; CGSCC-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]+]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32
+; CGSCC-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <4 x i64>, align 32
}
define internal fastcc void @promote_avx2(<4 x i64>* %arg, <4 x i64>* readonly %arg1) #0 {
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@promote_avx2
-; IS________NPM-SAME: (<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[ARG:%.*]], <4 x i64> [[TMP0:%.*]]) #[[ATTR0]] {
-; IS________NPM-NEXT: bb:
-; 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
-; IS________NPM-NEXT: [[TMP:%.*]] = load <4 x i64>, <4 x i64>* [[ARG1_PRIV]], align 32
-; IS________NPM-NEXT: store <4 x i64> [[TMP]], <4 x i64>* [[ARG]], align 32
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@promote_avx2
+; CHECK-SAME: (<4 x i64>* noalias nocapture nofree noundef nonnull writeonly align 32 dereferenceable(32) [[ARG:%.*]], <4 x i64> [[TMP0:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[ARG1_PRIV:%.*]] = alloca <4 x i64>, align 32
+; CHECK-NEXT: store <4 x i64> [[TMP0]], <4 x i64>* [[ARG1_PRIV]], align 32
+; CHECK-NEXT: [[TMP:%.*]] = load <4 x i64>, <4 x i64>* [[ARG1_PRIV]], align 32
+; CHECK-NEXT: store <4 x i64> [[TMP]], <4 x i64>* [[ARG]], align 32
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <4 x i64>, <4 x i64>* %arg1
}
define void @promote(<4 x i64>* %arg) #0 {
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@promote
-; 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: [[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: [[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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@promote
+; TUNIT-SAME: (<4 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8*
+; TUNIT-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]]
+; TUNIT-NEXT: [[TMP0:%.*]] = load <4 x i64>, <4 x i64>* [[TMP]], align 32
+; TUNIT-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]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32
+; TUNIT-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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-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: [[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: [[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
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@promote
+; CGSCC-SAME: (<4 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(32) [[ARG:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <4 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <4 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <4 x i64>* [[TMP]] to i8*
+; CGSCC-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]]
+; CGSCC-NEXT: [[TMP0:%.*]] = load <4 x i64>, <4 x i64>* [[TMP]], align 32
+; CGSCC-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]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <4 x i64>, <4 x i64>* [[TMP2]], align 32
+; CGSCC-NEXT: store <4 x i64> [[TMP4]], <4 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <4 x i64>, align 32
attributes #1 = { nounwind uwtable }
attributes #2 = { argmemonly nounwind }
;.
-; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "target-features"="+avx2" }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR3:[0-9]+]] = { willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "target-features"="+avx2" }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn uwtable }
+; TUNIT: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR3:[0-9]+]] = { willreturn writeonly }
+; TUNIT: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "target-features"="+avx2" }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR3:[0-9]+]] = { willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "target-features"="+avx2" }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn uwtable }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR3:[0-9]+]] = { willreturn writeonly }
+; CGSCC: attributes #[[ATTR4:[0-9]+]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Test that we only promote arguments when the caller/callee have compatible
; function attrubtes.
; This should promote
define internal fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #0 {
;
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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:[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
-; IS________NPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
-; IS________NPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512
+; CHECK-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64
+; CHECK-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <8 x i64>, <8 x i64>* %arg1
define void @avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* %arg) #0 {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512
-; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: bb:
-; 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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5:[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]]) #[[ATTR6:[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_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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-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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5:[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]]) #[[ATTR6:[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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512
+; TUNIT-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; TUNIT-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5:[0-9]+]]
+; TUNIT-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; TUNIT-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]]) #[[ATTR6:[0-9]+]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; TUNIT-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer512
+; CGSCC-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; CGSCC-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5:[0-9]+]]
+; CGSCC-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; CGSCC-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]]) #[[ATTR6:[0-9]+]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; CGSCC-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <8 x i64>, align 32
; This should promote
define internal fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #1 {
;
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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:[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
-; IS________NPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
-; IS________NPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256
+; CHECK-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64
+; CHECK-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <8 x i64>, <8 x i64>* %arg1
define void @avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* %arg) #1 {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256
-; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: bb:
-; 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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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-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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256
+; TUNIT-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; TUNIT-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; TUNIT-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; TUNIT-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]]) #[[ATTR6]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; TUNIT-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer256
+; CGSCC-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; CGSCC-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; CGSCC-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; CGSCC-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]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; CGSCC-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <8 x i64>, align 32
; This should promote
define internal fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #1 {
;
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256
-; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR1]] {
-; IS________NPM-NEXT: bb:
-; 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
-; IS________NPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
-; IS________NPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256
+; CHECK-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64
+; CHECK-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <8 x i64>, <8 x i64>* %arg1
define void @avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* %arg) #0 {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256
-; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: bb:
-; 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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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-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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256
+; TUNIT-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; TUNIT-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; TUNIT-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; TUNIT-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]]) #[[ATTR6]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; TUNIT-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@avx512_legal512_prefer512_call_avx512_legal512_prefer256
+; CGSCC-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; CGSCC-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; CGSCC-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; CGSCC-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]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; CGSCC-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <8 x i64>, align 32
; This should promote
define internal fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #0 {
;
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512
-; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR0]] {
-; IS________NPM-NEXT: bb:
-; 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
-; IS________NPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
-; IS________NPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512
+; CHECK-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64
+; CHECK-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <8 x i64>, <8 x i64>* %arg1
define void @avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* %arg) #1 {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512
-; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: bb:
-; 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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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-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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512
+; TUNIT-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; TUNIT-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; TUNIT-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; TUNIT-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]]) #[[ATTR6]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; TUNIT-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal512_prefer512
+; CGSCC-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; CGSCC-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; CGSCC-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; CGSCC-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]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; CGSCC-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <8 x i64>, align 32
; This should not promote
define internal fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #1 {
;
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256
-; IS________NPM-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[ARG1:%.*]]) #[[ATTR1]] {
-; IS________NPM-NEXT: bb:
-; 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
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256
+; CHECK-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]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64
+; CHECK-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <8 x i64>, <8 x i64>* %arg1
define void @avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* %arg) #2 {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256
-; 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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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:[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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256
+; TUNIT-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; TUNIT-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; TUNIT-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]]) #[[ATTR6]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; TUNIT-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@avx512_legal256_prefer256_call_avx512_legal512_prefer256
+; CGSCC-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; CGSCC-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; CGSCC-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]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; CGSCC-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <8 x i64>, align 32
; This should not promote
define internal fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #2 {
;
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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:[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
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256
+; CHECK-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]+]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1]], align 64
+; CHECK-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <8 x i64>, <8 x i64>* %arg1
define void @avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* %arg) #1 {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256
-; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: bb:
-; 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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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-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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256
+; TUNIT-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; TUNIT-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; TUNIT-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]]) #[[ATTR6]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; TUNIT-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@avx512_legal512_prefer256_call_avx512_legal256_prefer256
+; CGSCC-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; CGSCC-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; CGSCC-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]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; CGSCC-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <8 x i64>, align 32
; This should promote
define internal fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #3 {
;
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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:[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
-; IS________NPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
-; IS________NPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256
+; CHECK-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR3:[0-9]+]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64
+; CHECK-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <8 x i64>, <8 x i64>* %arg1
define void @avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* %arg) #4 {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256
-; 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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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:%.*]]) #[[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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256
+; TUNIT-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; TUNIT-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; TUNIT-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; TUNIT-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]]) #[[ATTR6]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; TUNIT-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256
+; CGSCC-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; CGSCC-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; CGSCC-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; CGSCC-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]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; CGSCC-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <8 x i64>, align 32
; This should promote
define internal fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* %arg, <8 x i64>* readonly %arg1) #4 {
;
-; IS________NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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:%.*]]) #[[ATTR3]] {
-; 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
-; IS________NPM-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
-; IS________NPM-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256
+; CHECK-SAME: (<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[ARG:%.*]], <8 x i64> [[TMP0:%.*]]) #[[ATTR3]] {
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[ARG1_PRIV:%.*]] = alloca <8 x i64>, align 64
+; CHECK-NEXT: store <8 x i64> [[TMP0]], <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, <8 x i64>* [[ARG1_PRIV]], align 64
+; CHECK-NEXT: store <8 x i64> [[TMP]], <8 x i64>* [[ARG]], align 64
+; CHECK-NEXT: ret void
;
bb:
%tmp = load <8 x i64>, <8 x i64>* %arg1
define void @avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* %arg) #3 {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256
-; IS__TUNIT_NPM-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: bb:
-; 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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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_NPM: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
-; 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-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 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
-; 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]]) #[[ATTR6]]
-; 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
+; TUNIT: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256
+; TUNIT-SAME: (<8 x i64>* nocapture nofree writeonly [[ARG:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; TUNIT-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; TUNIT-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; TUNIT-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]]) #[[ATTR6]]
+; TUNIT-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; TUNIT-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@avx2_legal512_prefer256_call_avx2_legal256_prefer256
+; CGSCC-SAME: (<8 x i64>* nocapture nofree noundef nonnull writeonly align 2 dereferenceable(64) [[ARG:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
+; CGSCC-NEXT: call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; CGSCC-NEXT: [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
+; CGSCC-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]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
+; CGSCC-NEXT: store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
+; CGSCC-NEXT: ret void
;
bb:
%tmp = alloca <8 x i64>, align 32
attributes #4 = { inlinehint norecurse nounwind uwtable "target-features"="+avx2" "min-legal-vector-width"="256" "prefer-vector-width"="256" }
attributes #5 = { argmemonly nounwind }
;.
-; IS__TUNIT_NPM: attributes #[[ATTR0]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="512" "target-features"="+avx512vl" }
-; IS__TUNIT_NPM: attributes #[[ATTR1]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx512vl" }
-; IS__TUNIT_NPM: attributes #[[ATTR2]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx512vl" }
-; IS__TUNIT_NPM: attributes #[[ATTR3]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx2" }
-; IS__TUNIT_NPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR5]] = { willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="512" "target-features"="+avx512vl" }
+; TUNIT: attributes #[[ATTR1]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx512vl" }
+; TUNIT: attributes #[[ATTR2]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx512vl" }
+; TUNIT: attributes #[[ATTR3]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx2" }
+; TUNIT: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR5]] = { willreturn writeonly }
+; TUNIT: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="512" "target-features"="+avx512vl" }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx512vl" }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx512vl" }
-; IS__CGSCC_NPM: attributes #[[ATTR3]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx2" }
-; IS__CGSCC_NPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR5]] = { willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="512" "target-features"="+avx512vl" }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx512vl" }
+; CGSCC: attributes #[[ATTR2]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx512vl" }
+; CGSCC: attributes #[[ATTR3]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="512" "prefer-vector-width"="256" "target-features"="+avx2" }
+; CGSCC: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR5]] = { willreturn writeonly }
+; CGSCC: attributes #[[ATTR6]] = { nounwind willreturn }
;.
; we don't do that anymore. It also verifies that the combination of
; globalopt and argpromotion is able to optimize the call safely.
;
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i386-pc-windows-msvc19.11.0"
; This is here to ensure @internalfun is live.
define void @exportedfun(%struct.a* %a) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@exportedfun
-; IS__TUNIT____-SAME: (%struct.a* nocapture nofree readnone [[A:%.*]]) {
-; IS__TUNIT____-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT: [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A:%.*]] }>, align 4
-; IS__TUNIT____-NEXT: call x86_thiscallcc void @internalfun(%struct.a* noalias nocapture nofree readnone undef, <{ [[STRUCT_A]] }>* noundef nonnull inalloca(<{ [[STRUCT_A]] }>) align 4 dereferenceable(1) [[ARGMEM]])
-; IS__TUNIT____-NEXT: call void @llvm.stackrestore(i8* nofree [[INALLOCA_SAVE]])
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@exportedfun
+; TUNIT-SAME: (%struct.a* nocapture nofree readnone [[A:%.*]]) {
+; TUNIT-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A:%.*]] }>, align 4
+; TUNIT-NEXT: call x86_thiscallcc void @internalfun(%struct.a* noalias nocapture nofree readnone undef, <{ [[STRUCT_A]] }>* noundef nonnull inalloca(<{ [[STRUCT_A]] }>) align 4 dereferenceable(1) [[ARGMEM]])
+; TUNIT-NEXT: call void @llvm.stackrestore(i8* nofree [[INALLOCA_SAVE]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@exportedfun
-; IS__CGSCC____-SAME: (%struct.a* nocapture nofree readnone [[A:%.*]]) {
-; IS__CGSCC____-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() #[[ATTR1:[0-9]+]]
-; IS__CGSCC____-NEXT: [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A:%.*]] }>, align 4
-; IS__CGSCC____-NEXT: call x86_thiscallcc void @internalfun(%struct.a* noalias nocapture nofree readnone [[A]], <{ [[STRUCT_A]] }>* noundef nonnull inalloca(<{ [[STRUCT_A]] }>) align 4 dereferenceable(1) [[ARGMEM]])
-; IS__CGSCC____-NEXT: call void @llvm.stackrestore(i8* nofree [[INALLOCA_SAVE]])
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@exportedfun
+; CGSCC-SAME: (%struct.a* nocapture nofree readnone [[A:%.*]]) {
+; CGSCC-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() #[[ATTR1:[0-9]+]]
+; CGSCC-NEXT: [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A:%.*]] }>, align 4
+; CGSCC-NEXT: call x86_thiscallcc void @internalfun(%struct.a* noalias nocapture nofree readnone [[A]], <{ [[STRUCT_A]] }>* noundef nonnull inalloca(<{ [[STRUCT_A]] }>) align 4 dereferenceable(1) [[ARGMEM]])
+; CGSCC-NEXT: call void @llvm.stackrestore(i8* nofree [[INALLOCA_SAVE]])
+; CGSCC-NEXT: ret void
;
%inalloca.save = tail call i8* @llvm.stacksave()
%argmem = alloca inalloca <{ %struct.a }>, align 4
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
%T = type { i32, i32, i32, i32 }
@G = constant %T { i32 0, i32 0, i32 17, i32 25 }
}
define i32 @caller() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test() #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[V]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[V:%.*]] = call i32 @test() #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[V]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[V:%.*]] = call i32 @test() #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[V]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[V:%.*]] = call i32 @test() #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[V]]
;
entry:
%v = call i32 @test(%T* @G)
ret i32 %v
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define void @f() {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f() {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i32, align 1
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 1
-; IS__TUNIT_NPM-NEXT: call void @g(i32 [[TMP0]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@f() {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[A:%.*]] = alloca i32, align 1
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 1
+; TUNIT-NEXT: call void @g(i32 [[TMP0]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f() {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: call void @g(i32 undef)
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@f() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @g(i32 undef)
+; CGSCC-NEXT: ret void
;
entry:
%a = alloca i32, align 1
}
define internal void @g(i32* %a) {
-; IS________NPM-LABEL: define {{[^@]+}}@g
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS________NPM-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4
-; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[A_PRIV]], align 4
-; IS________NPM-NEXT: [[AA:%.*]] = load i32, i32* [[A_PRIV]], align 1
-; IS________NPM-NEXT: call void @z(i32 [[AA]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@g
+; CHECK-SAME: (i32 [[TMP0:%.*]]) {
+; CHECK-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4
+; CHECK-NEXT: store i32 [[TMP0]], i32* [[A_PRIV]], align 4
+; CHECK-NEXT: [[AA:%.*]] = load i32, i32* [[A_PRIV]], align 1
+; CHECK-NEXT: call void @z(i32 [[AA]])
+; CHECK-NEXT: ret void
;
%aa = load i32, i32* %a, align 1
call void @z(i32 %aa)
; Test2
; Different alignemnt privatizable arguments
define internal i32 @test(i32* %X, i64* %Y) {
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]], i64 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[Y_PRIV:%.*]] = alloca i64, align 8
-; IS__CGSCC_NPM-NEXT: store i64 [[TMP0]], i64* [[Y_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4
-; IS__CGSCC_NPM-NEXT: [[B:%.*]] = load i64, i64* [[Y_PRIV]], align 8
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = add i32 [[A]], 1
-; IS__CGSCC_NPM-NEXT: [[D:%.*]] = add i64 [[B]], 1
-; IS__CGSCC_NPM-NEXT: [[COND:%.*]] = icmp sgt i64 [[D]], -1
-; IS__CGSCC_NPM-NEXT: br i1 [[COND]], label [[RETURN1:%.*]], label [[RETURN2:%.*]]
-; IS__CGSCC_NPM: Return1:
-; IS__CGSCC_NPM-NEXT: ret i32 [[C]]
-; IS__CGSCC_NPM: Return2:
-; IS__CGSCC_NPM-NEXT: ret i32 [[A]]
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]], i64 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: [[Y_PRIV:%.*]] = alloca i64, align 8
+; CGSCC-NEXT: store i64 [[TMP0]], i64* [[Y_PRIV]], align 4
+; CGSCC-NEXT: [[A:%.*]] = load i32, i32* [[X]], align 4
+; CGSCC-NEXT: [[B:%.*]] = load i64, i64* [[Y_PRIV]], align 8
+; CGSCC-NEXT: [[C:%.*]] = add i32 [[A]], 1
+; CGSCC-NEXT: [[D:%.*]] = add i64 [[B]], 1
+; CGSCC-NEXT: [[COND:%.*]] = icmp sgt i64 [[D]], -1
+; CGSCC-NEXT: br i1 [[COND]], label [[RETURN1:%.*]], label [[RETURN2:%.*]]
+; CGSCC: Return1:
+; CGSCC-NEXT: ret i32 [[C]]
+; CGSCC: Return2:
+; CGSCC-NEXT: ret i32 [[A]]
;
%A = load i32, i32* %X
%B = load i64, i64* %Y
}
define internal i32 @caller(i32* %A) {
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] {
-; 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: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_PRIV]], i64 noundef 1) #[[ATTR3:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[C]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[TMP0]], i32* [[A_PRIV]], align 4
+; CGSCC-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_PRIV]], i64 noundef 1) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[C]]
;
%B = alloca i64
store i64 1, i64* %B
}
define i32 @callercaller() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: ret i32 3
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@callercaller
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: ret i32 3
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller
-; IS__CGSCC_NPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 noundef 2) #[[ATTR4:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callercaller
+; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: [[X:%.*]] = call i32 @caller(i32 noundef 2) #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[X]]
;
%B = alloca i32
store i32 2, i32* %B
ret i32 %X
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3:[0-9]+]] = { readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3:[0-9]+]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR4:[0-9]+]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "A7"
; Make sure we create allocas in AS 7 and cast them properly.
define i32 @bar(i32 %arg) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bar
-; IS__TUNIT_NPM-SAME: (i32 [[ARG:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[STACK:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[ARG]], i32* [[STACK]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[STACK]], align 4
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @foo(i32 [[TMP0]])
-; IS__TUNIT_NPM-NEXT: ret i32 [[CALL]]
+; TUNIT-LABEL: define {{[^@]+}}@bar
+; TUNIT-SAME: (i32 [[ARG:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 [[ARG]], i32* [[STACK]], align 4
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[STACK]], align 4
+; TUNIT-NEXT: [[CALL:%.*]] = call i32 @foo(i32 [[TMP0]])
+; TUNIT-NEXT: ret i32 [[CALL]]
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC_NPM-SAME: (i32 [[ARG:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[STACK:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: store i32 [[ARG]], i32* [[STACK]], align 4
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @foo(i32 [[ARG]])
-; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]]
+; CGSCC-LABEL: define {{[^@]+}}@bar
+; CGSCC-SAME: (i32 [[ARG:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[ARG]], i32* [[STACK]], align 4
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @foo(i32 [[ARG]])
+; CGSCC-NEXT: ret i32 [[CALL]]
;
entry:
%stack = alloca i32
}
define internal i32 @foo(i32* %arg) {
-; IS________NPM-LABEL: define {{[^@]+}}@foo
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[ARG_PRIV:%.*]] = alloca i32, align 4, addrspace(7)
-; IS________NPM-NEXT: store i32 [[TMP0]], i32 addrspace(7)* [[ARG_PRIV]], align 4
-; IS________NPM-NEXT: [[TMP1:%.*]] = addrspacecast i32 addrspace(7)* [[ARG_PRIV]] to i32*
-; IS________NPM-NEXT: [[L:%.*]] = load i32, i32* [[TMP1]], align 4
-; IS________NPM-NEXT: call void @use(i32 [[L]])
-; IS________NPM-NEXT: ret i32 [[L]]
+; CHECK-LABEL: define {{[^@]+}}@foo
+; CHECK-SAME: (i32 [[TMP0:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[ARG_PRIV:%.*]] = alloca i32, align 4, addrspace(7)
+; CHECK-NEXT: store i32 [[TMP0]], i32 addrspace(7)* [[ARG_PRIV]], align 4
+; CHECK-NEXT: [[TMP1:%.*]] = addrspacecast i32 addrspace(7)* [[ARG_PRIV]] to i32*
+; CHECK-NEXT: [[L:%.*]] = load i32, i32* [[TMP1]], align 4
+; CHECK-NEXT: call void @use(i32 [[L]])
+; CHECK-NEXT: ret i32 [[L]]
;
entry:
%l = load i32, i32* %arg
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; FIXME: The GEP + BC + GEP solution we create is not great but correct.
declare void @use(i32* nocapture readonly %arg)
define void @caller() {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@caller() {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[LEFT:%.*]] = alloca [3 x i32], align 4
-; IS__TUNIT_NPM-NEXT: [[ARRAYDECAY:%.*]] = getelementptr inbounds [3 x i32], [3 x i32]* [[LEFT]], i64 0, i64 0
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[ARRAYDECAY]] to [3 x i32]*
-; IS__TUNIT_NPM-NEXT: [[DOTCAST:%.*]] = bitcast [3 x i32]* [[TMP0]] to i32*
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTCAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[DOT0_1:%.*]] = getelementptr [3 x i32], [3 x i32]* [[TMP0]], i64 0, i64 1
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOT0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[DOT0_2:%.*]] = getelementptr [3 x i32], [3 x i32]* [[TMP0]], i64 0, i64 2
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOT0_2]], align 4
-; IS__TUNIT_NPM-NEXT: call void @callee(i32 [[TMP1]], i32 [[TMP2]], i32 [[TMP3]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@caller() {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[LEFT:%.*]] = alloca [3 x i32], align 4
+; TUNIT-NEXT: [[ARRAYDECAY:%.*]] = getelementptr inbounds [3 x i32], [3 x i32]* [[LEFT]], i64 0, i64 0
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast i32* [[ARRAYDECAY]] to [3 x i32]*
+; TUNIT-NEXT: [[DOTCAST:%.*]] = bitcast [3 x i32]* [[TMP0]] to i32*
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTCAST]], align 4
+; TUNIT-NEXT: [[DOT0_1:%.*]] = getelementptr [3 x i32], [3 x i32]* [[TMP0]], i64 0, i64 1
+; TUNIT-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOT0_1]], align 4
+; TUNIT-NEXT: [[DOT0_2:%.*]] = getelementptr [3 x i32], [3 x i32]* [[TMP0]], i64 0, i64 2
+; TUNIT-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOT0_2]], align 4
+; TUNIT-NEXT: call void @callee(i32 [[TMP1]], i32 [[TMP2]], i32 [[TMP3]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller() {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: call void @callee(i32 undef, i32 undef, i32 undef)
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@caller() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @callee(i32 undef, i32 undef, i32 undef)
+; CGSCC-NEXT: ret void
;
entry:
%left = alloca [3 x i32], align 4
}
define internal void @callee(i32* noalias %arg) {
-; IS________NPM-LABEL: define {{[^@]+}}@callee
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[ARG_PRIV:%.*]] = alloca [3 x i32], align 4
-; IS________NPM-NEXT: [[ARG_PRIV_CAST:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
-; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[ARG_PRIV_CAST]], align 4
-; IS________NPM-NEXT: [[ARG_PRIV_0_1:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 1
-; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[ARG_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[ARG_PRIV_0_2:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 2
-; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[ARG_PRIV_0_2]], align 4
-; IS________NPM-NEXT: [[TMP3:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
-; IS________NPM-NEXT: call void @use(i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(12) [[TMP3]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@callee
+; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[ARG_PRIV:%.*]] = alloca [3 x i32], align 4
+; CHECK-NEXT: [[ARG_PRIV_CAST:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
+; CHECK-NEXT: store i32 [[TMP0]], i32* [[ARG_PRIV_CAST]], align 4
+; CHECK-NEXT: [[ARG_PRIV_0_1:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 1
+; CHECK-NEXT: store i32 [[TMP1]], i32* [[ARG_PRIV_0_1]], align 4
+; CHECK-NEXT: [[ARG_PRIV_0_2:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 2
+; CHECK-NEXT: store i32 [[TMP2]], i32* [[ARG_PRIV_0_2]], align 4
+; CHECK-NEXT: [[TMP3:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
+; CHECK-NEXT: call void @use(i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(12) [[TMP3]])
+; CHECK-NEXT: ret void
;
entry:
call void @use(i32* %arg)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
%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________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@f
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4
-; IS________NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
-; IS________NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
-; IS________NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS________NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
-; IS________NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 4
-; IS________NPM-NEXT: store i32 0, i32* [[X_PRIV]], align 4
-; IS________NPM-NEXT: [[L:%.*]] = load i32, i32* [[X_PRIV]], align 4
-; IS________NPM-NEXT: [[A:%.*]] = add i32 [[L]], [[TMP2]]
-; IS________NPM-NEXT: ret i32 [[A]]
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CHECK-LABEL: define {{[^@]+}}@f
+; CHECK-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
+; CHECK-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4
+; CHECK-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
+; CHECK-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
+; CHECK-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
+; CHECK-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
+; CHECK-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
+; CHECK-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
+; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; CHECK-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 4
+; CHECK-NEXT: store i32 0, i32* [[X_PRIV]], align 4
+; CHECK-NEXT: [[L:%.*]] = load i32, i32* [[X_PRIV]], align 4
+; CHECK-NEXT: [[A:%.*]] = add i32 [[L]], [[TMP2]]
+; CHECK-NEXT: ret i32 [[A]]
;
entry:
; Also make sure we don't drop the call zeroext attribute.
define i32 @test(i32* %X) {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly [[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
-; 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: [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32*
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[S_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 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]]) #[[ATTR1:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[C]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test
+; TUNIT-SAME: (i32* nocapture nofree readonly [[X:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
+; TUNIT-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
+; TUNIT-NEXT: store i32 1, i32* [[TMP1]], align 8
+; TUNIT-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
+; TUNIT-NEXT: [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32*
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[S_CAST]], align 8
+; TUNIT-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 0, i32 1
+; TUNIT-NEXT: [[TMP1:%.*]] = load i64, i64* [[S_0_1]], align 8
+; TUNIT-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4
+; TUNIT-NEXT: [[C:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]], i32 [[TMP2]]) #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[C]]
;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree 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:[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
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[X]], align 4
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @f(i32 noundef 1, i64 noundef 2, i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[C]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
+; CGSCC-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
+; CGSCC-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[X]], align 4
+; CGSCC-NEXT: [[C:%.*]] = call i32 @f(i32 noundef 1, i64 noundef 2, i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[C]]
;
entry:
%S = alloca %struct.ss
ret i32 %c
}
;.
-; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[Y:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = load i32, i32* [[X_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[B:%.*]] = load i32, i32* [[Y]], align 4
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = add i32 [[A]], [[B]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[C]]
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test
+; CGSCC-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[Y:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]], align 4
+; CGSCC-NEXT: [[A:%.*]] = load i32, i32* [[X_PRIV]], align 4
+; CGSCC-NEXT: [[B:%.*]] = load i32, i32* [[Y]], align 4
+; CGSCC-NEXT: [[C:%.*]] = add i32 [[A]], [[B]]
+; CGSCC-NEXT: ret i32 [[C]]
;
%A = load i32, i32* %X
%B = load i32, i32* %Y
}
define internal i32 @caller(i32* %B) {
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] {
-; 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: [[C:%.*]] = call i32 @test(i32 noundef 1, i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B_PRIV]]) #[[ATTR3:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[C]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[TMP0]], i32* [[B_PRIV]], align 4
+; CGSCC-NEXT: [[C:%.*]] = call i32 @test(i32 noundef 1, i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B_PRIV]]) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[C]]
;
%A = alloca i32
store i32 1, i32* %A
}
define i32 @callercaller() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: ret i32 3
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@callercaller
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: ret i32 3
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller
-; IS__CGSCC_NPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32 noundef 2) #[[ATTR4:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callercaller
+; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: [[X:%.*]] = call i32 @caller(i32 noundef 2) #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[X]]
;
%B = alloca i32
store i32 2, i32* %B
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3:[0-9]+]] = { readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3:[0-9]+]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR4:[0-9]+]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
%struct.ss = type { i32, i64 }
define internal void @f(%struct.ss* byval(%struct.ss) %b, i32* byval(i32) %X) nounwind {
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@f
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4
-; IS________NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
-; IS________NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
-; IS________NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS________NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
-; IS________NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 4
-; IS________NPM-NEXT: store i32 0, i32* [[X_PRIV]], align 4
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CHECK-LABEL: define {{[^@]+}}@f
+; CHECK-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
+; CHECK-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4
+; CHECK-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
+; CHECK-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
+; CHECK-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
+; CHECK-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
+; CHECK-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
+; CHECK-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
+; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; CHECK-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 4
+; CHECK-NEXT: store i32 0, i32* [[X_PRIV]], align 4
+; CHECK-NEXT: ret void
;
entry:
%tmp = getelementptr %struct.ss, %struct.ss* %b, i32 0, i32 0
define i32 @test(i32* %X) {
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly [[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
-; 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: [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32*
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[S_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 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: call void @f(i32 [[TMP0]], i64 [[TMP1]], i32 [[TMP2]]) #[[ATTR1:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret i32 0
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test
+; TUNIT-SAME: (i32* nocapture nofree readonly [[X:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
+; TUNIT-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
+; TUNIT-NEXT: store i32 1, i32* [[TMP1]], align 8
+; TUNIT-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
+; TUNIT-NEXT: [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32*
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[S_CAST]], align 8
+; TUNIT-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 0, i32 1
+; TUNIT-NEXT: [[TMP1:%.*]] = load i64, i64* [[S_0_1]], align 8
+; TUNIT-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4
+; TUNIT-NEXT: call void @f(i32 [[TMP0]], i64 [[TMP1]], i32 [[TMP2]]) #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree 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:[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
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[X]], align 4
-; IS__CGSCC_NPM-NEXT: call void @f(i32 noundef 1, i64 noundef 2, i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 0
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
+; CGSCC-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
+; CGSCC-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[X]], align 4
+; CGSCC-NEXT: call void @f(i32 noundef 1, i64 noundef 2, i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 0
;
entry:
%S = alloca %struct.ss
ret i32 0
}
;.
-; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@f
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
-; IS________NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
-; IS________NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS________NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
-; IS________NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 4
-; IS________NPM-NEXT: ret i32 [[TMP1]]
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CHECK-LABEL: define {{[^@]+}}@f
+; CHECK-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
+; CHECK-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
+; CHECK-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
+; CHECK-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
+; CHECK-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
+; CHECK-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
+; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; CHECK-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 4
+; CHECK-NEXT: ret i32 [[TMP1]]
;
entry:
%tmp = getelementptr %struct.ss, %struct.ss* %b, i32 0, i32 0
define internal i32 @g(%struct.ss* byval(%struct.ss) align 32 %b) nounwind {
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@g
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
-; IS________NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
-; IS________NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS________NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32
-; IS________NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32
-; IS________NPM-NEXT: ret i32 [[TMP2]]
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CHECK-LABEL: define {{[^@]+}}@g
+; CHECK-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
+; CHECK-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
+; CHECK-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
+; CHECK-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
+; CHECK-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
+; CHECK-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
+; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32
+; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; CHECK-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32
+; CHECK-NEXT: ret i32 [[TMP2]]
;
entry:
%tmp = getelementptr %struct.ss, %struct.ss* %b, i32 0, i32 0
define i32 @main() nounwind {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@main
-; IS__TUNIT_NPM-SAME: () #[[ATTR1:[0-9]+]] {
-; 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: [[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]], i64 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]]) #[[ATTR2:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32*
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[S_CAST]], align 32
-; IS__TUNIT_NPM-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 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]]) #[[ATTR2]]
-; IS__TUNIT_NPM-NEXT: [[A:%.*]] = add i32 [[C0]], [[C1]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[A]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@main
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
+; TUNIT-NEXT: store i32 1, i32* [[TMP1]], align 8
+; TUNIT-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
+; TUNIT-NEXT: [[S_CAST1:%.*]] = bitcast %struct.ss* [[S]] to i32*
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[S_CAST1]], align 8
+; TUNIT-NEXT: [[S_0_12:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 0, i32 1
+; TUNIT-NEXT: [[TMP1:%.*]] = load i64, i64* [[S_0_12]], align 8
+; TUNIT-NEXT: [[C0:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]]) #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32*
+; TUNIT-NEXT: [[TMP2:%.*]] = load i32, i32* [[S_CAST]], align 32
+; TUNIT-NEXT: [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 0, i32 1
+; TUNIT-NEXT: [[TMP3:%.*]] = load i64, i64* [[S_0_1]], align 32
+; TUNIT-NEXT: [[C1:%.*]] = call i32 @g(i32 [[TMP2]], i64 [[TMP3]]) #[[ATTR2]]
+; TUNIT-NEXT: [[A:%.*]] = add i32 [[C0]], [[C1]]
+; TUNIT-NEXT: ret i32 [[A]]
;
-; IS__CGSCC_NPM: Function Attrs: nofree 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: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[C0:%.*]] = call i32 @f(i32 noundef 1, i64 noundef 2) #[[ATTR2:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[C1:%.*]] = call i32 @g(i32 noundef 1, i64 noundef 2) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = add i32 [[C0]], [[C1]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[A]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@main
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
+; CGSCC-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
+; CGSCC-NEXT: [[C0:%.*]] = call i32 @f(i32 noundef 1, i64 noundef 2) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: [[C1:%.*]] = call i32 @g(i32 noundef 1, i64 noundef 2) #[[ATTR2]]
+; CGSCC-NEXT: [[A:%.*]] = add i32 [[C0]], [[C1]]
+; CGSCC-NEXT: ret i32 [[A]]
;
entry:
%S = alloca %struct.ss
;.
-; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
+; 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 nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
@G1 = constant i32 0
@G2 = constant i32* @G1
}
define i32 @caller() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @test() #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[X]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[X:%.*]] = call i32 @test() #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[X]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @test() #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[X:%.*]] = call i32 @test() #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[X]]
;
entry:
%x = call i32 @test(i32** @G2)
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Don't promote around control flow.
define internal i32 @callee(i1 %C, i32* %P) {
}
define i32 @foo(i1 %C, i32* %P) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[X]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[X]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[X]]
;
entry:
%X = call i32 @callee(i1 %C, i32* %P)
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readonly willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callee
-; 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:%.*]]
-; IS__CGSCC_NPM: T:
-; IS__CGSCC_NPM-NEXT: unreachable
-; IS__CGSCC_NPM: F:
-; IS__CGSCC_NPM-NEXT: [[X:%.*]] = load i32, i32* [[P_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callee
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: [[P_PRIV:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[TMP0]], i32* [[P_PRIV]], align 4
+; CGSCC-NEXT: br label [[F:%.*]]
+; CGSCC: T:
+; CGSCC-NEXT: unreachable
+; CGSCC: F:
+; CGSCC-NEXT: [[X:%.*]] = load i32, i32* [[P_PRIV]], align 4
+; CGSCC-NEXT: ret i32 [[X]]
;
br i1 %C, label %T, label %F
}
define i32 @foo() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: ret i32 17
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: [[A:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: ret i32 17
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @callee(i32 noundef 17) #[[ATTR2:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[X:%.*]] = call i32 @callee(i32 noundef 17) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[X]]
;
%A = alloca i32 ; <i32*> [#uses=2]
store i32 17, i32* %A
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { readonly willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
%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 norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@zot
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] personality i32 (...)* @wibble {
-; IS__TUNIT____-NEXT: bb:
-; IS__TUNIT____-NEXT: call void @hoge() #[[ATTR2:[0-9]+]]
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: bb1:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: bb2:
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@zot
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] personality i32 (...)* @wibble {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: call void @hoge() #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: unreachable
+; TUNIT: bb1:
+; TUNIT-NEXT: unreachable
+; TUNIT: bb2:
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@zot
-; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] personality i32 (...)* @wibble {
-; IS__CGSCC____-NEXT: bb:
-; IS__CGSCC____-NEXT: call void @hoge() #[[ATTR4:[0-9]+]]
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: bb1:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: bb2:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@zot
+; CGSCC-SAME: () #[[ATTR0:[0-9]+]] personality i32 (...)* @wibble {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: call void @hoge() #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: unreachable
+; CGSCC: bb1:
+; CGSCC-NEXT: unreachable
+; CGSCC: bb2:
+; CGSCC-NEXT: unreachable
;
bb:
invoke void @hoge()
}
define internal void @hoge() {
-; IS__TUNIT____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@hoge
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: bb:
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@hoge
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@hoge
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: bb:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@hoge
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: unreachable
;
bb:
%tmp = call fastcc i8* @spam(i1 (i8*)* @eggs)
}
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: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: bb:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@spam
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: unreachable
;
bb:
unreachable
}
define internal i1 @eggs(i8* %arg) {
-; IS__CGSCC____-LABEL: define {{[^@]+}}@eggs
-; IS__CGSCC____-SAME: (i8* [[ARG:%.*]]) {
-; IS__CGSCC____-NEXT: bb:
-; IS__CGSCC____-NEXT: [[TMP:%.*]] = call zeroext i1 @barney()
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC-LABEL: define {{[^@]+}}@eggs
+; CGSCC-SAME: (i8* [[ARG:%.*]]) {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = call zeroext i1 @barney()
+; CGSCC-NEXT: unreachable
;
bb:
%tmp = call zeroext i1 @barney(i8* %arg)
}
define internal i1 @barney(i8* %arg) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@barney
-; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: bb:
-; IS__CGSCC____-NEXT: ret i1 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@barney
+; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: ret i1 undef
;
bb:
ret i1 undef
}
define i32 @test_inf_promote_caller(i32 %arg) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_inf_promote_caller
-; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: bb:
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_inf_promote_caller
+; TUNIT-SAME: (i32 [[ARG:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inf_promote_caller
-; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: bb:
-; IS__CGSCC____-NEXT: [[TMP:%.*]] = alloca [[S:%.*]], align 8
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = alloca [[S]], align 8
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_inf_promote_caller
+; CGSCC-SAME: (i32 [[ARG:%.*]]) #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca [[S:%.*]], align 8
+; CGSCC-NEXT: [[TMP1:%.*]] = alloca [[S]], align 8
+; CGSCC-NEXT: ret i32 0
;
bb:
%tmp = alloca %S
}
define internal i32 @test_inf_promote_callee(%S* %arg, %S* %arg1) {
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inf_promote_callee
-; IS__CGSCC____-SAME: () #[[ATTR3]] {
-; IS__CGSCC____-NEXT: bb:
-; IS__CGSCC____-NEXT: ret i32 undef
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_inf_promote_callee
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: ret i32 undef
;
bb:
%tmp = getelementptr %S, %S* %arg1, i32 0, i32 0
declare i32 @wibble(...)
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { noreturn nounwind readnone }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { noreturn nounwind readnone }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { noreturn nounwind readnone }
+; CGSCC: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR4]] = { noreturn nounwind readnone }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
declare void @sink(i32)
}
define void @caller(i32** %Y, %struct.pair* %P) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: (i32** nocapture nofree readonly [[Y:%.*]], %struct.pair* nocapture nofree readnone [[P:%.*]]) {
-; IS__TUNIT____-NEXT: call void @test(i32** nocapture nofree readonly align 8 [[Y]]), !dbg [[DBG4:![0-9]+]]
-; IS__TUNIT____-NEXT: call void @test_byval(), !dbg [[DBG5:![0-9]+]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@caller
+; TUNIT-SAME: (i32** nocapture nofree readonly [[Y:%.*]], %struct.pair* nocapture nofree readnone [[P:%.*]]) {
+; TUNIT-NEXT: call void @test(i32** nocapture nofree readonly align 8 [[Y]]), !dbg [[DBG4:![0-9]+]]
+; TUNIT-NEXT: call void @test_byval(), !dbg [[DBG5:![0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: (i32** nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[Y:%.*]], %struct.pair* nocapture nofree readnone [[P:%.*]]) {
-; IS__CGSCC____-NEXT: call void @test(i32** nocapture nofree 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
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: (i32** nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[Y:%.*]], %struct.pair* nocapture nofree readnone [[P:%.*]]) {
+; CGSCC-NEXT: call void @test(i32** nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[Y]]), !dbg [[DBG4:![0-9]+]]
+; CGSCC-NEXT: call void @test_byval(), !dbg [[DBG5:![0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @test(i32** %Y), !dbg !1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
;.
define void @run() {
;
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@run
-; NOT_CGSCC_NPM-SAME: () #[[ATTR0:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@run
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@run
-; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_FOO:%.*]], %struct.Foo* @a, i32 0, i32 0), align 8
-; IS__CGSCC____-NEXT: [[A_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* @a, i64 0, i32 1
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_0_1]], align 8
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@run
+; CGSCC-SAME: () #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_FOO:%.*]], %struct.Foo* @a, i32 0, i32 0), align 8
+; CGSCC-NEXT: [[A_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* @a, i64 0, i32 1
+; CGSCC-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_0_1]], align 8
+; CGSCC-NEXT: unreachable
;
entry:
tail call i8 @UseLongDoubleUnsafely(%union.u* byval(%union.u) align 16 bitcast (%struct.s* @b to %union.u*))
}
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:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i8 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@UseLongDoubleUnsafely
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i8 undef
;
entry:
%bitcast = bitcast %union.u* %arg to %struct.s*
}
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____-NEXT: ret x86_fp80 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@UseLongDoubleSafely
+; CGSCC-SAME: () #[[ATTR1]] {
+; 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
}
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____-NEXT: ret i64 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@AccessPaddingOfStruct
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: ret i64 undef
;
%p = bitcast %struct.Foo* %a to i64*
%v = load i64, i64* %p
}
define internal i64 @CaptureAStruct(%struct.Foo* byval(%struct.Foo) %a) {
-; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@CaptureAStruct
-; 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*
-; IS__CGSCC____-NEXT: store i32 [[TMP0]], i32* [[A_PRIV_CAST]], align 4
-; IS__CGSCC____-NEXT: [[A_PRIV_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i64 0, i32 1
-; IS__CGSCC____-NEXT: store i64 [[TMP1]], i64* [[A_PRIV_0_1]], align 8
-; IS__CGSCC____-NEXT: [[A_PTR:%.*]] = alloca %struct.Foo*, align 8
-; IS__CGSCC____-NEXT: br label [[LOOP:%.*]]
-; IS__CGSCC____: loop:
-; IS__CGSCC____-NEXT: [[PHI:%.*]] = phi %struct.Foo* [ null, [[ENTRY:%.*]] ], [ [[A_PRIV]], [[LOOP]] ]
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = phi %struct.Foo* [ [[A_PRIV]], [[ENTRY]] ], [ [[TMP2]], [[LOOP]] ]
-; IS__CGSCC____-NEXT: br label [[LOOP]]
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@CaptureAStruct
+; CGSCC-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_FOO:%.*]], align 8
+; CGSCC-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.Foo* [[A_PRIV]] to i32*
+; CGSCC-NEXT: store i32 [[TMP0]], i32* [[A_PRIV_CAST]], align 4
+; CGSCC-NEXT: [[A_PRIV_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i64 0, i32 1
+; CGSCC-NEXT: store i64 [[TMP1]], i64* [[A_PRIV_0_1]], align 8
+; CGSCC-NEXT: [[A_PTR:%.*]] = alloca %struct.Foo*, align 8
+; CGSCC-NEXT: br label [[LOOP:%.*]]
+; CGSCC: loop:
+; CGSCC-NEXT: [[PHI:%.*]] = phi %struct.Foo* [ null, [[ENTRY:%.*]] ], [ [[A_PRIV]], [[LOOP]] ]
+; CGSCC-NEXT: [[TMP2:%.*]] = phi %struct.Foo* [ [[A_PRIV]], [[ENTRY]] ], [ [[TMP2]], [[LOOP]] ]
+; CGSCC-NEXT: br label [[LOOP]]
;
entry:
%a_ptr = alloca %struct.Foo*
br label %loop
}
;.
-; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse noreturn nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree norecurse noreturn nosync nounwind readnone }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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 i32 @main() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@main
-; 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* noalias nocapture nofree noundef nonnull inalloca([[STRUCT_SS]]) align 4 dereferenceable(8) [[S]]) #[[ATTR2:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@main
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[S:%.*]] = alloca inalloca [[STRUCT_SS:%.*]], align 4
+; TUNIT-NEXT: [[F0:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
+; TUNIT-NEXT: [[F1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
+; TUNIT-NEXT: store i32 1, i32* [[F0]], align 4
+; TUNIT-NEXT: store i32 2, i32* [[F1]], align 4
+; TUNIT-NEXT: [[R:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull inalloca([[STRUCT_SS]]) align 4 dereferenceable(8) [[S]]) #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[R]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@main
-; 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* noalias nocapture nofree noundef nonnull inalloca([[STRUCT_SS]]) align 4 dereferenceable(8) [[S]]) #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[R]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@main
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[S:%.*]] = alloca inalloca [[STRUCT_SS:%.*]], align 4
+; CGSCC-NEXT: [[F0:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
+; CGSCC-NEXT: [[F1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
+; CGSCC-NEXT: store i32 1, i32* [[F0]], align 4
+; CGSCC-NEXT: store i32 2, i32* [[F1]], align 4
+; CGSCC-NEXT: [[R:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull inalloca([[STRUCT_SS]]) align 4 dereferenceable(8) [[S]]) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[R]]
;
entry:
%S = alloca inalloca %struct.ss
; Argpromote can't promote %a because of the icmp use.
define internal i1 @g(%struct.ss* %a, %struct.ss* inalloca(%struct.ss) %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* noalias nocapture nofree nonnull writeonly inalloca([[STRUCT_SS:%.*]]) align 4 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i1 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@g
+; CGSCC-SAME: (%struct.ss* noalias nocapture nofree nonnull readnone align 4 dereferenceable(8) [[A:%.*]], %struct.ss* noalias nocapture nofree nonnull writeonly inalloca([[STRUCT_SS:%.*]]) align 4 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i1 undef
;
entry:
%c = icmp eq %struct.ss* %a, %b
}
define i32 @test() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i32 0
;
entry:
%S = alloca inalloca %struct.ss
ret i32 0
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { nofree nosync nounwind readonly willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { readonly willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define internal void @dead() {
-; IS__CGSCC____-LABEL: define {{[^@]+}}@dead() {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 4294967296 null)
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@dead() {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 4294967296 null)
+; CGSCC-NEXT: ret void
;
call i32 @test(i32* null, i32* null)
ret void
}
define internal i32 @test(i32* %X, i32* %Y) {
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test
-; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]]
-; IS__CGSCC____: live:
-; IS__CGSCC____-NEXT: store i32 0, i32* [[X]], align 4
-; IS__CGSCC____-NEXT: ret i32 undef
-; IS__CGSCC____: dead:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test
+; CGSCC-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]]
+; CGSCC: live:
+; CGSCC-NEXT: store i32 0, i32* [[X]], align 4
+; CGSCC-NEXT: ret i32 undef
+; CGSCC: dead:
+; CGSCC-NEXT: unreachable
;
br i1 true, label %live, label %dead
live:
}
define internal i32 @caller(i32* %B) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[A:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: ret i32 0
;
%A = alloca i32
store i32 1, i32* %A
}
define i32 @callercaller() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@callercaller
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@callercaller
-; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: [[X:%.*]] = call noundef i32 @caller() #[[ATTR4:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callercaller
+; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[X:%.*]] = call noundef i32 @caller() #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[X]]
;
%B = alloca i32
store i32 2, i32* %B
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR4]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR4]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define internal void @dead() {
-; IS__CGSCC____-LABEL: define {{[^@]+}}@dead() {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 4294967296 null)
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@dead() {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 4294967296 null)
+; CGSCC-NEXT: ret void
;
call i32 @test(i32* null, i32* null)
ret void
}
define internal i32 @caller(i32* %B) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 undef
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@caller
+; TUNIT-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[A:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: ret i32 undef
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: [[A:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 0
;
%A = alloca i32
store i32 1, i32* %A
}
define i32 @callercaller() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller
-; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, 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: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@callercaller
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2]]
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@callercaller
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: store i32 2, i32* [[B]], align 4
-; IS__CGSCC____-NEXT: [[X:%.*]] = call noundef i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callercaller
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 2, i32* [[B]], align 4
+; CGSCC-NEXT: [[X:%.*]] = call noundef i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[X]]
;
%B = alloca i32
store i32 2, i32* %B
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR3]] = { nounwind willreturn writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; PR36543
; Don't promote arguments of musttail callee
}
define i32 @caller(%T* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[V]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller
+; TUNIT-SAME: (%T* nocapture nofree readonly [[P:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[V:%.*]] = musttail call i32 @test(%T* nocapture nofree readonly [[P]]) #[[ATTR4:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[V]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[V:%.*]] = musttail call i32 @test(%T* nocapture nofree readonly [[P]]) #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[V]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: (%T* nocapture nofree readonly [[P:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[V:%.*]] = musttail call i32 @test(%T* nocapture nofree readonly [[P]]) #[[ATTR5:[0-9]+]]
+; 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 norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) #[[ATTR1:[0-9]+]] {
+; 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:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (%T* nocapture nofree readnone [[P:%.*]], i32 [[V:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: ret i32 0
;
ret i32 0
}
define internal i32 @test2(%T* %p, i32 %p2) {
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2
-; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR1]] {
-; 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 noundef i32 @foo(%T* undef, i32 [[V]]) #[[ATTR6:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[CA]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test2
+; CGSCC-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3
+; CGSCC-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* [[P]], i64 0, i32 2
+; CGSCC-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4
+; CGSCC-NEXT: [[B:%.*]] = load i32, i32* [[B_GEP]], align 4
+; CGSCC-NEXT: [[V:%.*]] = add i32 [[A]], [[B]]
+; CGSCC-NEXT: [[CA:%.*]] = musttail call noundef i32 @foo(%T* undef, i32 [[V]]) #[[ATTR6:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[CA]]
;
%a.gep = getelementptr %T, %T* %p, i64 0, i32 3
%b.gep = getelementptr %T, %T* %p, i64 0, i32 2
}
define i32 @caller2(%T* %g) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2
-; IS__TUNIT____-SAME: (%T* nocapture nofree readnone [[G:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller2
+; TUNIT-SAME: (%T* nocapture nofree readnone [[G:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2
-; IS__CGSCC____-SAME: (%T* nocapture nofree readonly align 4 [[G:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[V:%.*]] = call noundef i32 @test2(%T* nocapture nofree readonly [[G]], i32 noundef 0) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i32 [[V]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller2
+; CGSCC-SAME: (%T* nocapture nofree readonly align 4 [[G:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[V:%.*]] = call noundef i32 @test2(%T* nocapture nofree readonly [[G]], i32 noundef 0) #[[ATTR5]]
+; CGSCC-NEXT: ret i32 [[V]]
;
%v = call i32 @test2(%T* %g, i32 0)
ret i32 %v
; is kept as well.
define i32 @bar(%T* %p, i32 %v) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@bar
-; 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
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@bar
+; TUNIT-SAME: (%T* nocapture nofree nonnull writeonly dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: [[I32PTR:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 0
+; TUNIT-NEXT: store i32 [[V]], i32* [[I32PTR]], align 4
+; 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:%.*]]) #[[ATTR3:[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
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@bar
+; CGSCC-SAME: (%T* nocapture nofree nonnull writeonly dereferenceable(4) [[P:%.*]], i32 [[V:%.*]]) #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: [[I32PTR:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 0
+; CGSCC-NEXT: store i32 [[V]], i32* [[I32PTR]], align 4
+; CGSCC-NEXT: ret i32 0
;
%i32ptr = getelementptr %T, %T* %p, i64 0, i32 0
store i32 %v, i32* %i32ptr
}
define internal i32 @test2b(%T* %p, i32 %p2) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2b
-; 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 noundef i32 @bar(%T* undef, i32 [[V]]) #[[ATTR5:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[CA]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test2b
+; TUNIT-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3
+; TUNIT-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* [[P]], i64 0, i32 2
+; TUNIT-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4
+; TUNIT-NEXT: [[B:%.*]] = load i32, i32* [[B_GEP]], align 4
+; TUNIT-NEXT: [[V:%.*]] = add i32 [[A]], [[B]]
+; TUNIT-NEXT: [[CA:%.*]] = musttail call noundef i32 @bar(%T* undef, i32 [[V]]) #[[ATTR5:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[CA]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2b
-; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR4:[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 noundef i32 @bar(%T* undef, i32 [[V]]) #[[ATTR7:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[CA]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test2b
+; CGSCC-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* [[P]], i64 0, i32 3
+; CGSCC-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* [[P]], i64 0, i32 2
+; CGSCC-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4
+; CGSCC-NEXT: [[B:%.*]] = load i32, i32* [[B_GEP]], align 4
+; CGSCC-NEXT: [[V:%.*]] = add i32 [[A]], [[B]]
+; CGSCC-NEXT: [[CA:%.*]] = musttail call noundef i32 @bar(%T* undef, i32 [[V]]) #[[ATTR7:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[CA]]
;
%a.gep = getelementptr %T, %T* %p, i64 0, i32 3
%b.gep = getelementptr %T, %T* %p, i64 0, i32 2
}
define i32 @caller2b(%T* %g) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2b
-; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[G:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[V:%.*]] = call noundef i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) #[[ATTR6:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[V]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller2b
+; TUNIT-SAME: (%T* nocapture nofree readonly [[G:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[V:%.*]] = call noundef i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) #[[ATTR6:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[V]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2b
-; IS__CGSCC____-SAME: (%T* nocapture nofree readonly align 4 [[G:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: [[V:%.*]] = call noundef i32 @test2b(%T* nocapture nofree readonly [[G]], i32 noundef 0) #[[ATTR8:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[V]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller2b
+; CGSCC-SAME: (%T* nocapture nofree readonly align 4 [[G:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: [[V:%.*]] = call noundef i32 @test2b(%T* nocapture nofree readonly [[G]], i32 noundef 0) #[[ATTR8:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[V]]
;
%v = call i32 @test2b(%T* %g, i32 0)
ret i32 %v
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree norecurse 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 }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR4]] = { nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR5]] = { readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR6]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR7]] = { nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR8]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR5]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR6]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR7]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR8]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Don't promote paramaters of/arguments to naked functions
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; ArgumentPromotion should preserve the default function address space
; from the data layout.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target triple = "x86_64-pc-windows-msvc"
define internal void @callee(i8*) {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; PR 32917
@b = 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 norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2
-; 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]]) #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 undef
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@fn2
+; TUNIT-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* @b, align 4
+; TUNIT-NEXT: [[TMP2:%.*]] = sext i32 [[TMP1]] to i64
+; TUNIT-NEXT: [[TMP3:%.*]] = inttoptr i64 [[TMP2]] to i32*
+; TUNIT-NEXT: call fastcc void @fn1(i32* nocapture nofree readonly align 4 [[TMP3]]) #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret i32 undef
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2
-; 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]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 undef
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fn2
+; CGSCC-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* @b, align 4
+; CGSCC-NEXT: [[TMP2:%.*]] = sext i32 [[TMP1]] to i64
+; CGSCC-NEXT: [[TMP3:%.*]] = inttoptr i64 [[TMP2]] to i32*
+; CGSCC-NEXT: call fastcc void @fn1(i32* nocapture nofree nonnull readonly align 4 [[TMP3]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 undef
;
%1 = load i32, i32* @b, align 4
%2 = sext i32 %1 to i64
}
define internal fastcc void @fn1(i32* nocapture readonly) unnamed_addr {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn1
-; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 [[TMP0:%.*]]) unnamed_addr #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 -1
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__TUNIT____-NEXT: store i32 [[TMP3]], i32* @a, align 4
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@fn1
+; TUNIT-SAME: (i32* nocapture nofree nonnull readonly align 4 [[TMP0:%.*]]) unnamed_addr #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 -1
+; TUNIT-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
+; TUNIT-NEXT: store i32 [[TMP3]], i32* @a, align 4
+; TUNIT-NEXT: ret void
;
-; 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 #[[ATTR1:[0-9]+]] {
-; 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
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fn1
+; CGSCC-SAME: (i32* nocapture nofree nonnull readonly align 4 [[TMP0:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 -1
+; CGSCC-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
+; CGSCC-NEXT: store i32 [[TMP3]], i32* @a, align 4
+; CGSCC-NEXT: ret void
;
%2 = getelementptr inbounds i32, i32* %0, i64 -1
%3 = load i32, i32* %2, align 4
ret void
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Fix for PR33641. ArgumentPromotion removed the argument to bar but left the call to
; dbg.value which still used the removed argument.
}
define internal void @bar(%p_t %p) {
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC_NPM-SAME: (i16* nocapture nofree readnone [[P:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], metadata [[META3:![0-9]+]], metadata !DIExpression()) #[[ATTR2:[0-9]+]], !dbg [[DBG5:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@bar
+; CGSCC-SAME: (i16* nocapture nofree readnone [[P:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], metadata [[META3:![0-9]+]], metadata !DIExpression()) #[[ATTR2:[0-9]+]], !dbg [[DBG5:![0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @llvm.dbg.value(metadata %p_t %p, metadata !4, metadata !5), !dbg !6
ret void
!5 = !DIExpression()
!6 = !DILocation(line: 1, column: 1, scope: !3)
;.
-; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
-; IS__TUNIT____: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
-; IS__TUNIT____: [[META1:![0-9]+]] = !DIFile(filename: "test.c", directory: "")
-; IS__TUNIT____: [[META2:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; TUNIT: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
+; TUNIT: [[META1:![0-9]+]] = !DIFile(filename: "test.c", directory: "")
+; TUNIT: [[META2:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
;.
-; IS__CGSCC____: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
-; IS__CGSCC____: [[META1:![0-9]+]] = !DIFile(filename: "test.c", directory: "")
-; IS__CGSCC____: [[META2:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
-; IS__CGSCC____: [[META3:![0-9]+]] = !DILocalVariable(name: "p", scope: !4)
-; IS__CGSCC____: [[META4:![0-9]+]] = distinct !DISubprogram(name: "bar", scope: null, spFlags: DISPFlagDefinition, unit: !0)
-; IS__CGSCC____: [[META5:![0-9]+]] = !DILocation(line: 1, column: 1, scope: !4)
+; CGSCC: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
+; CGSCC: [[META1:![0-9]+]] = !DIFile(filename: "test.c", directory: "")
+; CGSCC: [[META2:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CGSCC: [[META3:![0-9]+]] = !DILocalVariable(name: "p", scope: !4)
+; CGSCC: [[META4:![0-9]+]] = distinct !DISubprogram(name: "bar", scope: null, spFlags: DISPFlagDefinition, unit: !0)
+; CGSCC: [[META5:![0-9]+]] = !DILocation(line: 1, column: 1, scope: !4)
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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__TUNIT_NPM-LABEL: define {{[^@]+}}@caller() {
-; IS__TUNIT_NPM-NEXT: [[X:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[X]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[X]], align 4
-; IS__TUNIT_NPM-NEXT: call void @promote_i32_ptr(i32 [[TMP1]]), !prof [[PROF0:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@caller() {
+; TUNIT-NEXT: [[X:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 42, i32* [[X]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[X]], align 4
+; TUNIT-NEXT: call void @promote_i32_ptr(i32 [[TMP1]]), !prof [[PROF0:![0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller() {
-; IS__CGSCC_NPM-NEXT: call void @promote_i32_ptr(i32 noundef 42), !prof [[PROF0:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@caller() {
+; CGSCC-NEXT: call void @promote_i32_ptr(i32 noundef 42), !prof [[PROF0:![0-9]+]]
+; CGSCC-NEXT: ret void
;
%x = alloca i32
store i32 42, i32* %x
}
define internal void @promote_i32_ptr(i32* %xp) {
-; IS________NPM-LABEL: define {{[^@]+}}@promote_i32_ptr
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS________NPM-NEXT: [[XP_PRIV:%.*]] = alloca i32, align 4
-; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[XP_PRIV]], align 4
-; IS________NPM-NEXT: [[X:%.*]] = load i32, i32* [[XP_PRIV]], align 4
-; IS________NPM-NEXT: call void @use_i32(i32 [[X]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@promote_i32_ptr
+; CHECK-SAME: (i32 [[TMP0:%.*]]) {
+; CHECK-NEXT: [[XP_PRIV:%.*]] = alloca i32, align 4
+; CHECK-NEXT: store i32 [[TMP0]], i32* [[XP_PRIV]], align 4
+; CHECK-NEXT: [[X:%.*]] = load i32, i32* [[XP_PRIV]], align 4
+; CHECK-NEXT: call void @use_i32(i32 [[X]])
+; CHECK-NEXT: ret void
;
%x = load i32, i32* %xp
call void @use_i32(i32 %x)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; PR17906
; When we promote two arguments in a single function with different types,
}
define i32 @main() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@main
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; 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() #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@main
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32**, i32*** @e, align 8, !tbaa [[TBAA5:![0-9]+]]
+; TUNIT-NEXT: store i32* @g, i32** [[TMP0]], align 8, !tbaa [[TBAA5]]
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32*, i32** @a, align 8, !tbaa [[TBAA5]]
+; TUNIT-NEXT: store i32 1, i32* [[TMP1]], align 4, !tbaa [[TBAA0]]
+; TUNIT-NEXT: call fastcc void @fn() #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@main
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; 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() #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@main
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32**, i32*** @e, align 8, !tbaa [[TBAA5:![0-9]+]]
+; CGSCC-NEXT: store i32* @g, i32** [[TMP0]], align 8, !tbaa [[TBAA5]]
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32*, i32** @a, align 8, !tbaa [[TBAA5]]
+; CGSCC-NEXT: store i32 1, i32* [[TMP1]], align 4, !tbaa [[TBAA0]]
+; CGSCC-NEXT: call fastcc void @fn() #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 0
;
entry:
%0 = load i32**, i32*** @e, align 8, !tbaa !8
!9 = !{!"any pointer", !3, i64 0}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nounwind willreturn }
;.
; CHECK: [[TBAA0]] = !{!1, !1, i64 0}
; CHECK: [[META1:![0-9]+]] = !{!"int", !2, i64 0}
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@add
-; IS__TUNIT____-SAME: ({ i32, i32 }* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: store i32 undef, i32* [[R]], align 4
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@add
+; TUNIT-SAME: ({ i32, i32 }* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: store i32 undef, i32* [[R]], align 4
+; TUNIT-NEXT: ret void
;
-; 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:[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 4
-; IS__CGSCC_NPM-NEXT: [[B:%.*]] = load i32, i32* [[BP]], align 4
-; IS__CGSCC_NPM-NEXT: [[AB:%.*]] = add i32 [[A]], [[B]]
-; IS__CGSCC_NPM-NEXT: store i32 [[AB]], i32* [[R]], align 4
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@add
+; CGSCC-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]+]] {
+; CGSCC-NEXT: [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0
+; CGSCC-NEXT: [[BP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 1
+; CGSCC-NEXT: [[A:%.*]] = load i32, i32* [[AP]], align 4
+; CGSCC-NEXT: [[B:%.*]] = load i32, i32* [[BP]], align 4
+; CGSCC-NEXT: [[AB:%.*]] = add i32 [[A]], [[B]]
+; CGSCC-NEXT: store i32 [[AB]], i32* [[R]], align 4
+; CGSCC-NEXT: ret void
;
%ap = getelementptr {i32, i32}, {i32, i32}* %this, i32 0, i32 0
%bp = getelementptr {i32, i32}, {i32, i32}* %this, i32 0, i32 1
}
define void @f() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@f
-; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[R:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: call void @add({ i32, i32 }* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) undef, i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R]]) #[[ATTR2:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@f
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: [[R:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: call void @add({ i32, i32 }* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) undef, i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R]]) #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f
-; 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:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[R:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[PAIR:%.*]] = alloca { i32, i32 }, align 8
+; CGSCC-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]+]]
+; CGSCC-NEXT: ret void
;
%r = alloca i32
%pair = alloca {i32, i32}
ret void
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; PR14710
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
declare i8* @foo(%pair*)
define internal void @bar(%pair* byval(%pair) %Data) {
-; IS________NPM-LABEL: define {{[^@]+}}@bar
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
-; IS________NPM-NEXT: [[DATA_PRIV:%.*]] = alloca [[PAIR:%.*]], align 8
-; IS________NPM-NEXT: [[DATA_PRIV_CAST:%.*]] = bitcast %pair* [[DATA_PRIV]] to i32*
-; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[DATA_PRIV_CAST]], align 4
-; IS________NPM-NEXT: [[DATA_PRIV_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA_PRIV]], i64 0, i32 1
-; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[DATA_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[TMP3:%.*]] = call i8* @foo(%pair* nonnull dereferenceable(8) [[DATA_PRIV]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@bar
+; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
+; CHECK-NEXT: [[DATA_PRIV:%.*]] = alloca [[PAIR:%.*]], align 8
+; CHECK-NEXT: [[DATA_PRIV_CAST:%.*]] = bitcast %pair* [[DATA_PRIV]] to i32*
+; CHECK-NEXT: store i32 [[TMP0]], i32* [[DATA_PRIV_CAST]], align 4
+; CHECK-NEXT: [[DATA_PRIV_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA_PRIV]], i64 0, i32 1
+; CHECK-NEXT: store i32 [[TMP1]], i32* [[DATA_PRIV_0_1]], align 4
+; CHECK-NEXT: [[TMP3:%.*]] = call i8* @foo(%pair* nonnull dereferenceable(8) [[DATA_PRIV]])
+; CHECK-NEXT: ret void
;
tail call i8* @foo(%pair* %Data)
ret void
}
define void @zed(%pair* byval(%pair) %Data) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@zed
-; IS__TUNIT_NPM-SAME: (%pair* noalias nocapture nonnull readonly byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) {
-; IS__TUNIT_NPM-NEXT: [[DATA_CAST:%.*]] = bitcast %pair* [[DATA]] to i32*
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[DATA_CAST]], align 1
-; IS__TUNIT_NPM-NEXT: [[DATA_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[DATA_0_1]], align 1
-; IS__TUNIT_NPM-NEXT: call void @bar(i32 [[TMP1]], i32 [[TMP2]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@zed
+; TUNIT-SAME: (%pair* noalias nocapture nonnull readonly byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) {
+; TUNIT-NEXT: [[DATA_CAST:%.*]] = bitcast %pair* [[DATA]] to i32*
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[DATA_CAST]], align 1
+; TUNIT-NEXT: [[DATA_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA]], i64 0, i32 1
+; TUNIT-NEXT: [[TMP2:%.*]] = load i32, i32* [[DATA_0_1]], align 1
+; TUNIT-NEXT: call void @bar(i32 [[TMP1]], i32 [[TMP2]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@zed
-; IS__CGSCC_NPM-SAME: (%pair* noalias nocapture nofree nonnull readonly byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) {
-; IS__CGSCC_NPM-NEXT: [[DATA_CAST:%.*]] = bitcast %pair* [[DATA]] to i32*
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[DATA_CAST]], align 1
-; IS__CGSCC_NPM-NEXT: [[DATA_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[DATA_0_1]], align 1
-; IS__CGSCC_NPM-NEXT: call void @bar(i32 [[TMP1]], i32 [[TMP2]])
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@zed
+; CGSCC-SAME: (%pair* noalias nocapture nofree nonnull readonly byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) {
+; CGSCC-NEXT: [[DATA_CAST:%.*]] = bitcast %pair* [[DATA]] to i32*
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* [[DATA_CAST]], align 1
+; CGSCC-NEXT: [[DATA_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA]], i64 0, i32 1
+; CGSCC-NEXT: [[TMP2:%.*]] = load i32, i32* [[DATA_0_1]], align 1
+; CGSCC-NEXT: call void @bar(i32 [[TMP1]], i32 [[TMP2]])
+; CGSCC-NEXT: ret void
;
call void @bar(%pair* byval(%pair) %Data)
ret void
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Unused arguments from variadic functions cannot be eliminated as that changes
; their classiciation according to the SysV amd64 ABI. Clang and other frontends
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Should not propagate the result of a weak function.
; PR2411
}
define i32 @main() nounwind {
-; IS__TUNIT____: Function Attrs: norecurse nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@main
-; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i32 @foo() #[[ATTR0]]
-; IS__TUNIT____-NEXT: ret i32 [[R]]
+; TUNIT: Function Attrs: norecurse nounwind
+; TUNIT-LABEL: define {{[^@]+}}@main
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[R:%.*]] = call i32 @foo() #[[ATTR0]]
+; TUNIT-NEXT: ret i32 [[R]]
;
-; IS__CGSCC____: Function Attrs: nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@main
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i32 @foo() #[[ATTR0]]
-; IS__CGSCC____-NEXT: ret i32 [[R]]
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@main
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[R:%.*]] = call i32 @foo() #[[ATTR0]]
+; CGSCC-NEXT: ret i32 [[R]]
;
entry:
%r = call i32 @foo( ) nounwind
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nounwind }
-; IS__TUNIT____: attributes #[[ATTR1]] = { norecurse nounwind }
+; TUNIT: attributes #[[ATTR0]] = { nounwind }
+; TUNIT: attributes #[[ATTR1]] = { norecurse nounwind }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nounwind }
+; CGSCC: attributes #[[ATTR0]] = { nounwind }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Don't constant-propagate byval pointers, since they are not pointers!
; PR5038
; 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________NPM: Function Attrs: nounwind
-; IS________NPM-LABEL: define {{[^@]+}}@vfu1
-; IS________NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS________NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS________NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
-; IS________NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS________NPM-NEXT: store i32 99, i32* [[TMP2]], align 4
-; IS________NPM-NEXT: [[TMP3:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT: store i8 97, i8* [[TMP3]], align 4
-; IS________NPM-NEXT: [[L:%.*]] = load i8, i8* [[TMP3]], align 4
-; IS________NPM-NEXT: call void @use(i8 [[L]])
-; IS________NPM-NEXT: br label [[RETURN:%.*]]
-; IS________NPM: return:
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: nounwind
+; CHECK-LABEL: define {{[^@]+}}@vfu1
+; CHECK-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
+; CHECK-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
+; CHECK-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
+; CHECK-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
+; CHECK-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
+; CHECK-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
+; CHECK-NEXT: store i32 99, i32* [[TMP2]], align 4
+; CHECK-NEXT: [[TMP3:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
+; CHECK-NEXT: store i8 97, i8* [[TMP3]], align 4
+; CHECK-NEXT: [[L:%.*]] = load i8, i8* [[TMP3]], align 4
+; CHECK-NEXT: call void @use(i8 [[L]])
+; CHECK-NEXT: br label [[RETURN:%.*]]
+; CHECK: return:
+; CHECK-NEXT: ret void
;
entry:
%0 = getelementptr %struct.MYstr, %struct.MYstr* %u, i32 0, i32 1 ; <i32*> [#uses=1]
}
define internal i32 @vfu2(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounwind readonly {
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@vfu2
-; IS________NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS________NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS________NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
-; IS________NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS________NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS________NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 4
-; IS________NPM-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
-; IS________NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
-; IS________NPM-NEXT: ret i32 [[TMP7]]
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CHECK-LABEL: define {{[^@]+}}@vfu2
+; CHECK-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
+; CHECK-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
+; CHECK-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
+; CHECK-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
+; CHECK-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
+; CHECK-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
+; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
+; CHECK-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 4
+; CHECK-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
+; CHECK-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
+; CHECK-NEXT: ret i32 [[TMP7]]
;
entry:
%0 = getelementptr %struct.MYstr, %struct.MYstr* %u, i32 0, i32 1 ; <i32*> [#uses=1]
}
define i32 @unions() nounwind {
-; IS__TUNIT_NPM: Function Attrs: nounwind
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions
-; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
-; 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, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
-; IS__TUNIT_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
-; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
-; IS__TUNIT_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
-; IS__TUNIT_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR2:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RESULT]]
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@unions
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[MYSTR_CAST:%.*]] = bitcast %struct.MYstr* @mystr to i8*
+; TUNIT-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8
+; TUNIT-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i64 0, i32 1
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; TUNIT-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
+; TUNIT-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
+; TUNIT-NEXT: [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
+; TUNIT-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
+; TUNIT-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
+; TUNIT-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[RESULT]]
;
-; IS__CGSCC_NPM: Function Attrs: nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@unions
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* getelementptr inbounds ([[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i32 0, i32 0), align 8
-; IS__CGSCC_NPM-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
-; IS__CGSCC_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i8, i8* getelementptr inbounds ([[STRUCT_MYSTR]], %struct.MYstr* @mystr, i32 0, i32 0), align 8
-; IS__CGSCC_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
-; IS__CGSCC_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR0]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RESULT]]
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@unions
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i8, i8* getelementptr inbounds ([[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i32 0, i32 0), align 8
+; CGSCC-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; CGSCC-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
+; CGSCC-NEXT: [[TMP2:%.*]] = load i8, i8* getelementptr inbounds ([[STRUCT_MYSTR]], %struct.MYstr* @mystr, i32 0, i32 0), align 8
+; CGSCC-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
+; CGSCC-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
+; CGSCC-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR0]]
+; CGSCC-NEXT: ret i32 [[RESULT]]
;
entry:
call void @vfu1(%struct.MYstr* byval(%struct.MYstr) align 4 @mystr) nounwind
}
define internal i32 @vfu2_v2(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounwind readonly {
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@vfu2_v2
-; IS________NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS________NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS________NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
-; IS________NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
-; IS________NPM-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS________NPM-NEXT: store i32 99, i32* [[Z]], align 4
-; IS________NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS________NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS________NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 4
-; IS________NPM-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
-; IS________NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
-; IS________NPM-NEXT: ret i32 [[TMP7]]
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CHECK-LABEL: define {{[^@]+}}@vfu2_v2
+; CHECK-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
+; CHECK-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
+; CHECK-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
+; CHECK-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
+; CHECK-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
+; CHECK-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
+; CHECK-NEXT: store i32 99, i32* [[Z]], align 4
+; CHECK-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
+; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
+; CHECK-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 4
+; CHECK-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
+; CHECK-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
+; CHECK-NEXT: ret i32 [[TMP7]]
;
entry:
%z = getelementptr %struct.MYstr, %struct.MYstr* %u, i32 0, i32 1
}
define i32 @unions_v2() nounwind {
-; IS__TUNIT_NPM: Function Attrs: nounwind
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions_v2
-; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
-; 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, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
-; IS__TUNIT_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
-; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
-; IS__TUNIT_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
-; IS__TUNIT_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR2]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RESULT]]
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@unions_v2
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[MYSTR_CAST:%.*]] = bitcast %struct.MYstr* @mystr to i8*
+; TUNIT-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8
+; TUNIT-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i64 0, i32 1
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; TUNIT-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
+; TUNIT-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
+; TUNIT-NEXT: [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
+; TUNIT-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
+; TUNIT-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
+; TUNIT-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR2]]
+; TUNIT-NEXT: ret i32 [[RESULT]]
;
-; IS__CGSCC_NPM: Function Attrs: nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@unions_v2
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: call void @vfu1(i8 noundef 0, i32 noundef 0) #[[ATTR0]]
-; IS__CGSCC_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 noundef 0, i32 noundef 0) #[[ATTR0]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RESULT]]
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@unions_v2
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @vfu1(i8 noundef 0, i32 noundef 0) #[[ATTR0]]
+; CGSCC-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 noundef 0, i32 noundef 0) #[[ATTR0]]
+; CGSCC-NEXT: ret i32 [[RESULT]]
;
entry:
call void @vfu1(%struct.MYstr* byval(%struct.MYstr) align 4 @mystr) nounwind
ret i32 %result
}
;.
-; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { nounwind }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nounwind readonly }
+; TUNIT: attributes #[[ATTR0:[0-9]+]] = { nounwind }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR2:[0-9]+]] = { nounwind readonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { nounwind }
-; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { nounwind }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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 norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i64 undef
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@fn2
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i64 undef
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2
-; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CONV:%.*]] = sext i32 undef to i64
-; IS__CGSCC____-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]]
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i64 [[CALL2]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fn2
+; CGSCC-SAME: () #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CONV:%.*]] = sext i32 undef to i64
+; CGSCC-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]]
+; CGSCC-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i64 [[CALL2]]
;
entry:
%conv = sext i32 undef to i64
define i64 @fn2b(i32 %arg) {
;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2b
-; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64
-; IS__TUNIT____-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]]
-; IS__TUNIT____-NEXT: ret i64 [[DIV]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@fn2b
+; TUNIT-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64
+; TUNIT-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]]
+; TUNIT-NEXT: ret i64 [[DIV]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2b
-; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] {
-; 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]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT: ret i64 [[CALL2]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fn2b
+; CGSCC-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64
+; CGSCC-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]]
+; CGSCC-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]]) #[[ATTR2]]
+; CGSCC-NEXT: ret i64 [[CALL2]]
;
entry:
%conv = sext i32 %arg to i64
}
define i64 @fn2c() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2c
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i64 42
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@fn2c
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i64 42
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2c
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CONV:%.*]] = sext i32 undef to i64
-; IS__CGSCC____-NEXT: [[ADD:%.*]] = add i64 42, [[CONV]]
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[ADD]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT: ret i64 [[CALL2]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fn2c
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CONV:%.*]] = sext i32 undef to i64
+; CGSCC-NEXT: [[ADD:%.*]] = add i64 42, [[CONV]]
+; CGSCC-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[ADD]]) #[[ATTR2]]
+; CGSCC-NEXT: ret i64 [[CALL2]]
;
entry:
%conv = sext i32 undef to i64
}
define internal i64 @fn1(i64 %p1) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1
-; IS__CGSCC____-SAME: (i64 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i64 [[P1]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fn1
+; CGSCC-SAME: (i64 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i64 [[P1]]
;
entry:
%tobool = icmp ne i64 %p1, 0
ret i64 %cond
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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 norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2
-; 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:
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
-; 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: store i32 [[TMP0]], i32* [[P]], align 4
-; IS__TUNIT____-NEXT: br label [[FOR_COND1]]
-; IS__TUNIT____: exit:
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@fn2
+; TUNIT-SAME: (i32* nocapture nofree [[P:%.*]], i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[IF_END:%.*]]
+; TUNIT: for.cond1:
+; TUNIT-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[E_2:%.*]] = phi i32* [ [[P]], [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[E_2]], align 4
+; TUNIT-NEXT: store i32 [[TMP0]], i32* [[P]], align 4
+; TUNIT-NEXT: br label [[FOR_COND1]]
+; TUNIT: exit:
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2
-; 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:
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[E_2:%.*]] = phi i32* [ [[P]], [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[E_2]], align 4
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @fn1(i32 [[TMP0]])
-; IS__CGSCC____-NEXT: store i32 [[CALL]], i32* [[P]], align 4
-; IS__CGSCC____-NEXT: br label [[FOR_COND1]]
-; IS__CGSCC____: exit:
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@fn2
+; CGSCC-SAME: (i32* nocapture nofree nonnull align 4 dereferenceable(4) [[P:%.*]], i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[IF_END:%.*]]
+; CGSCC: for.cond1:
+; CGSCC-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[E_2:%.*]] = phi i32* [ [[P]], [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[E_2]], align 4
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @fn1(i32 [[TMP0]])
+; CGSCC-NEXT: store i32 [[CALL]], i32* [[P]], align 4
+; CGSCC-NEXT: br label [[FOR_COND1]]
+; CGSCC: exit:
+; CGSCC-NEXT: ret void
;
entry:
br label %if.end
}
define internal i32 @fn1(i32 %p1) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1
-; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 [[P1]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fn1
+; CGSCC-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i32 [[P1]]
;
entry:
%tobool = icmp ne i32 %p1, 0
define void @fn_no_null_opt(i32* %P, i1 %C) null_pointer_is_valid {
;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn_no_null_opt
-; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: br label [[IF_END:%.*]]
-; IS__TUNIT____: for.cond1:
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
-; 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 4294967296
-; IS__TUNIT____-NEXT: store i32 [[TMP0]], i32* [[P]], align 4
-; IS__TUNIT____-NEXT: br label [[FOR_COND1]]
-; IS__TUNIT____: exit:
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid
+; TUNIT-LABEL: define {{[^@]+}}@fn_no_null_opt
+; TUNIT-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[IF_END:%.*]]
+; TUNIT: for.cond1:
+; TUNIT-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* null, align 4294967296
+; TUNIT-NEXT: store i32 [[TMP0]], i32* [[P]], align 4
+; TUNIT-NEXT: br label [[FOR_COND1]]
+; TUNIT: exit:
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree 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:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br label [[IF_END:%.*]]
-; IS__CGSCC____: for.cond1:
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* null, align 4294967296
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @fn0(i32 [[TMP0]])
-; IS__CGSCC____-NEXT: store i32 [[CALL]], i32* [[P]], align 4
-; IS__CGSCC____-NEXT: br label [[FOR_COND1]]
-; IS__CGSCC____: exit:
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind null_pointer_is_valid
+; CGSCC-LABEL: define {{[^@]+}}@fn_no_null_opt
+; CGSCC-SAME: (i32* nocapture nofree writeonly align 4 dereferenceable_or_null(4) [[P:%.*]], i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[IF_END:%.*]]
+; CGSCC: for.cond1:
+; CGSCC-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* null, align 4294967296
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @fn0(i32 [[TMP0]])
+; CGSCC-NEXT: store i32 [[CALL]], i32* [[P]], align 4
+; CGSCC-NEXT: br label [[FOR_COND1]]
+; CGSCC: exit:
+; CGSCC-NEXT: ret void
;
entry:
br label %if.end
}
define internal i32 @fn0(i32 %p1) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn0
-; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 [[P1]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fn0
+; CGSCC-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i32 [[P1]]
;
entry:
%tobool = icmp ne i32 %p1, 0
ret i32 %cond
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind null_pointer_is_valid }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind null_pointer_is_valid }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind null_pointer_is_valid }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind null_pointer_is_valid }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
%struct.wobble = type { i32 }
%struct.zot = type { %struct.wobble, %struct.wobble, %struct.wobble }
}
define void @baz(<8 x i32> %arg) local_unnamed_addr {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@baz
-; IS__TUNIT____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0]] {
-; IS__TUNIT____-NEXT: bb:
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = extractvalue [[STRUCT_ZOT:%.*]] undef, 0, 0
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@baz
+; TUNIT-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP1:%.*]] = extractvalue [[STRUCT_ZOT:%.*]] undef, 0, 0
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@baz
-; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: bb:
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@baz
+; CGSCC-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: ret void
;
bb:
%tmp = call %struct.zot @widget(<8 x i32> %arg)
ret void
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; The original C source looked like this:
;
; FIXME we should recognize this as UB and make it an unreachable.
define dso_local i16 @foo(i16 %a) {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16)*)(i16 [[A]])
-; IS__TUNIT____-NEXT: ret i16 [[CALL]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16)*)(i16 [[A]])
-; IS__CGSCC_NPM-NEXT: ret i16 [[CALL]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16)*)(i16 [[A]])
+; TUNIT-NEXT: ret i16 [[CALL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16)*)(i16 [[A]])
+; CGSCC-NEXT: ret i16 [[CALL]]
;
%call = call i16 bitcast (i16 (i16, i16) * @bar to i16 (i16) *)(i16 %a)
ret i16 %call
}
define internal i16 @bar(i16 %p1, i16 %p2) {
-; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@bar
-; NOT_CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR1:[0-9]+]] {
-; NOT_CGSCC_OPM-NEXT: ret i16 0
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@bar
+; CHECK-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR1:[0-9]+]] {
+; CHECK-NEXT: ret i16 0
;
ret i16 0
}
define dso_local i16 @foo2(i16 %a) {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo2
-; IS__TUNIT____-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar2 to i16 (i16)*)(i16 [[A]])
-; IS__TUNIT____-NEXT: ret i16 [[CALL]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo2
-; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar2 to i16 (i16)*)(i16 [[A]])
-; IS__CGSCC_NPM-NEXT: ret i16 [[CALL]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@foo2
+; TUNIT-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar2 to i16 (i16)*)(i16 [[A]])
+; TUNIT-NEXT: ret i16 [[CALL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@foo2
+; CGSCC-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar2 to i16 (i16)*)(i16 [[A]])
+; CGSCC-NEXT: ret i16 [[CALL]]
;
%call = call i16 bitcast (i16 (i16, i16) * @bar2 to i16 (i16) *)(i16 %a)
ret i16 %call
}
define internal i16 @bar2(i16 %p1, i16 %p2) {
-; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@bar2
-; NOT_CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR1]] {
-; NOT_CGSCC_OPM-NEXT: [[A:%.*]] = add i16 [[P1]], [[P2]]
-; NOT_CGSCC_OPM-NEXT: ret i16 [[A]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@bar2
+; CHECK-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: [[A:%.*]] = add i16 [[P1]], [[P2]]
+; CHECK-NEXT: ret i16 [[A]]
;
%a = add i16 %p1, %p2
ret i16 %a
; been provided),
define dso_local i16 @vararg_tests(i16 %a) {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@vararg_tests
-; IS__TUNIT____-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 noundef 7)
-; IS__TUNIT____-NEXT: [[ADD:%.*]] = add i16 7, [[CALL2]]
-; IS__TUNIT____-NEXT: ret i16 [[ADD]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vararg_tests
-; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i16 (i16, ...) @vararg_prop(i16 noundef 7, i16 noundef 8, i16 [[A]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 7)
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i16 [[CALL1]], [[CALL2]]
-; IS__CGSCC_NPM-NEXT: ret i16 [[ADD]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@vararg_tests
+; TUNIT-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 noundef 7)
+; TUNIT-NEXT: [[ADD:%.*]] = add i16 7, [[CALL2]]
+; TUNIT-NEXT: ret i16 [[ADD]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@vararg_tests
+; CGSCC-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: [[CALL1:%.*]] = call i16 (i16, ...) @vararg_prop(i16 noundef 7, i16 noundef 8, i16 [[A]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 7)
+; CGSCC-NEXT: [[ADD:%.*]] = add i16 [[CALL1]], [[CALL2]]
+; CGSCC-NEXT: ret i16 [[ADD]]
;
%call1 = call i16 (i16, ...) @vararg_prop(i16 7, i16 8, i16 %a)
%call2 = call i16 bitcast (i16 (i16, i16, ...) * @vararg_no_prop to i16 (i16) *) (i16 7)
}
define internal i16 @vararg_prop(i16 %p1, ...) {
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vararg_prop
-; IS__CGSCC_NPM-SAME: (i16 [[P1:%.*]], ...) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: ret i16 7
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@vararg_prop
+; CGSCC-SAME: (i16 [[P1:%.*]], ...) #[[ATTR1]] {
+; CGSCC-NEXT: ret i16 7
;
ret i16 %p1
}
define internal i16 @vararg_no_prop(i16 %p1, i16 %p2, ...) {
-; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@vararg_no_prop
-; NOT_CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]], ...) #[[ATTR1]] {
-; NOT_CGSCC_OPM-NEXT: ret i16 7
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@vararg_no_prop
+; CHECK-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]], ...) #[[ATTR1]] {
+; CHECK-NEXT: ret i16 7
;
ret i16 %p1
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { norecurse }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { norecurse }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; 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) {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16, i32)*)(i16 [[A]], i32 7)
-; IS__TUNIT____-NEXT: ret i16 [[CALL]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16, i32)*)(i16 [[A]], i32 7)
+; TUNIT-NEXT: ret i16 [[CALL]]
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16, i32)*)(i16 [[A]], i32 7)
-; IS__CGSCC_NPM-NEXT: ret i16 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16, i32)*)(i16 [[A]], i32 7)
+; CGSCC-NEXT: ret i16 [[CALL]]
;
%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) {
-; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@bar
-; NOT_CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 returned [[P2:%.*]]) #[[ATTR1:[0-9]+]] {
-; NOT_CGSCC_OPM-NEXT: ret i16 [[P2]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@bar
+; CHECK-SAME: (i16 [[P1:%.*]], i16 returned [[P2:%.*]]) #[[ATTR1:[0-9]+]] {
+; CHECK-NEXT: ret i16 [[P2]]
;
ret i16 %p2
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { norecurse }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { norecurse }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; See PR26774
; constprop @foo's return value into bar.
define linkonce_odr i32 @foo() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo() {
-; IS__TUNIT____-NEXT: ret i32 10
+; TUNIT-LABEL: define {{[^@]+}}@foo() {
+; TUNIT-NEXT: ret i32 10
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo() {
-; IS__CGSCC____-NEXT: [[VAL:%.*]] = call i32 @baz()
-; IS__CGSCC____-NEXT: ret i32 [[VAL]]
+; CGSCC-LABEL: define {{[^@]+}}@foo() {
+; CGSCC-NEXT: [[VAL:%.*]] = call i32 @baz()
+; CGSCC-NEXT: ret i32 [[VAL]]
;
%val = call i32 @baz()
}
define i32 @bar() {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@bar
-; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[VAL:%.*]] = call i32 @foo()
-; IS__TUNIT____-NEXT: ret i32 [[VAL]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@bar
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: [[VAL:%.*]] = call i32 @foo()
+; TUNIT-NEXT: ret i32 [[VAL]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@bar() {
-; IS__CGSCC____-NEXT: [[VAL:%.*]] = call i32 @foo()
-; IS__CGSCC____-NEXT: ret i32 [[VAL]]
+; CGSCC-LABEL: define {{[^@]+}}@bar() {
+; CGSCC-NEXT: [[VAL:%.*]] = call i32 @foo()
+; CGSCC-NEXT: ret i32 [[VAL]]
;
%val = call i32 @foo()
ret i32 %val
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { norecurse }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { norecurse }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; PR5569
; IPSCCP should prove that the blocks are dead and delete them, and
@bar.l = internal constant [2 x i8*] [i8* blockaddress(@bar, %lab0), i8* blockaddress(@bar, %end)] ; <[2 x i8*]*> [#uses=1]
;.
-; IS__TUNIT____: @[[CODE:[a-zA-Z0-9_$"\\.-]+]] = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4
-; IS__TUNIT____: @[[BAR_L:[a-zA-Z0-9_$"\\.-]+]] = internal constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)]
+; TUNIT: @[[CODE:[a-zA-Z0-9_$"\\.-]+]] = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4
+; TUNIT: @[[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____: @[[CODE:[a-zA-Z0-9_$"\\.-]+]] = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4
-; IS__CGSCC____: @[[BAR_L:[a-zA-Z0-9_$"\\.-]+]] = internal constant [2 x i8*] [i8* blockaddress(@bar, [[LAB0:%.*]]), i8* blockaddress(@bar, [[END:%.*]])]
+; CGSCC: @[[CODE:[a-zA-Z0-9_$"\\.-]+]] = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4
+; CGSCC: @[[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:[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
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i32 [[X:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store volatile i32 -1, i32* [[B]], align 4
+; CGSCC-NEXT: ret void
;
entry:
%b = alloca i32, align 4 ; <i32*> [#uses=1]
}
define internal void @bar(i32* nocapture %pc) nounwind readonly {
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC____-SAME: (i32* nocapture [[PC:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br label [[INDIRECTGOTO:%.*]]
-; IS__CGSCC____: lab0:
-; IS__CGSCC____-NEXT: [[INDVAR_NEXT:%.*]] = add i32 [[INDVAR:%.*]], 1
-; IS__CGSCC____-NEXT: br label [[INDIRECTGOTO]]
-; IS__CGSCC____: end:
-; IS__CGSCC____-NEXT: ret void
-; IS__CGSCC____: indirectgoto:
-; IS__CGSCC____-NEXT: [[INDVAR]] = phi i32 [ [[INDVAR_NEXT]], [[LAB0:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__CGSCC____-NEXT: [[PC_ADDR_0:%.*]] = getelementptr i32, i32* [[PC]], i32 [[INDVAR]]
-; IS__CGSCC____-NEXT: [[TMP1_PN:%.*]] = load i32, i32* [[PC_ADDR_0]], align 4
-; IS__CGSCC____-NEXT: [[INDIRECT_GOTO_DEST_IN:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* @bar.l, i32 0, i32 [[TMP1_PN]]
-; IS__CGSCC____-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]], align 8
-; IS__CGSCC____-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end]
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@bar
+; CGSCC-SAME: (i32* nocapture [[PC:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[INDIRECTGOTO:%.*]]
+; CGSCC: lab0:
+; CGSCC-NEXT: [[INDVAR_NEXT:%.*]] = add i32 [[INDVAR:%.*]], 1
+; CGSCC-NEXT: br label [[INDIRECTGOTO]]
+; CGSCC: end:
+; CGSCC-NEXT: ret void
+; CGSCC: indirectgoto:
+; CGSCC-NEXT: [[INDVAR]] = phi i32 [ [[INDVAR_NEXT]], [[LAB0:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; CGSCC-NEXT: [[PC_ADDR_0:%.*]] = getelementptr i32, i32* [[PC]], i32 [[INDVAR]]
+; CGSCC-NEXT: [[TMP1_PN:%.*]] = load i32, i32* [[PC_ADDR_0]], align 4
+; CGSCC-NEXT: [[INDIRECT_GOTO_DEST_IN:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* @bar.l, i32 0, i32 [[TMP1_PN]]
+; CGSCC-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]], align 8
+; CGSCC-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end]
;
entry:
br label %indirectgoto
}
define i32 @main() nounwind readnone {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@main
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@main
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@main
-; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@main
+; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i32 0
;
entry:
ret i32 0
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nounwind readnone }
+; CGSCC: attributes #[[ATTR1]] = { nounwind readonly }
+; CGSCC: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define internal void @foo(i32 %X) {
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (i32 [[X:%.*]]) {
-; IS__CGSCC____-NEXT: call void @foo(i32 [[X]])
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i32 [[X:%.*]]) {
+; CGSCC-NEXT: call void @foo(i32 [[X]])
+; CGSCC-NEXT: ret void
;
call void @foo( i32 %X )
ret void
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64le-unknown-linux"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
@_ZL6test1g = internal global i32 42, align 4
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
;
; /---------------------------------------|
}
define internal i32 @cb2(i32 %unknown) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@cb2
-; IS__TUNIT____-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32 [[UNKNOWN]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@cb2
+; TUNIT-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i32 [[UNKNOWN]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@cb2
-; IS__CGSCC____-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 [[UNKNOWN]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cb2
+; CGSCC-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i32 [[UNKNOWN]]
;
entry:
%call = call i32 @cb0(i32 0)
!2 = !{i64 2, i64 3, i1 false}
!3 = !{!0, !2, !1}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
;.
; CHECK: [[META0:![0-9]+]] = !{!1, !2, !3}
; CHECK: [[META1:![0-9]+]] = !{i64 0, i64 3, i1 false}
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; PR36485
; musttail call result can't be replaced with a constant, unless the call can be removed
define i8* @start(i8 %v) {
;
-; IS__TUNIT____-LABEL: define {{[^@]+}}@start
-; IS__TUNIT____-SAME: (i8 [[V:%.*]]) {
-; IS__TUNIT____-NEXT: [[C1:%.*]] = icmp eq i8 [[V]], 0
-; IS__TUNIT____-NEXT: br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
-; IS__TUNIT____: true:
-; IS__TUNIT____-NEXT: [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @side_effects(i8 [[V]])
-; IS__TUNIT____-NEXT: ret i8* [[CA]]
-; IS__TUNIT____: false:
-; IS__TUNIT____-NEXT: [[C2:%.*]] = icmp eq i8 [[V]], 1
-; IS__TUNIT____-NEXT: br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
-; IS__TUNIT____: c2_true:
-; IS__TUNIT____-NEXT: ret i8* null
-; IS__TUNIT____: c2_false:
-; IS__TUNIT____-NEXT: [[CA2:%.*]] = musttail call noalias noundef align 4294967296 i8* @dont_zap_me(i8 undef)
-; IS__TUNIT____-NEXT: ret i8* [[CA2]]
+; TUNIT-LABEL: define {{[^@]+}}@start
+; TUNIT-SAME: (i8 [[V:%.*]]) {
+; TUNIT-NEXT: [[C1:%.*]] = icmp eq i8 [[V]], 0
+; TUNIT-NEXT: br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
+; TUNIT: true:
+; TUNIT-NEXT: [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @side_effects(i8 [[V]])
+; TUNIT-NEXT: ret i8* [[CA]]
+; TUNIT: false:
+; TUNIT-NEXT: [[C2:%.*]] = icmp eq i8 [[V]], 1
+; TUNIT-NEXT: br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
+; TUNIT: c2_true:
+; TUNIT-NEXT: ret i8* null
+; TUNIT: c2_false:
+; TUNIT-NEXT: [[CA2:%.*]] = musttail call noalias noundef align 4294967296 i8* @dont_zap_me(i8 undef)
+; TUNIT-NEXT: ret i8* [[CA2]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@start
-; IS__CGSCC____-SAME: (i8 [[V:%.*]]) {
-; IS__CGSCC____-NEXT: [[C1:%.*]] = icmp eq i8 [[V]], 0
-; IS__CGSCC____-NEXT: br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
-; IS__CGSCC____: true:
-; IS__CGSCC____-NEXT: [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @side_effects(i8 [[V]])
-; IS__CGSCC____-NEXT: ret i8* [[CA]]
-; IS__CGSCC____: false:
-; IS__CGSCC____-NEXT: [[C2:%.*]] = icmp eq i8 [[V]], 1
-; IS__CGSCC____-NEXT: br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
-; IS__CGSCC____: c2_true:
-; IS__CGSCC____-NEXT: [[CA1:%.*]] = musttail call noalias noundef align 4294967296 i8* @no_side_effects(i8 [[V]])
-; IS__CGSCC____-NEXT: ret i8* [[CA1]]
-; IS__CGSCC____: c2_false:
-; IS__CGSCC____-NEXT: [[CA2:%.*]] = musttail call noalias noundef align 4294967296 i8* @dont_zap_me(i8 [[V]])
-; IS__CGSCC____-NEXT: ret i8* [[CA2]]
+; CGSCC-LABEL: define {{[^@]+}}@start
+; CGSCC-SAME: (i8 [[V:%.*]]) {
+; CGSCC-NEXT: [[C1:%.*]] = icmp eq i8 [[V]], 0
+; CGSCC-NEXT: br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
+; CGSCC: true:
+; CGSCC-NEXT: [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @side_effects(i8 [[V]])
+; CGSCC-NEXT: ret i8* [[CA]]
+; CGSCC: false:
+; CGSCC-NEXT: [[C2:%.*]] = icmp eq i8 [[V]], 1
+; CGSCC-NEXT: br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
+; CGSCC: c2_true:
+; CGSCC-NEXT: [[CA1:%.*]] = musttail call noalias noundef align 4294967296 i8* @no_side_effects(i8 [[V]])
+; CGSCC-NEXT: ret i8* [[CA1]]
+; CGSCC: c2_false:
+; CGSCC-NEXT: [[CA2:%.*]] = musttail call noalias noundef align 4294967296 i8* @dont_zap_me(i8 [[V]])
+; CGSCC-NEXT: ret i8* [[CA2]]
;
%c1 = icmp eq i8 %v, 0
br i1 %c1, label %true, label %false
}
define internal i8* @side_effects(i8 %v) {
-; IS________NPM-LABEL: define {{[^@]+}}@side_effects
-; IS________NPM-SAME: (i8 [[V:%.*]]) {
-; IS________NPM-NEXT: [[I1:%.*]] = call i32 @external()
-; IS________NPM-NEXT: [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @start(i8 0)
-; IS________NPM-NEXT: ret i8* [[CA]]
+; CHECK-LABEL: define {{[^@]+}}@side_effects
+; CHECK-SAME: (i8 [[V:%.*]]) {
+; CHECK-NEXT: [[I1:%.*]] = call i32 @external()
+; CHECK-NEXT: [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @start(i8 0)
+; CHECK-NEXT: ret i8* [[CA]]
;
%i1 = call i32 @external()
}
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:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i8* null
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@no_side_effects
+; CGSCC-SAME: (i8 [[V:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: ret i8* null
;
ret i8* null
}
ret i8* null
}
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=15 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=15 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; void bar(int, float, double);
;
; 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_NPM-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[P:%.*]] = alloca float, align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[N]], i32* [[N_ADDR]], 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 nofree noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef, i64 undef)
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (i32 [[N:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[P:%.*]] = alloca float, align 4
+; TUNIT-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4
+; TUNIT-NEXT: store i32 7, i32* [[N_ADDR]], align 4
+; TUNIT-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 nofree noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef, i64 undef)
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (i32 [[N:%.*]]) {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: [[P:%.*]] = alloca float, align 4
-; IS__CGSCC____-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4
-; IS__CGSCC____-NEXT: store float 3.000000e+00, float* [[P]], align 4
-; IS__CGSCC____-NEXT: store i32 7, i32* [[N_ADDR]], align 4
-; IS__CGSCC____-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* nofree noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 noundef 4617315517961601024)
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i32 [[N:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[P:%.*]] = alloca float, align 4
+; CGSCC-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4
+; CGSCC-NEXT: store float 3.000000e+00, float* [[P]], align 4
+; CGSCC-NEXT: store i32 7, i32* [[N_ADDR]], align 4
+; CGSCC-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* nofree noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]], i64 noundef 4617315517961601024)
+; CGSCC-NEXT: ret void
;
entry:
%N.addr = alloca i32, align 4
}
define internal void @.omp_outlined.(i32* noalias %.global_tid., i32* noalias %.bound_tid., i32* dereferenceable(4) %N, float* dereferenceable(4) %p, i64 %q) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@.omp_outlined.
-; IS__TUNIT_NPM-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[N:%.*]], float* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) [[P:%.*]], i64 [[Q:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[Q_ADDR:%.*]] = alloca i64, align 8
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i64 4617315517961601024, i64* [[Q_ADDR]], align 8
-; IS__TUNIT_NPM-NEXT: [[CONV:%.*]] = bitcast i64* [[Q_ADDR]] to double*
-; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = load i32, i32* [[N]], align 4
-; IS__TUNIT_NPM-NEXT: [[SUB3:%.*]] = add nsw i32 [[TMP]], -3
-; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP]], 2
-; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
-; IS__TUNIT_NPM: omp.precond.then:
-; IS__TUNIT_NPM-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[SUB3]], i32* [[DOTOMP_UB]], align 4
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
-; IS__TUNIT_NPM-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
-; IS__TUNIT_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__TUNIT_NPM-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
-; IS__TUNIT_NPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP6]], [[SUB3]]
-; IS__TUNIT_NPM-NEXT: br i1 [[CMP6]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS__TUNIT_NPM: cond.true:
-; IS__TUNIT_NPM-NEXT: br label [[COND_END:%.*]]
-; IS__TUNIT_NPM: cond.false:
-; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
-; IS__TUNIT_NPM-NEXT: br label [[COND_END]]
-; IS__TUNIT_NPM: cond.end:
-; IS__TUNIT_NPM-NEXT: [[COND:%.*]] = phi i32 [ [[SUB3]], [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
-; IS__TUNIT_NPM-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
-; IS__TUNIT_NPM-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
-; IS__TUNIT_NPM: omp.inner.for.cond:
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_IV_0:%.*]] = phi i32 [ [[TMP8]], [[COND_END]] ], [ [[ADD11:%.*]], [[OMP_INNER_FOR_INC:%.*]] ]
-; IS__TUNIT_NPM-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
-; IS__TUNIT_NPM-NEXT: [[CMP8:%.*]] = icmp sgt i32 [[DOTOMP_IV_0]], [[TMP9]]
-; IS__TUNIT_NPM-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]], label [[OMP_INNER_FOR_BODY:%.*]]
-; IS__TUNIT_NPM: omp.inner.for.cond.cleanup:
-; IS__TUNIT_NPM-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
-; IS__TUNIT_NPM: omp.inner.for.body:
-; IS__TUNIT_NPM-NEXT: [[ADD10:%.*]] = add nsw i32 [[DOTOMP_IV_0]], 2
-; IS__TUNIT_NPM-NEXT: [[TMP11:%.*]] = load double, double* [[CONV]], align 8
-; IS__TUNIT_NPM-NEXT: call void @bar(i32 [[ADD10]], float 3.000000e+00, double [[TMP11]])
-; IS__TUNIT_NPM-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
-; IS__TUNIT_NPM: omp.body.continue:
-; IS__TUNIT_NPM-NEXT: br label [[OMP_INNER_FOR_INC]]
-; IS__TUNIT_NPM: omp.inner.for.inc:
-; IS__TUNIT_NPM-NEXT: [[ADD11]] = add nsw i32 [[DOTOMP_IV_0]], 1
-; IS__TUNIT_NPM-NEXT: br label [[OMP_INNER_FOR_COND]]
-; IS__TUNIT_NPM: omp.inner.for.end:
-; IS__TUNIT_NPM-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
-; IS__TUNIT_NPM: omp.loop.exit:
-; IS__TUNIT_NPM-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
-; IS__TUNIT_NPM-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB0]], i32 [[TMP12]])
-; IS__TUNIT_NPM-NEXT: br label [[OMP_PRECOND_END]]
-; IS__TUNIT_NPM: omp.precond.end:
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@.omp_outlined.
+; TUNIT-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[N:%.*]], float* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) [[P:%.*]], i64 [[Q:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[Q_ADDR:%.*]] = alloca i64, align 8
+; TUNIT-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i64 4617315517961601024, i64* [[Q_ADDR]], align 8
+; TUNIT-NEXT: [[CONV:%.*]] = bitcast i64* [[Q_ADDR]] to double*
+; TUNIT-NEXT: [[TMP:%.*]] = load i32, i32* [[N]], align 4
+; TUNIT-NEXT: [[SUB3:%.*]] = add nsw i32 [[TMP]], -3
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP]], 2
+; TUNIT-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
+; TUNIT: omp.precond.then:
+; TUNIT-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
+; TUNIT-NEXT: store i32 [[SUB3]], i32* [[DOTOMP_UB]], align 4
+; TUNIT-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
+; TUNIT-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
+; TUNIT-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
+; TUNIT-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)
+; TUNIT-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
+; TUNIT-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP6]], [[SUB3]]
+; TUNIT-NEXT: br i1 [[CMP6]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; TUNIT: cond.true:
+; TUNIT-NEXT: br label [[COND_END:%.*]]
+; TUNIT: cond.false:
+; TUNIT-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
+; TUNIT-NEXT: br label [[COND_END]]
+; TUNIT: cond.end:
+; TUNIT-NEXT: [[COND:%.*]] = phi i32 [ [[SUB3]], [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
+; TUNIT-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
+; TUNIT-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
+; TUNIT-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
+; TUNIT: omp.inner.for.cond:
+; TUNIT-NEXT: [[DOTOMP_IV_0:%.*]] = phi i32 [ [[TMP8]], [[COND_END]] ], [ [[ADD11:%.*]], [[OMP_INNER_FOR_INC:%.*]] ]
+; TUNIT-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
+; TUNIT-NEXT: [[CMP8:%.*]] = icmp sgt i32 [[DOTOMP_IV_0]], [[TMP9]]
+; TUNIT-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]], label [[OMP_INNER_FOR_BODY:%.*]]
+; TUNIT: omp.inner.for.cond.cleanup:
+; TUNIT-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
+; TUNIT: omp.inner.for.body:
+; TUNIT-NEXT: [[ADD10:%.*]] = add nsw i32 [[DOTOMP_IV_0]], 2
+; TUNIT-NEXT: [[TMP11:%.*]] = load double, double* [[CONV]], align 8
+; TUNIT-NEXT: call void @bar(i32 [[ADD10]], float 3.000000e+00, double [[TMP11]])
+; TUNIT-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
+; TUNIT: omp.body.continue:
+; TUNIT-NEXT: br label [[OMP_INNER_FOR_INC]]
+; TUNIT: omp.inner.for.inc:
+; TUNIT-NEXT: [[ADD11]] = add nsw i32 [[DOTOMP_IV_0]], 1
+; TUNIT-NEXT: br label [[OMP_INNER_FOR_COND]]
+; TUNIT: omp.inner.for.end:
+; TUNIT-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
+; TUNIT: omp.loop.exit:
+; TUNIT-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
+; TUNIT-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB0]], i32 [[TMP12]])
+; TUNIT-NEXT: br label [[OMP_PRECOND_END]]
+; TUNIT: omp.precond.end:
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@.omp_outlined.
-; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[N:%.*]], float* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]], i64 [[Q:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[Q_ADDR:%.*]] = alloca i64, align 8
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: store i64 4617315517961601024, i64* [[Q_ADDR]], align 8
-; IS__CGSCC_NPM-NEXT: [[CONV:%.*]] = bitcast i64* [[Q_ADDR]] to double*
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = load i32, i32* [[N]], align 4
-; IS__CGSCC_NPM-NEXT: [[SUB3:%.*]] = add nsw i32 [[TMP]], -3
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP]], 2
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
-; IS__CGSCC_NPM: omp.precond.then:
-; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
-; IS__CGSCC_NPM-NEXT: store i32 [[SUB3]], i32* [[DOTOMP_UB]], align 4
-; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
-; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
-; IS__CGSCC_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__CGSCC_NPM-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
-; IS__CGSCC_NPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP6]], [[SUB3]]
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP6]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS__CGSCC_NPM: cond.true:
-; IS__CGSCC_NPM-NEXT: br label [[COND_END:%.*]]
-; IS__CGSCC_NPM: cond.false:
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
-; IS__CGSCC_NPM-NEXT: br label [[COND_END]]
-; IS__CGSCC_NPM: cond.end:
-; IS__CGSCC_NPM-NEXT: [[COND:%.*]] = phi i32 [ [[SUB3]], [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
-; IS__CGSCC_NPM-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
-; IS__CGSCC_NPM-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
-; IS__CGSCC_NPM: omp.inner.for.cond:
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_IV_0:%.*]] = phi i32 [ [[TMP8]], [[COND_END]] ], [ [[ADD11:%.*]], [[OMP_INNER_FOR_INC:%.*]] ]
-; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
-; IS__CGSCC_NPM-NEXT: [[CMP8:%.*]] = icmp sgt i32 [[DOTOMP_IV_0]], [[TMP9]]
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]], label [[OMP_INNER_FOR_BODY:%.*]]
-; IS__CGSCC_NPM: omp.inner.for.cond.cleanup:
-; IS__CGSCC_NPM-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
-; IS__CGSCC_NPM: omp.inner.for.body:
-; IS__CGSCC_NPM-NEXT: [[ADD10:%.*]] = add nsw i32 [[DOTOMP_IV_0]], 2
-; IS__CGSCC_NPM-NEXT: [[TMP10:%.*]] = load float, float* [[P]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP11:%.*]] = load double, double* [[CONV]], align 8
-; IS__CGSCC_NPM-NEXT: call void @bar(i32 [[ADD10]], float [[TMP10]], double [[TMP11]])
-; IS__CGSCC_NPM-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
-; IS__CGSCC_NPM: omp.body.continue:
-; IS__CGSCC_NPM-NEXT: br label [[OMP_INNER_FOR_INC]]
-; IS__CGSCC_NPM: omp.inner.for.inc:
-; IS__CGSCC_NPM-NEXT: [[ADD11]] = add nsw i32 [[DOTOMP_IV_0]], 1
-; IS__CGSCC_NPM-NEXT: br label [[OMP_INNER_FOR_COND]]
-; IS__CGSCC_NPM: omp.inner.for.end:
-; IS__CGSCC_NPM-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
-; IS__CGSCC_NPM: omp.loop.exit:
-; IS__CGSCC_NPM-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
-; IS__CGSCC_NPM-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB0]], i32 [[TMP12]])
-; IS__CGSCC_NPM-NEXT: br label [[OMP_PRECOND_END]]
-; IS__CGSCC_NPM: omp.precond.end:
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@.omp_outlined.
+; CGSCC-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[N:%.*]], float* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]], i64 [[Q:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[Q_ADDR:%.*]] = alloca i64, align 8
+; CGSCC-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i64 4617315517961601024, i64* [[Q_ADDR]], align 8
+; CGSCC-NEXT: [[CONV:%.*]] = bitcast i64* [[Q_ADDR]] to double*
+; CGSCC-NEXT: [[TMP:%.*]] = load i32, i32* [[N]], align 4
+; CGSCC-NEXT: [[SUB3:%.*]] = add nsw i32 [[TMP]], -3
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP]], 2
+; CGSCC-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
+; CGSCC: omp.precond.then:
+; CGSCC-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
+; CGSCC-NEXT: store i32 [[SUB3]], i32* [[DOTOMP_UB]], align 4
+; CGSCC-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
+; CGSCC-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
+; CGSCC-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
+; CGSCC-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)
+; CGSCC-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
+; CGSCC-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP6]], [[SUB3]]
+; CGSCC-NEXT: br i1 [[CMP6]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CGSCC: cond.true:
+; CGSCC-NEXT: br label [[COND_END:%.*]]
+; CGSCC: cond.false:
+; CGSCC-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
+; CGSCC-NEXT: br label [[COND_END]]
+; CGSCC: cond.end:
+; CGSCC-NEXT: [[COND:%.*]] = phi i32 [ [[SUB3]], [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
+; CGSCC-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
+; CGSCC-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
+; CGSCC-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
+; CGSCC: omp.inner.for.cond:
+; CGSCC-NEXT: [[DOTOMP_IV_0:%.*]] = phi i32 [ [[TMP8]], [[COND_END]] ], [ [[ADD11:%.*]], [[OMP_INNER_FOR_INC:%.*]] ]
+; CGSCC-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
+; CGSCC-NEXT: [[CMP8:%.*]] = icmp sgt i32 [[DOTOMP_IV_0]], [[TMP9]]
+; CGSCC-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]], label [[OMP_INNER_FOR_BODY:%.*]]
+; CGSCC: omp.inner.for.cond.cleanup:
+; CGSCC-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
+; CGSCC: omp.inner.for.body:
+; CGSCC-NEXT: [[ADD10:%.*]] = add nsw i32 [[DOTOMP_IV_0]], 2
+; CGSCC-NEXT: [[TMP10:%.*]] = load float, float* [[P]], align 4
+; CGSCC-NEXT: [[TMP11:%.*]] = load double, double* [[CONV]], align 8
+; CGSCC-NEXT: call void @bar(i32 [[ADD10]], float [[TMP10]], double [[TMP11]])
+; CGSCC-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
+; CGSCC: omp.body.continue:
+; CGSCC-NEXT: br label [[OMP_INNER_FOR_INC]]
+; CGSCC: omp.inner.for.inc:
+; CGSCC-NEXT: [[ADD11]] = add nsw i32 [[DOTOMP_IV_0]], 1
+; CGSCC-NEXT: br label [[OMP_INNER_FOR_COND]]
+; CGSCC: omp.inner.for.end:
+; CGSCC-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
+; CGSCC: omp.loop.exit:
+; CGSCC-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
+; CGSCC-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB0]], i32 [[TMP12]])
+; CGSCC-NEXT: br label [[OMP_PRECOND_END]]
+; CGSCC: omp.precond.end:
+; CGSCC-NEXT: ret void
;
entry:
%q.addr = alloca i64, align 8
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; #include <pthread.h>
;
; 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:
-; IS__TUNIT____-NEXT: [[ALLOC1:%.*]] = alloca i8, align 8
-; IS__TUNIT____-NEXT: [[ALLOC2:%.*]] = alloca i8, align 8
-; IS__TUNIT____-NEXT: [[THREAD:%.*]] = alloca i64, align 8
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree readnone align 4294967296 undef)
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) undef)
-; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]])
-; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[ALLOC2]])
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT-LABEL: define {{[^@]+}}@main() {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[ALLOC1:%.*]] = alloca i8, align 8
+; TUNIT-NEXT: [[ALLOC2:%.*]] = alloca i8, align 8
+; TUNIT-NEXT: [[THREAD:%.*]] = alloca i64, align 8
+; TUNIT-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree readnone align 4294967296 undef)
+; TUNIT-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) undef)
+; TUNIT-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]])
+; TUNIT-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[ALLOC2]])
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@main() {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[ALLOC1:%.*]] = alloca i8, align 8
-; IS__CGSCC____-NEXT: [[ALLOC2:%.*]] = alloca i8, align 8
-; IS__CGSCC____-NEXT: [[THREAD:%.*]] = alloca i64, align 8
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree noundef readnone align 4294967296 null)
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(8) bitcast (i8** @GlobalVPtr to i8*))
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]])
-; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC2]])
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC-LABEL: define {{[^@]+}}@main() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[ALLOC1:%.*]] = alloca i8, align 8
+; CGSCC-NEXT: [[ALLOC2:%.*]] = alloca i8, align 8
+; CGSCC-NEXT: [[THREAD:%.*]] = alloca i64, align 8
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree noundef readnone align 4294967296 null)
+; CGSCC-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(8) bitcast (i8** @GlobalVPtr to i8*))
+; CGSCC-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]])
+; CGSCC-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC2]])
+; CGSCC-NEXT: ret i32 0
;
entry:
%alloc1 = alloca i8, align 8
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; CHECK-NOT: %X
define internal i32 @foo(i32 %X) {
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i32 undef
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: () #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: ret i32 undef
;
%Y = call i32 @foo( i32 %X ) ; <i32> [#uses=1]
%Z = add i32 %Y, 1 ; <i32> [#uses=1]
}
define void @bar() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@bar
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@bar
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@bar
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: ret void
;
call i32 @foo( i32 17 ) ; <i32>:1 [#uses=0]
ret void
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; PR5596
; IPSCCP should propagate the 0 argument, eliminate the switch, and propagate
; FIXME: Remove obsolete calls/instructions
define i32 @main() noreturn nounwind {
-; IS__TUNIT____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@main
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32 123
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@main
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i32 123
;
-; IS__CGSCC____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@main
-; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call noundef i32 @wwrite() #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[CALL2]]
+; CGSCC: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@main
+; CGSCC-SAME: () #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL2:%.*]] = tail call noundef i32 @wwrite() #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[CALL2]]
;
entry:
%call2 = tail call i32 @wwrite(i64 0) nounwind
}
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:[0-9]+]] {
-; 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: ret i32 123
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@wwrite
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
+; CGSCC-NEXT: i64 3, label [[RETURN:%.*]]
+; CGSCC-NEXT: i64 10, label [[RETURN]]
+; CGSCC-NEXT: ]
+; CGSCC: sw.default:
+; CGSCC-NEXT: ret i32 123
+; CGSCC: return:
+; CGSCC-NEXT: unreachable
;
entry:
switch i64 %i, label %sw.default [
ret i32 0
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;; This function returns its second argument on all return statements
define internal i32* @incdec(i1 %C, i32* %V) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@incdec
-; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: T:
-; IS__TUNIT____-NEXT: ret i32* [[V]]
-; IS__TUNIT____: F:
-; IS__TUNIT____-NEXT: ret i32* [[V]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@incdec
+; TUNIT-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: T:
+; TUNIT-NEXT: ret i32* [[V]]
+; TUNIT: F:
+; TUNIT-NEXT: ret i32* [[V]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@incdec
-; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* 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:
-; IS__CGSCC____-NEXT: [[X1:%.*]] = add i32 [[X]], 1
-; IS__CGSCC____-NEXT: store i32 [[X1]], i32* [[V]], align 4
-; IS__CGSCC____-NEXT: ret i32* [[V]]
-; IS__CGSCC____: F:
-; IS__CGSCC____-NEXT: [[X2:%.*]] = sub i32 [[X]], 1
-; IS__CGSCC____-NEXT: store i32 [[X2]], i32* [[V]], align 4
-; IS__CGSCC____-NEXT: ret i32* [[V]]
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@incdec
+; CGSCC-SAME: (i1 [[C:%.*]], i32* nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: T:
+; CGSCC-NEXT: [[X1:%.*]] = add i32 [[X]], 1
+; CGSCC-NEXT: store i32 [[X1]], i32* [[V]], align 4
+; CGSCC-NEXT: ret i32* [[V]]
+; CGSCC: F:
+; CGSCC-NEXT: [[X2:%.*]] = sub i32 [[X]], 1
+; CGSCC-NEXT: store i32 [[X2]], i32* [[V]], align 4
+; CGSCC-NEXT: ret i32* [[V]]
;
%X = load i32, i32* %V
br i1 %C, label %T, label %F
;; This function returns its first argument as a part of a multiple return
;; value
define internal { i32, i32 } @foo(i32 %A, i32 %B) {
-; 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:[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
-; IS__CGSCC____-NEXT: ret { i32, i32 } [[Z]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i32 noundef [[A:%.*]], i32 noundef [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[X:%.*]] = add i32 [[A]], [[B]]
+; CGSCC-NEXT: [[Y:%.*]] = insertvalue { i32, i32 } undef, i32 [[A]], 0
+; CGSCC-NEXT: [[Z:%.*]] = insertvalue { i32, i32 } [[Y]], i32 [[X]], 1
+; CGSCC-NEXT: ret { i32, i32 } [[Z]]
;
%X = add i32 %A, %B
%Y = insertvalue { i32, i32 } undef, i32 %A, 0
}
define void @caller(i1 %C) personality i32 (...)* @__gxx_personality_v0 {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1:[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 writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]]
-; IS__TUNIT____-NEXT: br label [[OK:%.*]]
-; IS__TUNIT____: OK:
-; IS__TUNIT____-NEXT: br label [[RET:%.*]]
-; IS__TUNIT____: LPAD:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: RET:
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
+; TUNIT-NEXT: [[Q:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: br label [[OK:%.*]]
+; TUNIT: OK:
+; TUNIT-NEXT: br label [[RET:%.*]]
+; TUNIT: LPAD:
+; TUNIT-NEXT: unreachable
+; TUNIT: RET:
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] 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* nofree noundef nonnull align 4 dereferenceable(4) [[Q]]) #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT: [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR4:[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) #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-NEXT: br label [[OK:%.*]]
-; IS__CGSCC____: OK:
-; IS__CGSCC____-NEXT: [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
-; IS__CGSCC____-NEXT: [[Z:%.*]] = add i32 [[X1]], [[X2]]
-; IS__CGSCC____-NEXT: store i32 [[Z]], i32* [[W]], align 4
-; IS__CGSCC____-NEXT: br label [[RET:%.*]]
-; IS__CGSCC____: LPAD:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: RET:
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
+; CGSCC-NEXT: [[Q:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[Q]]) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0
+; CGSCC-NEXT: [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR5:[0-9]+]]
+; CGSCC-NEXT: br label [[OK:%.*]]
+; CGSCC: OK:
+; CGSCC-NEXT: [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
+; CGSCC-NEXT: [[Z:%.*]] = add i32 [[X1]], [[X2]]
+; CGSCC-NEXT: store i32 [[Z]], i32* [[W]], align 4
+; CGSCC-NEXT: br label [[RET:%.*]]
+; CGSCC: LPAD:
+; CGSCC-NEXT: unreachable
+; CGSCC: RET:
+; CGSCC-NEXT: ret void
;
%Q = alloca i32
;; Call incdec to see if %W is properly replaced by %Q
declare i32 @__gxx_personality_v0(...)
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR5]] = { nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR3]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR4]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR5]] = { nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; FIXME: icmp folding is missing
define i1 @invokecaller(i1 %C) personality i32 (...)* @__gxx_personality_v0 {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@invokecaller
-; 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
-; IS__TUNIT____: FAIL:
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@invokecaller
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
+; TUNIT-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: br label [[OK:%.*]]
+; TUNIT: OK:
+; TUNIT-NEXT: ret i1 true
+; TUNIT: FAIL:
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@invokecaller
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
-; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: br label [[OK:%.*]]
-; IS__CGSCC____: OK:
-; IS__CGSCC____-NEXT: [[Y:%.*]] = icmp ne i32 [[X]], 0
-; IS__CGSCC____-NEXT: ret i1 [[Y]]
-; IS__CGSCC____: FAIL:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@invokecaller
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
+; CGSCC-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: br label [[OK:%.*]]
+; CGSCC: OK:
+; CGSCC-NEXT: [[Y:%.*]] = icmp ne i32 [[X]], 0
+; CGSCC-NEXT: ret i1 [[Y]]
+; CGSCC: FAIL:
+; CGSCC-NEXT: unreachable
;
%X = invoke i32 @foo( i1 %C ) to label %OK unwind label %FAIL ; <i32> [#uses=1]
OK:
}
define internal i32 @foo(i1 %C) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; 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
-; IS__TUNIT____: F:
-; IS__TUNIT____-NEXT: ret i32 undef
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: T:
+; TUNIT-NEXT: ret i32 undef
+; TUNIT: F:
+; TUNIT-NEXT: ret i32 undef
;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: T:
-; IS__CGSCC____-NEXT: ret i32 52
-; IS__CGSCC____: F:
-; IS__CGSCC____-NEXT: ret i32 52
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: T:
+; CGSCC-NEXT: ret i32 52
+; CGSCC: F:
+; CGSCC-NEXT: ret i32 52
;
br i1 %C, label %T, label %F
}
define i1 @caller(i1 %C) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i1 true
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: ret i1 true
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT: [[Y:%.*]] = icmp ne i32 [[X]], 0
-; IS__CGSCC____-NEXT: ret i1 [[Y]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: [[Y:%.*]] = icmp ne i32 [[X]], 0
+; CGSCC-NEXT: ret i1 [[Y]]
;
%X = call i32 @foo( i1 %C ) ; <i32> [#uses=1]
%Y = icmp ne i32 %X, 0 ; <i1> [#uses=1]
declare i32 @__gxx_personality_v0(...)
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nounwind readnone }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nounwind readnone }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;; FIXME: support for extractvalue and insertvalue missing.
}
define %0 @caller(i1 %Q) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT: ret [[TMP0]] [[X]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller
+; TUNIT-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: ret [[TMP0]] [[X]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret [[TMP0]] [[X]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller
+; CGSCC-SAME: (i1 [[Q:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret [[TMP0]] [[X]]
;
%X = call %0 @foo(i1 %Q)
%A = extractvalue %0 %X, 0
; Similar to @caller but the result of both calls are actually used.
define i32 @caller2(i1 %Q) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2
-; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR1]]
-; IS__TUNIT____-NEXT: [[A:%.*]] = extractvalue [[TMP0]] [[X]], 0
-; IS__TUNIT____-NEXT: [[B:%.*]] = extractvalue [[TMP0]] [[X]], 1
-; IS__TUNIT____-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) #[[ATTR1]]
-; IS__TUNIT____-NEXT: [[C:%.*]] = extractvalue [[TMP0]] [[Y]], 0
-; IS__TUNIT____-NEXT: [[D:%.*]] = extractvalue [[TMP0]] [[Y]], 1
-; IS__TUNIT____-NEXT: [[M:%.*]] = add i32 [[A]], [[C]]
-; IS__TUNIT____-NEXT: [[N:%.*]] = add i32 [[B]], [[D]]
-; IS__TUNIT____-NEXT: [[R:%.*]] = add i32 [[N]], [[M]]
-; IS__TUNIT____-NEXT: ret i32 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller2
+; TUNIT-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR1]]
+; TUNIT-NEXT: [[A:%.*]] = extractvalue [[TMP0]] [[X]], 0
+; TUNIT-NEXT: [[B:%.*]] = extractvalue [[TMP0]] [[X]], 1
+; TUNIT-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) #[[ATTR1]]
+; TUNIT-NEXT: [[C:%.*]] = extractvalue [[TMP0]] [[Y]], 0
+; TUNIT-NEXT: [[D:%.*]] = extractvalue [[TMP0]] [[Y]], 1
+; TUNIT-NEXT: [[M:%.*]] = add i32 [[A]], [[C]]
+; TUNIT-NEXT: [[N:%.*]] = add i32 [[B]], [[D]]
+; TUNIT-NEXT: [[R:%.*]] = add i32 [[N]], [[M]]
+; TUNIT-NEXT: ret i32 [[R]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2
-; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT: [[A:%.*]] = extractvalue [[TMP0]] [[X]], 0
-; IS__CGSCC____-NEXT: [[B:%.*]] = extractvalue [[TMP0]] [[X]], 1
-; IS__CGSCC____-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT: [[C:%.*]] = extractvalue [[TMP0]] [[Y]], 0
-; IS__CGSCC____-NEXT: [[D:%.*]] = extractvalue [[TMP0]] [[Y]], 1
-; IS__CGSCC____-NEXT: [[M:%.*]] = add i32 [[A]], [[C]]
-; IS__CGSCC____-NEXT: [[N:%.*]] = add i32 [[B]], [[D]]
-; IS__CGSCC____-NEXT: [[R:%.*]] = add i32 [[N]], [[M]]
-; IS__CGSCC____-NEXT: ret i32 [[R]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller2
+; CGSCC-SAME: (i1 [[Q:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR2]]
+; CGSCC-NEXT: [[A:%.*]] = extractvalue [[TMP0]] [[X]], 0
+; CGSCC-NEXT: [[B:%.*]] = extractvalue [[TMP0]] [[X]], 1
+; CGSCC-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) #[[ATTR2]]
+; CGSCC-NEXT: [[C:%.*]] = extractvalue [[TMP0]] [[Y]], 0
+; CGSCC-NEXT: [[D:%.*]] = extractvalue [[TMP0]] [[Y]], 1
+; CGSCC-NEXT: [[M:%.*]] = add i32 [[A]], [[C]]
+; CGSCC-NEXT: [[N:%.*]] = add i32 [[B]], [[D]]
+; CGSCC-NEXT: [[R:%.*]] = add i32 [[N]], [[M]]
+; CGSCC-NEXT: ret i32 [[R]]
;
%X = call %0 @foo(i1 %Q)
%A = extractvalue %0 %X, 0
ret i32 %R
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
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:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_COND:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.cond:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: ret i32 10
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@testf
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br i1 [[C]], label [[IF_COND:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.cond:
+; CGSCC-NEXT: unreachable
+; CGSCC: if.then:
+; CGSCC-NEXT: unreachable
+; CGSCC: if.end:
+; CGSCC-NEXT: ret i32 10
;
entry:
br i1 %c, label %if.cond, label %if.end
}
define internal i32 @test1(i1 %c) {
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br label [[IF_THEN:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @testf(i1 [[C]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: [[RES:%.*]] = icmp eq i32 [[CALL]], 10
-; IS__CGSCC____-NEXT: br i1 [[RES]], label [[RET1:%.*]], label [[RET2:%.*]]
-; IS__CGSCC____: ret1:
-; IS__CGSCC____-NEXT: ret i32 99
-; IS__CGSCC____: ret2:
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test1
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[IF_THEN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @testf(i1 [[C]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: [[RES:%.*]] = icmp eq i32 [[CALL]], 10
+; CGSCC-NEXT: br i1 [[RES]], label [[RET1:%.*]], label [[RET2:%.*]]
+; CGSCC: ret1:
+; CGSCC-NEXT: ret i32 99
+; CGSCC: ret2:
+; CGSCC-NEXT: ret i32 0
;
entry:
br label %if.then
}
define i32 @main(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@main
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: ret i32 99
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@main
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: ret i32 99
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@main
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[RES:%.*]] = call noundef i32 @test1(i1 [[C]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT: ret i32 [[RES]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@main
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[RES:%.*]] = call noundef i32 @test1(i1 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: ret i32 [[RES]]
;
%res = call i32 @test1(i1 %c)
ret i32 %res
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; #include <threads.h>
; thread_local int gtl = 0;
}
define dso_local void @caller() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller() {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: call void @broker(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) undef, i32 (i32*, i32*)* noundef nonnull @callee, i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) undef)
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@caller() {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: call void @broker(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) undef, i32 (i32*, i32*)* noundef nonnull @callee, i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) undef)
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller() {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @broker(i32* nofree noundef nonnull readonly align 4 dereferenceable(4) @gtl, i32 (i32*, i32*)* noundef nonnull @callee, i32* nofree noundef nonnull readonly align 4 dereferenceable(4) @gsh)
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@caller() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @broker(i32* nofree noundef nonnull readonly align 4 dereferenceable(4) @gtl, i32 (i32*, i32*)* noundef nonnull @callee, i32* nofree noundef nonnull readonly align 4 dereferenceable(4) @gsh)
+; CGSCC-NEXT: ret void
;
entry:
call void @broker(i32* nonnull @gtl, i32 (i32*, i32*)* nonnull @callee, i32* nonnull @gsh)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; TEST 6
; SCC
define i32* @test6_1() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6_1
-; NOT_CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: ret i32* undef
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@test6_1
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: ret i32* undef
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_1
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: ret i32* undef
+; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@test6_1
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: ret i32* undef
;
%ret = tail call i32* @test6_2()
ret i32* %ret
}
define i32* @test6_2() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6_2
-; NOT_CGSCC_NPM-SAME: () #[[ATTR1]] {
-; NOT_CGSCC_NPM-NEXT: ret i32* undef
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@test6_2
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i32* undef
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_2
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: ret i32* undef
+; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@test6_2
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: ret i32* undef
;
%ret = tail call i32* @test6_1()
ret i32* %ret
; Function Attrs: nounwind readnone ssp uwtable
define internal i8* @f2(i8* readnone %0) local_unnamed_addr #0 {
-; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2
-; IS__CGSCC_NPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp eq i8* undef, null
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
-; IS__CGSCC_NPM: 3:
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* noalias nonnull readnone align 4294967296 dereferenceable(4294967295) undef)
-; IS__CGSCC_NPM-NEXT: br label [[TMP7:%.*]]
-; IS__CGSCC_NPM: 5:
-; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = tail call i8* @f3()
-; IS__CGSCC_NPM-NEXT: br label [[TMP7]]
-; IS__CGSCC_NPM: 7:
-; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
-; IS__CGSCC_NPM-NEXT: ret i8* [[TMP8]]
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@f2
+; CGSCC-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq i8* undef, null
+; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
+; CGSCC: 3:
+; CGSCC-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* noalias nonnull readnone align 4294967296 dereferenceable(4294967295) undef)
+; CGSCC-NEXT: br label [[TMP7:%.*]]
+; CGSCC: 5:
+; CGSCC-NEXT: [[TMP6:%.*]] = tail call i8* @f3()
+; CGSCC-NEXT: br label [[TMP7]]
+; CGSCC: 7:
+; CGSCC-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
+; CGSCC-NEXT: ret i8* [[TMP8]]
;
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
; Function Attrs: nounwind readnone ssp uwtable
define internal i8* @f3(i8* readnone %0) local_unnamed_addr #0 {
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3
-; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]]
-; IS__CGSCC_NPM: 1:
-; IS__CGSCC_NPM-NEXT: unreachable
-; IS__CGSCC_NPM: 2:
-; IS__CGSCC_NPM-NEXT: ret i8* @a1
+; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@f3
+; CGSCC-SAME: () local_unnamed_addr #[[ATTR0]] {
+; CGSCC-NEXT: br label [[TMP2:%.*]]
+; CGSCC: 1:
+; CGSCC-NEXT: unreachable
+; CGSCC: 2:
+; CGSCC-NEXT: ret i8* @a1
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
; TEST 7
; Better than IR information
define align 4 i8* @test7() #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; 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:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i8* [[C]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test7
-; IS__CGSCC_NPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = tail call noundef nonnull align 8 dereferenceable(1) i8* @f1(i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) @a1) #[[ATTR13:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i8* [[C]]
+; TUNIT: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@test7
+; TUNIT-SAME: () #[[ATTR0]] {
+; 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]+]]
+; TUNIT-NEXT: ret i8* [[C]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@test7
+; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: [[C:%.*]] = tail call noundef nonnull align 8 dereferenceable(1) i8* @f1(i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) @a1) #[[ATTR13:[0-9]+]]
+; CGSCC-NEXT: ret i8* [[C]]
;
%c = tail call i8* @f1(i8* align 8 dereferenceable(1) @a1)
ret i8* %c
; TEST 7b
; Function Attrs: nounwind readnone ssp uwtable
define internal i8* @f1b(i8* readnone %0) local_unnamed_addr #0 {
-; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f1b
-; IS__CGSCC____-SAME: (i8* noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
-; IS__CGSCC____-NEXT: br label [[TMP3:%.*]]
-; IS__CGSCC____: 2:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: 3:
-; IS__CGSCC____-NEXT: ret i8* [[TMP0]]
+; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@f1b
+; CGSCC-SAME: (i8* noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
+; CGSCC-NEXT: br label [[TMP3:%.*]]
+; CGSCC: 2:
+; CGSCC-NEXT: unreachable
+; CGSCC: 3:
+; CGSCC-NEXT: ret i8* [[TMP0]]
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
; Function Attrs: nounwind readnone ssp uwtable
define internal i8* @f2b(i8* readnone %0) local_unnamed_addr #0 {
;
-; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2b
-; IS__CGSCC_NPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp eq i8* undef, null
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
-; IS__CGSCC_NPM: 3:
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = tail call i8* @f1b(i8* noalias nonnull readnone align 4294967296 dereferenceable(4294967295) undef)
-; IS__CGSCC_NPM-NEXT: br label [[TMP7:%.*]]
-; IS__CGSCC_NPM: 5:
-; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = tail call i8* @f3b()
-; IS__CGSCC_NPM-NEXT: br label [[TMP7]]
-; IS__CGSCC_NPM: 7:
-; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
-; IS__CGSCC_NPM-NEXT: ret i8* [[TMP8]]
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@f2b
+; CGSCC-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq i8* undef, null
+; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
+; CGSCC: 3:
+; CGSCC-NEXT: [[TMP4:%.*]] = tail call i8* @f1b(i8* noalias nonnull readnone align 4294967296 dereferenceable(4294967295) undef)
+; CGSCC-NEXT: br label [[TMP7:%.*]]
+; CGSCC: 5:
+; CGSCC-NEXT: [[TMP6:%.*]] = tail call i8* @f3b()
+; CGSCC-NEXT: br label [[TMP7]]
+; CGSCC: 7:
+; CGSCC-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
+; CGSCC-NEXT: ret i8* [[TMP8]]
;
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
; Function Attrs: nounwind readnone ssp uwtable
define internal i8* @f3b(i8* readnone %0) local_unnamed_addr #0 {
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3b
-; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]]
-; IS__CGSCC_NPM: 1:
-; IS__CGSCC_NPM-NEXT: unreachable
-; IS__CGSCC_NPM: 2:
-; IS__CGSCC_NPM-NEXT: ret i8* @a1
+; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@f3b
+; CGSCC-SAME: () local_unnamed_addr #[[ATTR0]] {
+; CGSCC-NEXT: br label [[TMP2:%.*]]
+; CGSCC: 1:
+; CGSCC-NEXT: unreachable
+; CGSCC: 2:
+; CGSCC-NEXT: ret i8* @a1
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
}
define align 4 i32* @test7b(i32* align 32 %p) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test7b
-; IS__TUNIT____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i32* [[P]]
+; TUNIT: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@test7b
+; TUNIT-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: ret i32* [[P]]
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test7b
-; IS__CGSCC_NPM-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: ret i32* [[P]]
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@test7b
+; CGSCC-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: ret i32* [[P]]
;
tail call i8* @f1b(i8* align 8 dereferenceable(1) @a1)
ret i32* %p
; TEST 8
define void @test8_helper() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test8_helper() {
-; IS__TUNIT____-NEXT: [[PTR0:%.*]] = tail call i32* @unknown()
-; IS__TUNIT____-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown()
-; IS__TUNIT____-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown()
-; IS__TUNIT____-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]+]]
-; IS__TUNIT____-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]]
-; IS__TUNIT____-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]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test8_helper() {
-; IS__CGSCC____-NEXT: [[PTR0:%.*]] = tail call i32* @unknown()
-; IS__CGSCC____-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown()
-; IS__CGSCC____-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown()
-; IS__CGSCC____-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____-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____-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____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@test8_helper() {
+; TUNIT-NEXT: [[PTR0:%.*]] = tail call i32* @unknown()
+; TUNIT-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown()
+; TUNIT-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown()
+; TUNIT-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]+]]
+; TUNIT-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]]
+; TUNIT-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]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@test8_helper() {
+; CGSCC-NEXT: [[PTR0:%.*]] = tail call i32* @unknown()
+; CGSCC-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown()
+; CGSCC-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown()
+; CGSCC-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]+]]
+; CGSCC-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]]
+; CGSCC-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]]
+; CGSCC-NEXT: ret void
;
%ptr0 = tail call i32* @unknown()
%ptr1 = tail call align 4 i32* @unknown()
declare void @user_i32_ptr(i32* nocapture readnone) nounwind
define internal void @test8(i32* %a, i32* %b, i32* %c) {
-; IS__TUNIT____: Function Attrs: nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test8
-; IS__TUNIT____-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR2]]
-; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR2]]
-; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR2]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test8
-; IS__CGSCC____-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@test8
+; TUNIT-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR2]]
+; TUNIT-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR2]]
+; TUNIT-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR2]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@test8
+; CGSCC-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR3]]
+; CGSCC-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR3]]
+; CGSCC-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR3]]
+; CGSCC-NEXT: ret void
;
call void @user_i32_ptr(i32* %a)
call void @user_i32_ptr(i32* %b)
; FIXME: This will work with an upcoming patch (D66618 or similar)
; store i32 -1, i32* %g1, align 32
define i32* @test10a(i32* align 32 %p) {
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test10a
-; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
-; IS__TUNIT____-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: store i32 1, i32* [[R]], align 32
-; IS__TUNIT____-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
-; IS__TUNIT____-NEXT: br label [[E:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 8
-; IS__TUNIT____-NEXT: store i32 -1, i32* [[G1]], align 32
-; IS__TUNIT____-NEXT: br label [[E]]
-; IS__TUNIT____: e:
-; IS__TUNIT____-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
-; IS__TUNIT____-NEXT: ret i32* [[PHI]]
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test10a
-; IS__CGSCC____-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
-; IS__CGSCC____-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: store i32 1, i32* [[R]], align 32
-; IS__CGSCC____-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
-; IS__CGSCC____-NEXT: br label [[E:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 8
-; IS__CGSCC____-NEXT: store i32 -1, i32* [[G1]], align 32
-; IS__CGSCC____-NEXT: br label [[E]]
-; IS__CGSCC____: e:
-; IS__CGSCC____-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
-; IS__CGSCC____-NEXT: ret i32* [[PHI]]
+; TUNIT: Function Attrs: nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@test10a
+; TUNIT-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
+; TUNIT-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3]]
+; TUNIT-NEXT: store i32 1, i32* [[R]], align 32
+; TUNIT-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
+; TUNIT-NEXT: br label [[E:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 8
+; TUNIT-NEXT: store i32 -1, i32* [[G1]], align 32
+; TUNIT-NEXT: br label [[E]]
+; TUNIT: e:
+; TUNIT-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
+; TUNIT-NEXT: ret i32* [[PHI]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@test10a
+; CGSCC-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
+; CGSCC-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4]]
+; CGSCC-NEXT: store i32 1, i32* [[R]], align 32
+; CGSCC-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
+; CGSCC-NEXT: br label [[E:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 8
+; CGSCC-NEXT: store i32 -1, i32* [[G1]], align 32
+; CGSCC-NEXT: br label [[E]]
+; CGSCC: e:
+; CGSCC-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
+; CGSCC-NEXT: ret i32* [[PHI]]
;
%l = load i32, i32* %p
%c = icmp eq i32 %l, 0
; FIXME: This will work with an upcoming patch (D66618 or similar)
; store i32 -1, i32* %g1, align 32
define i32* @test10b(i32* align 32 %p) {
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test10b
-; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
-; IS__TUNIT____-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: store i32 1, i32* [[R]], align 32
-; IS__TUNIT____-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
-; IS__TUNIT____-NEXT: br label [[E:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 -8
-; IS__TUNIT____-NEXT: store i32 -1, i32* [[G1]], align 32
-; IS__TUNIT____-NEXT: br label [[E]]
-; IS__TUNIT____: e:
-; IS__TUNIT____-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
-; IS__TUNIT____-NEXT: ret i32* [[PHI]]
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test10b
-; IS__CGSCC____-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
-; IS__CGSCC____-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: store i32 1, i32* [[R]], align 32
-; IS__CGSCC____-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
-; IS__CGSCC____-NEXT: br label [[E:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 -8
-; IS__CGSCC____-NEXT: store i32 -1, i32* [[G1]], align 32
-; IS__CGSCC____-NEXT: br label [[E]]
-; IS__CGSCC____: e:
-; IS__CGSCC____-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
-; IS__CGSCC____-NEXT: ret i32* [[PHI]]
+; TUNIT: Function Attrs: nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@test10b
+; TUNIT-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
+; TUNIT-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3]]
+; TUNIT-NEXT: store i32 1, i32* [[R]], align 32
+; TUNIT-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
+; TUNIT-NEXT: br label [[E:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 -8
+; TUNIT-NEXT: store i32 -1, i32* [[G1]], align 32
+; TUNIT-NEXT: br label [[E]]
+; TUNIT: e:
+; TUNIT-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
+; TUNIT-NEXT: ret i32* [[PHI]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@test10b
+; CGSCC-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
+; CGSCC-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4]]
+; CGSCC-NEXT: store i32 1, i32* [[R]], align 32
+; CGSCC-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
+; CGSCC-NEXT: br label [[E:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 -8
+; CGSCC-NEXT: store i32 -1, i32* [[G1]], align 32
+; CGSCC-NEXT: br label [[E]]
+; CGSCC: e:
+; CGSCC-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
+; CGSCC-NEXT: ret i32* [[PHI]]
;
%l = load i32, i32* %p
%c = icmp eq i32 %l, 0
define i64 @test11(i32* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test11
-; 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:%.*]]) #[[ATTR5:[0-9]+]] {
-; 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]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test11
+; TUNIT-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; TUNIT-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8
+; TUNIT-NEXT: ret i64 [[RET]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test11
+; CGSCC-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; CGSCC-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8
+; CGSCC-NEXT: ret i64 [[RET]]
;
%p-cast = bitcast i32* %p to i64*
%ret = load i64, i64* %p-cast, align 8
; FXIME: %p should have nonnull
define i64 @test12-1(i32* align 4 %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-1
-; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
-; 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:%.*]]) #[[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: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16
-; IS__CGSCC____-NEXT: ret i64 [[RET]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test12-1
+; TUNIT-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; TUNIT-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
+; TUNIT-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
+; TUNIT-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16
+; TUNIT-NEXT: ret i64 [[RET]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test12-1
+; CGSCC-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; CGSCC-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
+; CGSCC-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
+; CGSCC-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16
+; CGSCC-NEXT: ret i64 [[RET]]
;
%p-cast = bitcast i32* %p to i64*
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 1
}
define i64 @test12-2(i32* align 4 %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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____-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:%.*]]) #[[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: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16
-; IS__CGSCC____-NEXT: ret i64 [[RET]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test12-2
+; TUNIT-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; TUNIT-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
+; TUNIT-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16
+; TUNIT-NEXT: ret i64 [[RET]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test12-2
+; CGSCC-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; CGSCC-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
+; CGSCC-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16
+; CGSCC-NEXT: ret i64 [[RET]]
;
%p-cast = bitcast i32* %p to i64*
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 0
; FXIME: %p should have nonnull
define void @test12-3(i32* align 4 %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-3
-; 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:%.*]]) #[[ATTR6:[0-9]+]] {
-; 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
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test12-3
+; TUNIT-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; TUNIT-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
+; TUNIT-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
+; TUNIT-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test12-3
+; CGSCC-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; CGSCC-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
+; CGSCC-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
+; CGSCC-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16
+; CGSCC-NEXT: ret void
;
%p-cast = bitcast i32* %p to i64*
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 1
}
define void @test12-4(i32* align 4 %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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____-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:%.*]]) #[[ATTR6]] {
-; 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
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test12-4
+; TUNIT-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; TUNIT-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
+; TUNIT-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test12-4
+; CGSCC-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; CGSCC-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
+; CGSCC-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16
+; CGSCC-NEXT: ret void
;
%p-cast = bitcast i32* %p to i64*
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 0
declare void @use(i64*) willreturn nounwind
define void @test12-5(i32* align 4 %p) {
-; IS__TUNIT____: Function Attrs: nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-5
-; IS__TUNIT____-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR6:[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: tail call void @use(i64* align 16 [[ARRAYIDX1]]) #[[ATTR6]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-5
-; IS__CGSCC____-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR7:[0-9]+]] {
-; 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: tail call void @use(i64* align 16 [[ARRAYIDX1]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test12-5
+; TUNIT-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; TUNIT-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
+; TUNIT-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
+; TUNIT-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) #[[ATTR6]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test12-5
+; CGSCC-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR7:[0-9]+]] {
+; CGSCC-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; CGSCC-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
+; CGSCC-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
+; CGSCC-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) #[[ATTR7]]
+; CGSCC-NEXT: ret void
;
%p-cast = bitcast i32* %p to i64*
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 1
}
define void @test12-6(i32* align 4 %p) {
-; IS__TUNIT____: Function Attrs: nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-6
-; IS__TUNIT____-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR6]] {
-; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
-; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
-; IS__TUNIT____-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) #[[ATTR6]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-6
-; IS__CGSCC____-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR7]] {
-; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
-; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
-; IS__CGSCC____-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test12-6
+; TUNIT-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR6]] {
+; TUNIT-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; TUNIT-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
+; TUNIT-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) #[[ATTR6]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test12-6
+; CGSCC-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR7]] {
+; CGSCC-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
+; CGSCC-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
+; CGSCC-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) #[[ATTR7]]
+; CGSCC-NEXT: ret void
;
%p-cast = bitcast i32* %p to i64*
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 0
}
define void @test13(i1 %c, i32* align 32 %dst) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test13
-; 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:%.*]]
-; IS__TUNIT____: falsebb:
-; IS__TUNIT____-NEXT: br label [[END]]
-; IS__TUNIT____: end:
-; IS__TUNIT____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ]
-; 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 willreturn writeonly uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test13
-; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] {
-; 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
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
+; TUNIT-LABEL: define {{[^@]+}}@test13
+; TUNIT-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
+; TUNIT: truebb:
+; TUNIT-NEXT: br label [[END:%.*]]
+; TUNIT: falsebb:
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ]
+; TUNIT-NEXT: store i32 0, i32* [[PTR]], align 32
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
+; CGSCC-LABEL: define {{[^@]+}}@test13
+; CGSCC-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
+; CGSCC: truebb:
+; CGSCC-NEXT: br label [[END:%.*]]
+; CGSCC: falsebb:
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ]
+; CGSCC-NEXT: store i32 0, i32* [[PTR]], align 32
+; CGSCC-NEXT: ret void
;
br i1 %c, label %truebb, label %falsebb
truebb:
}
define void @test13-1(i1 %c, i32* align 32 %dst) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-1
-; 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:%.*]]
-; IS__TUNIT____: falsebb:
-; IS__TUNIT____-NEXT: br label [[END]]
-; IS__TUNIT____: end:
-; IS__TUNIT____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ]
-; 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:%.*]]) #[[ATTR9:[0-9]+]] {
-; 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
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test13-1
+; TUNIT-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
+; TUNIT: truebb:
+; TUNIT-NEXT: br label [[END:%.*]]
+; TUNIT: falsebb:
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ]
+; TUNIT-NEXT: store i32 0, i32* [[PTR]], align 16
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test13-1
+; CGSCC-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
+; CGSCC: truebb:
+; CGSCC-NEXT: br label [[END:%.*]]
+; CGSCC: falsebb:
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ]
+; CGSCC-NEXT: store i32 0, i32* [[PTR]], align 16
+; CGSCC-NEXT: ret void
;
br i1 %c, label %truebb, label %falsebb
truebb:
}
define void @test13-2(i1 %c, i32* align 32 %dst) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
-; IS__TUNIT____: truebb:
-; IS__TUNIT____-NEXT: br label [[END:%.*]]
-; IS__TUNIT____: falsebb:
-; IS__TUNIT____-NEXT: br label [[END]]
-; IS__TUNIT____: end:
-; IS__TUNIT____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ]
-; 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:%.*]]) #[[ATTR9]] {
-; 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
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test13-2
+; TUNIT-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
+; TUNIT: truebb:
+; TUNIT-NEXT: br label [[END:%.*]]
+; TUNIT: falsebb:
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ]
+; TUNIT-NEXT: store i32 0, i32* [[PTR]], align 32
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test13-2
+; CGSCC-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
+; CGSCC: truebb:
+; CGSCC-NEXT: br label [[END:%.*]]
+; CGSCC: falsebb:
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ]
+; CGSCC-NEXT: store i32 0, i32* [[PTR]], align 32
+; CGSCC-NEXT: ret void
;
br i1 %c, label %truebb, label %falsebb
truebb:
}
define void @test13-3(i1 %c, i32* align 32 %dst) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
-; IS__TUNIT____: truebb:
-; IS__TUNIT____-NEXT: br label [[END:%.*]]
-; IS__TUNIT____: falsebb:
-; IS__TUNIT____-NEXT: br label [[END]]
-; IS__TUNIT____: end:
-; IS__TUNIT____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ]
-; 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:%.*]]) #[[ATTR9]] {
-; 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
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test13-3
+; TUNIT-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
+; TUNIT: truebb:
+; TUNIT-NEXT: br label [[END:%.*]]
+; TUNIT: falsebb:
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ]
+; TUNIT-NEXT: store i32 0, i32* [[PTR]], align 32
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test13-3
+; CGSCC-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
+; CGSCC: truebb:
+; CGSCC-NEXT: br label [[END:%.*]]
+; CGSCC: falsebb:
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ]
+; CGSCC-NEXT: store i32 0, i32* [[PTR]], align 32
+; CGSCC-NEXT: ret void
;
br i1 %c, label %truebb, label %falsebb
truebb:
; Don't crash on ptr2int/int2ptr uses.
define i64 @ptr2int(i32* %p) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr2int
-; 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:%.*]]) #[[ATTR10:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64
-; IS__CGSCC____-NEXT: ret i64 [[P2I]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ptr2int
+; TUNIT-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR9]] {
+; TUNIT-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64
+; TUNIT-NEXT: ret i64 [[P2I]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ptr2int
+; CGSCC-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR10:[0-9]+]] {
+; CGSCC-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64
+; CGSCC-NEXT: ret i64 [[P2I]]
;
%p2i = ptrtoint i32* %p to i64
ret i64 %p2i
}
define i64* @int2ptr(i64 %i) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@int2ptr
-; 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:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64*
-; IS__CGSCC____-NEXT: ret i64* [[I2P]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@int2ptr
+; TUNIT-SAME: (i64 [[I:%.*]]) #[[ATTR9]] {
+; TUNIT-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64*
+; TUNIT-NEXT: ret i64* [[I2P]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@int2ptr
+; CGSCC-SAME: (i64 [[I:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64*
+; CGSCC-NEXT: ret i64* [[I2P]]
;
%i2p = inttoptr i64 %i to i64*
ret i64* %i2p
; Use the store alignment only for the pointer operand.
define void @aligned_store(i8* %Value, i8** %Ptr) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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____-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:%.*]]) #[[ATTR6]] {
-; IS__CGSCC____-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@aligned_store
+; TUNIT-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@aligned_store
+; CGSCC-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32
+; CGSCC-NEXT: ret void
;
store i8* %Value, i8** %Ptr, align 32
ret void
}
define void @align_store_after_bc(i32* align 2048 %arg) {
;
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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____-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8*
-; IS__TUNIT____-NEXT: store i8 0, i8* [[BC]], align 2048
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@align_store_after_bc
+; TUNIT-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8*
+; TUNIT-NEXT: store i8 0, i8* [[BC]], align 2048
+; 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:%.*]]) #[[ATTR6]] {
-; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8*
-; IS__CGSCC____-NEXT: store i8 0, i8* [[BC]], align 2048
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@align_store_after_bc
+; CGSCC-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8*
+; CGSCC-NEXT: store i8 0, i8* [[BC]], align 2048
+; CGSCC-NEXT: ret void
;
%bc = bitcast i32* %arg to i8*
store i8 0, i8* %bc
; we cannot also put on the caller.
@cnd = external global i1
define i32 @musttail_callee_1(i32* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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____-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:%.*]]) #[[ATTR5]] {
-; IS__CGSCC____-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32
-; IS__CGSCC____-NEXT: ret i32 [[V]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@musttail_callee_1
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32
+; TUNIT-NEXT: ret i32 [[V]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@musttail_callee_1
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32
+; CGSCC-NEXT: ret i32 [[V]]
;
%v = load i32, i32* %p, align 32
ret i32 %v
}
define i32 @musttail_caller_1(i32* %p) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_caller_1
-; 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]]) #[[ATTR11:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[V]]
-; IS__TUNIT____: exit:
-; IS__TUNIT____-NEXT: ret i32 0
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@musttail_caller_1
-; IS__CGSCC____-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR11:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
-; IS__CGSCC____: mt:
-; IS__CGSCC____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR14:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[V]]
-; IS__CGSCC____: exit:
-; IS__CGSCC____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@musttail_caller_1
+; TUNIT-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR10:[0-9]+]] {
+; TUNIT-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1
+; TUNIT-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
+; TUNIT: mt:
+; TUNIT-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree readonly [[P]]) #[[ATTR11:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[V]]
+; TUNIT: exit:
+; TUNIT-NEXT: ret i32 0
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@musttail_caller_1
+; CGSCC-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR11:[0-9]+]] {
+; CGSCC-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1
+; CGSCC-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
+; CGSCC: mt:
+; CGSCC-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR14:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[V]]
+; CGSCC: exit:
+; CGSCC-NEXT: ret i32 0
;
%c = load i1, i1* @cnd
br i1 %c, label %mt, label %exit
}
define i32* @checkAndAdvance(i32* align(16) %p) {
-; IS__TUNIT____: Function Attrs: nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@checkAndAdvance
-; IS__TUNIT____-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR2]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[ADD_PTR]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ]
-; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR2]]
-; IS__TUNIT____-NEXT: ret i32* [[RETVAL_0]]
-;
-; IS__CGSCC____: Function Attrs: nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@checkAndAdvance
-; IS__CGSCC____-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[ADD_PTR]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ]
-; IS__CGSCC____-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: ret i32* [[RETVAL_0]]
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@checkAndAdvance
+; TUNIT-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR2]]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[ADD_PTR]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ]
+; TUNIT-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR2]]
+; TUNIT-NEXT: ret i32* [[RETVAL_0]]
+;
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@checkAndAdvance
+; CGSCC-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR3]]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[ADD_PTR]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ]
+; CGSCC-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR3]]
+; CGSCC-NEXT: ret i32* [[RETVAL_0]]
;
entry:
%0 = load i32, i32* %p, align 4
@G = global i8 0, align 32
define internal i8* @aligned_8_return(i8* %a, i1 %c1, i1 %c2) norecurse {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@aligned_8_return
-; IS__TUNIT____-SAME: (i8* noalias nofree readnone align 16 "no-capture-maybe-returned" [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR9]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i8*, align 8
-; IS__TUNIT____-NEXT: br i1 [[C1]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[GEP:%.*]] = getelementptr i8, i8* @G, i32 8
-; IS__TUNIT____-NEXT: [[SEL:%.*]] = select i1 [[C2]], i8* [[A]], i8* [[GEP]]
-; IS__TUNIT____-NEXT: store i8* [[SEL]], i8** [[STACK]], align 8
-; IS__TUNIT____-NEXT: br label [[END:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i8* @G, i8** [[STACK]], align 8
-; IS__TUNIT____-NEXT: br label [[END]]
-; IS__TUNIT____: end:
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i8*, i8** [[STACK]], align 8
-; IS__TUNIT____-NEXT: ret i8* [[L]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@aligned_8_return
-; IS__CGSCC____-SAME: (i8* noalias nofree readnone align 16 "no-capture-maybe-returned" [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i8*, align 8
-; IS__CGSCC____-NEXT: br i1 [[C1]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[GEP:%.*]] = getelementptr i8, i8* @G, i32 8
-; IS__CGSCC____-NEXT: [[SEL:%.*]] = select i1 [[C2]], i8* [[A]], i8* [[GEP]]
-; IS__CGSCC____-NEXT: store i8* [[SEL]], i8** [[STACK]], align 8
-; IS__CGSCC____-NEXT: br label [[END:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i8* @G, i8** [[STACK]], align 8
-; IS__CGSCC____-NEXT: br label [[END]]
-; IS__CGSCC____: end:
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i8*, i8** [[STACK]], align 8
-; IS__CGSCC____-NEXT: ret i8* [[L]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@aligned_8_return
+; TUNIT-SAME: (i8* noalias nofree readnone align 16 "no-capture-maybe-returned" [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR9]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i8*, align 8
+; TUNIT-NEXT: br i1 [[C1]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[GEP:%.*]] = getelementptr i8, i8* @G, i32 8
+; TUNIT-NEXT: [[SEL:%.*]] = select i1 [[C2]], i8* [[A]], i8* [[GEP]]
+; TUNIT-NEXT: store i8* [[SEL]], i8** [[STACK]], align 8
+; TUNIT-NEXT: br label [[END:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i8* @G, i8** [[STACK]], align 8
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: [[L:%.*]] = load i8*, i8** [[STACK]], align 8
+; TUNIT-NEXT: ret i8* [[L]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@aligned_8_return
+; CGSCC-SAME: (i8* noalias nofree readnone align 16 "no-capture-maybe-returned" [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i8*, align 8
+; CGSCC-NEXT: br i1 [[C1]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[GEP:%.*]] = getelementptr i8, i8* @G, i32 8
+; CGSCC-NEXT: [[SEL:%.*]] = select i1 [[C2]], i8* [[A]], i8* [[GEP]]
+; CGSCC-NEXT: store i8* [[SEL]], i8** [[STACK]], align 8
+; CGSCC-NEXT: br label [[END:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i8* @G, i8** [[STACK]], align 8
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: [[L:%.*]] = load i8*, i8** [[STACK]], align 8
+; CGSCC-NEXT: ret i8* [[L]]
;
%stack = alloca i8*
br i1 %c1, label %t, label %f
}
define i8* @aligned_8_return_caller(i8* align(16) %a, i1 %c1, i1 %c2) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@aligned_8_return_caller
-; IS__TUNIT____-SAME: (i8* nofree readnone align 16 "no-capture-maybe-returned" [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR9]] {
-; IS__TUNIT____-NEXT: [[R:%.*]] = call align 8 i8* @aligned_8_return(i8* noalias nofree readnone align 16 "no-capture-maybe-returned" [[A]], i1 [[C1]], i1 [[C2]]) #[[ATTR12:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i8* [[R]]
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@aligned_8_return_caller
-; IS__CGSCC____-SAME: (i8* nofree readnone align 16 [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR12:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[R:%.*]] = call align 8 i8* @aligned_8_return(i8* noalias nofree readnone align 16 [[A]], i1 [[C1]], i1 [[C2]]) #[[ATTR13:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i8* [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@aligned_8_return_caller
+; TUNIT-SAME: (i8* nofree readnone align 16 "no-capture-maybe-returned" [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR9]] {
+; TUNIT-NEXT: [[R:%.*]] = call align 8 i8* @aligned_8_return(i8* noalias nofree readnone align 16 "no-capture-maybe-returned" [[A]], i1 [[C1]], i1 [[C2]]) #[[ATTR12:[0-9]+]]
+; TUNIT-NEXT: ret i8* [[R]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@aligned_8_return_caller
+; CGSCC-SAME: (i8* nofree readnone align 16 [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR12:[0-9]+]] {
+; CGSCC-NEXT: [[R:%.*]] = call align 8 i8* @aligned_8_return(i8* noalias nofree readnone align 16 [[A]], i1 [[C1]], i1 [[C2]]) #[[ATTR13:[0-9]+]]
+; CGSCC-NEXT: ret i8* [[R]]
;
%r = call i8* @aligned_8_return(i8* %a, i1 %c1, i1 %c2)
ret i8* %r
attributes #1 = { uwtable noinline }
attributes #2 = { null_pointer_is_valid }
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nounwind }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR6]] = { nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR7]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
-; IS__TUNIT____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR11]] = { nofree nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR2]] = { nounwind }
+; TUNIT: attributes #[[ATTR3]] = { nofree nosync nounwind }
+; TUNIT: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR6]] = { nounwind willreturn }
+; TUNIT: attributes #[[ATTR7]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
+; TUNIT: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR11]] = { nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { noinline nounwind uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree nosync nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR8]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR13]] = { readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR14]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR1]] = { noinline nounwind uwtable }
+; CGSCC: attributes #[[ATTR2]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR3]] = { nounwind }
+; CGSCC: attributes #[[ATTR4]] = { nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR7]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR8]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
+; CGSCC: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR11]] = { nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR13]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR14]] = { readonly willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; When a function is marked `alwaysinline` and is able to be inlined,
; we can IPO its boundaries
}
define void @outer1() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@outer1
-; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@outer1
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@outer1
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@outer1
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret void
;
entry:
call void @inner1()
; CHECK-NOT: Function Attrs
define i32 @outer2() {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@outer2
-; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i32 @inner2() #[[ATTR3:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[R]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@outer2
+; TUNIT-SAME: () #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[R:%.*]] = call i32 @inner2() #[[ATTR3:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[R]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@outer2() {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i32 @inner2() #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[R]]
+; CGSCC-LABEL: define {{[^@]+}}@outer2() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[R:%.*]] = call i32 @inner2() #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[R]]
;
entry:
%r = call i32 @inner2() alwaysinline
; it is `unexactly defined` and alwaysinline but cannot be inlined.
; so it will not be analyzed
define linkonce i32 @inner3(i8* %addr) alwaysinline {
-; IS__TUNIT____: Function Attrs: alwaysinline
-; IS__TUNIT____-LABEL: define {{[^@]+}}@inner3
-; IS__TUNIT____-SAME: (i8* [[ADDR:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: indirectbr i8* [[ADDR]], [label [[ONE:%.*]], label %two]
-; IS__TUNIT____: one:
-; IS__TUNIT____-NEXT: ret i32 42
-; IS__TUNIT____: two:
-; IS__TUNIT____-NEXT: ret i32 44
+; TUNIT: Function Attrs: alwaysinline
+; TUNIT-LABEL: define {{[^@]+}}@inner3
+; TUNIT-SAME: (i8* [[ADDR:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: indirectbr i8* [[ADDR]], [label [[ONE:%.*]], label %two]
+; TUNIT: one:
+; TUNIT-NEXT: ret i32 42
+; TUNIT: two:
+; TUNIT-NEXT: ret i32 44
;
-; IS__CGSCC____: Function Attrs: alwaysinline
-; IS__CGSCC____-LABEL: define {{[^@]+}}@inner3
-; IS__CGSCC____-SAME: (i8* [[ADDR:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: indirectbr i8* [[ADDR]], [label [[ONE:%.*]], label %two]
-; IS__CGSCC____: one:
-; IS__CGSCC____-NEXT: ret i32 42
-; IS__CGSCC____: two:
-; IS__CGSCC____-NEXT: ret i32 44
+; CGSCC: Function Attrs: alwaysinline
+; CGSCC-LABEL: define {{[^@]+}}@inner3
+; CGSCC-SAME: (i8* [[ADDR:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: indirectbr i8* [[ADDR]], [label [[ONE:%.*]], label %two]
+; CGSCC: one:
+; CGSCC-NEXT: ret i32 42
+; CGSCC: two:
+; CGSCC-NEXT: ret i32 44
;
entry:
indirectbr i8* %addr, [ label %one, label %two ]
}
define i32 @outer3(i32 %x) {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@outer3
-; IS__TUNIT____-SAME: (i32 [[X:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp slt i32 [[X]], 42
-; IS__TUNIT____-NEXT: [[ADDR:%.*]] = select i1 [[CMP]], i8* blockaddress(@inner3, [[ONE:%.*]]), i8* blockaddress(@inner3, [[TWO:%.*]])
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @inner3(i8* [[ADDR]])
-; IS__TUNIT____-NEXT: ret i32 [[CALL]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@outer3
+; TUNIT-SAME: (i32 [[X:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: [[CMP:%.*]] = icmp slt i32 [[X]], 42
+; TUNIT-NEXT: [[ADDR:%.*]] = select i1 [[CMP]], i8* blockaddress(@inner3, [[ONE:%.*]]), i8* blockaddress(@inner3, [[TWO:%.*]])
+; TUNIT-NEXT: [[CALL:%.*]] = call i32 @inner3(i8* [[ADDR]])
+; TUNIT-NEXT: ret i32 [[CALL]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@outer3
-; IS__CGSCC____-SAME: (i32 [[X:%.*]]) {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 [[X]], 42
-; IS__CGSCC____-NEXT: [[ADDR:%.*]] = select i1 [[CMP]], i8* blockaddress(@inner3, [[ONE:%.*]]), i8* blockaddress(@inner3, [[TWO:%.*]])
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @inner3(i8* [[ADDR]])
-; IS__CGSCC____-NEXT: ret i32 [[CALL]]
+; CGSCC-LABEL: define {{[^@]+}}@outer3
+; CGSCC-SAME: (i32 [[X:%.*]]) {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp slt i32 [[X]], 42
+; CGSCC-NEXT: [[ADDR:%.*]] = select i1 [[CMP]], i8* blockaddress(@inner3, [[ONE:%.*]]), i8* blockaddress(@inner3, [[TWO:%.*]])
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @inner3(i8* [[ADDR]])
+; CGSCC-NEXT: ret i32 [[CALL]]
;
%cmp = icmp slt i32 %x, 42
%addr = select i1 %cmp, i8* blockaddress(@inner3, %one), i8* blockaddress(@inner3, %two)
ret i32 %call
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { alwaysinline nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { norecurse }
-; IS__TUNIT____: attributes #[[ATTR3]] = { alwaysinline }
+; TUNIT: attributes #[[ATTR0]] = { alwaysinline nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { norecurse }
+; TUNIT: attributes #[[ATTR3]] = { alwaysinline }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { alwaysinline nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { alwaysinline }
+; CGSCC: attributes #[[ATTR0]] = { alwaysinline nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { alwaysinline }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define dso_local void @entry(i1 %cond) #0 {
; CHECK-LABEL: define {{[^@]+}}@entry
}
define internal void @foo(i1 %cond) #1 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: call void @baz(i1 [[COND]])
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (i1 [[COND:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: call void @baz(i1 [[COND]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @baz(i1 [[COND]]) #[[ATTR1]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i1 [[COND:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @baz(i1 [[COND]]) #[[ATTR1]]
+; CGSCC-NEXT: ret void
;
entry:
call void @baz(i1 %cond)
}
define internal void @baz(i1 %Cond) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@baz
-; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i1 [[COND]], false
-; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: call void @baz(i1 noundef false)
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: call void @qux()
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@baz
+; TUNIT-SAME: (i1 [[COND:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp ne i1 [[COND]], false
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: call void @baz(i1 noundef false)
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: call void @qux()
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@baz
-; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i1 [[COND]], false
-; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: call void @baz(i1 noundef false)
-; IS__CGSCC____-NEXT: br label [[IF_END]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: call void @qux() #[[ATTR3]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@baz
+; CGSCC-SAME: (i1 [[COND:%.*]]) #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp ne i1 [[COND]], false
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: call void @baz(i1 noundef false)
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: call void @qux() #[[ATTR3]]
+; CGSCC-NEXT: ret void
;
entry:
%tobool = icmp ne i1 %Cond, 0
}
define internal void @qux() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@qux
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: call void @call()
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@qux
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: call void @call()
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@qux() {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @call()
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@qux() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @call()
+; CGSCC-NEXT: ret void
;
entry:
call void @call()
attributes #2 = { "llvm.assume"="B,C" }
attributes #3 = { "llvm.assume"="B,C,A" }
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { "llvm.assume"="A" }
-; IS__TUNIT____: attributes #[[ATTR1]] = { "llvm.assume"="B,A" }
-; IS__TUNIT____: attributes #[[ATTR2]] = { "llvm.assume"="B,C,A" }
+; TUNIT: attributes #[[ATTR0]] = { "llvm.assume"="A" }
+; TUNIT: attributes #[[ATTR1]] = { "llvm.assume"="B,A" }
+; TUNIT: attributes #[[ATTR2]] = { "llvm.assume"="B,C,A" }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { "llvm.assume"="A" }
-; IS__CGSCC____: attributes #[[ATTR1]] = { "llvm.assume"="B,A" }
-; IS__CGSCC____: attributes #[[ATTR2]] = { "llvm.assume"="B,C,A" }
-; IS__CGSCC____: attributes #[[ATTR3]] = { "llvm.assume"="B" }
+; CGSCC: attributes #[[ATTR0]] = { "llvm.assume"="A" }
+; CGSCC: attributes #[[ATTR1]] = { "llvm.assume"="B,A" }
+; CGSCC: attributes #[[ATTR2]] = { "llvm.assume"="B,C,A" }
+; CGSCC: attributes #[[ATTR3]] = { "llvm.assume"="B" }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
; transfer in both directions.
define void @t0_caller(i32* %a) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t0_caller
-; IS__TUNIT_NPM-SAME: (i32* align 256 [[A:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i32, align 32
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = alloca i32*, align 64
-; IS__TUNIT_NPM-NEXT: [[PTR:%.*]] = alloca i32, align 128
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
-; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32
-; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@t0_caller
+; TUNIT-SAME: (i32* align 256 [[A:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 32
+; TUNIT-NEXT: [[C:%.*]] = alloca i32*, align 64
+; TUNIT-NEXT: [[PTR:%.*]] = alloca i32, align 128
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
+; TUNIT-NEXT: store i32 42, i32* [[B]], align 32
+; TUNIT-NEXT: store i32* [[B]], i32** [[C]], align 64
+; TUNIT-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t0_caller
-; IS__CGSCC____-SAME: (i32* align 256 [[A:%.*]]) {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 32
-; IS__CGSCC____-NEXT: [[C:%.*]] = alloca i32*, align 64
-; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 128
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
-; IS__CGSCC____-NEXT: store i32 42, i32* [[B]], align 32
-; IS__CGSCC____-NEXT: store i32* [[B]], i32** [[C]], align 64
-; IS__CGSCC____-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@t0_caller
+; CGSCC-SAME: (i32* align 256 [[A:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 32
+; CGSCC-NEXT: [[C:%.*]] = alloca i32*, align 64
+; CGSCC-NEXT: [[PTR:%.*]] = alloca i32, align 128
+; CGSCC-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
+; CGSCC-NEXT: store i32 42, i32* [[B]], align 32
+; CGSCC-NEXT: store i32* [[B]], i32** [[C]], align 64
+; CGSCC-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; CGSCC-NEXT: ret void
;
entry:
%b = alloca i32, align 32
; The others are annotated with alignment information, amongst others, or even replaced by the constants passed to the call.
define internal void @t0_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a, i64 %b, i32** %c) {
;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t0_callback_callee
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
-; IS__TUNIT_NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT: tail call void @t0_check(i32* align 256 [[A]], i64 noundef 99, i32* nonnull align 32 [[TMP0]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@t0_callback_callee
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
+; TUNIT-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
+; TUNIT-NEXT: tail call void @t0_check(i32* align 256 [[A]], i64 noundef 99, i32* nonnull align 32 [[TMP0]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t0_callback_callee
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
-; IS__CGSCC_NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__CGSCC_NPM-NEXT: tail call void @t0_check(i32* align 256 [[A]], i64 noundef 99, i32* [[TMP0]])
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@t0_callback_callee
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
+; CGSCC-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
+; CGSCC-NEXT: tail call void @t0_check(i32* align 256 [[A]], i64 noundef 99, i32* [[TMP0]])
+; CGSCC-NEXT: ret void
;
entry:
%ptr_val = load i32, i32* %ptr, align 8
define void @t1_caller(i32* noalias %a) {
;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t1_caller
-; IS__TUNIT_NPM-SAME: (i32* noalias nocapture align 256 [[A:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i32, align 32
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = alloca i32*, align 64
-; IS__TUNIT_NPM-NEXT: [[PTR:%.*]] = alloca i32, align 128
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
-; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32
-; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@t1_caller
+; TUNIT-SAME: (i32* noalias nocapture align 256 [[A:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 32
+; TUNIT-NEXT: [[C:%.*]] = alloca i32*, align 64
+; TUNIT-NEXT: [[PTR:%.*]] = alloca i32, align 128
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
+; TUNIT-NEXT: store i32 42, i32* [[B]], align 32
+; TUNIT-NEXT: store i32* [[B]], i32** [[C]], align 64
+; TUNIT-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t1_caller
-; IS__CGSCC_NPM-SAME: (i32* noalias align 256 [[A:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 32
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = alloca i32*, align 64
-; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = alloca i32, align 128
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
-; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32
-; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
-; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@t1_caller
+; CGSCC-SAME: (i32* noalias align 256 [[A:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 32
+; CGSCC-NEXT: [[C:%.*]] = alloca i32*, align 64
+; CGSCC-NEXT: [[PTR:%.*]] = alloca i32, align 128
+; CGSCC-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
+; CGSCC-NEXT: store i32 42, i32* [[B]], align 32
+; CGSCC-NEXT: store i32* [[B]], i32** [[C]], align 64
+; CGSCC-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; CGSCC-NEXT: ret void
;
entry:
%b = alloca i32, align 32
; The others are annotated with alignment information, amongst others, or even replaced by the constants passed to the call.
define internal void @t1_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a, i64 %b, i32** %c) {
;
-; IS__TUNIT_NPM: Function Attrs: nosync
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t1_callback_callee
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
-; IS__TUNIT_NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT: tail call void @t1_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nosync
+; TUNIT-LABEL: define {{[^@]+}}@t1_callback_callee
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
+; TUNIT-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
+; TUNIT-NEXT: tail call void @t1_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nosync
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t1_callback_callee
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
-; IS__CGSCC_NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__CGSCC_NPM-NEXT: tail call void @t1_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture [[TMP0]])
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nosync
+; CGSCC-LABEL: define {{[^@]+}}@t1_callback_callee
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
+; CGSCC-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
+; CGSCC-NEXT: tail call void @t1_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture [[TMP0]])
+; CGSCC-NEXT: ret void
;
entry:
%ptr_val = load i32, i32* %ptr, align 8
; Similar to test 1 but checking that the noalias is only placed if potential synchronization through @t2_check is preserved.
define void @t2_caller(i32* noalias %a) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t2_caller
-; IS__TUNIT_NPM-SAME: (i32* noalias nocapture align 256 [[A:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i32, align 32
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = alloca i32*, align 64
-; IS__TUNIT_NPM-NEXT: [[PTR:%.*]] = alloca i32, align 128
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
-; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32
-; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@t2_caller
+; TUNIT-SAME: (i32* noalias nocapture align 256 [[A:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 32
+; TUNIT-NEXT: [[C:%.*]] = alloca i32*, align 64
+; TUNIT-NEXT: [[PTR:%.*]] = alloca i32, align 128
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
+; TUNIT-NEXT: store i32 42, i32* [[B]], align 32
+; TUNIT-NEXT: store i32* [[B]], i32** [[C]], align 64
+; TUNIT-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t2_caller
-; IS__CGSCC_NPM-SAME: (i32* noalias align 256 [[A:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 32
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = alloca i32*, align 64
-; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = alloca i32, align 128
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
-; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32
-; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
-; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@t2_caller
+; CGSCC-SAME: (i32* noalias align 256 [[A:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 32
+; CGSCC-NEXT: [[C:%.*]] = alloca i32*, align 64
+; CGSCC-NEXT: [[PTR:%.*]] = alloca i32, align 128
+; CGSCC-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
+; CGSCC-NEXT: store i32 42, i32* [[B]], align 32
+; CGSCC-NEXT: store i32* [[B]], i32** [[C]], align 64
+; CGSCC-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; CGSCC-NEXT: ret void
;
entry:
%b = alloca i32, align 32
; FIXME: We should derive noalias for %a and add a "fake use" of %a in all potentially synchronizing calls.
define internal void @t2_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a, i64 %b, i32** %c) {
;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t2_callback_callee
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
-; IS__TUNIT_NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT: tail call void @t2_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@t2_callback_callee
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
+; TUNIT-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
+; TUNIT-NEXT: tail call void @t2_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t2_callback_callee
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
-; IS__CGSCC_NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__CGSCC_NPM-NEXT: tail call void @t2_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture [[TMP0]])
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@t2_callback_callee
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
+; CGSCC-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
+; CGSCC-NEXT: tail call void @t2_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture [[TMP0]])
+; CGSCC-NEXT: ret void
;
entry:
%ptr_val = load i32, i32* %ptr, align 8
; Basically test 2 with the casted callback callee used twice.
define void @t3_caller(i32* noalias %a) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t3_caller
-; IS__TUNIT_NPM-SAME: (i32* noalias nocapture align 256 [[A:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[B:%.*]] = alloca i32, align 32
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = alloca i32*, align 64
-; IS__TUNIT_NPM-NEXT: [[PTR:%.*]] = alloca i32, align 128
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
-; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32
-; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@t3_caller
+; TUNIT-SAME: (i32* noalias nocapture align 256 [[A:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 32
+; TUNIT-NEXT: [[C:%.*]] = alloca i32*, align 64
+; TUNIT-NEXT: [[PTR:%.*]] = alloca i32, align 128
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
+; TUNIT-NEXT: store i32 42, i32* [[B]], align 32
+; TUNIT-NEXT: store i32* [[B]], i32** [[C]], align 64
+; TUNIT-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; TUNIT-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t3_caller
-; IS__CGSCC_NPM-SAME: (i32* noalias align 256 [[A:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 32
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = alloca i32*, align 64
-; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = alloca i32, align 128
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
-; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32
-; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
-; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@t3_caller
+; CGSCC-SAME: (i32* noalias align 256 [[A:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 32
+; CGSCC-NEXT: [[C:%.*]] = alloca i32*, align 64
+; CGSCC-NEXT: [[PTR:%.*]] = alloca i32, align 128
+; CGSCC-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
+; CGSCC-NEXT: store i32 42, i32* [[B]], align 32
+; CGSCC-NEXT: store i32* [[B]], i32** [[C]], align 64
+; CGSCC-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; CGSCC-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
+; CGSCC-NEXT: ret void
;
entry:
%b = alloca i32, align 32
; FIXME: We should derive noalias for %a and add a "fake use" of %a in all potentially synchronizing calls.
define internal void @t3_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a, i64 %b, i32** %c) {
;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t3_callback_callee
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
-; IS__TUNIT_NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT: tail call void @t3_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@t3_callback_callee
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
+; TUNIT-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
+; TUNIT-NEXT: tail call void @t3_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t3_callback_callee
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
-; IS__CGSCC_NPM-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__CGSCC_NPM-NEXT: tail call void @t3_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture [[TMP0]])
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@t3_callback_callee
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[IS_NOT_NULL:%.*]], i32* nocapture nofree noundef nonnull readonly align 8 dereferenceable(4) [[PTR:%.*]], i32* nocapture align 256 [[A:%.*]], i64 [[B:%.*]], i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
+; CGSCC-NEXT: store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
+; CGSCC-NEXT: tail call void @t3_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture [[TMP0]])
+; CGSCC-NEXT: ret void
;
entry:
%ptr_val = load i32, i32* %ptr, align 8
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-globals
; call site specific analysis is disabled
-; 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 -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,TUNIT
-; 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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define dso_local i32 @test_range1(i32 %0) #0 {
; CHECK-LABEL: define {{[^@]+}}@test_range1
ret i32 %.0
}
define i32 @test(i32 %0, i32 %1) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
-; IS__TUNIT____-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
-; IS__TUNIT____: 4:
-; IS__TUNIT____-NEXT: [[TMP5:%.*]] = call i32 @test_range1(i32 [[TMP0]])
-; IS__TUNIT____-NEXT: br label [[TMP8:%.*]]
-; IS__TUNIT____: 6:
-; IS__TUNIT____-NEXT: [[TMP7:%.*]] = call i32 @test_range2(i32 [[TMP0]])
-; IS__TUNIT____-NEXT: br label [[TMP8]]
-; IS__TUNIT____: 8:
-; IS__TUNIT____-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
-; IS__TUNIT____-NEXT: ret i32 [[DOT0]]
+; TUNIT-LABEL: define {{[^@]+}}@test
+; TUNIT-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
+; TUNIT-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
+; TUNIT: 4:
+; TUNIT-NEXT: [[TMP5:%.*]] = call i32 @test_range1(i32 [[TMP0]])
+; TUNIT-NEXT: br label [[TMP8:%.*]]
+; TUNIT: 6:
+; TUNIT-NEXT: [[TMP7:%.*]] = call i32 @test_range2(i32 [[TMP0]])
+; TUNIT-NEXT: br label [[TMP8]]
+; TUNIT: 8:
+; TUNIT-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
+; TUNIT-NEXT: ret i32 [[DOT0]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
-; IS__CGSCC____-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
-; IS__CGSCC____: 4:
-; IS__CGSCC____-NEXT: [[TMP5:%.*]] = call noundef i32 @test_range1(i32 [[TMP0]])
-; IS__CGSCC____-NEXT: br label [[TMP8:%.*]]
-; IS__CGSCC____: 6:
-; IS__CGSCC____-NEXT: [[TMP7:%.*]] = call noundef i32 @test_range2(i32 [[TMP0]])
-; IS__CGSCC____-NEXT: br label [[TMP8]]
-; IS__CGSCC____: 8:
-; IS__CGSCC____-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
-; IS__CGSCC____-NEXT: ret i32 [[DOT0]]
+; CGSCC-LABEL: define {{[^@]+}}@test
+; CGSCC-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
+; CGSCC-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
+; CGSCC: 4:
+; CGSCC-NEXT: [[TMP5:%.*]] = call noundef i32 @test_range1(i32 [[TMP0]])
+; CGSCC-NEXT: br label [[TMP8:%.*]]
+; CGSCC: 6:
+; CGSCC-NEXT: [[TMP7:%.*]] = call noundef i32 @test_range2(i32 [[TMP0]])
+; CGSCC-NEXT: br label [[TMP8]]
+; CGSCC: 8:
+; CGSCC-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
+; CGSCC-NEXT: ret i32 [[DOT0]]
;
%3 = icmp ne i32 %1, 0
br i1 %3, label %4, label %6
}
define i32 @test_pcheck1(i32 %0) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_pcheck1
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
-; IS__TUNIT____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP4]]
+; TUNIT-LABEL: define {{[^@]+}}@test_pcheck1
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
+; TUNIT-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; TUNIT-NEXT: ret i32 [[TMP4]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_pcheck1
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP4]]
+; CGSCC-LABEL: define {{[^@]+}}@test_pcheck1
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
+; CGSCC-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; CGSCC-NEXT: ret i32 [[TMP4]]
;
%2 = call i32 @test(i32 %0, i32 1)
%3 = icmp slt i32 %2, 101
}
define i32 @test_pcheck2(i32 %0) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_pcheck2
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
-; IS__TUNIT____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP4]]
+; TUNIT-LABEL: define {{[^@]+}}@test_pcheck2
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
+; TUNIT-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; TUNIT-NEXT: ret i32 [[TMP4]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_pcheck2
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP4]]
+; CGSCC-LABEL: define {{[^@]+}}@test_pcheck2
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
+; CGSCC-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; CGSCC-NEXT: ret i32 [[TMP4]]
;
%2 = call i32 @test(i32 %0, i32 0)
%3 = icmp sgt i32 %2, 99
}
define i32 @test_ncheck1(i32 %0) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_ncheck1
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
-; IS__TUNIT____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP4]]
+; TUNIT-LABEL: define {{[^@]+}}@test_ncheck1
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
+; TUNIT-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; TUNIT-NEXT: ret i32 [[TMP4]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_ncheck1
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP4]]
+; CGSCC-LABEL: define {{[^@]+}}@test_ncheck1
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
+; CGSCC-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; CGSCC-NEXT: ret i32 [[TMP4]]
;
%2 = call i32 @test(i32 %0, i32 1)
%3 = icmp sgt i32 %2, 50
}
define i32 @test_ncheck2(i32 %0) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_ncheck2
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
-; IS__TUNIT____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP4]]
+; TUNIT-LABEL: define {{[^@]+}}@test_ncheck2
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
+; TUNIT-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; TUNIT-NEXT: ret i32 [[TMP4]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_ncheck2
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP4]]
+; CGSCC-LABEL: define {{[^@]+}}@test_ncheck2
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
+; CGSCC-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; CGSCC-NEXT: ret i32 [[TMP4]]
;
%2 = call i32 @test(i32 %0, i32 0)
%3 = icmp sgt i32 %2, 150
attributes #0 = { noinline nounwind sspstrong uwtable}
-; IS__TUNIT_____: !0 = !{i32 0, i32 101}
-; IS__TUNIT_____: !1 = !{i32 100, i32 201}
+; TUNIT_: !0 = !{i32 0, i32 101}
+; TUNIT_: !1 = !{i32 100, i32 201}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone sspstrong willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
+; CGSCC: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone sspstrong willreturn uwtable }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-globals
; call site specific analysis is enabled
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-enable-call-site-specific-deduction=true -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 -aa-pipeline=basic-aa -passes=attributor -attributor-enable-call-site-specific-deduction=true -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-enable-call-site-specific-deduction=true -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-enable-call-site-specific-deduction=true -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define dso_local i32 @test_range1(i32 %0) #0 {
; CHECK-LABEL: define {{[^@]+}}@test_range1
ret i32 %.0
}
define i32 @test(i32 %0, i32 %1) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
-; IS__TUNIT____-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
-; IS__TUNIT____: 4:
-; IS__TUNIT____-NEXT: [[TMP5:%.*]] = call i32 @test_range1(i32 [[TMP0]])
-; IS__TUNIT____-NEXT: br label [[TMP8:%.*]]
-; IS__TUNIT____: 6:
-; IS__TUNIT____-NEXT: [[TMP7:%.*]] = call i32 @test_range2(i32 [[TMP0]])
-; IS__TUNIT____-NEXT: br label [[TMP8]]
-; IS__TUNIT____: 8:
-; IS__TUNIT____-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
-; IS__TUNIT____-NEXT: ret i32 [[DOT0]]
+; TUNIT-LABEL: define {{[^@]+}}@test
+; TUNIT-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
+; TUNIT-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
+; TUNIT: 4:
+; TUNIT-NEXT: [[TMP5:%.*]] = call i32 @test_range1(i32 [[TMP0]])
+; TUNIT-NEXT: br label [[TMP8:%.*]]
+; TUNIT: 6:
+; TUNIT-NEXT: [[TMP7:%.*]] = call i32 @test_range2(i32 [[TMP0]])
+; TUNIT-NEXT: br label [[TMP8]]
+; TUNIT: 8:
+; TUNIT-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
+; TUNIT-NEXT: ret i32 [[DOT0]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
-; IS__CGSCC____-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
-; IS__CGSCC____: 4:
-; IS__CGSCC____-NEXT: [[TMP5:%.*]] = call noundef i32 @test_range1(i32 [[TMP0]])
-; IS__CGSCC____-NEXT: br label [[TMP8:%.*]]
-; IS__CGSCC____: 6:
-; IS__CGSCC____-NEXT: [[TMP7:%.*]] = call noundef i32 @test_range2(i32 [[TMP0]])
-; IS__CGSCC____-NEXT: br label [[TMP8]]
-; IS__CGSCC____: 8:
-; IS__CGSCC____-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
-; IS__CGSCC____-NEXT: ret i32 [[DOT0]]
+; CGSCC-LABEL: define {{[^@]+}}@test
+; CGSCC-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
+; CGSCC-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
+; CGSCC: 4:
+; CGSCC-NEXT: [[TMP5:%.*]] = call noundef i32 @test_range1(i32 [[TMP0]])
+; CGSCC-NEXT: br label [[TMP8:%.*]]
+; CGSCC: 6:
+; CGSCC-NEXT: [[TMP7:%.*]] = call noundef i32 @test_range2(i32 [[TMP0]])
+; CGSCC-NEXT: br label [[TMP8]]
+; CGSCC: 8:
+; CGSCC-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
+; CGSCC-NEXT: ret i32 [[DOT0]]
;
%3 = icmp ne i32 %1, 0
br i1 %3, label %4, label %6
}
define i32 @test_pcheck1(i32 %0) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_pcheck1
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
-; IS__TUNIT____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP4]]
+; TUNIT-LABEL: define {{[^@]+}}@test_pcheck1
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
+; TUNIT-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; TUNIT-NEXT: ret i32 [[TMP4]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_pcheck1
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP4]]
+; CGSCC-LABEL: define {{[^@]+}}@test_pcheck1
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
+; CGSCC-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; CGSCC-NEXT: ret i32 [[TMP4]]
;
-; IS__TUNIT_____ENABLED-LABEL: define {{[^@]+}}@test_pcheck1
-; IS__TUNIT_____ENABLED-SAME: (i32 [[TMP0:%.*]])
-; IS__TUNIT_____ENABLED-NEXT: ret i32 1
+; TUNIT_ENABLED-LABEL: define {{[^@]+}}@test_pcheck1
+; TUNIT_ENABLED-SAME: (i32 [[TMP0:%.*]])
+; TUNIT_ENABLED-NEXT: ret i32 1
%2 = call i32 @test(i32 %0, i32 1)
%3 = icmp slt i32 %2, 101
%4 = zext i1 %3 to i32
}
define i32 @test_pcheck2(i32 %0) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_pcheck2
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
-; IS__TUNIT____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP4]]
+; TUNIT-LABEL: define {{[^@]+}}@test_pcheck2
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
+; TUNIT-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; TUNIT-NEXT: ret i32 [[TMP4]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_pcheck2
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP4]]
+; CGSCC-LABEL: define {{[^@]+}}@test_pcheck2
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
+; CGSCC-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; CGSCC-NEXT: ret i32 [[TMP4]]
;
%2 = call i32 @test(i32 %0, i32 0)
%3 = icmp sgt i32 %2, 99
}
define i32 @test_ncheck1(i32 %0) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_ncheck1
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
-; IS__TUNIT____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP4]]
+; TUNIT-LABEL: define {{[^@]+}}@test_ncheck1
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
+; TUNIT-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; TUNIT-NEXT: ret i32 [[TMP4]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_ncheck1
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP4]]
+; CGSCC-LABEL: define {{[^@]+}}@test_ncheck1
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
+; CGSCC-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; CGSCC-NEXT: ret i32 [[TMP4]]
;
%2 = call i32 @test(i32 %0, i32 1)
%3 = icmp sgt i32 %2, 50
}
define i32 @test_ncheck2(i32 %0) #0 {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_ncheck2
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
-; IS__TUNIT____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP4]]
+; TUNIT-LABEL: define {{[^@]+}}@test_ncheck2
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
+; TUNIT-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; TUNIT-NEXT: ret i32 [[TMP4]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_ncheck2
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP4]]
+; CGSCC-LABEL: define {{[^@]+}}@test_ncheck2
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
+; CGSCC-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
+; CGSCC-NEXT: ret i32 [[TMP4]]
;
%2 = call i32 @test(i32 %0, i32 0)
%3 = icmp sgt i32 %2, 150
attributes #0 = { noinline nounwind sspstrong uwtable}
-; IS__TUNIT_____: !0 = !{i32 0, i32 101}
-; IS__TUNIT_____: !1 = !{i32 100, i32 201}
+; TUNIT_: !0 = !{i32 0, i32 101}
+; TUNIT_: !1 = !{i32 100, i32 201}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone sspstrong willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
+; CGSCC: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone sspstrong willreturn uwtable }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-globals
; call site specific analysis is disabled
-; 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 -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,TUNIT
-; 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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define i32 @test_range(i32 %unknown) {
; CHECK-LABEL: define {{[^@]+}}@test_range
}
define i32 @test1(i32 %unknown, i32 %b) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test1
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
-; IS__TUNIT____-NEXT: ret i32 [[TMP2]]
+; TUNIT-LABEL: define {{[^@]+}}@test1
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; TUNIT-NEXT: [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
+; TUNIT-NEXT: ret i32 [[TMP2]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
-; IS__CGSCC____-NEXT: ret i32 [[TMP2]]
+; CGSCC-LABEL: define {{[^@]+}}@test1
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; CGSCC-NEXT: [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
+; CGSCC-NEXT: ret i32 [[TMP2]]
;
%1 = call i32 @test_range(i32 %unknown)
%2 = sub nsw i32 %1, %b
}
define i32 @test2(i32 %unknown, i32 %b) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
-; IS__TUNIT____-NEXT: ret i32 [[TMP2]]
+; TUNIT-LABEL: define {{[^@]+}}@test2
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; TUNIT-NEXT: [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
+; TUNIT-NEXT: ret i32 [[TMP2]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
-; IS__CGSCC____-NEXT: ret i32 [[TMP2]]
+; CGSCC-LABEL: define {{[^@]+}}@test2
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; CGSCC-NEXT: [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
+; CGSCC-NEXT: ret i32 [[TMP2]]
;
%1 = call i32 @test_range(i32 %unknown)
%2 = add nsw i32 %1, %b
; Positive checks
define i32 @test1_pcheck(i32 %unknown) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test1_pcheck
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP3]]
+; TUNIT-LABEL: define {{[^@]+}}@test1_pcheck
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
+; TUNIT-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; TUNIT-NEXT: ret i32 [[TMP3]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1_pcheck
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP3]]
+; CGSCC-LABEL: define {{[^@]+}}@test1_pcheck
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
+; CGSCC-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; CGSCC-NEXT: ret i32 [[TMP3]]
;
%1 = call i32 @test1(i32 %unknown, i32 20)
%2 = icmp sle i32 %1, 90
}
define i32 @test2_pcheck(i32 %unknown) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_pcheck
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP3]]
+; TUNIT-LABEL: define {{[^@]+}}@test2_pcheck
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
+; TUNIT-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; TUNIT-NEXT: ret i32 [[TMP3]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_pcheck
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP3]]
+; CGSCC-LABEL: define {{[^@]+}}@test2_pcheck
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
+; CGSCC-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; CGSCC-NEXT: ret i32 [[TMP3]]
;
%1 = call i32 @test2(i32 %unknown, i32 20)
%2 = icmp sge i32 %1, 20
; Negative checks
define i32 @test1_ncheck(i32 %unknown) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test1_ncheck
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP3]]
+; TUNIT-LABEL: define {{[^@]+}}@test1_ncheck
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
+; TUNIT-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; TUNIT-NEXT: ret i32 [[TMP3]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1_ncheck
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP3]]
+; CGSCC-LABEL: define {{[^@]+}}@test1_ncheck
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
+; CGSCC-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; CGSCC-NEXT: ret i32 [[TMP3]]
;
%1 = call i32 @test1(i32 %unknown, i32 20)
%2 = icmp sle i32 %1, 10
}
define i32 @test2_ncheck(i32 %unknown) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_ncheck
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP3]]
+; TUNIT-LABEL: define {{[^@]+}}@test2_ncheck
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
+; TUNIT-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; TUNIT-NEXT: ret i32 [[TMP3]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_ncheck
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP3]]
+; CGSCC-LABEL: define {{[^@]+}}@test2_ncheck
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
+; CGSCC-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; CGSCC-NEXT: ret i32 [[TMP3]]
;
%1 = call i32 @test2(i32 %unknown, i32 20)
%2 = icmp sge i32 %1, 30
ret i32 %3
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone 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]+]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-globals
; call site specific analysis is enabled
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-enable-call-site-specific-deduction=true -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 -aa-pipeline=basic-aa -passes=attributor -attributor-enable-call-site-specific-deduction=true -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-enable-call-site-specific-deduction=true -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-enable-call-site-specific-deduction=true -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define i32 @test_range(i32 %unknown) {
; CHECK-LABEL: define {{[^@]+}}@test_range
}
define i32 @test1(i32 %unknown, i32 %b) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test1
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
-; IS__TUNIT____-NEXT: ret i32 [[TMP2]]
+; TUNIT-LABEL: define {{[^@]+}}@test1
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; TUNIT-NEXT: [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
+; TUNIT-NEXT: ret i32 [[TMP2]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
-; IS__CGSCC____-NEXT: ret i32 [[TMP2]]
+; CGSCC-LABEL: define {{[^@]+}}@test1
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; CGSCC-NEXT: [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
+; CGSCC-NEXT: ret i32 [[TMP2]]
;
%1 = call i32 @test_range(i32 %unknown)
%2 = sub nsw i32 %1, %b
}
define i32 @test2(i32 %unknown, i32 %b) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
-; IS__TUNIT____-NEXT: ret i32 [[TMP2]]
+; TUNIT-LABEL: define {{[^@]+}}@test2
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; TUNIT-NEXT: [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
+; TUNIT-NEXT: ret i32 [[TMP2]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
-; IS__CGSCC____-NEXT: ret i32 [[TMP2]]
+; CGSCC-LABEL: define {{[^@]+}}@test2
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; CGSCC-NEXT: [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
+; CGSCC-NEXT: ret i32 [[TMP2]]
;
%1 = call i32 @test_range(i32 %unknown)
%2 = add nsw i32 %1, %b
; we need to look into this again. For the purpose of making some progress we take this regression
; for now, call site contexts are not on by default anyway (yet).
define i32 @test1_pcheck(i32 %unknown) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test1_pcheck
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP3]]
+; TUNIT-LABEL: define {{[^@]+}}@test1_pcheck
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
+; TUNIT-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; TUNIT-NEXT: ret i32 [[TMP3]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1_pcheck
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP3]]
+; CGSCC-LABEL: define {{[^@]+}}@test1_pcheck
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
+; CGSCC-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; CGSCC-NEXT: ret i32 [[TMP3]]
;
%1 = call i32 @test1(i32 %unknown, i32 20)
%2 = icmp sle i32 %1, 90
}
define i32 @test2_pcheck(i32 %unknown) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_pcheck
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP3]]
+; TUNIT-LABEL: define {{[^@]+}}@test2_pcheck
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
+; TUNIT-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; TUNIT-NEXT: ret i32 [[TMP3]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_pcheck
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP3]]
+; CGSCC-LABEL: define {{[^@]+}}@test2_pcheck
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
+; CGSCC-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; CGSCC-NEXT: ret i32 [[TMP3]]
;
%1 = call i32 @test2(i32 %unknown, i32 20)
%2 = icmp sge i32 %1, 20
; Negative checks
define i32 @test1_ncheck(i32 %unknown) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test1_ncheck
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP3]]
+; TUNIT-LABEL: define {{[^@]+}}@test1_ncheck
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
+; TUNIT-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; TUNIT-NEXT: ret i32 [[TMP3]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1_ncheck
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP3]]
+; CGSCC-LABEL: define {{[^@]+}}@test1_ncheck
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
+; CGSCC-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; CGSCC-NEXT: ret i32 [[TMP3]]
;
%1 = call i32 @test1(i32 %unknown, i32 20)
%2 = icmp sle i32 %1, 10
}
define i32 @test2_ncheck(i32 %unknown) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_ncheck
-; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT: ret i32 [[TMP3]]
+; TUNIT-LABEL: define {{[^@]+}}@test2_ncheck
+; TUNIT-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
+; TUNIT-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; TUNIT-NEXT: ret i32 [[TMP3]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_ncheck
-; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__CGSCC____-NEXT: ret i32 [[TMP3]]
+; CGSCC-LABEL: define {{[^@]+}}@test2_ncheck
+; CGSCC-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
+; CGSCC-NEXT: [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
+; CGSCC-NEXT: ret i32 [[TMP3]]
;
%1 = call i32 @test2(i32 %unknown, i32 20)
%2 = icmp sge i32 %1, 30
ret i32 %3
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone 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]+]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; FIXME: Figure out why we need 16 iterations here.
declare void @deref_phi_user(i32* %a);
; FIXME: %ptr should be dereferenceable(31)
define void @test8(i8* %ptr) #0 {
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS________NPM-LABEL: define {{[^@]+}}@test8
-; IS________NPM-SAME: (i8* nocapture nofree nonnull writeonly dereferenceable(21) [[PTR:%.*]]) #[[ATTR2]] {
-; IS________NPM-NEXT: br label [[TMP1:%.*]]
-; IS________NPM: 1:
-; IS________NPM-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ]
-; IS________NPM-NEXT: [[TMP2:%.*]] = sext i32 [[I_0]] to i64
-; IS________NPM-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8, i8* [[PTR]], i64 [[TMP2]]
-; IS________NPM-NEXT: store i8 32, i8* [[TMP3]], align 1
-; IS________NPM-NEXT: [[TMP4]] = add nsw i32 [[I_0]], 1
-; IS________NPM-NEXT: br label [[TMP5]]
-; IS________NPM: 5:
-; IS________NPM-NEXT: [[TMP6:%.*]] = icmp slt i32 [[TMP4]], 30
-; IS________NPM-NEXT: br i1 [[TMP6]], label [[TMP1]], label [[TMP7:%.*]]
-; IS________NPM: 7:
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CHECK-LABEL: define {{[^@]+}}@test8
+; CHECK-SAME: (i8* nocapture nofree nonnull writeonly dereferenceable(21) [[PTR:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: br label [[TMP1:%.*]]
+; CHECK: 1:
+; CHECK-NEXT: [[I_0:%.*]] = phi i32 [ 20, [[TMP0:%.*]] ], [ [[TMP4:%.*]], [[TMP5:%.*]] ]
+; CHECK-NEXT: [[TMP2:%.*]] = sext i32 [[I_0]] to i64
+; CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8, i8* [[PTR]], i64 [[TMP2]]
+; CHECK-NEXT: store i8 32, i8* [[TMP3]], align 1
+; CHECK-NEXT: [[TMP4]] = add nsw i32 [[I_0]], 1
+; CHECK-NEXT: br label [[TMP5]]
+; CHECK: 5:
+; CHECK-NEXT: [[TMP6:%.*]] = icmp slt i32 [[TMP4]], 30
+; CHECK-NEXT: br i1 [[TMP6]], label [[TMP1]], label [[TMP7:%.*]]
+; CHECK: 7:
+; CHECK-NEXT: ret void
;
br label %1
1: ; preds = %5, %0
; NOTE: %p should not be dereferenceable
define internal void @fill_range_not_inbounds(i32* %p, i64 %start){
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS________NPM-LABEL: define {{[^@]+}}@fill_range_not_inbounds
-; IS________NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) #[[ATTR2]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9
-; IS________NPM-NEXT: br label [[FOR_BODY:%.*]]
-; IS________NPM: for.cond.cleanup:
-; IS________NPM-NEXT: ret void
-; IS________NPM: for.body:
-; IS________NPM-NEXT: [[I_06:%.*]] = phi i64 [ [[START]], [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY]] ]
-; IS________NPM-NEXT: [[CONV:%.*]] = trunc i64 [[I_06]] to i32
-; IS________NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr i32, i32* [[P]], i64 [[I_06]]
-; IS________NPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX]], align 4
-; IS________NPM-NEXT: [[INC]] = add nsw i64 [[I_06]], 1
-; IS________NPM-NEXT: [[CMP:%.*]] = icmp slt i64 [[I_06]], [[TMP0]]
-; IS________NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]]
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CHECK-LABEL: define {{[^@]+}}@fill_range_not_inbounds
+; CHECK-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9
+; CHECK-NEXT: br label [[FOR_BODY:%.*]]
+; CHECK: for.cond.cleanup:
+; CHECK-NEXT: ret void
+; CHECK: for.body:
+; CHECK-NEXT: [[I_06:%.*]] = phi i64 [ [[START]], [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY]] ]
+; CHECK-NEXT: [[CONV:%.*]] = trunc i64 [[I_06]] to i32
+; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr i32, i32* [[P]], i64 [[I_06]]
+; CHECK-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX]], align 4
+; CHECK-NEXT: [[INC]] = add nsw i64 [[I_06]], 1
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[I_06]], [[TMP0]]
+; CHECK-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]]
;
entry:
%0 = add nsw i64 %start, 9
; FIXME: %p should be dereferenceable(40)
define internal void @fill_range_inbounds(i32* %p, i64 %start){
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS________NPM-LABEL: define {{[^@]+}}@fill_range_inbounds
-; IS________NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) #[[ATTR2]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9
-; IS________NPM-NEXT: br label [[FOR_BODY:%.*]]
-; IS________NPM: for.cond.cleanup:
-; IS________NPM-NEXT: ret void
-; IS________NPM: for.body:
-; IS________NPM-NEXT: [[I_06:%.*]] = phi i64 [ [[START]], [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY]] ]
-; IS________NPM-NEXT: [[CONV:%.*]] = trunc i64 [[I_06]] to i32
-; IS________NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 [[I_06]]
-; IS________NPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX]], align 4
-; IS________NPM-NEXT: [[INC]] = add nsw i64 [[I_06]], 1
-; IS________NPM-NEXT: [[CMP:%.*]] = icmp slt i64 [[I_06]], [[TMP0]]
-; IS________NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]]
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CHECK-LABEL: define {{[^@]+}}@fill_range_inbounds
+; CHECK-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64 [[START:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP0:%.*]] = add nsw i64 [[START]], 9
+; CHECK-NEXT: br label [[FOR_BODY:%.*]]
+; CHECK: for.cond.cleanup:
+; CHECK-NEXT: ret void
+; CHECK: for.body:
+; CHECK-NEXT: [[I_06:%.*]] = phi i64 [ [[START]], [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY]] ]
+; CHECK-NEXT: [[CONV:%.*]] = trunc i64 [[I_06]] to i32
+; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 [[I_06]]
+; CHECK-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX]], align 4
+; CHECK-NEXT: [[INC]] = add nsw i64 [[I_06]], 1
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[I_06]], [[TMP0]]
+; CHECK-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]]
;
entry:
%0 = add nsw i64 %start, 9
}
define void @call_fill_range(i32* nocapture %p, i64* nocapture readonly %range) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse 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:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; 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_NPM: Function Attrs: argmemonly nofree 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:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; 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
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@call_fill_range
+; TUNIT-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, !range [[RNG0:![0-9]+]]
+; TUNIT-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6:[0-9]+]]
+; TUNIT-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@call_fill_range
+; CGSCC-SAME: (i32* nocapture nofree writeonly [[P:%.*]], i64* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[RANGE:%.*]]) #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i64, i64* [[RANGE]], align 8, !range [[RNG0:![0-9]+]]
+; CGSCC-NEXT: tail call void @fill_range_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6:[0-9]+]]
+; CGSCC-NEXT: tail call void @fill_range_not_inbounds(i32* nocapture nofree writeonly [[P]], i64 [[TMP0]]) #[[ATTR6]]
+; CGSCC-NEXT: ret void
;
entry:
%0 = load i64, i64* %range, align 8, !range !0
; }
; FIXME: %ptr should be dereferenceable(4)
define dso_local void @rec-branch-2(i32 %a, i32 %b, i32 %c, i32* %ptr) {
-; 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:[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:%.*]]
-; IS________NPM: if.then:
-; IS________NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[B]], 0
-; IS________NPM-NEXT: br i1 [[TOBOOL1]], label [[IF_ELSE:%.*]], label [[IF_THEN2:%.*]]
-; IS________NPM: if.then2:
-; IS________NPM-NEXT: store i32 1, i32* [[PTR]], align 4
-; IS________NPM-NEXT: br label [[IF_END8:%.*]]
-; IS________NPM: if.else:
-; IS________NPM-NEXT: store i32 2, i32* [[PTR]], align 4
-; IS________NPM-NEXT: br label [[IF_END8]]
-; IS________NPM: if.else3:
-; IS________NPM-NEXT: [[TOBOOL4:%.*]] = icmp eq i32 [[C]], 0
-; IS________NPM-NEXT: br i1 [[TOBOOL4]], label [[IF_ELSE6:%.*]], label [[IF_THEN5:%.*]]
-; IS________NPM: if.then5:
-; 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:[0-9]+]]
-; IS________NPM-NEXT: br label [[IF_END8]]
-; IS________NPM: if.end8:
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; CHECK-LABEL: define {{[^@]+}}@rec-branch-2
+; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], i32* nocapture nofree writeonly [[PTR:%.*]]) #[[ATTR4:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[A]], 0
+; CHECK-NEXT: br i1 [[TOBOOL]], label [[IF_ELSE3:%.*]], label [[IF_THEN:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[B]], 0
+; CHECK-NEXT: br i1 [[TOBOOL1]], label [[IF_ELSE:%.*]], label [[IF_THEN2:%.*]]
+; CHECK: if.then2:
+; CHECK-NEXT: store i32 1, i32* [[PTR]], align 4
+; CHECK-NEXT: br label [[IF_END8:%.*]]
+; CHECK: if.else:
+; CHECK-NEXT: store i32 2, i32* [[PTR]], align 4
+; CHECK-NEXT: br label [[IF_END8]]
+; CHECK: if.else3:
+; CHECK-NEXT: [[TOBOOL4:%.*]] = icmp eq i32 [[C]], 0
+; CHECK-NEXT: br i1 [[TOBOOL4]], label [[IF_ELSE6:%.*]], label [[IF_THEN5:%.*]]
+; CHECK: if.then5:
+; CHECK-NEXT: store i32 3, i32* [[PTR]], align 4
+; CHECK-NEXT: br label [[IF_END8]]
+; CHECK: if.else6:
+; CHECK-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, i32* nocapture nofree writeonly [[PTR]]) #[[ATTR7:[0-9]+]]
+; CHECK-NEXT: br label [[IF_END8]]
+; CHECK: if.end8:
+; CHECK-NEXT: ret void
;
entry:
%tobool = icmp eq i32 %a, 0
; ATTRIBUTOR-NEXT: call void @unknown()
; ATTRIBUTOR-NEXT: ret void
;
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_assume_pos
-; NOT_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:%.*]]) {
-; NOT_CGSCC_OPM-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) ]
-; NOT_CGSCC_OPM-NEXT: call void @unknown()
-; NOT_CGSCC_OPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@nonnull_assume_pos
+; CHECK-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:%.*]]) {
+; CHECK-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) ]
+; CHECK-NEXT: call void @unknown()
+; CHECK-NEXT: ret void
;
call void @llvm.assume(i1 true) [ "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)]
call void @unknown()
; ATTRIBUTOR-NEXT: call void @unknown()
; ATTRIBUTOR-NEXT: ret void
;
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@nonnull_assume_call
-; NOT_CGSCC_OPM-SAME: (i8* [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* [[ARG3:%.*]], i8* [[ARG4:%.*]]) {
-; NOT_CGSCC_OPM-NEXT: call void @unknown()
-; NOT_CGSCC_OPM-NEXT: [[P:%.*]] = call nonnull dereferenceable(101) i32* @unkown_ptr() #[[ATTR9:[0-9]+]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) #[[ATTR9]]
-; NOT_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) ]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) #[[ATTR9]]
-; NOT_CGSCC_OPM-NEXT: call void @unknown()
-; NOT_CGSCC_OPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@nonnull_assume_call
+; CHECK-SAME: (i8* [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* [[ARG3:%.*]], i8* [[ARG4:%.*]]) {
+; CHECK-NEXT: call void @unknown()
+; CHECK-NEXT: [[P:%.*]] = call nonnull dereferenceable(101) i32* @unkown_ptr() #[[ATTR9:[0-9]+]]
+; CHECK-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) #[[ATTR9]]
+; CHECK-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) ]
+; CHECK-NEXT: call void @unknown_use8(i8* nonnull dereferenceable(2) [[ARG1]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(31) [[ARG2]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown_use8(i8* nonnull [[ARG3]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown_use8(i8* dereferenceable_or_null(42) [[ARG4]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown_use32(i32* nonnull dereferenceable(101) [[P]]) #[[ATTR9]]
+; CHECK-NEXT: call void @unknown()
+; CHECK-NEXT: ret void
;
call void @unknown()
%p = call i32* @unkown_ptr()
!0 = !{i64 10, i64 100}
;.
-; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nocallback 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 }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nounwind willreturn }
+; TUNIT: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly }
+; TUNIT: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly }
+; TUNIT: attributes #[[ATTR8]] = { willreturn }
+; TUNIT: attributes #[[ATTR9]] = { 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 nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR8]] = { willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nounwind }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR3]] = { argmemonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly }
+; CGSCC: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR6]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly }
+; CGSCC: attributes #[[ATTR8]] = { willreturn }
+; CGSCC: attributes #[[ATTR9]] = { nounwind }
;.
; CHECK: [[META0:![0-9]+]] = !{i64 10, i64 100}
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Determine dereference-ability before unused loads get deleted:
; https://bugs.llvm.org/show_bug.cgi?id=21780
;
; ATTRIBUTOR_CGSCC_NPM-LABEL: define i32 @require_cfg_analysis(i32 %c, i32* {{.*}} dereferenceable(4) %p)
define i32 @require_cfg_analysis(i32 %c, i32* %p) {
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS________NPM-LABEL: define {{[^@]+}}@require_cfg_analysis
-; IS________NPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR4]] {
-; IS________NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0
-; IS________NPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]]
-; IS________NPM: l1:
-; IS________NPM-NEXT: [[TOBOOL2:%.*]] = icmp eq i32 [[C]], 1
-; IS________NPM-NEXT: br i1 [[TOBOOL2]], label [[L3:%.*]], label [[L4:%.*]]
-; IS________NPM: l2:
-; IS________NPM-NEXT: [[TOBOOL3:%.*]] = icmp eq i32 [[C]], 2
-; IS________NPM-NEXT: br i1 [[TOBOOL3]], label [[L3]], label [[L4]]
-; IS________NPM: l3:
-; IS________NPM-NEXT: br label [[L5:%.*]]
-; IS________NPM: l4:
-; IS________NPM-NEXT: br label [[L5]]
-; IS________NPM: l5:
-; IS________NPM-NEXT: [[TOBOOL4:%.*]] = icmp eq i32 [[C]], 4
-; IS________NPM-NEXT: br i1 [[TOBOOL4]], label [[L6:%.*]], label [[L7:%.*]]
-; IS________NPM: l6:
-; IS________NPM-NEXT: store i32 0, i32* [[P]], align 4
-; IS________NPM-NEXT: br label [[END:%.*]]
-; IS________NPM: l7:
-; IS________NPM-NEXT: store i32 1, i32* [[P]], align 4
-; IS________NPM-NEXT: br label [[END]]
-; IS________NPM: end:
-; IS________NPM-NEXT: ret i32 1
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CHECK-LABEL: define {{[^@]+}}@require_cfg_analysis
+; CHECK-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR4]] {
+; CHECK-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0
+; CHECK-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]]
+; CHECK: l1:
+; CHECK-NEXT: [[TOBOOL2:%.*]] = icmp eq i32 [[C]], 1
+; CHECK-NEXT: br i1 [[TOBOOL2]], label [[L3:%.*]], label [[L4:%.*]]
+; CHECK: l2:
+; CHECK-NEXT: [[TOBOOL3:%.*]] = icmp eq i32 [[C]], 2
+; CHECK-NEXT: br i1 [[TOBOOL3]], label [[L3]], label [[L4]]
+; CHECK: l3:
+; CHECK-NEXT: br label [[L5:%.*]]
+; CHECK: l4:
+; CHECK-NEXT: br label [[L5]]
+; CHECK: l5:
+; CHECK-NEXT: [[TOBOOL4:%.*]] = icmp eq i32 [[C]], 4
+; CHECK-NEXT: br i1 [[TOBOOL4]], label [[L6:%.*]], label [[L7:%.*]]
+; CHECK: l6:
+; CHECK-NEXT: store i32 0, i32* [[P]], align 4
+; CHECK-NEXT: br label [[END:%.*]]
+; CHECK: l7:
+; CHECK-NEXT: store i32 1, i32* [[P]], align 4
+; CHECK-NEXT: br label [[END]]
+; CHECK: end:
+; CHECK-NEXT: ret i32 1
;
%tobool1 = icmp eq i32 %c, 0
br i1 %tobool1, label %l1, label %l2
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Determine dereference-ability before unused loads get deleted:
; https://bugs.llvm.org/show_bug.cgi?id=21780
;
; ATTRIBUTOR_CGSCC_NPM-LABEL: define i32 @require_cfg_analysis(i32 %c, i32* {{.*}} dereferenceable(4) %p)
define i32 @require_cfg_analysis(i32 %c, i32* %p) {
-; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS________NPM-LABEL: define {{[^@]+}}@require_cfg_analysis
-; IS________NPM-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR4]] {
-; IS________NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0
-; IS________NPM-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]]
-; IS________NPM: l1:
-; IS________NPM-NEXT: [[TOBOOL2:%.*]] = icmp eq i32 [[C]], 1
-; IS________NPM-NEXT: br i1 [[TOBOOL2]], label [[L3:%.*]], label [[L4:%.*]]
-; IS________NPM: l2:
-; IS________NPM-NEXT: [[TOBOOL3:%.*]] = icmp eq i32 [[C]], 2
-; IS________NPM-NEXT: br i1 [[TOBOOL3]], label [[L3]], label [[L4]]
-; IS________NPM: l3:
-; IS________NPM-NEXT: br label [[L5:%.*]]
-; IS________NPM: l4:
-; IS________NPM-NEXT: br label [[L5]]
-; IS________NPM: l5:
-; IS________NPM-NEXT: [[TOBOOL4:%.*]] = icmp eq i32 [[C]], 4
-; IS________NPM-NEXT: br i1 [[TOBOOL4]], label [[L6:%.*]], label [[L7:%.*]]
-; IS________NPM: l6:
-; IS________NPM-NEXT: store i32 0, i32* [[P]], align 4
-; IS________NPM-NEXT: br label [[END:%.*]]
-; IS________NPM: l7:
-; IS________NPM-NEXT: store i32 1, i32* [[P]], align 4
-; IS________NPM-NEXT: br label [[END]]
-; IS________NPM: end:
-; IS________NPM-NEXT: ret i32 1
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CHECK-LABEL: define {{[^@]+}}@require_cfg_analysis
+; CHECK-SAME: (i32 [[C:%.*]], i32* nocapture nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR4]] {
+; CHECK-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C]], 0
+; CHECK-NEXT: br i1 [[TOBOOL1]], label [[L1:%.*]], label [[L2:%.*]]
+; CHECK: l1:
+; CHECK-NEXT: [[TOBOOL2:%.*]] = icmp eq i32 [[C]], 1
+; CHECK-NEXT: br i1 [[TOBOOL2]], label [[L3:%.*]], label [[L4:%.*]]
+; CHECK: l2:
+; CHECK-NEXT: [[TOBOOL3:%.*]] = icmp eq i32 [[C]], 2
+; CHECK-NEXT: br i1 [[TOBOOL3]], label [[L3]], label [[L4]]
+; CHECK: l3:
+; CHECK-NEXT: br label [[L5:%.*]]
+; CHECK: l4:
+; CHECK-NEXT: br label [[L5]]
+; CHECK: l5:
+; CHECK-NEXT: [[TOBOOL4:%.*]] = icmp eq i32 [[C]], 4
+; CHECK-NEXT: br i1 [[TOBOOL4]], label [[L6:%.*]], label [[L7:%.*]]
+; CHECK: l6:
+; CHECK-NEXT: store i32 0, i32* [[P]], align 4
+; CHECK-NEXT: br label [[END:%.*]]
+; CHECK: l7:
+; CHECK-NEXT: store i32 1, i32* [[P]], align 4
+; CHECK-NEXT: br label [[END]]
+; CHECK: end:
+; CHECK-NEXT: ret i32 1
;
%tobool1 = icmp eq i32 %c, 0
br i1 %tobool1, label %l1, label %l2
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
declare noalias i8* @malloc(i64) allockind("alloc,uninitialized") allocsize(0)
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
define void @h2s_value_simplify_interaction(i1 %c, i8* %A) {
-; IS________NPM-LABEL: define {{[^@]+}}@h2s_value_simplify_interaction
-; IS________NPM-SAME: (i1 [[C:%.*]], i8* nocapture nofree readnone [[A:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[ADD:%.*]] = add i64 2, 2
-; IS________NPM-NEXT: [[M:%.*]] = tail call noalias align 16 i8* @malloc(i64 noundef [[ADD]])
-; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS________NPM: t:
-; IS________NPM-NEXT: br i1 false, label [[DEAD:%.*]], label [[F2:%.*]]
-; IS________NPM: f:
-; IS________NPM-NEXT: br label [[J:%.*]]
-; IS________NPM: f2:
-; IS________NPM-NEXT: [[L:%.*]] = load i8, i8* [[M]], align 16
-; IS________NPM-NEXT: call void @usei8(i8 [[L]])
-; IS________NPM-NEXT: call void @no_sync_func(i8* nocapture nofree noundef align 16 [[M]]) #[[ATTR10:[0-9]+]]
-; IS________NPM-NEXT: br label [[J]]
-; IS________NPM: dead:
-; IS________NPM-NEXT: unreachable
-; IS________NPM: j:
-; IS________NPM-NEXT: [[PHI:%.*]] = phi i8* [ [[M]], [[F]] ], [ null, [[F2]] ]
-; IS________NPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree noundef align 16 [[PHI]]) #[[ATTR10]]
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@h2s_value_simplify_interaction
+; CHECK-SAME: (i1 [[C:%.*]], i8* nocapture nofree readnone [[A:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[ADD:%.*]] = add i64 2, 2
+; CHECK-NEXT: [[M:%.*]] = tail call noalias align 16 i8* @malloc(i64 noundef [[ADD]])
+; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CHECK: t:
+; CHECK-NEXT: br i1 false, label [[DEAD:%.*]], label [[F2:%.*]]
+; CHECK: f:
+; CHECK-NEXT: br label [[J:%.*]]
+; CHECK: f2:
+; CHECK-NEXT: [[L:%.*]] = load i8, i8* [[M]], align 16
+; CHECK-NEXT: call void @usei8(i8 [[L]])
+; CHECK-NEXT: call void @no_sync_func(i8* nocapture nofree noundef align 16 [[M]]) #[[ATTR10:[0-9]+]]
+; CHECK-NEXT: br label [[J]]
+; CHECK: dead:
+; CHECK-NEXT: unreachable
+; CHECK: j:
+; CHECK-NEXT: [[PHI:%.*]] = phi i8* [ [[M]], [[F]] ], [ null, [[F2]] ]
+; CHECK-NEXT: tail call void @no_sync_func(i8* nocapture nofree noundef align 16 [[PHI]]) #[[ATTR10]]
+; CHECK-NEXT: ret void
;
entry:
%add = add i64 2, 2
; TEST 3 - 1 malloc, 1 free
define void @test3() {
-; IS________NPM-LABEL: define {{[^@]+}}@test3() {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[DOTH2S]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test3() {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[DOTH2S]])
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @malloc(i64 4)
tail call void @no_sync_func(i8* %1)
}
define void @test3a(i8* %p) {
-; IS________NPM-LABEL: define {{[^@]+}}@test3a
-; IS________NPM-SAME: (i8* nocapture [[P:%.*]]) {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[DOTH2S]], i8* nocapture [[P]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test3a
+; CHECK-SAME: (i8* nocapture [[P:%.*]]) {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[DOTH2S]], i8* nocapture [[P]])
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @malloc(i64 4)
tail call void @nofree_arg_only(i8* %1, i8* %p)
declare noalias i8* @aligned_alloc(i64 allocalign, i64) allockind("alloc,uninitialized,aligned") allocsize(1)
define void @test3b(i8* %p) {
-; IS________NPM-LABEL: define {{[^@]+}}@test3b
-; IS________NPM-SAME: (i8* nocapture [[P:%.*]]) {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 128, align 32
-; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[DOTH2S]], i8* nocapture [[P]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test3b
+; CHECK-SAME: (i8* nocapture [[P:%.*]]) {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 128, align 32
+; CHECK-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[DOTH2S]], i8* nocapture [[P]])
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @aligned_alloc(i64 32, i64 128)
tail call void @nofree_arg_only(i8* %1, i8* %p)
; leave alone a constant-but-invalid alignment
define void @test3d(i8* %p) {
-; IS________NPM-LABEL: define {{[^@]+}}@test3d
-; IS________NPM-SAME: (i8* nocapture [[P:%.*]]) {
-; IS________NPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @aligned_alloc(i64 noundef 33, i64 noundef 128)
-; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP1]], i8* nocapture [[P]])
-; IS________NPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test3d
+; CHECK-SAME: (i8* nocapture [[P:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @aligned_alloc(i64 noundef 33, i64 noundef 128)
+; CHECK-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP1]], i8* nocapture [[P]])
+; CHECK-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
+; CHECK-NEXT: ret void
;
; CHECK-SAME; (i8* nocapture [[P:%.*]]) {
%1 = tail call noalias i8* @aligned_alloc(i64 33, i64 128)
declare noalias i8* @calloc(i64, i64) allockind("alloc,zeroed") allocsize(0,1)
define void @test0() {
-; IS________NPM-LABEL: define {{[^@]+}}@test0() {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 8, align 1
-; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[DOTH2S]], i8 0, i64 8, i1 false)
-; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[DOTH2S]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test0() {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 8, align 1
+; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* [[DOTH2S]], i8 0, i64 8, i1 false)
+; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[DOTH2S]])
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @calloc(i64 2, i64 4)
tail call void @no_sync_func(i8* %1)
; are in nofree functions and are not captured
define void @test5(i32, i8* %p) {
-; IS________NPM-LABEL: define {{[^@]+}}@test5
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i8* nocapture [[P:%.*]]) {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0
-; IS________NPM-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]]
-; IS________NPM: 3:
-; IS________NPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[DOTH2S]])
-; IS________NPM-NEXT: br label [[TMP5:%.*]]
-; IS________NPM: 4:
-; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[DOTH2S]], i8* nocapture [[P]])
-; IS________NPM-NEXT: br label [[TMP5]]
-; IS________NPM: 5:
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test5
+; CHECK-SAME: (i32 [[TMP0:%.*]], i8* nocapture [[P:%.*]]) {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0
+; CHECK-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]]
+; CHECK: 3:
+; CHECK-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[DOTH2S]])
+; CHECK-NEXT: br label [[TMP5:%.*]]
+; CHECK: 4:
+; CHECK-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[DOTH2S]], i8* nocapture [[P]])
+; CHECK-NEXT: br label [[TMP5]]
+; CHECK: 5:
+; CHECK-NEXT: ret void
;
%2 = tail call noalias i8* @malloc(i64 4)
%3 = icmp eq i32 %0, 0
; TEST 6 - all exit paths have a call to free
define void @test6(i32) {
-; IS________NPM-LABEL: define {{[^@]+}}@test6
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0
-; IS________NPM-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]]
-; IS________NPM: 3:
-; IS________NPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[DOTH2S]])
-; IS________NPM-NEXT: br label [[TMP5:%.*]]
-; IS________NPM: 4:
-; IS________NPM-NEXT: br label [[TMP5]]
-; IS________NPM: 5:
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test6
+; CHECK-SAME: (i32 [[TMP0:%.*]]) {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0
+; CHECK-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]]
+; CHECK: 3:
+; CHECK-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[DOTH2S]])
+; CHECK-NEXT: br label [[TMP5:%.*]]
+; CHECK: 4:
+; CHECK-NEXT: br label [[TMP5]]
+; CHECK: 5:
+; CHECK-NEXT: ret void
;
%2 = tail call noalias i8* @malloc(i64 4)
%3 = icmp eq i32 %0, 0
; TEST 7 - free is dead.
define void @test7() {
-; IS________NPM-LABEL: define {{[^@]+}}@test7() {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: [[TMP1:%.*]] = tail call i32 @no_return_call() #[[ATTR4:[0-9]+]]
-; IS________NPM-NEXT: unreachable
+; CHECK-LABEL: define {{[^@]+}}@test7() {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: [[TMP1:%.*]] = tail call i32 @no_return_call() #[[ATTR4:[0-9]+]]
+; CHECK-NEXT: unreachable
;
%1 = tail call noalias i8* @malloc(i64 4)
tail call i32 @no_return_call()
; TEST 9 - FIXME: malloc should be converted.
define void @test9() {
-; IS________NPM-LABEL: define {{[^@]+}}@test9() {
-; IS________NPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; IS________NPM-NEXT: tail call void @no_sync_func(i8* 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]]) #[[ATTR10]]
-; IS________NPM-NEXT: tail call void @free(i8* nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test9() {
+; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; CHECK-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[TMP1]])
+; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
+; CHECK-NEXT: store i32 10, i32* [[TMP2]], align 4
+; CHECK-NEXT: tail call void @foo_nounw(i32* nofree noundef align 4 [[TMP2]]) #[[ATTR10]]
+; CHECK-NEXT: tail call void @free(i8* nocapture noundef nonnull align 4 dereferenceable(4) [[TMP1]])
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @malloc(i64 4)
tail call void @no_sync_func(i8* %1)
; TEST 10 - 1 malloc, 1 free
define i32 @test10() {
-; IS________NPM-LABEL: define {{[^@]+}}@test10() {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[DOTH2S]])
-; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[DOTH2S]] to i32*
-; IS________NPM-NEXT: store i32 10, i32* [[TMP1]], align 4
-; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
-; IS________NPM-NEXT: ret i32 [[TMP2]]
+; CHECK-LABEL: define {{[^@]+}}@test10() {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[DOTH2S]])
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[DOTH2S]] to i32*
+; CHECK-NEXT: store i32 10, i32* [[TMP1]], align 4
+; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
+; CHECK-NEXT: ret i32 [[TMP2]]
;
%1 = tail call noalias i8* @malloc(i64 4)
tail call void @no_sync_func(i8* %1)
}
define i32 @test_lifetime() {
-; IS________NPM-LABEL: define {{[^@]+}}@test_lifetime() {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[DOTH2S]])
-; IS________NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[DOTH2S]])
-; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[DOTH2S]] to i32*
-; IS________NPM-NEXT: store i32 10, i32* [[TMP1]], align 4
-; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
-; IS________NPM-NEXT: ret i32 [[TMP2]]
+; CHECK-LABEL: define {{[^@]+}}@test_lifetime() {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree [[DOTH2S]])
+; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[DOTH2S]])
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[DOTH2S]] to i32*
+; CHECK-NEXT: store i32 10, i32* [[TMP1]], align 4
+; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
+; CHECK-NEXT: ret i32 [[TMP2]]
;
%1 = tail call noalias i8* @malloc(i64 4)
tail call void @no_sync_func(i8* %1)
; TEST 11
define void @test11() {
-; IS________NPM-LABEL: define {{[^@]+}}@test11() {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: tail call void @sync_will_return(i8* [[DOTH2S]]) #[[ATTR10]]
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test11() {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: tail call void @sync_will_return(i8* [[DOTH2S]]) #[[ATTR10]]
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @malloc(i64 4)
tail call void @sync_will_return(i8* %1)
; TEST 12
define i32 @irreducible_cfg(i32 %0) {
-; IS________NPM-LABEL: define {{[^@]+}}@irreducible_cfg
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[DOTH2S]] to i32*
-; IS________NPM-NEXT: store i32 10, i32* [[TMP2]], align 4
-; IS________NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 1
-; IS________NPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
-; IS________NPM: 4:
-; IS________NPM-NEXT: [[TMP5:%.*]] = add nsw i32 [[TMP0]], 5
-; IS________NPM-NEXT: br label [[TMP12:%.*]]
-; IS________NPM: 6:
-; IS________NPM-NEXT: br label [[TMP7:%.*]]
-; IS________NPM: 7:
-; IS________NPM-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP13:%.*]], [[TMP12]] ], [ 1, [[TMP6]] ]
-; IS________NPM-NEXT: [[TMP8:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS________NPM-NEXT: [[TMP9:%.*]] = add nsw i32 [[TMP8]], -1
-; IS________NPM-NEXT: store i32 [[TMP9]], i32* [[TMP2]], align 4
-; IS________NPM-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP8]], 0
-; IS________NPM-NEXT: br i1 [[TMP10]], label [[TMP11:%.*]], label [[TMP14:%.*]]
-; IS________NPM: 11:
-; IS________NPM-NEXT: br label [[TMP12]]
-; IS________NPM: 12:
-; IS________NPM-NEXT: [[DOT1:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[DOT0]], [[TMP11]] ]
-; IS________NPM-NEXT: [[TMP13]] = add nsw i32 [[DOT1]], 1
-; IS________NPM-NEXT: br label [[TMP7]]
-; IS________NPM: 14:
-; IS________NPM-NEXT: [[TMP15:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS________NPM-NEXT: ret i32 [[TMP15]]
+; CHECK-LABEL: define {{[^@]+}}@irreducible_cfg
+; CHECK-SAME: (i32 [[TMP0:%.*]]) {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[DOTH2S]] to i32*
+; CHECK-NEXT: store i32 10, i32* [[TMP2]], align 4
+; CHECK-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 1
+; CHECK-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
+; CHECK: 4:
+; CHECK-NEXT: [[TMP5:%.*]] = add nsw i32 [[TMP0]], 5
+; CHECK-NEXT: br label [[TMP12:%.*]]
+; CHECK: 6:
+; CHECK-NEXT: br label [[TMP7:%.*]]
+; CHECK: 7:
+; CHECK-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP13:%.*]], [[TMP12]] ], [ 1, [[TMP6]] ]
+; CHECK-NEXT: [[TMP8:%.*]] = load i32, i32* [[TMP2]], align 4
+; CHECK-NEXT: [[TMP9:%.*]] = add nsw i32 [[TMP8]], -1
+; CHECK-NEXT: store i32 [[TMP9]], i32* [[TMP2]], align 4
+; CHECK-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP8]], 0
+; CHECK-NEXT: br i1 [[TMP10]], label [[TMP11:%.*]], label [[TMP14:%.*]]
+; CHECK: 11:
+; CHECK-NEXT: br label [[TMP12]]
+; CHECK: 12:
+; CHECK-NEXT: [[DOT1:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[DOT0]], [[TMP11]] ]
+; CHECK-NEXT: [[TMP13]] = add nsw i32 [[DOT1]], 1
+; CHECK-NEXT: br label [[TMP7]]
+; CHECK: 14:
+; CHECK-NEXT: [[TMP15:%.*]] = load i32, i32* [[TMP2]], align 4
+; CHECK-NEXT: ret i32 [[TMP15]]
;
%2 = call noalias i8* @malloc(i64 4)
%3 = bitcast i8* %2 to i32*
}
define void @test16a(i8 %v, i8** %P) {
-; IS________NPM-LABEL: define {{[^@]+}}@test16a
-; IS________NPM-SAME: (i8 [[V:%.*]], i8** nocapture nofree readnone [[P:%.*]]) {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: store i8 [[V]], i8* [[DOTH2S]], align 1
-; IS________NPM-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[DOTH2S]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test16a
+; CHECK-SAME: (i8 [[V:%.*]], i8** nocapture nofree readnone [[P:%.*]]) {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: store i8 [[V]], i8* [[DOTH2S]], align 1
+; CHECK-NEXT: tail call void @no_sync_func(i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[DOTH2S]])
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @malloc(i64 4)
store i8 %v, i8* %1
}
define void @test16c(i8 %v, i8** %P) {
-; IS________NPM-LABEL: define {{[^@]+}}@test16c
-; IS________NPM-SAME: (i8 [[V:%.*]], i8** nocapture nofree writeonly [[P:%.*]]) {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: store i8* [[DOTH2S]], i8** [[P]], align 8
-; IS________NPM-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[DOTH2S]]) #[[ATTR10]]
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test16c
+; CHECK-SAME: (i8 [[V:%.*]], i8** nocapture nofree writeonly [[P:%.*]]) {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: store i8* [[DOTH2S]], i8** [[P]], align 8
+; CHECK-NEXT: tail call void @no_sync_func(i8* nocapture nofree [[DOTH2S]]) #[[ATTR10]]
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @malloc(i64 4)
store i8* %1, i8** %P
ret void
}
;.
-; IS________NPM: attributes #[[ATTR0:[0-9]+]] = { allockind("alloc,uninitialized") allocsize(0) }
-; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { nounwind willreturn }
-; IS________NPM: attributes #[[ATTR2:[0-9]+]] = { nofree nosync willreturn }
-; IS________NPM: attributes #[[ATTR3:[0-9]+]] = { nofree nounwind }
-; IS________NPM: attributes #[[ATTR4]] = { noreturn }
-; IS________NPM: attributes #[[ATTR5:[0-9]+]] = { allockind("free") }
-; IS________NPM: attributes #[[ATTR6:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; IS________NPM: attributes #[[ATTR7:[0-9]+]] = { allockind("alloc,uninitialized,aligned") allocsize(1) }
-; IS________NPM: attributes #[[ATTR8:[0-9]+]] = { allockind("alloc,zeroed") allocsize(0,1) }
-; IS________NPM: attributes #[[ATTR9:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; IS________NPM: attributes #[[ATTR10]] = { nounwind }
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { allockind("alloc,uninitialized") allocsize(0) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nounwind willreturn }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nofree nosync willreturn }
+; CHECK: attributes #[[ATTR3:[0-9]+]] = { nofree nounwind }
+; CHECK: attributes #[[ATTR4]] = { noreturn }
+; CHECK: attributes #[[ATTR5:[0-9]+]] = { allockind("free") }
+; CHECK: attributes #[[ATTR6:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; CHECK: attributes #[[ATTR7:[0-9]+]] = { allockind("alloc,uninitialized,aligned") allocsize(1) }
+; CHECK: attributes #[[ATTR8:[0-9]+]] = { allockind("alloc,zeroed") allocsize(0,1) }
+; CHECK: attributes #[[ATTR9:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; CHECK: attributes #[[ATTR10]] = { nounwind }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; FIXME: amdgpu doesn't claim malloc is a thing, so the test is somewhat
; useless except the __kmpc_alloc_shared part which now also covers the important
}
define void @test3a(i8* %p) {
-; IS________NPM-LABEL: define {{[^@]+}}@test3a
-; IS________NPM-SAME: (i8* nocapture [[P:%.*]]) {
-; IS________NPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP1]], i8* nocapture [[P]])
-; IS________NPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test3a
+; CHECK-SAME: (i8* nocapture [[P:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; CHECK-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP1]], i8* nocapture [[P]])
+; CHECK-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @malloc(i64 4)
tail call void @nofree_arg_only(i8* %1, i8* %p)
declare noalias i8* @aligned_alloc(i64, i64)
define void @test3b(i8* %p) {
-; IS________NPM-LABEL: define {{[^@]+}}@test3b
-; IS________NPM-SAME: (i8* nocapture [[P:%.*]]) {
-; IS________NPM-NEXT: [[TMP1:%.*]] = tail call noalias i8* @aligned_alloc(i64 noundef 32, i64 noundef 128)
-; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP1]], i8* nocapture [[P]])
-; IS________NPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test3b
+; CHECK-SAME: (i8* nocapture [[P:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias i8* @aligned_alloc(i64 noundef 32, i64 noundef 128)
+; CHECK-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP1]], i8* nocapture [[P]])
+; CHECK-NEXT: tail call void @free(i8* noalias nocapture [[TMP1]])
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @aligned_alloc(i64 32, i64 128)
tail call void @nofree_arg_only(i8* %1, i8* %p)
; are in nofree functions and are not captured
define void @test5(i32, i8* %p) {
-; IS________NPM-LABEL: define {{[^@]+}}@test5
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i8* nocapture [[P:%.*]]) {
-; IS________NPM-NEXT: [[TMP2:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; IS________NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 0
-; IS________NPM-NEXT: br i1 [[TMP3]], label [[TMP5:%.*]], label [[TMP4:%.*]]
-; IS________NPM: 4:
-; IS________NPM-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[TMP2]])
-; IS________NPM-NEXT: br label [[TMP6:%.*]]
-; IS________NPM: 5:
-; IS________NPM-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP2]], i8* nocapture [[P]])
-; IS________NPM-NEXT: tail call void @free(i8* noalias nocapture [[TMP2]])
-; IS________NPM-NEXT: br label [[TMP6]]
-; IS________NPM: 6:
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test5
+; CHECK-SAME: (i32 [[TMP0:%.*]], i8* nocapture [[P:%.*]]) {
+; CHECK-NEXT: [[TMP2:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; CHECK-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP0]], 0
+; CHECK-NEXT: br i1 [[TMP3]], label [[TMP5:%.*]], label [[TMP4:%.*]]
+; CHECK: 4:
+; CHECK-NEXT: tail call void @nofree_func(i8* noalias nocapture nofree [[TMP2]])
+; CHECK-NEXT: br label [[TMP6:%.*]]
+; CHECK: 5:
+; CHECK-NEXT: tail call void @nofree_arg_only(i8* noalias nocapture nofree [[TMP2]], i8* nocapture [[P]])
+; CHECK-NEXT: tail call void @free(i8* noalias nocapture [[TMP2]])
+; CHECK-NEXT: br label [[TMP6]]
+; CHECK: 6:
+; CHECK-NEXT: ret void
;
%2 = tail call noalias i8* @malloc(i64 4)
%3 = icmp eq i32 %0, 0
; TEST 12
define i32 @irreducible_cfg(i32 %0) {
-; IS________NPM-LABEL: define {{[^@]+}}@irreducible_cfg
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS________NPM-NEXT: [[TMP2:%.*]] = call noalias i8* @malloc(i64 noundef 4)
-; IS________NPM-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32*
-; IS________NPM-NEXT: store i32 10, i32* [[TMP3]], align 4
-; IS________NPM-NEXT: [[TMP4:%.*]] = icmp eq i32 [[TMP0]], 1
-; IS________NPM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP7:%.*]]
-; IS________NPM: 5:
-; IS________NPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], 5
-; IS________NPM-NEXT: br label [[TMP13:%.*]]
-; IS________NPM: 7:
-; IS________NPM-NEXT: br label [[TMP8:%.*]]
-; IS________NPM: 8:
-; IS________NPM-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP14:%.*]], [[TMP13]] ], [ 1, [[TMP7]] ]
-; IS________NPM-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP3]], align 4
-; IS________NPM-NEXT: [[TMP10:%.*]] = add nsw i32 [[TMP9]], -1
-; IS________NPM-NEXT: store i32 [[TMP10]], i32* [[TMP3]], align 4
-; IS________NPM-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP9]], 0
-; IS________NPM-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP15:%.*]]
-; IS________NPM: 12:
-; IS________NPM-NEXT: br label [[TMP13]]
-; IS________NPM: 13:
-; IS________NPM-NEXT: [[DOT1:%.*]] = phi i32 [ [[TMP6]], [[TMP5]] ], [ [[DOT0]], [[TMP12]] ]
-; IS________NPM-NEXT: [[TMP14]] = add nsw i32 [[DOT1]], 1
-; IS________NPM-NEXT: br label [[TMP8]]
-; IS________NPM: 15:
-; IS________NPM-NEXT: [[TMP16:%.*]] = load i32, i32* [[TMP3]], align 4
-; IS________NPM-NEXT: call void @free(i8* nocapture noundef [[TMP2]])
-; IS________NPM-NEXT: [[TMP17:%.*]] = load i32, i32* [[TMP3]], align 4
-; IS________NPM-NEXT: ret i32 [[TMP17]]
+; CHECK-LABEL: define {{[^@]+}}@irreducible_cfg
+; CHECK-SAME: (i32 [[TMP0:%.*]]) {
+; CHECK-NEXT: [[TMP2:%.*]] = call noalias i8* @malloc(i64 noundef 4)
+; CHECK-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32*
+; CHECK-NEXT: store i32 10, i32* [[TMP3]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = icmp eq i32 [[TMP0]], 1
+; CHECK-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP7:%.*]]
+; CHECK: 5:
+; CHECK-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], 5
+; CHECK-NEXT: br label [[TMP13:%.*]]
+; CHECK: 7:
+; CHECK-NEXT: br label [[TMP8:%.*]]
+; CHECK: 8:
+; CHECK-NEXT: [[DOT0:%.*]] = phi i32 [ [[TMP14:%.*]], [[TMP13]] ], [ 1, [[TMP7]] ]
+; CHECK-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP3]], align 4
+; CHECK-NEXT: [[TMP10:%.*]] = add nsw i32 [[TMP9]], -1
+; CHECK-NEXT: store i32 [[TMP10]], i32* [[TMP3]], align 4
+; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP9]], 0
+; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP15:%.*]]
+; CHECK: 12:
+; CHECK-NEXT: br label [[TMP13]]
+; CHECK: 13:
+; CHECK-NEXT: [[DOT1:%.*]] = phi i32 [ [[TMP6]], [[TMP5]] ], [ [[DOT0]], [[TMP12]] ]
+; CHECK-NEXT: [[TMP14]] = add nsw i32 [[DOT1]], 1
+; CHECK-NEXT: br label [[TMP8]]
+; CHECK: 15:
+; CHECK-NEXT: [[TMP16:%.*]] = load i32, i32* [[TMP3]], align 4
+; CHECK-NEXT: call void @free(i8* nocapture noundef [[TMP2]])
+; CHECK-NEXT: [[TMP17:%.*]] = load i32, i32* [[TMP3]], align 4
+; CHECK-NEXT: ret i32 [[TMP17]]
;
%2 = call noalias i8* @malloc(i64 4)
%3 = bitcast i8* %2 to i32*
declare void @__kmpc_free_shared(i8* nocapture, i64)
define void @test17() {
-; IS________NPM-LABEL: define {{[^@]+}}@test17() {
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1, addrspace(5)
-; IS________NPM-NEXT: [[MALLOC_CAST:%.*]] = addrspacecast i8 addrspace(5)* [[DOTH2S]] to i8*
-; IS________NPM-NEXT: tail call void @usei8(i8* noalias nocapture nofree [[MALLOC_CAST]]) #[[ATTR6:[0-9]+]]
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test17() {
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1, addrspace(5)
+; CHECK-NEXT: [[MALLOC_CAST:%.*]] = addrspacecast i8 addrspace(5)* [[DOTH2S]] to i8*
+; CHECK-NEXT: tail call void @usei8(i8* noalias nocapture nofree [[MALLOC_CAST]]) #[[ATTR6:[0-9]+]]
+; CHECK-NEXT: ret void
;
%1 = tail call noalias i8* @__kmpc_alloc_shared(i64 4)
tail call void @usei8(i8* nocapture nofree %1) willreturn nounwind nosync
}
define void @move_alloca() {
-; IS________NPM-LABEL: define {{[^@]+}}@move_alloca() {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1, addrspace(5)
-; IS________NPM-NEXT: br label [[NOT_ENTRY:%.*]]
-; IS________NPM: not_entry:
-; IS________NPM-NEXT: [[MALLOC_CAST:%.*]] = addrspacecast i8 addrspace(5)* [[DOTH2S]] to i8*
-; IS________NPM-NEXT: tail call void @usei8(i8* noalias nocapture nofree [[MALLOC_CAST]]) #[[ATTR6]]
-; IS________NPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@move_alloca() {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[DOTH2S:%.*]] = alloca i8, i64 4, align 1, addrspace(5)
+; CHECK-NEXT: br label [[NOT_ENTRY:%.*]]
+; CHECK: not_entry:
+; CHECK-NEXT: [[MALLOC_CAST:%.*]] = addrspacecast i8 addrspace(5)* [[DOTH2S]] to i8*
+; CHECK-NEXT: tail call void @usei8(i8* noalias nocapture nofree [[MALLOC_CAST]]) #[[ATTR6]]
+; CHECK-NEXT: ret void
;
entry:
br label %not_entry
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define dso_local i32 @visible(i32* noalias %A, i32* noalias %B) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@visible
-; IS__TUNIT____-SAME: (i32* noalias nocapture nofree readonly [[A:%.*]], i32* noalias nocapture nofree readonly align 4 [[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:[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]]
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@visible
+; TUNIT-SAME: (i32* noalias nocapture nofree readonly [[A:%.*]], i32* noalias nocapture nofree readonly align 4 [[B:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; 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]+]]
+; 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]]
+; TUNIT-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]]
+; TUNIT-NEXT: ret i32 [[ADD]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@visible
-; IS__CGSCC____-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____-NEXT: entry:
-; IS__CGSCC____-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]]) #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-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]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]]
-; IS__CGSCC____-NEXT: ret i32 [[ADD]]
+; CGSCC: Function Attrs: argmemonly nofree noinline nosync nounwind readonly willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@visible
+; CGSCC-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]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-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]]) #[[ATTR5:[0-9]+]]
+; CGSCC-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]]) #[[ATTR5]]
+; CGSCC-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]]
+; CGSCC-NEXT: ret i32 [[ADD]]
;
entry:
%call1 = call i32 @noalias_args(i32* %A, i32* %B)
}
define private i32 @noalias_args(i32* %A, i32* %B) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
-; 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____-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: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]]
-; IS__TUNIT____-NEXT: ret i32 [[ADD2]]
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@noalias_args
+; 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]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
+; TUNIT-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
+; 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]]
+; TUNIT-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]]
+; TUNIT-NEXT: ret i32 [[ADD2]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args
-; 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____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
-; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
-; IS__CGSCC____-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____-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]]
-; IS__CGSCC____-NEXT: ret i32 [[ADD2]]
+; CGSCC: Function Attrs: argmemonly nofree noinline nosync nounwind readonly willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@noalias_args
+; 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]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
+; CGSCC-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
+; CGSCC-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]]
+; CGSCC-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]]
+; CGSCC-NEXT: ret i32 [[ADD2]]
;
entry:
%0 = load i32, i32* %A, align 4
define internal i32 @noalias_args_argmem(i32* %A, i32* %B) #1 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
-; 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____-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: ret i32 [[ADD]]
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@noalias_args_argmem
+; 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]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
+; TUNIT-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
+; TUNIT-NEXT: ret i32 [[ADD]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1:[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
-; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
-; IS__CGSCC____-NEXT: ret i32 [[ADD]]
+; CGSCC: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@noalias_args_argmem
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
+; CGSCC-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
+; CGSCC-NEXT: ret i32 [[ADD]]
;
entry:
%0 = load i32, i32* %A, align 4
}
define dso_local i32 @visible_local(i32* %A) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local
-; 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: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]]
-; IS__TUNIT____-NEXT: ret i32 [[ADD]]
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@visible_local
+; TUNIT-SAME: (i32* nocapture nofree readonly [[A:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 5, i32* [[B]], align 4
+; 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]]
+; 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]]
+; TUNIT-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]]
+; TUNIT-NEXT: ret i32 [[ADD]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@visible_local
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: store i32 5, i32* [[B]], align 4
-; IS__CGSCC____-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____-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]])
-; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]]
-; IS__CGSCC____-NEXT: ret i32 [[ADD]]
+; CGSCC: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@visible_local
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 5, i32* [[B]], align 4
+; CGSCC-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]]
+; CGSCC-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]])
+; CGSCC-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]]
+; CGSCC-NEXT: ret i32 [[ADD]]
;
entry:
%B = alloca i32, align 4
}
define internal i32 @noalias_args_argmem_ro(i32* %A, i32* %B) #1 {
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_args_argmem_ro
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1]] {
-; 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
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[A_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[T0:%.*]] = load i32, i32* [[A_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[T1:%.*]] = load i32, i32* [[B_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[ADD]]
+; CGSCC: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@noalias_args_argmem_ro
+; CGSCC-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[B_PRIV:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[TMP1]], i32* [[B_PRIV]], align 4
+; CGSCC-NEXT: [[A_PRIV:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[TMP0]], i32* [[A_PRIV]], align 4
+; CGSCC-NEXT: [[T0:%.*]] = load i32, i32* [[A_PRIV]], align 4
+; CGSCC-NEXT: [[T1:%.*]] = load i32, i32* [[B_PRIV]], align 4
+; CGSCC-NEXT: [[ADD:%.*]] = add nsw i32 [[T0]], [[T1]]
+; CGSCC-NEXT: ret i32 [[ADD]]
;
%t0 = load i32, i32* %A, align 4
%t1 = load i32, i32* %B, align 4
}
define i32 @visible_local_2() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local_2
-; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: ret i32 10
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@visible_local_2
+; TUNIT-SAME: () #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: ret i32 10
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local_2
-; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 noundef 5, i32 noundef 5) #[[ATTR6:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@visible_local_2
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 noundef 5, i32 noundef 5) #[[ATTR6:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[CALL]]
;
%B = alloca i32, align 4
store i32 5, i32* %B, align 4
}
define internal i32 @noalias_args_argmem_rn(i32* %A, i32* %B) #1 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn
-; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4
-; IS__TUNIT____-NEXT: ret i32 [[T0]]
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@noalias_args_argmem_rn
+; TUNIT-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4
+; TUNIT-NEXT: ret i32 [[T0]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn
-; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR4:[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]]
+; CGSCC: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@noalias_args_argmem_rn
+; CGSCC-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4
+; CGSCC-NEXT: store i32 0, i32* [[B]], align 4
+; CGSCC-NEXT: ret i32 [[T0]]
;
%t0 = load i32, i32* %B, align 4
store i32 0, i32* %B
}
define i32 @visible_local_3() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@visible_local_3
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; 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]]) #[[ATTR4:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@visible_local_3
+; TUNIT-SAME: () #[[ATTR2]] {
+; TUNIT-NEXT: [[B:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 5, i32* [[B]], align 4
+; TUNIT-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@visible_local_3
-; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: store i32 5, i32* [[B]], align 4
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR7:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@visible_local_3
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: [[B:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 5, i32* [[B]], align 4
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem_rn(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR7:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[CALL]]
;
%B = alloca i32, align 4
store i32 5, i32* %B, align 4
attributes #0 = { noinline nounwind uwtable willreturn }
attributes #1 = { argmemonly noinline nounwind uwtable willreturn}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind readonly }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable }
+; TUNIT: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable }
+; TUNIT: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR3]] = { nofree nosync nounwind readonly }
+; TUNIT: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree noinline nosync nounwind readonly willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR2]] = { argmemonly nofree noinline nosync nounwind willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR5]] = { readonly }
-; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR7]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree noinline nosync nounwind readonly willreturn uwtable }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable }
+; CGSCC: attributes #[[ATTR2]] = { argmemonly nofree noinline nosync nounwind willreturn uwtable }
+; CGSCC: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR4]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable }
+; CGSCC: attributes #[[ATTR5]] = { readonly }
+; CGSCC: attributes #[[ATTR6:[0-9]+]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR7]] = { nounwind willreturn }
;.
; 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=2 -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
-; 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,CHECK_DISABLED,NOT_CGSCC_OPM_DISABLED,NOT_CGSCC_NPM_DISABLED,NOT_TUNIT_OPM_DISABLED,IS__TUNIT_____DISABLED,IS________NPM_DISABLED,IS__TUNIT_NPM_DISABLED
+; 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,CHECK_DISABLED
; Deep Wrapper enabled
-; RUN: opt -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -attributor-allow-deep-wrappers -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM,CHECK_ENABLED,NOT_CGSCC_NPM_ENABLED,NOT_CGSCC_OPM_ENABLED,NOT_TUNIT_NPM_ENABLED,IS__TUNIT_____ENABLED,IS________OPM_ENABLED,IS__TUNIT_OPM_ENABLED
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -attributor-allow-deep-wrappers -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM,CHECK_ENABLED,NOT_CGSCC_OPM_ENABLED,NOT_CGSCC_NPM_ENABLED,NOT_TUNIT_OPM_ENABLED,IS__TUNIT_____ENABLED,IS________NPM_ENABLED,IS__TUNIT_NPM_ENABLED
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -attributor-allow-deep-wrappers -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK_ENABLED
; TEST 1: This function is of linkage `linkonce`, we cannot internalize this
; function and use information derived from it
; CHECK_ENABLED-SAME: () #[[ATTR0:[0-9]+]] {
; CHECK_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:[0-9]+]] {
-; IS__CGSCC_____ENABLED-NEXT: unreachable
+; CGSCC_ENABLED: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; CGSCC_ENABLED-LABEL: define {{[^@]+}}@unused_arg_caller
+; CGSCC_ENABLED-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC_ENABLED-NEXT: unreachable
call void @unused_arg(i8 0)
ret void
}
unreachable
}
-; 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 }
+; CGSCC_ENABLED: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC_ENABLED: attributes #[[ATTR1:[0-9]+]] = { nofree noreturn nosync nounwind readnone willreturn }
+; CGSCC_ENABLED: attributes #[[ATTR2]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
;.
; CHECK_DISABLED: attributes #[[ATTR0]] = { norecurse }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; NOT_CGSCC___: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)]
; IS__CGSCC___: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, %lab0), i8* blockaddress(@dead_with_blockaddress_users, %end)]
; and nothing should be deduced for it.
;.
-; NOT_CGSCC_NPM: @[[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*)]
-; NOT_CGSCC_NPM: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 8
-; NOT_CGSCC_NPM: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 16
-; NOT_CGSCC_NPM: @[[E:[a-zA-Z0-9_$"\\.-]+]] = global %struct.a* null
-; NOT_CGSCC_NPM: @[[P:[a-zA-Z0-9_$"\\.-]+]] = global i8 0
+; TUNIT: @[[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*)]
+; TUNIT: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 8
+; TUNIT: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 16
+; TUNIT: @[[E:[a-zA-Z0-9_$"\\.-]+]] = global %struct.a* null
+; TUNIT: @[[P:[a-zA-Z0-9_$"\\.-]+]] = global i8 0
;.
-; IS__CGSCC____: @[[DEAD_WITH_BLOCKADDRESS_USERS_L:[a-zA-Z0-9_$"\\.-]+]] = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, [[LAB0:%.*]]), i8* blockaddress(@dead_with_blockaddress_users, [[END:%.*]])]
-; IS__CGSCC____: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 8
-; IS__CGSCC____: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 16
-; IS__CGSCC____: @[[E:[a-zA-Z0-9_$"\\.-]+]] = global %struct.a* null
-; IS__CGSCC____: @[[P:[a-zA-Z0-9_$"\\.-]+]] = global i8 0
+; CGSCC: @[[DEAD_WITH_BLOCKADDRESS_USERS_L:[a-zA-Z0-9_$"\\.-]+]] = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, [[LAB0:%.*]]), i8* blockaddress(@dead_with_blockaddress_users, [[END:%.*]])]
+; CGSCC: @[[A1:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 8
+; CGSCC: @[[A2:[a-zA-Z0-9_$"\\.-]+]] = common global i8 0, align 16
+; CGSCC: @[[E:[a-zA-Z0-9_$"\\.-]+]] = global %struct.a* null
+; CGSCC: @[[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:[0-9]+]] {
-; IS__CGSCC____-NEXT: br label [[TMP2:%.*]]
-; IS__CGSCC____: 1:
-; IS__CGSCC____-NEXT: ret i32 undef
-; IS__CGSCC____: 2:
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = phi i32 [ [[TMP6:%.*]], [[TMP2]] ], [ 1, [[TMP0:%.*]] ]
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = phi i32 [ [[TMP5:%.*]], [[TMP2]] ], [ 1, [[TMP0]] ]
-; IS__CGSCC____-NEXT: [[TMP5]] = mul nsw i32 [[TMP3]], [[TMP4]]
-; IS__CGSCC____-NEXT: [[TMP6]] = add nuw nsw i32 [[TMP3]], 1
-; IS__CGSCC____-NEXT: [[TMP7:%.*]] = icmp eq i32 [[TMP3]], 10
-; IS__CGSCC____-NEXT: br i1 [[TMP7]], label [[TMP1:%.*]], label [[TMP2]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@dead_internal_func
+; CGSCC-SAME: () #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: br label [[TMP2:%.*]]
+; CGSCC: 1:
+; CGSCC-NEXT: ret i32 undef
+; CGSCC: 2:
+; CGSCC-NEXT: [[TMP3:%.*]] = phi i32 [ [[TMP6:%.*]], [[TMP2]] ], [ 1, [[TMP0:%.*]] ]
+; CGSCC-NEXT: [[TMP4:%.*]] = phi i32 [ [[TMP5:%.*]], [[TMP2]] ], [ 1, [[TMP0]] ]
+; CGSCC-NEXT: [[TMP5]] = mul nsw i32 [[TMP3]], [[TMP4]]
+; CGSCC-NEXT: [[TMP6]] = add nuw nsw i32 [[TMP3]], 1
+; CGSCC-NEXT: [[TMP7:%.*]] = icmp eq i32 [[TMP3]], 10
+; CGSCC-NEXT: br i1 [[TMP7]], label [[TMP1:%.*]], label [[TMP2]]
;
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
}
define i32 @volatile_load(i32*) norecurse nounwind uwtable {
-; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nounwind willreturn uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@volatile_load
-; NOT_CGSCC_NPM-SAME: (i32* nofree noundef 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 willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@volatile_load
-; IS__CGSCC____-SAME: (i32* nofree noundef align 4 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4
-; IS__CGSCC____-NEXT: ret i32 [[TMP2]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@volatile_load
+; TUNIT-SAME: (i32* nofree noundef align 4 [[TMP0:%.*]]) #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4
+; TUNIT-NEXT: ret i32 [[TMP2]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@volatile_load
+; CGSCC-SAME: (i32* nofree noundef align 4 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4
+; CGSCC-NEXT: ret i32 [[TMP2]]
;
%2 = load volatile i32, i32* %0, align 4
ret i32 %2
}
define internal i32 @internal_load(i32*) norecurse nounwind uwtable {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_load
-; IS__CGSCC____-SAME: () #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i32 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@internal_load
+; CGSCC-SAME: () #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: ret i32 undef
;
%2 = load i32, i32* %0, align 4
ret i32 %2
; FIXME: Should be able to detect undefined behavior.
define void @ub(i32* %0) {
-; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@ub
-; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR7:[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]]
-; NOT_CGSCC_NPM-NEXT: store i32 0, i32* [[POISON_YET_AGAIN]], align 4
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ub
-; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR9:[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]]
-; IS__CGSCC____-NEXT: store i32 0, i32* [[POISON_YET_AGAIN]], align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@ub
+; TUNIT-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-NEXT: [[POISON:%.*]] = sub nuw i32 0, 1
+; TUNIT-NEXT: [[STILL_POISON:%.*]] = and i32 [[POISON]], 0
+; TUNIT-NEXT: [[POISON_YET_AGAIN:%.*]] = getelementptr i32, i32* [[TMP0]], i32 [[STILL_POISON]]
+; TUNIT-NEXT: store i32 0, i32* [[POISON_YET_AGAIN]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@ub
+; CGSCC-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: [[POISON:%.*]] = sub nuw i32 0, 1
+; CGSCC-NEXT: [[STILL_POISON:%.*]] = and i32 [[POISON]], 0
+; CGSCC-NEXT: [[POISON_YET_AGAIN:%.*]] = getelementptr i32, i32* [[TMP0]], i32 [[STILL_POISON]]
+; CGSCC-NEXT: store i32 0, i32* [[POISON_YET_AGAIN]], align 4
+; CGSCC-NEXT: ret void
;
%poison = sub nuw i32 0, 1 ; Results in a poison value.
%still_poison = and i32 %poison, 0 ; 0, but also poison.
}
define void @inf_loop() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@inf_loop
-; NOT_CGSCC_NPM-SAME: () #[[ATTR8:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: br label [[WHILE_BODY:%.*]]
-; NOT_CGSCC_NPM: while.body:
-; NOT_CGSCC_NPM-NEXT: br label [[WHILE_BODY]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@inf_loop
-; IS__CGSCC____-SAME: () #[[ATTR10:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]]
-; IS__CGSCC____: while.body:
-; IS__CGSCC____-NEXT: br label [[WHILE_BODY]]
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@inf_loop
+; TUNIT-SAME: () #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[WHILE_BODY:%.*]]
+; TUNIT: while.body:
+; TUNIT-NEXT: br label [[WHILE_BODY]]
+;
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@inf_loop
+; CGSCC-SAME: () #[[ATTR10:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[WHILE_BODY:%.*]]
+; CGSCC: while.body:
+; CGSCC-NEXT: br label [[WHILE_BODY]]
;
entry:
br label %while.body
}
define void @rec() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@rec
-; NOT_CGSCC_NPM-SAME: () #[[ATTR9:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rec
-; IS__CGSCC____-SAME: () #[[ATTR11:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@rec
+; TUNIT-SAME: () #[[ATTR9:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@rec
+; CGSCC-SAME: () #[[ATTR11:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret void
;
entry:
call void @rec()
@a2 = common global i8 0, align 16
define internal i8* @f1(i8* readnone %0) local_unnamed_addr #0 {
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
-; IS__CGSCC____-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
-; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
-; IS__CGSCC____: 3:
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call i8* @f2(i8* nonnull @a1)
-; IS__CGSCC____-NEXT: br label [[TMP5]]
-; IS__CGSCC____: 5:
-; IS__CGSCC____-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP0]], [[TMP1:%.*]] ]
-; IS__CGSCC____-NEXT: ret i8* [[TMP6]]
+; CGSCC-LABEL: define {{[^@]+}}@f1
+; CGSCC-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
+; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
+; CGSCC: 3:
+; CGSCC-NEXT: [[TMP4:%.*]] = tail call i8* @f2(i8* nonnull @a1)
+; CGSCC-NEXT: br label [[TMP5]]
+; CGSCC: 5:
+; CGSCC-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP0]], [[TMP1:%.*]] ]
+; CGSCC-NEXT: ret i8* [[TMP6]]
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
}
define internal i8* @f2(i8* readnone %0) local_unnamed_addr #0 {
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f2
-; IS__CGSCC____-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
-; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
-; IS__CGSCC____: 3:
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* nonnull [[TMP0]])
-; IS__CGSCC____-NEXT: br label [[TMP7:%.*]]
-; IS__CGSCC____: 5:
-; IS__CGSCC____-NEXT: [[TMP6:%.*]] = tail call i8* @f3(i8* nonnull @a2)
-; IS__CGSCC____-NEXT: br label [[TMP7]]
-; IS__CGSCC____: 7:
-; IS__CGSCC____-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
-; IS__CGSCC____-NEXT: ret i8* [[TMP8]]
+; CGSCC-LABEL: define {{[^@]+}}@f2
+; CGSCC-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
+; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
+; CGSCC: 3:
+; CGSCC-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* nonnull [[TMP0]])
+; CGSCC-NEXT: br label [[TMP7:%.*]]
+; CGSCC: 5:
+; CGSCC-NEXT: [[TMP6:%.*]] = tail call i8* @f3(i8* nonnull @a2)
+; CGSCC-NEXT: br label [[TMP7]]
+; CGSCC: 7:
+; CGSCC-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
+; CGSCC-NEXT: ret i8* [[TMP8]]
;
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
}
define internal i8* @f3(i8* readnone %0) local_unnamed_addr #0 {
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f3
-; IS__CGSCC____-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
-; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
-; IS__CGSCC____: 3:
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* nonnull @a2)
-; IS__CGSCC____-NEXT: br label [[TMP5]]
-; IS__CGSCC____: 5:
-; IS__CGSCC____-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ @a1, [[TMP1:%.*]] ]
-; IS__CGSCC____-NEXT: ret i8* [[TMP6]]
+; CGSCC-LABEL: define {{[^@]+}}@f3
+; CGSCC-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr {
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
+; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
+; CGSCC: 3:
+; CGSCC-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* nonnull @a2)
+; CGSCC-NEXT: br label [[TMP5]]
+; CGSCC: 5:
+; CGSCC-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ @a1, [[TMP1:%.*]] ]
+; CGSCC-NEXT: ret i8* [[TMP6]]
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
declare void @sink() nofree nosync nounwind willreturn
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() #[[ATTR13:[0-9]+]]
-; NOT_CGSCC_NPM-NEXT: call void @test_unreachable() #[[ATTR0]]
-; NOT_CGSCC_NPM-NEXT: unreachable
+; TUNIT: Function Attrs: nofree noreturn nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@test_unreachable
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13:[0-9]+]]
+; TUNIT-NEXT: call void @test_unreachable() #[[ATTR0]]
+; TUNIT-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() #[[ATTR15:[0-9]+]]
-; IS__CGSCC____-NEXT: call void @test_unreachable() #[[ATTR0]]
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree noreturn nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@test_unreachable
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15:[0-9]+]]
+; CGSCC-NEXT: call void @test_unreachable() #[[ATTR0]]
+; CGSCC-NEXT: unreachable
;
call void @sink()
call void @test_unreachable()
ret void
}
define internal void @middle() {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@middle() {
-; NOT_CGSCC_NPM-NEXT: bb0:
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b0() #[[ATTR10:[0-9]+]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b1() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b2() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b3() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: br label [[BB1:%.*]]
-; NOT_CGSCC_NPM: bb1:
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b4() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b5() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b6() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b7() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: br label [[BB2:%.*]]
-; NOT_CGSCC_NPM: bb2:
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b8() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b9() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b10() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b11() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: br label [[BB3:%.*]]
-; NOT_CGSCC_NPM: bb3:
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b12() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b13() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b14() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: call void @non_dead_b15() #[[ATTR10]]
-; NOT_CGSCC_NPM-NEXT: br label [[BB4:%.*]]
-; NOT_CGSCC_NPM: bb4:
-; NOT_CGSCC_NPM-NEXT: call void @non_exact2()
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@middle() {
-; IS__CGSCC____-NEXT: bb0:
-; IS__CGSCC____-NEXT: call void @non_dead_b0() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b1() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b2() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b3() #[[ATTR15]]
-; IS__CGSCC____-NEXT: br label [[BB1:%.*]]
-; IS__CGSCC____: bb1:
-; IS__CGSCC____-NEXT: call void @non_dead_b4() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b5() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b6() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b7() #[[ATTR15]]
-; IS__CGSCC____-NEXT: br label [[BB2:%.*]]
-; IS__CGSCC____: bb2:
-; IS__CGSCC____-NEXT: call void @non_dead_b8() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b9() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b10() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b11() #[[ATTR15]]
-; IS__CGSCC____-NEXT: br label [[BB3:%.*]]
-; IS__CGSCC____: bb3:
-; IS__CGSCC____-NEXT: call void @non_dead_b12() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b13() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b14() #[[ATTR15]]
-; IS__CGSCC____-NEXT: call void @non_dead_b15() #[[ATTR15]]
-; IS__CGSCC____-NEXT: br label [[BB4:%.*]]
-; IS__CGSCC____: bb4:
-; IS__CGSCC____-NEXT: call void @non_exact2()
-; IS__CGSCC____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@middle() {
+; TUNIT-NEXT: bb0:
+; TUNIT-NEXT: call void @non_dead_b0() #[[ATTR10:[0-9]+]]
+; TUNIT-NEXT: call void @non_dead_b1() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b2() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b3() #[[ATTR10]]
+; TUNIT-NEXT: br label [[BB1:%.*]]
+; TUNIT: bb1:
+; TUNIT-NEXT: call void @non_dead_b4() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b5() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b6() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b7() #[[ATTR10]]
+; TUNIT-NEXT: br label [[BB2:%.*]]
+; TUNIT: bb2:
+; TUNIT-NEXT: call void @non_dead_b8() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b9() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b10() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b11() #[[ATTR10]]
+; TUNIT-NEXT: br label [[BB3:%.*]]
+; TUNIT: bb3:
+; TUNIT-NEXT: call void @non_dead_b12() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b13() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b14() #[[ATTR10]]
+; TUNIT-NEXT: call void @non_dead_b15() #[[ATTR10]]
+; TUNIT-NEXT: br label [[BB4:%.*]]
+; TUNIT: bb4:
+; TUNIT-NEXT: call void @non_exact2()
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@middle() {
+; CGSCC-NEXT: bb0:
+; CGSCC-NEXT: call void @non_dead_b0() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b1() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b2() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b3() #[[ATTR15]]
+; CGSCC-NEXT: br label [[BB1:%.*]]
+; CGSCC: bb1:
+; CGSCC-NEXT: call void @non_dead_b4() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b5() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b6() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b7() #[[ATTR15]]
+; CGSCC-NEXT: br label [[BB2:%.*]]
+; CGSCC: bb2:
+; CGSCC-NEXT: call void @non_dead_b8() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b9() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b10() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b11() #[[ATTR15]]
+; CGSCC-NEXT: br label [[BB3:%.*]]
+; CGSCC: bb3:
+; CGSCC-NEXT: call void @non_dead_b12() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b13() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b14() #[[ATTR15]]
+; CGSCC-NEXT: call void @non_dead_b15() #[[ATTR15]]
+; CGSCC-NEXT: br label [[BB4:%.*]]
+; CGSCC: bb4:
+; CGSCC-NEXT: call void @non_exact2()
+; CGSCC-NEXT: ret void
;
bb0:
call void @non_dead_b0()
}
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: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a0
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a0
-; IS__CGSCC____-SAME: () #[[ATTR12:[0-9]+]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a0
+; CGSCC-SAME: () #[[ATTR12:[0-9]+]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a1() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a1
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a1
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a1
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a1
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a2() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a2
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a2
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a2
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a2
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a3() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a3
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a3
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a3
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a3
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a4() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a4
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a4
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a4
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a4
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a5() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a5
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a5
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a5
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a5
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a6() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a6
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a6
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a6
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a6
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a7() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a7
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a7
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a7
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a7
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a8() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a8
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a8
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a8
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a8
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a9() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a9
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a9
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a9
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a9
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a10() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a10
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a10
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a10
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a10
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a11() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a11
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a11
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a11
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a11
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a12() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a12
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a12
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a12
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a12
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a13() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a13
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a13
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a13
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a13
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a14() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a14
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a14
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a14
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a14
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_a15() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a15
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_a15
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a15
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_a15
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b0() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b0
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b0
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b0
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b0
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b1() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b1
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b1
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b1
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b1
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b2() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b2
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b2
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b2
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b2
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b3() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b3
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b3
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b3
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b3
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b4() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b4
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b4
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b4
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b4
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b5() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b5
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b5
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b5
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b5
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b6() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b6
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b6
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b6
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b6
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b7() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b7
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b7
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b7
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b7
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b8() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b8
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b8
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b8
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b8
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b9() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b9
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b9
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b9
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b9
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b10() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b10
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b10
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b10
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b10
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b11() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b11
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b11
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b11
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b11
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b12() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b12
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b12
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b12
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b12
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b13() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b13
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b13
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b13
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b13
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b14() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b14
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b14
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b14
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b14
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_b15() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b15
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_b15
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b15
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_b15
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c0() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c0
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c0
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c0
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c0
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c1() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c1
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c1
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c1
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c1
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c2() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c2
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c2
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c2
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c2
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c3() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c3
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c3
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c3
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c3
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c4() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c4
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c4
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c4
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c4
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c5() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c5
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c5
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c5
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c5
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c6() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c6
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c6
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c6
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c6
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c7() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c7
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c7
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c7
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c7
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c8() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c8
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c8
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c8
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c8
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c9() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c9
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c9
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c9
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c9
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c10() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c10
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c10
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c10
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c10
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c11() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c11
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c11
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c11
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c11
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c12() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c12
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c12
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c12
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c12
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c13() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c13
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c13
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c13
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c13
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c14() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c14
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c14
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c14
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c14
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_c15() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c15
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_c15
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c15
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_c15
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d0() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d0
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d0
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d0
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d0
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d1() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d1
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d1
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d1
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d1
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d2() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d2
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d2
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d2
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d2
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d3() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d3
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d3
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d3
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d3
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d4() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d4
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d4
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d4
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d4
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d5() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d5
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d5
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d5
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d5
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d6() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d6
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d6
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d6
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d6
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d7() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d7
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d7
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d7
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d7
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d8() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d8
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d8
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d8
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d8
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d9() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d9
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d9
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d9
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d9
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d10() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d10
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d10
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d10
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d10
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d11() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d11
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d11
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d11
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d11
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d12() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d12
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d12
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d12
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d12
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d13() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d13
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d13
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d13
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d13
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d14() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d14
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d14
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d14
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d14
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @non_dead_d15() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d15
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_dead_d15
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d15
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_dead_d15
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
define internal void @dead_e0() { call void @dead_e1() ret void }
-; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_e0() {
-; IS__CGSCC____-NEXT: call void @dead_e1()
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@dead_e0() {
+; CGSCC-NEXT: call void @dead_e1()
+; CGSCC-NEXT: ret void
;
define internal void @dead_e1() { call void @dead_e2() ret void }
define internal void @dead_e2() { ret void }
}
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: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@useless_arg_sink
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_sink
-; IS__CGSCC____-SAME: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@useless_arg_sink
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @sink()
ret void
}
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: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: call void @useless_arg_sink() #[[ATTR10]]
-; 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: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: call void @useless_arg_sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@useless_arg_almost_sink
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: call void @useless_arg_sink() #[[ATTR10]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@useless_arg_almost_sink
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: call void @useless_arg_sink() #[[ATTR15]]
+; CGSCC-NEXT: ret void
;
call void @useless_arg_sink(i32* %a)
ret void
; FIXME: We should fold terminators.
define internal i32 @switch_default(i64 %i) nounwind {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default
-; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
-; 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() #[[ATTR13]]
-; 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: () #[[ATTR12]] {
-; 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() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret i32 123
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@switch_default
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
+; TUNIT-NEXT: i64 3, label [[RETURN:%.*]]
+; TUNIT-NEXT: i64 10, label [[RETURN]]
+; TUNIT-NEXT: ]
+; TUNIT: sw.default:
+; TUNIT-NEXT: call void @sink() #[[ATTR13]]
+; TUNIT-NEXT: ret i32 undef
+; TUNIT: return:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@switch_default
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
+; CGSCC-NEXT: i64 3, label [[RETURN:%.*]]
+; CGSCC-NEXT: i64 10, label [[RETURN]]
+; CGSCC-NEXT: ]
+; CGSCC: sw.default:
+; CGSCC-NEXT: call void @sink() #[[ATTR15]]
+; CGSCC-NEXT: ret i32 123
+; CGSCC: return:
+; CGSCC-NEXT: unreachable
;
entry:
switch i64 %i, label %sw.default [
}
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: () #[[ATTR10]] {
-; NOT_CGSCC_NPM-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR10]]
-; 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: () #[[ATTR12]] {
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call noundef i32 @switch_default() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret i32 [[CALL2]]
+; TUNIT: Function Attrs: nofree nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@switch_default_caller
+; TUNIT-SAME: () #[[ATTR10]] {
+; TUNIT-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR10]]
+; TUNIT-NEXT: ret i32 123
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@switch_default_caller
+; CGSCC-SAME: () #[[ATTR12]] {
+; CGSCC-NEXT: [[CALL2:%.*]] = tail call noundef i32 @switch_default() #[[ATTR15]]
+; CGSCC-NEXT: ret i32 [[CALL2]]
;
%call2 = tail call i32 @switch_default(i64 0)
ret i32 %call2
}
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____-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: ret i32 123
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@switch_default_dead
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
+; CGSCC-NEXT: i64 3, label [[RETURN:%.*]]
+; CGSCC-NEXT: i64 10, label [[RETURN]]
+; CGSCC-NEXT: ]
+; CGSCC: sw.default:
+; CGSCC-NEXT: ret i32 123
+; CGSCC: return:
+; CGSCC-NEXT: unreachable
;
entry:
switch i64 %i, label %sw.default [
}
define i32 @switch_default_dead_caller() {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_dead_caller
-; NOT_CGSCC_NPM-SAME: () #[[ATTR11:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: ret i32 123
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@switch_default_dead_caller
+; TUNIT-SAME: () #[[ATTR11:[0-9]+]] {
+; TUNIT-NEXT: ret i32 123
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead_caller
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call noundef i32 @switch_default_dead() #[[ATTR16:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[CALL2]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@switch_default_dead_caller
+; CGSCC-SAME: () #[[ATTR11]] {
+; CGSCC-NEXT: [[CALL2:%.*]] = tail call noundef i32 @switch_default_dead() #[[ATTR16:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[CALL2]]
;
%call2 = tail call i32 @switch_default_dead(i64 0)
ret i32 %call2
ret void
}
define void @call_via_pointer_with_dead_args_caller(i32* %a, i32* %b) {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_caller
-; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* [[B:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: [[PTR1:%.*]] = alloca i32, align 128
-; NOT_CGSCC_NPM-NEXT: [[PTR2:%.*]] = alloca i32, align 128
-; NOT_CGSCC_NPM-NEXT: [[PTR3:%.*]] = alloca i32, align 128
-; NOT_CGSCC_NPM-NEXT: [[PTR4:%.*]] = alloca i32, align 128
-; NOT_CGSCC_NPM-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR1]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef @called_via_pointer)
-; NOT_CGSCC_NPM-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR2]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef @called_via_pointer_internal_1)
-; NOT_CGSCC_NPM-NEXT: call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]])
-; NOT_CGSCC_NPM-NEXT: call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]])
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_caller
-; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* [[B:%.*]]) {
-; IS__CGSCC____-NEXT: [[PTR1:%.*]] = alloca i32, align 128
-; IS__CGSCC____-NEXT: [[PTR2:%.*]] = alloca i32, align 128
-; IS__CGSCC____-NEXT: [[PTR3:%.*]] = alloca i32, align 128
-; IS__CGSCC____-NEXT: [[PTR4:%.*]] = alloca i32, align 128
-; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR1]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer)
-; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR2]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer_internal_1)
-; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]])
-; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]])
-; IS__CGSCC____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_caller
+; TUNIT-SAME: (i32* [[A:%.*]], i32* [[B:%.*]]) {
+; TUNIT-NEXT: [[PTR1:%.*]] = alloca i32, align 128
+; TUNIT-NEXT: [[PTR2:%.*]] = alloca i32, align 128
+; TUNIT-NEXT: [[PTR3:%.*]] = alloca i32, align 128
+; TUNIT-NEXT: [[PTR4:%.*]] = alloca i32, align 128
+; TUNIT-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR1]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef @called_via_pointer)
+; TUNIT-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR2]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef @called_via_pointer_internal_1)
+; TUNIT-NEXT: call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]])
+; TUNIT-NEXT: call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]])
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_caller
+; CGSCC-SAME: (i32* [[A:%.*]], i32* [[B:%.*]]) {
+; CGSCC-NEXT: [[PTR1:%.*]] = alloca i32, align 128
+; CGSCC-NEXT: [[PTR2:%.*]] = alloca i32, align 128
+; CGSCC-NEXT: [[PTR3:%.*]] = alloca i32, align 128
+; CGSCC-NEXT: [[PTR4:%.*]] = alloca i32, align 128
+; CGSCC-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR1]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer)
+; CGSCC-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR2]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer_internal_1)
+; CGSCC-NEXT: call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]])
+; CGSCC-NEXT: call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]])
+; CGSCC-NEXT: ret void
;
%ptr1 = alloca i32, align 128
%ptr2 = alloca i32, align 128
}
; FIXME: Figure out why the MODULE has the unused arguments still
define internal void @called_via_pointer_internal_2(i32* %a, i32* %b, i32* %c, i64 %d, i32** %e) {
-; IS__CGSCC____-LABEL: define {{[^@]+}}@called_via_pointer_internal_2
-; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* [[B:%.*]], i32* [[C:%.*]], i64 [[D:%.*]], i32** [[E:%.*]]) {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: tail call void @use_i32p(i32* [[A]])
-; IS__CGSCC____-NEXT: tail call void @use_i32p(i32* [[A]])
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@called_via_pointer_internal_2
+; CGSCC-SAME: (i32* [[A:%.*]], i32* [[B:%.*]], i32* [[C:%.*]], i64 [[D:%.*]], i32** [[E:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: tail call void @use_i32p(i32* [[A]])
+; CGSCC-NEXT: tail call void @use_i32p(i32* [[A]])
+; CGSCC-NEXT: ret void
;
entry:
tail call void @use_i32p(i32* %a)
; Allow blockaddress users
define internal void @dead_with_blockaddress_users(i32* nocapture %pc) nounwind readonly {
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_with_blockaddress_users
-; IS__CGSCC____-SAME: (i32* nocapture [[PC:%.*]]) #[[ATTR13:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br label [[INDIRECTGOTO:%.*]]
-; IS__CGSCC____: lab0:
-; IS__CGSCC____-NEXT: [[INDVAR_NEXT:%.*]] = add i32 [[INDVAR:%.*]], 1
-; IS__CGSCC____-NEXT: br label [[INDIRECTGOTO]]
-; IS__CGSCC____: end:
-; IS__CGSCC____-NEXT: ret void
-; IS__CGSCC____: indirectgoto:
-; IS__CGSCC____-NEXT: [[INDVAR]] = phi i32 [ [[INDVAR_NEXT]], [[LAB0:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__CGSCC____-NEXT: [[PC_ADDR_0:%.*]] = getelementptr i32, i32* [[PC]], i32 [[INDVAR]]
-; IS__CGSCC____-NEXT: [[TMP1_PN:%.*]] = load i32, i32* [[PC_ADDR_0]], align 4
-; IS__CGSCC____-NEXT: [[INDIRECT_GOTO_DEST_IN:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* @dead_with_blockaddress_users.l, i32 0, i32 [[TMP1_PN]]
-; IS__CGSCC____-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]], align 8
-; IS__CGSCC____-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end]
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@dead_with_blockaddress_users
+; CGSCC-SAME: (i32* nocapture [[PC:%.*]]) #[[ATTR13:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[INDIRECTGOTO:%.*]]
+; CGSCC: lab0:
+; CGSCC-NEXT: [[INDVAR_NEXT:%.*]] = add i32 [[INDVAR:%.*]], 1
+; CGSCC-NEXT: br label [[INDIRECTGOTO]]
+; CGSCC: end:
+; CGSCC-NEXT: ret void
+; CGSCC: indirectgoto:
+; CGSCC-NEXT: [[INDVAR]] = phi i32 [ [[INDVAR_NEXT]], [[LAB0:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; CGSCC-NEXT: [[PC_ADDR_0:%.*]] = getelementptr i32, i32* [[PC]], i32 [[INDVAR]]
+; CGSCC-NEXT: [[TMP1_PN:%.*]] = load i32, i32* [[PC_ADDR_0]], align 4
+; CGSCC-NEXT: [[INDIRECT_GOTO_DEST_IN:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* @dead_with_blockaddress_users.l, i32 0, i32 [[TMP1_PN]]
+; CGSCC-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]], align 8
+; CGSCC-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end]
;
entry:
br label %indirectgoto
@e = global %struct.a* null
define i32 @main() {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@main() {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: [[F:%.*]] = alloca i32, align 4
-; NOT_CGSCC_NPM-NEXT: br label [[FOR_COND_0:%.*]]
-; NOT_CGSCC_NPM: for.cond.0:
-; NOT_CGSCC_NPM-NEXT: [[G_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY_0:%.*]] ]
-; NOT_CGSCC_NPM-NEXT: [[CMP_0:%.*]] = icmp ult i32 [[G_0]], 100
-; NOT_CGSCC_NPM-NEXT: br i1 [[CMP_0]], label [[FOR_BODY_0]], label [[FOR_END_0:%.*]]
-; NOT_CGSCC_NPM: for.body.0:
-; NOT_CGSCC_NPM-NEXT: [[INC]] = add nuw nsw i32 [[G_0]], 1
-; NOT_CGSCC_NPM-NEXT: br label [[FOR_COND_0]]
-; NOT_CGSCC_NPM: for.end.0:
-; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i8* @malloc(i64 noundef 8)
-; NOT_CGSCC_NPM-NEXT: store i8* [[CALL]], i8** bitcast (%struct.a** @e to i8**), align 8
-; NOT_CGSCC_NPM-NEXT: [[B:%.*]] = bitcast i8* [[CALL]] to %struct.a**
-; NOT_CGSCC_NPM-NEXT: store %struct.a* null, %struct.a** [[B]], align 8
-; NOT_CGSCC_NPM-NEXT: br label [[FOR_COND_1:%.*]]
-; NOT_CGSCC_NPM: for.cond.1:
-; NOT_CGSCC_NPM-NEXT: [[G_1:%.*]] = phi i32 [ 0, [[FOR_END_0]] ], [ [[INC6:%.*]], [[FOR_BODY_1:%.*]] ]
-; NOT_CGSCC_NPM-NEXT: [[CMP_1:%.*]] = icmp ult i32 [[G_1]], 100
-; NOT_CGSCC_NPM-NEXT: br i1 [[CMP_1]], label [[FOR_BODY_1]], label [[FOR_END_1:%.*]]
-; NOT_CGSCC_NPM: for.body.1:
-; NOT_CGSCC_NPM-NEXT: [[CALL4:%.*]] = call i32 (i32*, ...) bitcast (i32 (i32)* @h to i32 (i32*, ...)*)(i32* nonnull [[F]])
-; NOT_CGSCC_NPM-NEXT: [[INC6]] = add nuw nsw i32 [[G_1]], 1
-; NOT_CGSCC_NPM-NEXT: br label [[FOR_COND_1]]
-; NOT_CGSCC_NPM: for.end.1:
-; NOT_CGSCC_NPM-NEXT: ret i32 0
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@main() {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br label [[FOR_COND_0:%.*]]
-; IS__CGSCC____: for.cond.0:
-; IS__CGSCC____-NEXT: [[G_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY_0:%.*]] ]
-; IS__CGSCC____-NEXT: [[CMP_0:%.*]] = icmp ult i32 [[G_0]], 100
-; IS__CGSCC____-NEXT: br i1 [[CMP_0]], label [[FOR_BODY_0]], label [[FOR_END_0:%.*]]
-; IS__CGSCC____: for.body.0:
-; IS__CGSCC____-NEXT: [[INC]] = add nuw nsw i32 [[G_0]], 1
-; IS__CGSCC____-NEXT: br label [[FOR_COND_0]]
-; IS__CGSCC____: for.end.0:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i8* @malloc(i64 noundef 8)
-; IS__CGSCC____-NEXT: store i8* [[CALL]], i8** bitcast (%struct.a** @e to i8**), align 8
-; IS__CGSCC____-NEXT: [[B:%.*]] = bitcast i8* [[CALL]] to %struct.a**
-; IS__CGSCC____-NEXT: store %struct.a* null, %struct.a** [[B]], align 8
-; IS__CGSCC____-NEXT: br label [[FOR_COND_1:%.*]]
-; IS__CGSCC____: for.cond.1:
-; IS__CGSCC____-NEXT: [[G_1:%.*]] = phi i32 [ 0, [[FOR_END_0]] ], [ [[INC6:%.*]], [[FOR_BODY_1:%.*]] ]
-; IS__CGSCC____-NEXT: [[CMP_1:%.*]] = icmp ult i32 [[G_1]], 100
-; IS__CGSCC____-NEXT: br i1 [[CMP_1]], label [[FOR_BODY_1]], label [[FOR_END_1:%.*]]
-; IS__CGSCC____: for.body.1:
-; IS__CGSCC____-NEXT: [[INC6]] = add nuw nsw i32 [[G_1]], 1
-; IS__CGSCC____-NEXT: br label [[FOR_COND_1]]
-; IS__CGSCC____: for.end.1:
-; IS__CGSCC____-NEXT: ret i32 0
+; TUNIT-LABEL: define {{[^@]+}}@main() {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[F:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: br label [[FOR_COND_0:%.*]]
+; TUNIT: for.cond.0:
+; TUNIT-NEXT: [[G_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY_0:%.*]] ]
+; TUNIT-NEXT: [[CMP_0:%.*]] = icmp ult i32 [[G_0]], 100
+; TUNIT-NEXT: br i1 [[CMP_0]], label [[FOR_BODY_0]], label [[FOR_END_0:%.*]]
+; TUNIT: for.body.0:
+; TUNIT-NEXT: [[INC]] = add nuw nsw i32 [[G_0]], 1
+; TUNIT-NEXT: br label [[FOR_COND_0]]
+; TUNIT: for.end.0:
+; TUNIT-NEXT: [[CALL:%.*]] = call i8* @malloc(i64 noundef 8)
+; TUNIT-NEXT: store i8* [[CALL]], i8** bitcast (%struct.a** @e to i8**), align 8
+; TUNIT-NEXT: [[B:%.*]] = bitcast i8* [[CALL]] to %struct.a**
+; TUNIT-NEXT: store %struct.a* null, %struct.a** [[B]], align 8
+; TUNIT-NEXT: br label [[FOR_COND_1:%.*]]
+; TUNIT: for.cond.1:
+; TUNIT-NEXT: [[G_1:%.*]] = phi i32 [ 0, [[FOR_END_0]] ], [ [[INC6:%.*]], [[FOR_BODY_1:%.*]] ]
+; TUNIT-NEXT: [[CMP_1:%.*]] = icmp ult i32 [[G_1]], 100
+; TUNIT-NEXT: br i1 [[CMP_1]], label [[FOR_BODY_1]], label [[FOR_END_1:%.*]]
+; TUNIT: for.body.1:
+; TUNIT-NEXT: [[CALL4:%.*]] = call i32 (i32*, ...) bitcast (i32 (i32)* @h to i32 (i32*, ...)*)(i32* nonnull [[F]])
+; TUNIT-NEXT: [[INC6]] = add nuw nsw i32 [[G_1]], 1
+; TUNIT-NEXT: br label [[FOR_COND_1]]
+; TUNIT: for.end.1:
+; TUNIT-NEXT: ret i32 0
+;
+; CGSCC-LABEL: define {{[^@]+}}@main() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[FOR_COND_0:%.*]]
+; CGSCC: for.cond.0:
+; CGSCC-NEXT: [[G_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY_0:%.*]] ]
+; CGSCC-NEXT: [[CMP_0:%.*]] = icmp ult i32 [[G_0]], 100
+; CGSCC-NEXT: br i1 [[CMP_0]], label [[FOR_BODY_0]], label [[FOR_END_0:%.*]]
+; CGSCC: for.body.0:
+; CGSCC-NEXT: [[INC]] = add nuw nsw i32 [[G_0]], 1
+; CGSCC-NEXT: br label [[FOR_COND_0]]
+; CGSCC: for.end.0:
+; CGSCC-NEXT: [[CALL:%.*]] = call i8* @malloc(i64 noundef 8)
+; CGSCC-NEXT: store i8* [[CALL]], i8** bitcast (%struct.a** @e to i8**), align 8
+; CGSCC-NEXT: [[B:%.*]] = bitcast i8* [[CALL]] to %struct.a**
+; CGSCC-NEXT: store %struct.a* null, %struct.a** [[B]], align 8
+; CGSCC-NEXT: br label [[FOR_COND_1:%.*]]
+; CGSCC: for.cond.1:
+; CGSCC-NEXT: [[G_1:%.*]] = phi i32 [ 0, [[FOR_END_0]] ], [ [[INC6:%.*]], [[FOR_BODY_1:%.*]] ]
+; CGSCC-NEXT: [[CMP_1:%.*]] = icmp ult i32 [[G_1]], 100
+; CGSCC-NEXT: br i1 [[CMP_1]], label [[FOR_BODY_1]], label [[FOR_END_1:%.*]]
+; CGSCC: for.body.1:
+; CGSCC-NEXT: [[INC6]] = add nuw nsw i32 [[G_1]], 1
+; CGSCC-NEXT: br label [[FOR_COND_1]]
+; CGSCC: for.end.1:
+; CGSCC-NEXT: ret i32 0
;
entry:
%f = alloca i32
declare noalias i8* @malloc(i64)
define i32 @h(i32 %i) {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@h
-; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) #[[ATTR11]] {
-; NOT_CGSCC_NPM-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@h
+; TUNIT-SAME: (i32 [[I:%.*]]) #[[ATTR11]] {
+; TUNIT-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____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@h
+; CGSCC-SAME: (i32 [[I:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: ret i32 0
;
ret i32 0
}
@p = global i8 0
define void @bad_gep() {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@bad_gep
-; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
-; 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]]) #[[ATTR14:[0-9]+]]
-; NOT_CGSCC_NPM-NEXT: br label [[EXIT:%.*]]
-; NOT_CGSCC_NPM: while.body:
-; NOT_CGSCC_NPM-NEXT: unreachable
-; NOT_CGSCC_NPM: if.then:
-; NOT_CGSCC_NPM-NEXT: unreachable
-; 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]]) #[[ATTR14]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@bad_gep
-; IS__CGSCC____-SAME: () #[[ATTR6]] {
-; 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:[0-9]+]]
-; IS__CGSCC____-NEXT: br label [[EXIT:%.*]]
-; IS__CGSCC____: while.body:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: unreachable
-; 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: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@bad_gep
+; TUNIT-SAME: () #[[ATTR11]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[N:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: [[M:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR14:[0-9]+]]
+; TUNIT-NEXT: br label [[EXIT:%.*]]
+; TUNIT: while.body:
+; TUNIT-NEXT: unreachable
+; TUNIT: if.then:
+; TUNIT-NEXT: unreachable
+; TUNIT: if.end:
+; TUNIT-NEXT: unreachable
+; TUNIT: exit:
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR14]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@bad_gep
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[N:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: [[M:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR17:[0-9]+]]
+; CGSCC-NEXT: br label [[EXIT:%.*]]
+; CGSCC: while.body:
+; CGSCC-NEXT: unreachable
+; CGSCC: if.then:
+; CGSCC-NEXT: unreachable
+; CGSCC: if.end:
+; CGSCC-NEXT: unreachable
+; CGSCC: exit:
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR17]]
+; CGSCC-NEXT: ret void
;
entry:
%n = alloca i8
}
define i8 @edge_vs_block_liveness() {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@edge_vs_block_liveness
-; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: br i1 true, label [[B1:%.*]], label [[B2:%.*]]
-; NOT_CGSCC_NPM: b1:
-; NOT_CGSCC_NPM-NEXT: br label [[B2]]
-; NOT_CGSCC_NPM: b2:
-; NOT_CGSCC_NPM-NEXT: [[PHI:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ 1, [[B1]] ]
-; NOT_CGSCC_NPM-NEXT: ret i8 1
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@edge_vs_block_liveness
-; IS__CGSCC____-SAME: () #[[ATTR6]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br i1 true, label [[B1:%.*]], label [[B2:%.*]]
-; IS__CGSCC____: b1:
-; IS__CGSCC____-NEXT: br label [[B2]]
-; IS__CGSCC____: b2:
-; IS__CGSCC____-NEXT: [[PHI:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ 1, [[B1]] ]
-; IS__CGSCC____-NEXT: ret i8 1
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@edge_vs_block_liveness
+; TUNIT-SAME: () #[[ATTR11]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br i1 true, label [[B1:%.*]], label [[B2:%.*]]
+; TUNIT: b1:
+; TUNIT-NEXT: br label [[B2]]
+; TUNIT: b2:
+; TUNIT-NEXT: [[PHI:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ 1, [[B1]] ]
+; TUNIT-NEXT: ret i8 1
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@edge_vs_block_liveness
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br i1 true, label [[B1:%.*]], label [[B2:%.*]]
+; CGSCC: b1:
+; CGSCC-NEXT: br label [[B2]]
+; CGSCC: b2:
+; CGSCC-NEXT: [[PHI:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ 1, [[B1]] ]
+; CGSCC-NEXT: ret i8 1
;
entry:
br i1 true, label %b1, label %b2
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 willreturn uwtable }
-; NOT_CGSCC_NPM: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; NOT_CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone }
-; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind readnone willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR12:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR13]] = { nounwind willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR14]] = { willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind }
+; TUNIT: attributes #[[ATTR1:[0-9]+]] = { readnone }
+; TUNIT: attributes #[[ATTR2]] = { nounwind }
+; TUNIT: attributes #[[ATTR3]] = { noreturn nounwind }
+; TUNIT: attributes #[[ATTR4]] = { noreturn }
+; TUNIT: attributes #[[ATTR5]] = { nosync readnone }
+; TUNIT: attributes #[[ATTR6]] = { argmemonly nofree norecurse nounwind willreturn uwtable }
+; TUNIT: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR12:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR13]] = { nounwind willreturn }
+; TUNIT: attributes #[[ATTR14]] = { 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 willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR10]] = { nofree norecurse noreturn nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR11]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR13]] = { nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR14:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR15]] = { nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR16]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR17]] = { willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind }
+; CGSCC: attributes #[[ATTR1:[0-9]+]] = { readnone }
+; CGSCC: attributes #[[ATTR2]] = { nounwind }
+; CGSCC: attributes #[[ATTR3]] = { noreturn nounwind }
+; CGSCC: attributes #[[ATTR4]] = { noreturn }
+; CGSCC: attributes #[[ATTR5]] = { nosync readnone }
+; CGSCC: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR7]] = { argmemonly nofree norecurse nounwind willreturn uwtable }
+; CGSCC: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR9]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR10]] = { nofree norecurse noreturn nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR11]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR13]] = { nounwind readonly }
+; CGSCC: attributes #[[ATTR14:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR15]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR16]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR17]] = { willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Make sure we need a single iteration to determine the chains are dead/alive.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -max-heap-to-stack-size=-1 -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 -max-heap-to-stack-size=-1 -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
+; RUN: opt -max-heap-to-stack-size=-1 -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,TUNIT
+; RUN: opt -max-heap-to-stack-size=-1 -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
declare i64 @subfn(i8*) #0
declare void @free(i8*) allockind("free") "alloc-family"="malloc"
define i64 @f(i64 %len) {
-; IS________NPM-LABEL: define {{[^@]+}}@f
-; IS________NPM-SAME: (i64 [[LEN:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[MEM_H2S:%.*]] = alloca i8, i64 [[LEN]], align 1
-; IS________NPM-NEXT: [[RES:%.*]] = call i64 @subfn(i8* [[MEM_H2S]]) #[[ATTR5:[0-9]+]]
-; IS________NPM-NEXT: ret i64 [[RES]]
+; CHECK-LABEL: define {{[^@]+}}@f
+; CHECK-SAME: (i64 [[LEN:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[MEM_H2S:%.*]] = alloca i8, i64 [[LEN]], align 1
+; CHECK-NEXT: [[RES:%.*]] = call i64 @subfn(i8* [[MEM_H2S]]) #[[ATTR5:[0-9]+]]
+; CHECK-NEXT: ret i64 [[RES]]
;
entry:
%mem = call i8* @malloc(i64 %len)
define i64 @g(i64 %len) {
-; IS________NPM-LABEL: define {{[^@]+}}@g
-; IS________NPM-SAME: (i64 [[LEN:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[TMP0:%.*]] = mul i64 [[LEN]], 8
-; IS________NPM-NEXT: [[MEM_H2S:%.*]] = alloca i8, i64 [[TMP0]], align 1
-; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[MEM_H2S]], i8 0, i64 [[TMP0]], i1 false)
-; IS________NPM-NEXT: [[RES:%.*]] = call i64 @subfn(i8* [[MEM_H2S]]) #[[ATTR5]]
-; IS________NPM-NEXT: ret i64 [[RES]]
+; CHECK-LABEL: define {{[^@]+}}@g
+; CHECK-SAME: (i64 [[LEN:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP0:%.*]] = mul i64 [[LEN]], 8
+; CHECK-NEXT: [[MEM_H2S:%.*]] = alloca i8, i64 [[TMP0]], align 1
+; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* [[MEM_H2S]], i8 0, i64 [[TMP0]], i1 false)
+; CHECK-NEXT: [[RES:%.*]] = call i64 @subfn(i8* [[MEM_H2S]]) #[[ATTR5]]
+; CHECK-NEXT: ret i64 [[RES]]
;
entry:
%mem = call i8* @calloc(i64 %len, i64 8)
attributes #0 = { nounwind willreturn }
;.
-; IS________NPM: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn }
-; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { allockind("alloc,uninitialized") allocsize(0) "alloc-family"="malloc" }
-; IS________NPM: attributes #[[ATTR2:[0-9]+]] = { allockind("alloc,zeroed") allocsize(0,1) "alloc-family"="malloc" }
-; IS________NPM: attributes #[[ATTR3:[0-9]+]] = { allockind("free") "alloc-family"="malloc" }
-; IS________NPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; IS________NPM: attributes #[[ATTR5]] = { nounwind }
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { allockind("alloc,uninitialized") allocsize(0) "alloc-family"="malloc" }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { allockind("alloc,zeroed") allocsize(0,1) "alloc-family"="malloc" }
+; CHECK: attributes #[[ATTR3:[0-9]+]] = { allockind("free") "alloc-family"="malloc" }
+; CHECK: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; CHECK: attributes #[[ATTR5]] = { nounwind }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define i8 @test1(i32 %a, i32 %length) {
-; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@test1
-; IS________NPM-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: br label [[LOOP:%.*]]
-; IS________NPM: loop:
-; IS________NPM-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[BACKEDGE:%.*]] ]
-; IS________NPM-NEXT: [[CND:%.*]] = icmp sge i32 [[IV]], 0
-; IS________NPM-NEXT: br i1 [[CND]], label [[BACKEDGE]], label [[EXIT:%.*]]
-; IS________NPM: backedge:
-; IS________NPM-NEXT: [[IV_NEXT]] = add nsw i32 [[IV]], 1
-; IS________NPM-NEXT: [[CONT:%.*]] = icmp slt i32 [[IV_NEXT]], 400
-; IS________NPM-NEXT: br i1 [[CONT]], label [[LOOP]], label [[EXIT]]
-; IS________NPM: exit:
-; IS________NPM-NEXT: ret i8 0
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@test1
+; CHECK-SAME: (i32 [[A:%.*]], i32 [[LENGTH:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[LOOP:%.*]]
+; CHECK: loop:
+; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[BACKEDGE:%.*]] ]
+; CHECK-NEXT: [[CND:%.*]] = icmp sge i32 [[IV]], 0
+; CHECK-NEXT: br i1 [[CND]], label [[BACKEDGE]], label [[EXIT:%.*]]
+; CHECK: backedge:
+; CHECK-NEXT: [[IV_NEXT]] = add nsw i32 [[IV]], 1
+; CHECK-NEXT: [[CONT:%.*]] = icmp slt i32 [[IV_NEXT]], 400
+; CHECK-NEXT: br i1 [[CONT]], label [[LOOP]], label [[EXIT]]
+; CHECK: exit:
+; CHECK-NEXT: ret i8 0
;
entry:
br label %loop
}
define i8 @test2(i32 %n) {
-; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@test2
-; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR0]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: br label [[LOOP:%.*]]
-; IS________NPM: loop:
-; IS________NPM-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[BACKEDGE:%.*]] ]
-; IS________NPM-NEXT: [[IV2:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[IV2_NEXT:%.*]], [[BACKEDGE]] ]
-; IS________NPM-NEXT: [[CND1:%.*]] = icmp sge i32 [[IV]], 0
-; IS________NPM-NEXT: [[CND2:%.*]] = icmp sgt i32 [[IV2]], 0
-; IS________NPM-NEXT: [[CND:%.*]] = and i1 [[CND1]], [[CND2]]
-; IS________NPM-NEXT: br i1 [[CND]], label [[BACKEDGE]], label [[EXIT:%.*]]
-; IS________NPM: backedge:
-; IS________NPM-NEXT: [[IV_NEXT]] = add nsw i32 [[IV]], 1
-; IS________NPM-NEXT: [[IV2_NEXT]] = sub nsw i32 [[IV2]], 1
-; IS________NPM-NEXT: [[CONT1:%.*]] = icmp slt i32 [[IV_NEXT]], 400
-; IS________NPM-NEXT: [[CONT2:%.*]] = icmp sgt i32 [[IV2_NEXT]], 0
-; IS________NPM-NEXT: [[CONT:%.*]] = and i1 [[CONT1]], [[CONT2]]
-; IS________NPM-NEXT: br i1 [[CONT]], label [[LOOP]], label [[EXIT]]
-; IS________NPM: exit:
-; IS________NPM-NEXT: ret i8 0
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@test2
+; CHECK-SAME: (i32 [[N:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[LOOP:%.*]]
+; CHECK: loop:
+; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[BACKEDGE:%.*]] ]
+; CHECK-NEXT: [[IV2:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[IV2_NEXT:%.*]], [[BACKEDGE]] ]
+; CHECK-NEXT: [[CND1:%.*]] = icmp sge i32 [[IV]], 0
+; CHECK-NEXT: [[CND2:%.*]] = icmp sgt i32 [[IV2]], 0
+; CHECK-NEXT: [[CND:%.*]] = and i1 [[CND1]], [[CND2]]
+; CHECK-NEXT: br i1 [[CND]], label [[BACKEDGE]], label [[EXIT:%.*]]
+; CHECK: backedge:
+; CHECK-NEXT: [[IV_NEXT]] = add nsw i32 [[IV]], 1
+; CHECK-NEXT: [[IV2_NEXT]] = sub nsw i32 [[IV2]], 1
+; CHECK-NEXT: [[CONT1:%.*]] = icmp slt i32 [[IV_NEXT]], 400
+; CHECK-NEXT: [[CONT2:%.*]] = icmp sgt i32 [[IV2_NEXT]], 0
+; CHECK-NEXT: [[CONT:%.*]] = and i1 [[CONT1]], [[CONT2]]
+; CHECK-NEXT: br i1 [[CONT]], label [[LOOP]], label [[EXIT]]
+; CHECK: exit:
+; CHECK-NEXT: ret i8 0
;
entry:
br label %loop
declare void @dummy(i1) nounwind
declare void @llvm.experimental.guard(i1, ...)
;.
-; IS________NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
-; IS________NPM: attributes #[[ATTR2]] = { nounwind }
-; IS________NPM: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync willreturn }
+; CHECK: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; CHECK: attributes #[[ATTR2]] = { nounwind }
+; CHECK: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; FIXME: DOT should be replaced with 3
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
@G = external dso_local global i32, align 4
}
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 nofree [[ARG:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call noalias i8* @internal_argmem_only_rec_1(i32* nocapture nofree 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 nofree 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 nofree noundef nonnull align 4 dereferenceable(4) [[ARG]])
-; IS__CGSCC____-NEXT: ret i8* [[CALL]]
+; TUNIT: Function Attrs: inaccessiblemem_or_argmemonly
+; TUNIT-LABEL: define {{[^@]+}}@internal_argmem_only_rec
+; TUNIT-SAME: (i32* nocapture nofree [[ARG:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call noalias i8* @internal_argmem_only_rec_1(i32* nocapture nofree align 4 [[ARG]])
+; TUNIT-NEXT: ret i8* [[CALL]]
+;
+; CGSCC: Function Attrs: inaccessiblemem_or_argmemonly
+; CGSCC-LABEL: define {{[^@]+}}@internal_argmem_only_rec
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call noalias i8* @internal_argmem_only_rec_1(i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[ARG]])
+; CGSCC-NEXT: ret i8* [[CALL]]
;
entry:
%call = call i8* @internal_argmem_only_rec_1(i32* %arg)
}
define void @writeonly_global() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@writeonly_global
-; IS__TUNIT____-SAME: () #[[ATTR6]] {
-; IS__TUNIT____-NEXT: call void @write_global() #[[ATTR10:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@writeonly_global
-; IS__CGSCC____-SAME: () #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT: call void @write_global() #[[ATTR11:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@writeonly_global
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: call void @write_global() #[[ATTR10:[0-9]+]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@writeonly_global
+; CGSCC-SAME: () #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: call void @write_global() #[[ATTR11:[0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @write_global()
ret void
}
define void @writeonly_global_via_arg() {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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) #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@writeonly_global_via_arg
-; IS__CGSCC____-SAME: () #[[ATTR8]] {
-; IS__CGSCC____-NEXT: call void @write_global_via_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) @G) #[[ATTR11]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@writeonly_global_via_arg
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: call void @write_global_via_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) @G) #[[ATTR10]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@writeonly_global_via_arg
+; CGSCC-SAME: () #[[ATTR8]] {
+; CGSCC-NEXT: call void @write_global_via_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) @G) #[[ATTR11]]
+; CGSCC-NEXT: ret void
;
call void @write_global_via_arg(i32* @G)
ret void
define void @writeonly_global_via_arg_internal() {
;
-; IS__TUNIT____: Function Attrs: nofree norecurse 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() #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@writeonly_global_via_arg_internal
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: call void @write_global_via_arg_internal() #[[ATTR10]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@writeonly_global_via_arg_internal
-; IS__CGSCC____-SAME: () #[[ATTR8]] {
-; IS__CGSCC____-NEXT: call void @write_global_via_arg_internal() #[[ATTR11]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@writeonly_global_via_arg_internal
+; CGSCC-SAME: () #[[ATTR8]] {
+; CGSCC-NEXT: call void @write_global_via_arg_internal() #[[ATTR11]]
+; CGSCC-NEXT: ret void
;
call void @write_global_via_arg_internal(i32* @G)
ret void
}
define i8 @recursive_not_readnone(i8* %ptr, i1 %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone
-; 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) #[[ATTR11:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i8 1
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i8 1, i8* [[PTR]], align 1
-; IS__TUNIT____-NEXT: ret i8 0
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone
-; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR9:[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) #[[ATTR12:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i8 1
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i8 1, i8* [[PTR]], align 1
-; IS__CGSCC____-NEXT: ret i8 0
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@recursive_not_readnone
+; TUNIT-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11:[0-9]+]]
+; TUNIT-NEXT: ret i8 1
+; TUNIT: f:
+; TUNIT-NEXT: store i8 1, i8* [[PTR]], align 1
+; TUNIT-NEXT: ret i8 0
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@recursive_not_readnone
+; CGSCC-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR12:[0-9]+]]
+; CGSCC-NEXT: ret i8 1
+; CGSCC: f:
+; CGSCC-NEXT: store i8 1, i8* [[PTR]], align 1
+; CGSCC-NEXT: ret i8 0
;
%alloc = alloca i8
br i1 %c, label %t, label %f
}
define internal i8 @recursive_not_readnone_internal(i8* %ptr, i1 %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal
-; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
-; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
-; IS__TUNIT____-NEXT: ret i8 1
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i8 1, i8* [[PTR]], align 1
-; IS__TUNIT____-NEXT: ret i8 0
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal
-; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR9]] {
-; 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) #[[ATTR12]]
-; IS__CGSCC____-NEXT: ret i8 1
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i8 1, i8* [[PTR]], align 1
-; IS__CGSCC____-NEXT: ret i8 0
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@recursive_not_readnone_internal
+; TUNIT-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
+; TUNIT-NEXT: ret i8 1
+; TUNIT: f:
+; TUNIT-NEXT: store i8 1, i8* [[PTR]], align 1
+; TUNIT-NEXT: ret i8 0
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@recursive_not_readnone_internal
+; CGSCC-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR12]]
+; CGSCC-NEXT: ret i8 1
+; CGSCC: f:
+; CGSCC-NEXT: store i8 1, i8* [[PTR]], align 1
+; CGSCC-NEXT: ret i8 0
;
%alloc = alloca i8
br i1 %c, label %t, label %f
}
define i8 @readnone_caller(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller
-; 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]]) #[[ATTR11]]
-; 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:%.*]]) #[[ATTR10:[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]]) #[[ATTR13:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i8 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@readnone_caller
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR9:[0-9]+]] {
+; TUNIT-NEXT: [[A:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR11]]
+; TUNIT-NEXT: ret i8 [[R]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@readnone_caller
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR10:[0-9]+]] {
+; CGSCC-NEXT: [[A:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR13:[0-9]+]]
+; CGSCC-NEXT: ret i8 [[R]]
;
%a = alloca i8
%r = call i8 @recursive_not_readnone_internal(i8* %a, i1 %c)
}
define internal i8 @recursive_readnone_internal2(i8* %ptr, i1 %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_readnone_internal2
-; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
-; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i8 @recursive_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
-; IS__TUNIT____-NEXT: ret i8 1
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i8 1, i8* [[PTR]], align 1
-; IS__TUNIT____-NEXT: ret i8 0
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_readnone_internal2
-; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR9]] {
-; 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_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR12]]
-; IS__CGSCC____-NEXT: ret i8 1
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i8 1, i8* [[PTR]], align 1
-; IS__CGSCC____-NEXT: ret i8 0
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@recursive_readnone_internal2
+; TUNIT-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[TMP1:%.*]] = call i8 @recursive_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
+; TUNIT-NEXT: ret i8 1
+; TUNIT: f:
+; TUNIT-NEXT: store i8 1, i8* [[PTR]], align 1
+; TUNIT-NEXT: ret i8 0
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@recursive_readnone_internal2
+; CGSCC-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[TMP1:%.*]] = call i8 @recursive_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR12]]
+; CGSCC-NEXT: ret i8 1
+; CGSCC: f:
+; CGSCC-NEXT: store i8 1, i8* [[PTR]], align 1
+; CGSCC-NEXT: ret i8 0
;
%alloc = alloca i8
br i1 %c, label %t, label %f
}
define i8 @readnone_caller2(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller2
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] {
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR11]]
-; 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:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR13]]
-; IS__CGSCC____-NEXT: ret i8 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@readnone_caller2
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR9]] {
+; TUNIT-NEXT: [[R:%.*]] = call i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR11]]
+; TUNIT-NEXT: ret i8 [[R]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@readnone_caller2
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: [[R:%.*]] = call i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR13]]
+; CGSCC-NEXT: ret i8 [[R]]
;
%r = call i8 @recursive_readnone_internal2(i8* undef, i1 %c)
ret i8 %r
}
define internal i8 @recursive_not_readnone_internal3(i8* %ptr, i1 %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal3
-; 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_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
-; IS__TUNIT____-NEXT: ret i8 1
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i8 1, i8* [[PTR]], align 1
-; IS__TUNIT____-NEXT: ret i8 0
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal3
-; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR9]] {
-; 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_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR12]]
-; IS__CGSCC____-NEXT: ret i8 1
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i8 1, i8* [[PTR]], align 1
-; IS__CGSCC____-NEXT: ret i8 0
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@recursive_not_readnone_internal3
+; TUNIT-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
+; TUNIT-NEXT: ret i8 1
+; TUNIT: f:
+; TUNIT-NEXT: store i8 1, i8* [[PTR]], align 1
+; TUNIT-NEXT: ret i8 0
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@recursive_not_readnone_internal3
+; CGSCC-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR12]]
+; CGSCC-NEXT: ret i8 1
+; CGSCC: f:
+; CGSCC-NEXT: store i8 1, i8* [[PTR]], align 1
+; CGSCC-NEXT: ret i8 0
;
%alloc = alloca i8
br i1 %c, label %t, label %f
}
define i8 @readnone_caller3(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller3
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] {
-; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR11]]
-; IS__TUNIT____-NEXT: ret i8 [[R]]
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller3
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR13]]
-; IS__CGSCC____-NEXT: ret i8 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@readnone_caller3
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR9]] {
+; TUNIT-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR11]]
+; TUNIT-NEXT: ret i8 [[R]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@readnone_caller3
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR13]]
+; CGSCC-NEXT: ret i8 [[R]]
;
%alloc = alloca i8
%r = call i8 @recursive_not_readnone_internal3(i8* %alloc, i1 %c)
}
define void @argmemonky_caller() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@argmemonky_caller
-; IS__TUNIT____-SAME: () #[[ATTR6]] {
-; IS__TUNIT____-NEXT: call void @argmemonly_before_ipconstprop() #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@argmemonky_caller
-; IS__CGSCC____-SAME: () #[[ATTR8]] {
-; IS__CGSCC____-NEXT: call void @argmemonly_before_ipconstprop() #[[ATTR11]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@argmemonky_caller
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: call void @argmemonly_before_ipconstprop() #[[ATTR10]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@argmemonky_caller
+; CGSCC-SAME: () #[[ATTR8]] {
+; CGSCC-NEXT: call void @argmemonly_before_ipconstprop() #[[ATTR11]]
+; 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 nocallback nofree nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR8]] = { argmemonly nofree nosync nounwind writeonly }
-; IS__TUNIT____: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readnone }
-; IS__TUNIT____: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR11]] = { nofree nosync nounwind writeonly }
+; TUNIT: attributes #[[ATTR0]] = { inaccessiblememonly }
+; TUNIT: attributes #[[ATTR1]] = { inaccessiblemem_or_argmemonly }
+; TUNIT: attributes #[[ATTR2]] = { readnone }
+; TUNIT: attributes #[[ATTR3]] = { argmemonly }
+; TUNIT: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR8]] = { argmemonly nofree nosync nounwind writeonly }
+; TUNIT: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR11]] = { nofree nosync nounwind writeonly }
;.
-; 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 nocallback 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]] = { nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nofree nosync nounwind writeonly }
-; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR11]] = { nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR12]] = { nofree nosync nounwind writeonly }
-; IS__CGSCC____: attributes #[[ATTR13]] = { nounwind writeonly }
+; CGSCC: attributes #[[ATTR0]] = { inaccessiblememonly }
+; CGSCC: attributes #[[ATTR1]] = { inaccessiblemem_or_argmemonly }
+; CGSCC: attributes #[[ATTR2]] = { readnone }
+; CGSCC: attributes #[[ATTR3]] = { argmemonly }
+; CGSCC: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR8]] = { nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR9]] = { argmemonly nofree nosync nounwind writeonly }
+; CGSCC: attributes #[[ATTR10]] = { nofree nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR11]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR12]] = { nofree nosync nounwind writeonly }
+; CGSCC: attributes #[[ATTR13]] = { nounwind writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; Mostly check we do not crash on these uses
define internal void @internal(void (i8*)* %fp) {
;
;
-; IS__TUNIT____-LABEL: define {{[^@]+}}@internal
-; 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* 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*)*))
-; IS__TUNIT____-NEXT: call void @callback2(void (i8*)* nonnull [[FP]])
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = bitcast i32* [[A]] to i8*
-; IS__TUNIT____-NEXT: call void [[FP]](i8* [[TMP1]])
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@internal
+; TUNIT-SAME: (void (i8*)* nonnull [[FP:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[A:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: call void @foo(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR1:[0-9]+]]
+; TUNIT-NEXT: call void [[FP]](i8* bitcast (void (i32*)* @foo to i8*))
+; TUNIT-NEXT: call void @callback1(void (i32*)* noundef nonnull @foo)
+; TUNIT-NEXT: call void @callback2(void (i8*)* noundef bitcast (void (i32*)* @foo to void (i8*)*))
+; TUNIT-NEXT: call void @callback2(void (i8*)* nonnull [[FP]])
+; TUNIT-NEXT: [[TMP1:%.*]] = bitcast i32* [[A]] to i8*
+; TUNIT-NEXT: call void [[FP]](i8* [[TMP1]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@internal
-; 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* 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*)*))
-; IS__CGSCC____-NEXT: call void @callback2(void (i8*)* noundef nonnull [[FP]])
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = bitcast i32* [[A]] to i8*
-; IS__CGSCC____-NEXT: call void [[FP]](i8* [[TMP1]])
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@internal
+; CGSCC-SAME: (void (i8*)* noundef nonnull [[FP:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[A:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: call void @foo(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR1:[0-9]+]]
+; CGSCC-NEXT: call void [[FP]](i8* bitcast (void (i32*)* @foo to i8*))
+; CGSCC-NEXT: call void @callback1(void (i32*)* noundef nonnull @foo)
+; CGSCC-NEXT: call void @callback2(void (i8*)* noundef bitcast (void (i32*)* @foo to void (i8*)*))
+; CGSCC-NEXT: call void @callback2(void (i8*)* noundef nonnull [[FP]])
+; CGSCC-NEXT: [[TMP1:%.*]] = bitcast i32* [[A]] to i8*
+; CGSCC-NEXT: call void [[FP]](i8* [[TMP1]])
+; CGSCC-NEXT: ret void
;
entry:
%a = alloca i32, align 4
define void @external(void (i8*)* %fp) {
;
;
-; IS__TUNIT____-LABEL: define {{[^@]+}}@external
-; 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* 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]])
-; IS__TUNIT____-NEXT: call void [[FP]](i8* bitcast (void (i32*)* @foo to i8*))
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = bitcast i32* [[A]] to i8*
-; IS__TUNIT____-NEXT: call void [[FP]](i8* [[TMP1]])
-; IS__TUNIT____-NEXT: call void @internal(void (i8*)* nonnull [[FP]])
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@external
+; TUNIT-SAME: (void (i8*)* [[FP:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[A:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: call void @foo(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR1]]
+; TUNIT-NEXT: call void @callback1(void (i32*)* noundef nonnull @foo)
+; TUNIT-NEXT: call void @callback2(void (i8*)* noundef bitcast (void (i32*)* @foo to void (i8*)*))
+; TUNIT-NEXT: call void @callback2(void (i8*)* [[FP]])
+; TUNIT-NEXT: call void [[FP]](i8* bitcast (void (i32*)* @foo to i8*))
+; TUNIT-NEXT: [[TMP1:%.*]] = bitcast i32* [[A]] to i8*
+; TUNIT-NEXT: call void [[FP]](i8* [[TMP1]])
+; TUNIT-NEXT: call void @internal(void (i8*)* nonnull [[FP]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@external
-; 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* 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]])
-; IS__CGSCC____-NEXT: call void [[FP]](i8* bitcast (void (i32*)* @foo to i8*))
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = bitcast i32* [[A]] to i8*
-; IS__CGSCC____-NEXT: call void [[FP]](i8* [[TMP1]])
-; IS__CGSCC____-NEXT: call void @internal(void (i8*)* noundef nonnull [[FP]])
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@external
+; CGSCC-SAME: (void (i8*)* [[FP:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[A:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: call void @foo(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR1]]
+; CGSCC-NEXT: call void @callback1(void (i32*)* noundef nonnull @foo)
+; CGSCC-NEXT: call void @callback2(void (i8*)* noundef bitcast (void (i32*)* @foo to void (i8*)*))
+; CGSCC-NEXT: call void @callback2(void (i8*)* [[FP]])
+; CGSCC-NEXT: call void [[FP]](i8* bitcast (void (i32*)* @foo to i8*))
+; CGSCC-NEXT: [[TMP1:%.*]] = bitcast i32* [[A]] to i8*
+; CGSCC-NEXT: call void [[FP]](i8* [[TMP1]])
+; CGSCC-NEXT: call void @internal(void (i8*)* noundef nonnull [[FP]])
+; CGSCC-NEXT: ret void
;
entry:
%a = alloca i32, align 4
declare void @callback1(void (i32*)*)
declare void @callback2(void (i8*)*)
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; 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 }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR1]] = { nounwind willreturn writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; TEST 1 - negative.
; }
define i8* @bar() nounwind uwtable {
-; NOT_CGSCC_NPM: Function Attrs: nounwind uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@bar
-; NOT_CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: [[TMP1:%.*]] = tail call i8* (...) @baz() #[[ATTR2:[0-9]+]]
-; NOT_CGSCC_NPM-NEXT: ret i8* [[TMP1]]
-;
-; IS__CGSCC____: Function Attrs: nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = tail call i8* (...) @baz() #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i8* [[TMP1]]
+; TUNIT: Function Attrs: nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@bar
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = tail call i8* (...) @baz() #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: ret i8* [[TMP1]]
+;
+; CGSCC: Function Attrs: nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@bar
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = tail call i8* (...) @baz() #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: ret i8* [[TMP1]]
;
%1 = tail call i8* (...) @baz()
ret i8* %1
}
define i8* @foo1(i32 %0) nounwind uwtable {
-; NOT_CGSCC_NPM: Function Attrs: nounwind uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@foo1
-; NOT_CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; NOT_CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
-; NOT_CGSCC_NPM: 3:
-; NOT_CGSCC_NPM-NEXT: [[TMP4:%.*]] = tail call i8* (...) @baz() #[[ATTR2]]
-; NOT_CGSCC_NPM-NEXT: br label [[TMP5]]
-; NOT_CGSCC_NPM: 5:
-; NOT_CGSCC_NPM-NEXT: [[TMP6:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; NOT_CGSCC_NPM-NEXT: ret i8* [[TMP6]]
-;
-; IS__CGSCC____: Function Attrs: nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo1
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0
-; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
-; IS__CGSCC____: 3:
-; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call i8* (...) @baz() #[[ATTR3]]
-; IS__CGSCC____-NEXT: br label [[TMP5]]
-; IS__CGSCC____: 5:
-; IS__CGSCC____-NEXT: [[TMP6:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; IS__CGSCC____-NEXT: ret i8* [[TMP6]]
+; TUNIT: Function Attrs: nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@foo1
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0
+; TUNIT-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
+; TUNIT: 3:
+; TUNIT-NEXT: [[TMP4:%.*]] = tail call i8* (...) @baz() #[[ATTR2]]
+; TUNIT-NEXT: br label [[TMP5]]
+; TUNIT: 5:
+; TUNIT-NEXT: [[TMP6:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; TUNIT-NEXT: ret i8* [[TMP6]]
+;
+; CGSCC: Function Attrs: nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@foo1
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0]], 0
+; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
+; CGSCC: 3:
+; CGSCC-NEXT: [[TMP4:%.*]] = tail call i8* (...) @baz() #[[ATTR3]]
+; CGSCC-NEXT: br label [[TMP5]]
+; CGSCC: 5:
+; CGSCC-NEXT: [[TMP6:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; CGSCC-NEXT: ret i8* [[TMP6]]
;
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
; Returning global pointer. Should not be noalias.
define i8** @calle1(){
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@calle1
-; NOT_CGSCC_NPM-SAME: () #[[ATTR0]] {
-; NOT_CGSCC_NPM-NEXT: ret i8** @G
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@calle1
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: ret i8** @G
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@calle1
-; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call noundef nonnull align 8 dereferenceable(8) i8** @getter() #[[ATTR11:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i8** [[TMP1]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@calle1
+; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call noundef nonnull align 8 dereferenceable(8) i8** @getter() #[[ATTR11:[0-9]+]]
+; CGSCC-NEXT: ret i8** [[TMP1]]
;
%1 = call i8** @getter()
ret i8** %1
declare noalias i8* @strdup(i8* nocapture) nounwind
define i8* @test6() nounwind uwtable ssp {
-; NOT_CGSCC_NPM: Function Attrs: nounwind ssp uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6
-; NOT_CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: [[X:%.*]] = alloca [2 x i8], align 1
-; NOT_CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 0
-; NOT_CGSCC_NPM-NEXT: store i8 97, i8* [[ARRAYIDX]], align 1
-; NOT_CGSCC_NPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 1
-; NOT_CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX1]], align 1
-; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @strdup(i8* nocapture noundef nonnull dereferenceable(2) [[ARRAYIDX]]) #[[ATTR2]]
-; NOT_CGSCC_NPM-NEXT: ret i8* [[CALL]]
-;
-; IS__CGSCC____: Function Attrs: nounwind ssp uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test6
-; IS__CGSCC____-SAME: () #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[X:%.*]] = alloca [2 x i8], align 1
-; IS__CGSCC____-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 0
-; IS__CGSCC____-NEXT: store i8 97, i8* [[ARRAYIDX]], align 1
-; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 1
-; IS__CGSCC____-NEXT: store i8 0, i8* [[ARRAYIDX1]], align 1
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call noalias i8* @strdup(i8* nocapture noundef nonnull dereferenceable(2) [[ARRAYIDX]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: ret i8* [[CALL]]
+; TUNIT: Function Attrs: nounwind ssp uwtable
+; TUNIT-LABEL: define {{[^@]+}}@test6
+; TUNIT-SAME: () #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: [[X:%.*]] = alloca [2 x i8], align 1
+; TUNIT-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 0
+; TUNIT-NEXT: store i8 97, i8* [[ARRAYIDX]], align 1
+; TUNIT-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 1
+; TUNIT-NEXT: store i8 0, i8* [[ARRAYIDX1]], align 1
+; TUNIT-NEXT: [[CALL:%.*]] = call noalias i8* @strdup(i8* nocapture noundef nonnull dereferenceable(2) [[ARRAYIDX]]) #[[ATTR2]]
+; TUNIT-NEXT: ret i8* [[CALL]]
+;
+; CGSCC: Function Attrs: nounwind ssp uwtable
+; CGSCC-LABEL: define {{[^@]+}}@test6
+; CGSCC-SAME: () #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: [[X:%.*]] = alloca [2 x i8], align 1
+; CGSCC-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 0
+; CGSCC-NEXT: store i8 97, i8* [[ARRAYIDX]], align 1
+; CGSCC-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x i8], [2 x i8]* [[X]], i64 0, i64 1
+; CGSCC-NEXT: store i8 0, i8* [[ARRAYIDX1]], align 1
+; CGSCC-NEXT: [[CALL:%.*]] = call noalias i8* @strdup(i8* nocapture noundef nonnull dereferenceable(2) [[ARRAYIDX]]) #[[ATTR3]]
+; CGSCC-NEXT: ret i8* [[CALL]]
;
%x = alloca [2 x i8], align 1
%arrayidx = getelementptr inbounds [2 x i8], [2 x i8]* %x, i64 0, i64 0
; TEST 7
define i8* @test7() nounwind {
-; NOT_CGSCC_NPM: Function Attrs: nounwind
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test7
-; NOT_CGSCC_NPM-SAME: () #[[ATTR2]] {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: [[A:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR2]]
-; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i8* [[A]], null
-; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[RETURN:%.*]], label [[IF_END:%.*]]
-; NOT_CGSCC_NPM: if.end:
-; NOT_CGSCC_NPM-NEXT: store i8 7, i8* [[A]], align 1
-; NOT_CGSCC_NPM-NEXT: br label [[RETURN]]
-; NOT_CGSCC_NPM: return:
-; NOT_CGSCC_NPM-NEXT: [[RETVAL_0:%.*]] = phi i8* [ [[A]], [[IF_END]] ], [ null, [[ENTRY:%.*]] ]
-; NOT_CGSCC_NPM-NEXT: ret i8* [[RETVAL_0]]
-;
-; IS__CGSCC____: Function Attrs: nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test7
-; IS__CGSCC____-SAME: () #[[ATTR3]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[A:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR3]]
-; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp eq i8* [[A]], null
-; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[RETURN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: store i8 7, i8* [[A]], align 1
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i8* [ [[A]], [[IF_END]] ], [ null, [[ENTRY:%.*]] ]
-; IS__CGSCC____-NEXT: ret i8* [[RETVAL_0]]
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@test7
+; TUNIT-SAME: () #[[ATTR2]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[A:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR2]]
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp eq i8* [[A]], null
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[RETURN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: store i8 7, i8* [[A]], align 1
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i8* [ [[A]], [[IF_END]] ], [ null, [[ENTRY:%.*]] ]
+; TUNIT-NEXT: ret i8* [[RETVAL_0]]
+;
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@test7
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[A:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR3]]
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp eq i8* [[A]], null
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[RETURN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: store i8 7, i8* [[A]], align 1
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i8* [ [[A]], [[IF_END]] ], [ null, [[ENTRY:%.*]] ]
+; CGSCC-NEXT: ret i8* [[RETVAL_0]]
;
entry:
%A = call noalias i8* @malloc(i64 4) nounwind
}
define void @test12_4(){
-; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test12_4() {
-; NOT_TUNIT_OPM-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; NOT_TUNIT_OPM-NEXT: [[B:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; NOT_TUNIT_OPM-NEXT: [[A_1:%.*]] = getelementptr i8, i8* [[A]], i64 1
-; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* noalias nocapture [[A]], i8* noalias nocapture [[B]])
-; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A]])
-; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A_1]])
-; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[B]])
-; NOT_TUNIT_OPM-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@test12_4() {
+; CHECK-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; CHECK-NEXT: [[B:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; CHECK-NEXT: [[A_1:%.*]] = getelementptr i8, i8* [[A]], i64 1
+; CHECK-NEXT: tail call void @two_args(i8* noalias nocapture [[A]], i8* noalias nocapture [[B]])
+; CHECK-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A]])
+; CHECK-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A_1]])
+; CHECK-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[B]])
+; CHECK-NEXT: ret void
;
%A = tail call noalias i8* @malloc(i64 4)
%B = tail call noalias i8* @malloc(i64 4)
}
define i32 @i2p(i32* %arg) {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@i2p
-; NOT_CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR4:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) #[[ATTR9:[0-9]+]]
-; 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]]) #[[ATTR10:[0-9]+]]
-; NOT_CGSCC_NPM-NEXT: ret i32 [[CALL]]
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@i2p
-; IS__CGSCC____-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) #[[ATTR11]]
-; 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]]) #[[ATTR12:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@i2p
+; TUNIT-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) #[[ATTR9:[0-9]+]]
+; TUNIT-NEXT: [[I2P:%.*]] = inttoptr i32 [[C]] to i8*
+; TUNIT-NEXT: [[BC:%.*]] = bitcast i8* [[I2P]] to i32*
+; TUNIT-NEXT: [[CALL:%.*]] = call i32 @ret(i32* nocapture nofree readonly align 4 [[BC]]) #[[ATTR10:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[CALL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@i2p
+; CGSCC-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]]) #[[ATTR11]]
+; CGSCC-NEXT: [[I2P:%.*]] = inttoptr i32 [[C]] to i8*
+; CGSCC-NEXT: [[BC:%.*]] = bitcast i8* [[I2P]] to i32*
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @ret(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[BC]]) #[[ATTR12:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[CALL]]
;
%c = call i32 @p2i(i32* %arg)
%i2p = inttoptr i32 %c to i8*
ret i32 %call
}
define internal i32 @ret(i32* %arg) {
-; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree norecurse 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:[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:%.*]]) #[[ATTR6:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* [[ARG]], align 4
-; IS__CGSCC____-NEXT: ret i32 [[L]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ret
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* [[ARG]], align 4
+; TUNIT-NEXT: ret i32 [[L]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ret
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* [[ARG]], align 4
+; CGSCC-NEXT: ret i32 [[L]]
;
%l = load i32, i32* %arg
ret i32 %l
; Function Attrs: nounwind optsize
define internal fastcc double @strtox(i8* %s, i8** %p, i32 %prec) unnamed_addr {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@strtox
-; NOT_CGSCC_NPM-SAME: (i8* [[S:%.*]]) unnamed_addr {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8
-; NOT_CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8*
-; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) #[[ATTR11:[0-9]+]]
-; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 bitcast (i32 (...)* @sh_fromstring to i32 (%struct._IO_FILE*, i8*)*)(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i8* [[S]])
-; NOT_CGSCC_NPM-NEXT: call void @__shlim(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i64 noundef 0)
-; NOT_CGSCC_NPM-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i32 noundef 1, i32 noundef 1)
-; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]])
-; NOT_CGSCC_NPM-NEXT: ret double [[CALL1]]
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@strtox
-; IS__CGSCC____-SAME: (i8* [[S:%.*]]) unnamed_addr {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8*
-; IS__CGSCC____-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) #[[ATTR13:[0-9]+]]
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 bitcast (i32 (...)* @sh_fromstring to i32 (%struct._IO_FILE*, i8*)*)(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i8* [[S]])
-; IS__CGSCC____-NEXT: call void @__shlim(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i64 noundef 0)
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i32 noundef 1, i32 noundef 1)
-; IS__CGSCC____-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]])
-; IS__CGSCC____-NEXT: ret double [[CALL1]]
+; TUNIT-LABEL: define {{[^@]+}}@strtox
+; TUNIT-SAME: (i8* [[S:%.*]]) unnamed_addr {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) #[[ATTR11:[0-9]+]]
+; TUNIT-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]])
+; TUNIT-NEXT: call void @__shlim(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i64 noundef 0)
+; TUNIT-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i32 noundef 1, i32 noundef 1)
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]])
+; TUNIT-NEXT: ret double [[CALL1]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@strtox
+; CGSCC-SAME: (i8* [[S:%.*]]) unnamed_addr {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8
+; CGSCC-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]]) #[[ATTR13:[0-9]+]]
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 bitcast (i32 (...)* @sh_fromstring to i32 (%struct._IO_FILE*, i8*)*)(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i8* [[S]])
+; CGSCC-NEXT: call void @__shlim(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i64 noundef 0)
+; CGSCC-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* noundef nonnull align 8 dereferenceable(240) [[F]], i32 noundef 1, i32 noundef 1)
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 144, i8* nocapture nofree noundef nonnull align 8 dereferenceable(240) [[TMP0]])
+; CGSCC-NEXT: ret double [[CALL1]]
;
entry:
%f = alloca %struct._IO_FILE, align 8
@alias_of_p = external global i32*
define void @make_alias(i32* %p) {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@make_alias
-; 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:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT: store i32* [[P]], i32** @alias_of_p, align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@make_alias
+; TUNIT-SAME: (i32* nofree writeonly [[P:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-NEXT: store i32* [[P]], i32** @alias_of_p, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@make_alias
+; CGSCC-SAME: (i32* nofree writeonly [[P:%.*]]) #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: store i32* [[P]], i32** @alias_of_p, align 8
+; CGSCC-NEXT: ret void
;
store i32* %p, i32** @alias_of_p
ret void
}
define void @only_store(i32* %p) {
-; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree norecurse 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:[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:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__CGSCC____-NEXT: store i32 0, i32* [[P]], align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@only_store
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: store i32 0, i32* [[P]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@only_store
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: store i32 0, i32* [[P]], align 4
+; CGSCC-NEXT: ret void
;
store i32 0, i32* %p
ret void
}
define void @test15_caller(i32* noalias %p, i32 %c) {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse 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-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]]) #[[ATTR12:[0-9]+]]
-; 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]]) #[[ATTR12]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test15_caller
-; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR10:[0-9]+]] {
-; 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* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14:[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]]) #[[ATTR14]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test15_caller
+; TUNIT-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]]) #[[ATTR12:[0-9]+]]
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) #[[ATTR12]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test15_caller
+; CGSCC-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR10:[0-9]+]] {
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14:[0-9]+]]
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) #[[ATTR14]]
+; CGSCC-NEXT: ret void
;
%tobool = icmp eq i32 %c, 0
br i1 %tobool, label %if.end, label %if.then
; Therefore, only one of the two conditions of if statementes will be fulfilled.
define internal void @test16_sub(i32* noalias %p, i32 %c1, i32 %c2) {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse 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-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]]) #[[ATTR12]]
-; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly align 4 [[P]]) #[[ATTR12]]
-; 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]]) #[[ATTR12]]
-; NOT_CGSCC_NPM-NEXT: br label [[IF_END3]]
-; NOT_CGSCC_NPM: if.end3:
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test16_sub
-; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]]) #[[ATTR10]] {
-; 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* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
-; IS__CGSCC____-NEXT: tail call void @make_alias(i32* nofree nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
-; 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]]) #[[ATTR14]]
-; IS__CGSCC____-NEXT: br label [[IF_END3]]
-; IS__CGSCC____: if.end3:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test16_sub
+; TUNIT-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C1]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]]) #[[ATTR12]]
+; TUNIT-NEXT: tail call void @make_alias(i32* nofree writeonly align 4 [[P]]) #[[ATTR12]]
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C2]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]]
+; TUNIT: if.then2:
+; TUNIT-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) #[[ATTR12]]
+; TUNIT-NEXT: br label [[IF_END3]]
+; TUNIT: if.end3:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test16_sub
+; CGSCC-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C1]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
+; CGSCC-NEXT: tail call void @make_alias(i32* nofree nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C2]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]]
+; CGSCC: if.then2:
+; CGSCC-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
+; CGSCC-NEXT: br label [[IF_END3]]
+; CGSCC: if.end3:
+; CGSCC-NEXT: ret void
;
%tobool = icmp eq i32 %c1, 0
br i1 %tobool, label %if.end, label %if.then
}
define void @test16_caller(i32* %p, i32 %c) {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse 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]]) #[[ATTR12]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test16_caller
-; IS__CGSCC____-SAME: (i32* nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-NEXT: tail call void @test16_sub(i32* noalias nofree writeonly [[P]], i32 [[C]], i32 [[C]]) #[[ATTR14]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test16_caller
+; TUNIT-SAME: (i32* nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: tail call void @test16_sub(i32* noalias nofree writeonly [[P]], i32 [[C]], i32 [[C]]) #[[ATTR12]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test16_caller
+; CGSCC-SAME: (i32* nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: tail call void @test16_sub(i32* noalias nofree writeonly [[P]], i32 [[C]], i32 [[C]]) #[[ATTR14]]
+; CGSCC-NEXT: ret void
;
tail call void @test16_sub(i32* %p, i32 %c, i32 %c)
ret void
; }
define void @test17_caller(i32* noalias %p, i32 %c) {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse 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-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]]) #[[ATTR12]]
-; 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]]) #[[ATTR12]]
-; NOT_CGSCC_NPM-NEXT: br label [[L3]]
-; NOT_CGSCC_NPM: l3:
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test17_caller
-; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR10]] {
-; 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]]) #[[ATTR14]]
-; 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]]) #[[ATTR14]]
-; IS__CGSCC____-NEXT: br label [[L3]]
-; IS__CGSCC____: l3:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test17_caller
+; TUNIT-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[L1:%.*]], label [[L2:%.*]]
+; TUNIT: l1:
+; TUNIT-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) #[[ATTR12]]
+; TUNIT-NEXT: br label [[L3:%.*]]
+; TUNIT: l2:
+; TUNIT-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) #[[ATTR12]]
+; TUNIT-NEXT: br label [[L3]]
+; TUNIT: l3:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test17_caller
+; CGSCC-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[L1:%.*]], label [[L2:%.*]]
+; CGSCC: l1:
+; CGSCC-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) #[[ATTR14]]
+; CGSCC-NEXT: br label [[L3:%.*]]
+; CGSCC: l2:
+; CGSCC-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
+; CGSCC-NEXT: br label [[L3]]
+; CGSCC: l3:
+; CGSCC-NEXT: ret void
;
entry:
%tobool = icmp eq i32 %c, 0
; }
define void @noreturn() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@noreturn
-; NOT_CGSCC_NPM-SAME: () #[[ATTR9]] {
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@noreturn
+; TUNIT-SAME: () #[[ATTR9]] {
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@noreturn
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@noreturn
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: ret void
;
call void @noreturn()
ret void
}
define void @test18_caller(i32* noalias %p, i32 %c) {
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse 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-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]]) #[[ATTR12]]
-; NOT_CGSCC_NPM-NEXT: br label [[L2]]
-; NOT_CGSCC_NPM: l2:
-; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) #[[ATTR12]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree 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:%.*]]) #[[ATTR10]] {
-; 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]]) #[[ATTR14]]
-; IS__CGSCC____-NEXT: br label [[L2]]
-; IS__CGSCC____: l2:
-; IS__CGSCC____-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test18_caller
+; TUNIT-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[L1:%.*]], label [[L2:%.*]]
+; TUNIT: l1:
+; TUNIT-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]]) #[[ATTR12]]
+; TUNIT-NEXT: br label [[L2]]
+; TUNIT: l2:
+; TUNIT-NEXT: tail call void @only_store(i32* nocapture nofree writeonly align 4 [[P]]) #[[ATTR12]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test18_caller
+; CGSCC-SAME: (i32* noalias nofree nonnull writeonly align 4 dereferenceable(4) [[P:%.*]], i32 [[C:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[L1:%.*]], label [[L2:%.*]]
+; CGSCC: l1:
+; CGSCC-NEXT: tail call void @make_alias(i32* nofree nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
+; CGSCC-NEXT: br label [[L2]]
+; CGSCC: l2:
+; CGSCC-NEXT: tail call void @only_store(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[P]]) #[[ATTR14]]
+; CGSCC-NEXT: ret void
;
entry:
%tobool = icmp eq i32 %c, 0
ret void
}
;.
-; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse 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 norecurse nosync nounwind readonly willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR6:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; NOT_CGSCC_NPM: attributes #[[ATTR8]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR10]] = { nofree nosync nounwind readonly willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR11]] = { willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nounwind uwtable }
+; TUNIT: attributes #[[ATTR2]] = { nounwind }
+; TUNIT: attributes #[[ATTR3]] = { nounwind ssp uwtable }
+; TUNIT: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR6:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR8]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR10]] = { nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR11]] = { willreturn }
+; TUNIT: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn writeonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nounwind uwtable }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind }
-; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind ssp uwtable }
-; IS__CGSCC____: attributes #[[ATTR5]] = { nofree nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR7:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR11]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR12]] = { readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR13]] = { willreturn }
-; IS__CGSCC____: attributes #[[ATTR14]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nounwind uwtable }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { nounwind }
+; CGSCC: attributes #[[ATTR4]] = { nounwind ssp uwtable }
+; CGSCC: attributes #[[ATTR5]] = { nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR7:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR9]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR11]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR12]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR13]] = { willreturn }
+; CGSCC: attributes #[[ATTR14]] = { nounwind willreturn writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
@g = global i32* null ; <i32**> [#uses=1]
}
define void @c3(i32* %q) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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]]) #[[ATTR14:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@c3
-; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR17:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@c3
+; TUNIT-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR14:[0-9]+]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@c3
+; CGSCC-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR17:[0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @c2(i32* %q)
ret void
@lookup_table = global [2 x i1] [ i1 0, i1 1 ]
define i1 @c5(i32* %q, i32 %bitno) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@c5
-; 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
-; IS__TUNIT____-NEXT: [[LOOKUP:%.*]] = getelementptr [2 x i1], [2 x i1]* @lookup_table, i32 0, i32 [[BIT]]
-; IS__TUNIT____-NEXT: [[VAL:%.*]] = load i1, i1* [[LOOKUP]], align 1
-; IS__TUNIT____-NEXT: ret i1 [[VAL]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@c5
-; IS__CGSCC____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR3:[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
-; IS__CGSCC____-NEXT: [[LOOKUP:%.*]] = getelementptr [2 x i1], [2 x i1]* @lookup_table, i32 0, i32 [[BIT]]
-; IS__CGSCC____-NEXT: [[VAL:%.*]] = load i1, i1* [[LOOKUP]], align 1
-; IS__CGSCC____-NEXT: ret i1 [[VAL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@c5
+; TUNIT-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32
+; TUNIT-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]]
+; TUNIT-NEXT: [[BIT:%.*]] = and i32 [[TMP2]], 1
+; TUNIT-NEXT: [[LOOKUP:%.*]] = getelementptr [2 x i1], [2 x i1]* @lookup_table, i32 0, i32 [[BIT]]
+; TUNIT-NEXT: [[VAL:%.*]] = load i1, i1* [[LOOKUP]], align 1
+; TUNIT-NEXT: ret i1 [[VAL]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@c5
+; CGSCC-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: [[TMP:%.*]] = ptrtoint i32* [[Q]] to i32
+; CGSCC-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP]], [[BITNO]]
+; CGSCC-NEXT: [[BIT:%.*]] = and i32 [[TMP2]], 1
+; CGSCC-NEXT: [[LOOKUP:%.*]] = getelementptr [2 x i1], [2 x i1]* @lookup_table, i32 0, i32 [[BIT]]
+; CGSCC-NEXT: [[VAL:%.*]] = load i1, i1* [[LOOKUP]], align 1
+; CGSCC-NEXT: ret i1 [[VAL]]
;
%tmp = ptrtoint i32* %q to i32
%tmp2 = lshr i32 %tmp, %bitno
declare void @throw_if_bit_set(i8*, i8) readonly
define i1 @c6(i8* %q, i8 %bit) personality i32 (...)* @__gxx_personality_v0 {
-; IS__TUNIT____: Function Attrs: nounwind readonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@c6
-; IS__TUNIT____-SAME: (i8* readonly [[Q:%.*]], i8 [[BIT:%.*]]) #[[ATTR4:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
-; IS__TUNIT____-NEXT: invoke void @throw_if_bit_set(i8* readonly [[Q]], i8 [[BIT]]) #[[ATTR3:[0-9]+]]
-; IS__TUNIT____-NEXT: to label [[RET0:%.*]] unwind label [[RET1:%.*]]
-; IS__TUNIT____: ret0:
-; IS__TUNIT____-NEXT: ret i1 false
-; IS__TUNIT____: ret1:
-; IS__TUNIT____-NEXT: [[EXN:%.*]] = landingpad { i8*, i32 }
-; IS__TUNIT____-NEXT: cleanup
-; IS__TUNIT____-NEXT: ret i1 true
-;
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@c6
-; IS__CGSCC____-SAME: (i8* readonly [[Q:%.*]], i8 [[BIT:%.*]]) #[[ATTR5:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
-; IS__CGSCC____-NEXT: invoke void @throw_if_bit_set(i8* readonly [[Q]], i8 [[BIT]]) #[[ATTR4:[0-9]+]]
-; IS__CGSCC____-NEXT: to label [[RET0:%.*]] unwind label [[RET1:%.*]]
-; IS__CGSCC____: ret0:
-; IS__CGSCC____-NEXT: ret i1 false
-; IS__CGSCC____: ret1:
-; IS__CGSCC____-NEXT: [[EXN:%.*]] = landingpad { i8*, i32 }
-; IS__CGSCC____-NEXT: cleanup
-; IS__CGSCC____-NEXT: ret i1 true
+; TUNIT: Function Attrs: nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@c6
+; TUNIT-SAME: (i8* readonly [[Q:%.*]], i8 [[BIT:%.*]]) #[[ATTR4:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
+; TUNIT-NEXT: invoke void @throw_if_bit_set(i8* readonly [[Q]], i8 [[BIT]]) #[[ATTR3:[0-9]+]]
+; TUNIT-NEXT: to label [[RET0:%.*]] unwind label [[RET1:%.*]]
+; TUNIT: ret0:
+; TUNIT-NEXT: ret i1 false
+; TUNIT: ret1:
+; TUNIT-NEXT: [[EXN:%.*]] = landingpad { i8*, i32 }
+; TUNIT-NEXT: cleanup
+; TUNIT-NEXT: ret i1 true
+;
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@c6
+; CGSCC-SAME: (i8* readonly [[Q:%.*]], i8 [[BIT:%.*]]) #[[ATTR5:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
+; CGSCC-NEXT: invoke void @throw_if_bit_set(i8* readonly [[Q]], i8 [[BIT]]) #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: to label [[RET0:%.*]] unwind label [[RET1:%.*]]
+; CGSCC: ret0:
+; CGSCC-NEXT: ret i1 false
+; CGSCC: ret1:
+; CGSCC-NEXT: [[EXN:%.*]] = landingpad { i8*, i32 }
+; CGSCC-NEXT: cleanup
+; CGSCC-NEXT: ret i1 true
;
invoke void @throw_if_bit_set(i8* %q, i8 %bit)
to label %ret0 unwind label %ret1
}
define i1 @c7(i32* %q, i32 %bitno) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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:[0-9]+]]
-; IS__TUNIT____-NEXT: [[VAL:%.*]] = load i1, i1* [[PTR]], align 1
-; IS__TUNIT____-NEXT: ret i1 [[VAL]]
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@c7
-; IS__CGSCC____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR6:[0-9]+]] {
-; 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@c7
+; TUNIT-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR15:[0-9]+]]
+; TUNIT-NEXT: [[VAL:%.*]] = load i1, i1* [[PTR]], align 1
+; TUNIT-NEXT: ret i1 [[VAL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@c7
+; CGSCC-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR18:[0-9]+]]
+; CGSCC-NEXT: [[VAL:%.*]] = load i1, i1* [[PTR]], align 1
+; CGSCC-NEXT: ret i1 [[VAL]]
;
%ptr = call i1* @lookup_bit(i32* %q, i32 %bitno)
%val = load i1, i1* %ptr
define i32 @nc1(i32* %q, i32* %p, i1 %b) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@nc1
-; 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:
-; IS__TUNIT____-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E:%.*]] ]
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[P]], i32* [[Q]]
-; IS__TUNIT____-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__TUNIT____-NEXT: store i32 0, i32* [[P]], align 4
-; IS__TUNIT____-NEXT: store i32* [[Q]], i32** @g, align 8
-; IS__TUNIT____-NEXT: ret i32 [[VAL]]
-;
-; 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:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__CGSCC____-NEXT: e:
-; IS__CGSCC____-NEXT: br label [[L:%.*]]
-; IS__CGSCC____: l:
-; IS__CGSCC____-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E:%.*]] ]
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[P]], i32* [[Q]]
-; IS__CGSCC____-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__CGSCC____-NEXT: store i32 0, i32* [[P]], align 4
-; IS__CGSCC____-NEXT: store i32* [[Q]], i32** @g, align 8
-; IS__CGSCC____-NEXT: ret i32 [[VAL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@nc1
+; TUNIT-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: e:
+; TUNIT-NEXT: br label [[L:%.*]]
+; TUNIT: l:
+; TUNIT-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E:%.*]] ]
+; TUNIT-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[P]], i32* [[Q]]
+; TUNIT-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
+; TUNIT-NEXT: store i32 0, i32* [[P]], align 4
+; TUNIT-NEXT: store i32* [[Q]], i32** @g, align 8
+; TUNIT-NEXT: ret i32 [[VAL]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@nc1
+; CGSCC-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR7:[0-9]+]] {
+; CGSCC-NEXT: e:
+; CGSCC-NEXT: br label [[L:%.*]]
+; CGSCC: l:
+; CGSCC-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E:%.*]] ]
+; CGSCC-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[P]], i32* [[Q]]
+; CGSCC-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
+; CGSCC-NEXT: store i32 0, i32* [[P]], align 4
+; CGSCC-NEXT: store i32* [[Q]], i32** @g, align 8
+; CGSCC-NEXT: ret i32 [[VAL]]
;
e:
br label %l
}
define i32 @nc1_addrspace(i32* %q, i32 addrspace(1)* %p, i1 %b) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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____-NEXT: e:
-; IS__TUNIT____-NEXT: br label [[L:%.*]]
-; IS__TUNIT____: l:
-; IS__TUNIT____-NEXT: [[X:%.*]] = phi i32 addrspace(1)* [ [[P]], [[E:%.*]] ]
-; IS__TUNIT____-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E]] ]
-; IS__TUNIT____-NEXT: [[TMP:%.*]] = addrspacecast i32 addrspace(1)* [[P]] to i32*
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[TMP]], i32* [[Q]]
-; IS__TUNIT____-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__TUNIT____-NEXT: store i32 0, i32* [[TMP]], align 4
-; IS__TUNIT____-NEXT: store i32* [[Q]], i32** @g, align 8
-; IS__TUNIT____-NEXT: ret i32 [[VAL]]
-;
-; 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:%.*]]) #[[ATTR7]] {
-; IS__CGSCC____-NEXT: e:
-; IS__CGSCC____-NEXT: br label [[L:%.*]]
-; IS__CGSCC____: l:
-; IS__CGSCC____-NEXT: [[X:%.*]] = phi i32 addrspace(1)* [ [[P]], [[E:%.*]] ]
-; IS__CGSCC____-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E]] ]
-; IS__CGSCC____-NEXT: [[TMP:%.*]] = addrspacecast i32 addrspace(1)* [[P]] to i32*
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[TMP]], i32* [[Q]]
-; IS__CGSCC____-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__CGSCC____-NEXT: store i32 0, i32* [[TMP]], align 4
-; IS__CGSCC____-NEXT: store i32* [[Q]], i32** @g, align 8
-; IS__CGSCC____-NEXT: ret i32 [[VAL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@nc1_addrspace
+; TUNIT-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: e:
+; TUNIT-NEXT: br label [[L:%.*]]
+; TUNIT: l:
+; TUNIT-NEXT: [[X:%.*]] = phi i32 addrspace(1)* [ [[P]], [[E:%.*]] ]
+; TUNIT-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E]] ]
+; TUNIT-NEXT: [[TMP:%.*]] = addrspacecast i32 addrspace(1)* [[P]] to i32*
+; TUNIT-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[TMP]], i32* [[Q]]
+; TUNIT-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
+; TUNIT-NEXT: store i32 0, i32* [[TMP]], align 4
+; TUNIT-NEXT: store i32* [[Q]], i32** @g, align 8
+; TUNIT-NEXT: ret i32 [[VAL]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@nc1_addrspace
+; CGSCC-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR7]] {
+; CGSCC-NEXT: e:
+; CGSCC-NEXT: br label [[L:%.*]]
+; CGSCC: l:
+; CGSCC-NEXT: [[X:%.*]] = phi i32 addrspace(1)* [ [[P]], [[E:%.*]] ]
+; CGSCC-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E]] ]
+; CGSCC-NEXT: [[TMP:%.*]] = addrspacecast i32 addrspace(1)* [[P]] to i32*
+; CGSCC-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[TMP]], i32* [[Q]]
+; CGSCC-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
+; CGSCC-NEXT: store i32 0, i32* [[TMP]], align 4
+; CGSCC-NEXT: store i32* [[Q]], i32** @g, align 8
+; CGSCC-NEXT: ret i32 [[VAL]]
;
e:
br label %l
}
define void @nc2(i32* %p, i32* %q) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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) #[[ATTR16:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@nc2
-; IS__CGSCC____-SAME: (i32* nocapture nofree align 4 [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree align 4 [[P]], i1 noundef false) #[[ATTR14:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@nc2
+; TUNIT-SAME: (i32* nocapture nofree [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree [[P]], i1 noundef false) #[[ATTR16:[0-9]+]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@nc2
+; CGSCC-SAME: (i32* nocapture nofree align 4 [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree align 4 [[P]], i1 noundef false) #[[ATTR14:[0-9]+]]
+; CGSCC-NEXT: ret void
;
%1 = call i32 @nc1(i32* %q, i32* %p, i1 0) ; <i32> [#uses=0]
ret void
; FIXME: readonly and nocapture missing on the pointer.
declare void @external(i8* readonly) nounwind argmemonly
define void @nc4(i8* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@nc4
-; IS__TUNIT____-SAME: (i8* [[P:%.*]]) #[[ATTR6:[0-9]+]] {
-; IS__TUNIT____-NEXT: call void @external(i8* readonly [[P]]) #[[ATTR17:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@nc4
-; IS__CGSCC____-SAME: (i8* [[P:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__CGSCC____-NEXT: call void @external(i8* readonly [[P]]) #[[ATTR19:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nounwind
+; TUNIT-LABEL: define {{[^@]+}}@nc4
+; TUNIT-SAME: (i8* [[P:%.*]]) #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: call void @external(i8* readonly [[P]]) #[[ATTR17:[0-9]+]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nounwind
+; CGSCC-LABEL: define {{[^@]+}}@nc4
+; CGSCC-SAME: (i8* [[P:%.*]]) #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: call void @external(i8* readonly [[P]]) #[[ATTR19:[0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @external(i8* %p)
ret void
; It would be acceptable to add readnone to %y1_1 and %y1_2.
define void @test1_1(i8* %x1_1, i8* %y1_1, i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test1_1
-; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[X1_1:%.*]], i8* nocapture nofree readnone [[Y1_1:%.*]], i1 [[C:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__TUNIT____-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]]
-; IS__TUNIT____-NEXT: store i32* null, i32** @g, align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1_1
-; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[X1_1:%.*]], i8* nocapture nofree readnone [[Y1_1:%.*]], i1 [[C:%.*]]) #[[ATTR10:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i8* @test1_2(i8* noalias nocapture nofree readnone undef, i8* noalias nofree readnone "no-capture-maybe-returned" [[Y1_1]], i1 [[C]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: store i32* null, i32** @g, align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test1_1
+; TUNIT-SAME: (i8* nocapture nofree readnone [[X1_1:%.*]], i8* nocapture nofree readnone [[Y1_1:%.*]], i1 [[C:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-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]]
+; TUNIT-NEXT: store i32* null, i32** @g, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test1_1
+; CGSCC-SAME: (i8* nocapture nofree readnone [[X1_1:%.*]], i8* nocapture nofree readnone [[Y1_1:%.*]], i1 [[C:%.*]]) #[[ATTR10:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i8* @test1_2(i8* noalias nocapture nofree readnone undef, i8* noalias nofree readnone "no-capture-maybe-returned" [[Y1_1]], i1 [[C]]) #[[ATTR10]]
+; CGSCC-NEXT: store i32* null, i32** @g, align 8
+; CGSCC-NEXT: ret void
;
call i8* @test1_2(i8* %x1_1, i8* %y1_1, i1 %c)
store i32* null, i32** @g
}
define i8* @test1_2(i8* %x1_2, i8* %y1_2, i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test1_2
-; IS__TUNIT_NPM-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] {
-; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT_NPM: t:
-; IS__TUNIT_NPM-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 noundef [[C]]) #[[ATTR7]]
-; IS__TUNIT_NPM-NEXT: store i32* null, i32** @g, align 8
-; IS__TUNIT_NPM-NEXT: br label [[F]]
-; IS__TUNIT_NPM: f:
-; IS__TUNIT_NPM-NEXT: ret i8* [[Y1_2]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test1_2
-; IS__CGSCC_NPM-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) #[[ATTR10]] {
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC_NPM: t:
-; IS__CGSCC_NPM-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 noundef [[C]]) #[[ATTR10]]
-; IS__CGSCC_NPM-NEXT: store i32* null, i32** @g, align 8
-; IS__CGSCC_NPM-NEXT: br label [[F]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: ret i8* [[Y1_2]]
+; TUNIT: Function Attrs: nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test1_2
+; TUNIT-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 noundef [[C]]) #[[ATTR7]]
+; TUNIT-NEXT: store i32* null, i32** @g, align 8
+; TUNIT-NEXT: br label [[F]]
+; TUNIT: f:
+; TUNIT-NEXT: ret i8* [[Y1_2]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test1_2
+; CGSCC-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 noundef [[C]]) #[[ATTR10]]
+; CGSCC-NEXT: store i32* null, i32** @g, align 8
+; CGSCC-NEXT: br label [[F]]
+; CGSCC: f:
+; CGSCC-NEXT: ret i8* [[Y1_2]]
;
br i1 %c, label %t, label %f
t:
}
define void @test2(i8* %x2) {
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2
-; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[X2:%.*]]) #[[ATTR7]] {
-; IS__TUNIT____-NEXT: call void @test2(i8* noalias nocapture nofree readnone undef) #[[ATTR7]]
-; IS__TUNIT____-NEXT: store i32* null, i32** @g, align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2
-; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[X2:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-NEXT: call void @test2(i8* noalias nocapture nofree readnone undef) #[[ATTR10]]
-; IS__CGSCC____-NEXT: store i32* null, i32** @g, align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test2
+; TUNIT-SAME: (i8* nocapture nofree readnone [[X2:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: call void @test2(i8* noalias nocapture nofree readnone undef) #[[ATTR7]]
+; TUNIT-NEXT: store i32* null, i32** @g, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test2
+; CGSCC-SAME: (i8* nocapture nofree readnone [[X2:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: call void @test2(i8* noalias nocapture nofree readnone undef) #[[ATTR10]]
+; CGSCC-NEXT: store i32* null, i32** @g, align 8
+; CGSCC-NEXT: ret void
;
call void @test2(i8* %x2)
store i32* null, i32** @g
}
define void @test3(i8* %x3, i8* %y3, i8* %z3) {
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test3
-; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[X3:%.*]], i8* nocapture nofree readnone [[Y3:%.*]], i8* nocapture nofree readnone [[Z3:%.*]]) #[[ATTR7]] {
-; IS__TUNIT____-NEXT: call void @test3(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone undef) #[[ATTR7]]
-; IS__TUNIT____-NEXT: store i32* null, i32** @g, align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test3
-; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[X3:%.*]], i8* nocapture nofree readnone [[Y3:%.*]], i8* nocapture nofree readnone [[Z3:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-NEXT: call void @test3(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone undef) #[[ATTR10]]
-; IS__CGSCC____-NEXT: store i32* null, i32** @g, align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test3
+; TUNIT-SAME: (i8* nocapture nofree readnone [[X3:%.*]], i8* nocapture nofree readnone [[Y3:%.*]], i8* nocapture nofree readnone [[Z3:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: call void @test3(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone undef) #[[ATTR7]]
+; TUNIT-NEXT: store i32* null, i32** @g, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test3
+; CGSCC-SAME: (i8* nocapture nofree readnone [[X3:%.*]], i8* nocapture nofree readnone [[Y3:%.*]], i8* nocapture nofree readnone [[Z3:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: call void @test3(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone undef) #[[ATTR10]]
+; CGSCC-NEXT: store i32* null, i32** @g, align 8
+; CGSCC-NEXT: ret void
;
call void @test3(i8* %z3, i8* %y3, i8* %x3)
store i32* null, i32** @g
}
define void @test4_1(i8* %x4_1, i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test4_1
-; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[X4_1:%.*]], i1 [[C:%.*]]) #[[ATTR7]] {
-; IS__TUNIT____-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]]
-; IS__TUNIT____-NEXT: store i32* null, i32** @g, align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test4_1
-; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[X4_1:%.*]], i1 [[C:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-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]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: store i32* null, i32** @g, align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test4_1
+; TUNIT-SAME: (i8* nocapture nofree readnone [[X4_1:%.*]], i1 [[C:%.*]]) #[[ATTR7]] {
+; TUNIT-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]]
+; TUNIT-NEXT: store i32* null, i32** @g, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test4_1
+; CGSCC-SAME: (i8* nocapture nofree readnone [[X4_1:%.*]], i1 [[C:%.*]]) #[[ATTR10]] {
+; CGSCC-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]]) #[[ATTR10]]
+; CGSCC-NEXT: store i32* null, i32** @g, align 8
+; CGSCC-NEXT: ret void
;
call i8* @test4_2(i8* %x4_1, i8* %x4_1, i8* %x4_1, i1 %c)
store i32* null, i32** @g
}
define i8* @test4_2(i8* %x4_2, i8* %y4_2, i8* %z4_2, i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4_2
-; IS__TUNIT_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__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT_NPM: t:
-; IS__TUNIT_NPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 4294967296 null, i1 noundef [[C]]) #[[ATTR7]]
-; IS__TUNIT_NPM-NEXT: store i32* null, i32** @g, align 8
-; IS__TUNIT_NPM-NEXT: br label [[F]]
-; IS__TUNIT_NPM: f:
-; IS__TUNIT_NPM-NEXT: ret i8* [[Y4_2]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4_2
-; IS__CGSCC_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:%.*]]) #[[ATTR10]] {
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC_NPM: t:
-; IS__CGSCC_NPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 4294967296 null, i1 noundef [[C]]) #[[ATTR10]]
-; IS__CGSCC_NPM-NEXT: store i32* null, i32** @g, align 8
-; IS__CGSCC_NPM-NEXT: br label [[F]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: ret i8* [[Y4_2]]
+; TUNIT: Function Attrs: nofree nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test4_2
+; TUNIT-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]] {
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 4294967296 null, i1 noundef [[C]]) #[[ATTR7]]
+; TUNIT-NEXT: store i32* null, i32** @g, align 8
+; TUNIT-NEXT: br label [[F]]
+; TUNIT: f:
+; TUNIT-NEXT: ret i8* [[Y4_2]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test4_2
+; CGSCC-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:%.*]]) #[[ATTR10]] {
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 4294967296 null, i1 noundef [[C]]) #[[ATTR10]]
+; CGSCC-NEXT: store i32* null, i32** @g, align 8
+; CGSCC-NEXT: br label [[F]]
+; CGSCC: f:
+; CGSCC-NEXT: ret i8* [[Y4_2]]
;
br i1 %c, label %t, label %f
t:
}
define void @test_cmpxchg(i32* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_cmpxchg
-; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR8:[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:%.*]]) #[[ATTR11:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = cmpxchg i32* [[P]], i32 0, i32 1 acquire monotonic, align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_cmpxchg
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = cmpxchg i32* [[P]], i32 0, i32 1 acquire monotonic, align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_cmpxchg
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR11:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = cmpxchg i32* [[P]], i32 0, i32 1 acquire monotonic, align 4
+; CGSCC-NEXT: ret void
;
cmpxchg i32* %p, i32 0, i32 1 acquire monotonic
ret void
}
define void @test_cmpxchg_ptr(i32** %p, i32* %q) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_cmpxchg_ptr
-; IS__TUNIT____-SAME: (i32** nocapture nofree noundef nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR8]] {
-; 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:%.*]]) #[[ATTR11]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = cmpxchg i32** [[P]], i32* null, i32* [[Q]] acquire monotonic, align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_cmpxchg_ptr
+; TUNIT-SAME: (i32** nocapture nofree noundef nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = cmpxchg i32** [[P]], i32* null, i32* [[Q]] acquire monotonic, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_cmpxchg_ptr
+; CGSCC-SAME: (i32** nocapture nofree noundef nonnull dereferenceable(8) [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR11]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = cmpxchg i32** [[P]], i32* null, i32* [[Q]] acquire monotonic, align 8
+; CGSCC-NEXT: ret void
;
cmpxchg i32** %p, i32* null, i32* %q acquire monotonic
ret void
}
define void @test_atomicrmw(i32* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_atomicrmw
-; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR8]] {
-; 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:%.*]]) #[[ATTR11]] {
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = atomicrmw add i32* [[P]], i32 1 seq_cst, align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_atomicrmw
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = atomicrmw add i32* [[P]], i32 1 seq_cst, align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_atomicrmw
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull dereferenceable(4) [[P:%.*]]) #[[ATTR11]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = atomicrmw add i32* [[P]], i32 1 seq_cst, align 4
+; CGSCC-NEXT: ret void
;
atomicrmw add i32* %p, i32 1 seq_cst
ret void
}
define void @test_volatile(i32* %x) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_volatile
-; IS__TUNIT____-SAME: (i32* nofree align 4 [[X:%.*]]) #[[ATTR8]] {
-; 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
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_volatile
-; IS__CGSCC____-SAME: (i32* nofree align 4 [[X:%.*]]) #[[ATTR11]] {
-; 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
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_volatile
+; TUNIT-SAME: (i32* nofree align 4 [[X:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[GEP:%.*]] = getelementptr i32, i32* [[X]], i64 1
+; TUNIT-NEXT: store volatile i32 0, i32* [[GEP]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_volatile
+; CGSCC-SAME: (i32* nofree align 4 [[X:%.*]]) #[[ATTR11]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[GEP:%.*]] = getelementptr i32, i32* [[X]], i64 1
+; CGSCC-NEXT: store volatile i32 0, i32* [[GEP]], align 4
+; CGSCC-NEXT: ret void
;
entry:
%gep = getelementptr i32, i32* %x, i64 1
}
define void @nocaptureLaunder(i8* %p) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureLaunder
-; IS__TUNIT____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR18:[0-9]+]]
-; IS__TUNIT____-NEXT: store i8 42, i8* [[B]], align 1
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureLaunder
-; IS__CGSCC____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR7]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20:[0-9]+]]
-; IS__CGSCC____-NEXT: store i8 42, i8* [[B]], align 1
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@nocaptureLaunder
+; TUNIT-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR18:[0-9]+]]
+; TUNIT-NEXT: store i8 42, i8* [[B]], align 1
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@nocaptureLaunder
+; CGSCC-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR7]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20:[0-9]+]]
+; CGSCC-NEXT: store i8 42, i8* [[B]], align 1
+; CGSCC-NEXT: ret void
;
entry:
%b = call i8* @llvm.launder.invariant.group.p0i8(i8* %p)
@g2 = global i8* null
define void @captureLaunder(i8* %p) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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]]) #[[ATTR18]]
-; IS__TUNIT____-NEXT: store i8* [[B]], i8** @g2, align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@captureLaunder
-; IS__CGSCC____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR7]] {
-; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20]]
-; IS__CGSCC____-NEXT: store i8* [[B]], i8** @g2, align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@captureLaunder
+; TUNIT-SAME: (i8* nofree [[P:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR18]]
+; TUNIT-NEXT: store i8* [[B]], i8** @g2, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@captureLaunder
+; CGSCC-SAME: (i8* nofree [[P:%.*]]) #[[ATTR7]] {
+; CGSCC-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20]]
+; CGSCC-NEXT: store i8* [[B]], i8** @g2, align 8
+; CGSCC-NEXT: ret void
;
%b = call i8* @llvm.launder.invariant.group.p0i8(i8* %p)
store i8* %b, i8** @g2
}
define void @nocaptureStrip(i8* %p) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureStrip
-; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR19:[0-9]+]]
-; IS__TUNIT____-NEXT: store i8 42, i8* [[B]], align 1
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureStrip
-; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; 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
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@nocaptureStrip
+; TUNIT-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR19:[0-9]+]]
+; TUNIT-NEXT: store i8 42, i8* [[B]], align 1
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@nocaptureStrip
+; CGSCC-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR18]]
+; CGSCC-NEXT: store i8 42, i8* [[B]], align 1
+; CGSCC-NEXT: ret void
;
entry:
%b = call i8* @llvm.strip.invariant.group.p0i8(i8* %p)
@g3 = global i8* null
define void @captureStrip(i8* %p) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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]]) #[[ATTR19]]
-; IS__TUNIT____-NEXT: store i8* [[B]], i8** @g3, align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@captureStrip
-; IS__CGSCC____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR1]] {
-; 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
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@captureStrip
+; TUNIT-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR19]]
+; TUNIT-NEXT: store i8* [[B]], i8** @g3, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@captureStrip
+; CGSCC-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR18]]
+; CGSCC-NEXT: store i8* [[B]], i8** @g3, align 8
+; CGSCC-NEXT: ret void
;
%b = call i8* @llvm.strip.invariant.group.p0i8(i8* %p)
store i8* %b, i8** @g3
}
define i1 @captureDereferenceableOrNullICmp(i32* dereferenceable_or_null(4) %x) null_pointer_is_valid {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp
-; IS__TUNIT____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR9:[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:[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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp
+; TUNIT-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR9:[0-9]+]] {
+; TUNIT-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8*
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null
+; TUNIT-NEXT: ret i1 [[TMP2]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp
+; CGSCC-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR12:[0-9]+]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8*
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null
+; CGSCC-NEXT: ret i1 [[TMP2]]
;
%1 = bitcast i32* %x to i8*
%2 = icmp eq i8* %1, null
declare i8* @unknownpi8pi8(i8*,i8* returned)
define i8* @test_returned1(i8* %A, i8* returned %B) nounwind readonly {
-; IS__TUNIT____: Function Attrs: nounwind readonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_returned1
-; IS__TUNIT____-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* [[A]], i8* [[B]])
-; IS__TUNIT____-NEXT: ret i8* [[P]]
-;
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_returned1
-; IS__CGSCC____-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR5]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* [[A]], i8* [[B]])
-; IS__CGSCC____-NEXT: ret i8* [[P]]
+; TUNIT: Function Attrs: nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@test_returned1
+; TUNIT-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* [[A]], i8* [[B]])
+; TUNIT-NEXT: ret i8* [[P]]
+;
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@test_returned1
+; CGSCC-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* [[A]], i8* [[B]])
+; CGSCC-NEXT: ret i8* [[P]]
;
entry:
%p = call i8* @unknownpi8pi8(i8* %A, i8* %B)
}
define i8* @test_returned2(i8* %A, i8* %B) {
-; IS__TUNIT____: Function Attrs: nounwind readonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_returned2
-; IS__TUNIT____-SAME: (i8* readonly [[A:%.*]], i8* readonly [[B:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* readonly [[A]], i8* readonly [[B]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i8* [[P]]
-;
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_returned2
-; IS__CGSCC____-SAME: (i8* readonly [[A:%.*]], i8* readonly [[B:%.*]]) #[[ATTR5]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* readonly [[A]], i8* readonly [[B]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i8* [[P]]
+; TUNIT: Function Attrs: nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@test_returned2
+; TUNIT-SAME: (i8* readonly [[A:%.*]], i8* readonly [[B:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* readonly [[A]], i8* readonly [[B]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i8* [[P]]
+;
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@test_returned2
+; CGSCC-SAME: (i8* readonly [[A:%.*]], i8* readonly [[B:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[P:%.*]] = call i8* @unknownpi8pi8(i8* readonly [[A]], i8* readonly [[B]]) #[[ATTR5]]
+; CGSCC-NEXT: ret i8* [[P]]
;
entry:
%p = call i8* @unknownpi8pi8(i8* %A, i8* %B) nounwind readonly
; FIXME: Both pointers should be nocapture
define void @ptr_uses(i8* %ptr, i8* %wptr) {
-; IS__TUNIT____: Function Attrs: nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_uses
-; IS__TUNIT____-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR11:[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 nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR14]] {
-; IS__CGSCC____-NEXT: store i8 0, i8* [[WPTR]], align 1
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ptr_uses
+; TUNIT-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR11:[0-9]+]] {
+; TUNIT-NEXT: store i8 0, i8* [[WPTR]], align 1
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ptr_uses
+; CGSCC-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR14]] {
+; CGSCC-NEXT: store i8 0, i8* [[WPTR]], align 1
+; CGSCC-NEXT: ret void
;
%call_ptr = call i8* @maybe_returned_ptr(i8* %ptr)
%call_val = call i8 @maybe_returned_val(i8* %call_ptr)
declare i8* @llvm.launder.invariant.group.p0i8(i8*)
declare i8* @llvm.strip.invariant.group.p0i8(i8*)
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR3]] = { readonly }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nounwind readonly }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR6]] = { argmemonly nounwind }
-; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly }
-; IS__TUNIT____: attributes #[[ATTR8]] = { argmemonly nofree norecurse nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR10:[0-9]+]] = { nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR11]] = { nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR12:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn }
-; IS__TUNIT____: attributes #[[ATTR13:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; IS__TUNIT____: attributes #[[ATTR14]] = { nofree nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR15]] = { nofree nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR16]] = { nofree nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR17]] = { nounwind }
-; IS__TUNIT____: attributes #[[ATTR18]] = { willreturn }
-; IS__TUNIT____: attributes #[[ATTR19]] = { readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR3]] = { readonly }
+; TUNIT: attributes #[[ATTR4]] = { nounwind readonly }
+; TUNIT: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR6]] = { argmemonly nounwind }
+; TUNIT: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly }
+; TUNIT: attributes #[[ATTR8]] = { argmemonly nofree norecurse nounwind willreturn }
+; TUNIT: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
+; TUNIT: attributes #[[ATTR10:[0-9]+]] = { nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR11]] = { nounwind willreturn }
+; TUNIT: attributes #[[ATTR12:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn }
+; TUNIT: attributes #[[ATTR13:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; TUNIT: attributes #[[ATTR14]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR15]] = { nofree nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR16]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR17]] = { nounwind }
+; TUNIT: attributes #[[ATTR18]] = { willreturn }
+; TUNIT: attributes #[[ATTR19]] = { readnone 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 nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { readonly }
-; IS__CGSCC____: attributes #[[ATTR5]] = { nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR6]] = { nofree nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR8]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nounwind }
-; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind writeonly }
-; IS__CGSCC____: attributes #[[ATTR11]] = { argmemonly nofree norecurse nounwind willreturn }
-; 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 nocallback nofree nosync nounwind speculatable willreturn }
-; IS__CGSCC____: attributes #[[ATTR16:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; IS__CGSCC____: attributes #[[ATTR17]] = { nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR18]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR19]] = { nounwind }
-; IS__CGSCC____: attributes #[[ATTR20]] = { willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR4]] = { readonly }
+; CGSCC: attributes #[[ATTR5]] = { nounwind readonly }
+; CGSCC: attributes #[[ATTR6]] = { nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR8]] = { nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR9]] = { argmemonly nounwind }
+; CGSCC: attributes #[[ATTR10]] = { nofree nosync nounwind writeonly }
+; CGSCC: attributes #[[ATTR11]] = { argmemonly nofree norecurse nounwind willreturn }
+; CGSCC: attributes #[[ATTR12]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
+; CGSCC: attributes #[[ATTR13:[0-9]+]] = { nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR14]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR15:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn }
+; CGSCC: attributes #[[ATTR16:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; CGSCC: attributes #[[ATTR17]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR18]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR19]] = { nounwind }
+; CGSCC: attributes #[[ATTR20]] = { willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; Test cases specifically designed for the "no-capture" argument attribute.
; We use FIXME's to indicate problems and missing attributes.
; return scc_A((int*)(scc_A(a) ? scc_B((double*)a) : scc_C(a)));
; }
define float* @scc_A(i32* dereferenceable_or_null(4) %a) {
-; IS________NPM: Function Attrs: nofree nosync nounwind readnone
-; IS________NPM-LABEL: define {{[^@]+}}@scc_A
-; IS________NPM-SAME: (i32* nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32* [[A]], null
-; IS________NPM-NEXT: br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS________NPM: cond.true:
-; IS________NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[A]] to i16*
-; IS________NPM-NEXT: [[CALL:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree nonnull readnone dereferenceable(4) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
-; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[CALL]] to double*
-; IS________NPM-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(4) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]]
-; IS________NPM-NEXT: [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i32*
-; IS________NPM-NEXT: [[CALL2:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
-; IS________NPM-NEXT: [[TMP3:%.*]] = bitcast float* [[CALL2]] to i32*
-; IS________NPM-NEXT: br label [[COND_END:%.*]]
-; IS________NPM: cond.false:
-; IS________NPM-NEXT: br label [[COND_END]]
-; IS________NPM: cond.end:
-; IS________NPM-NEXT: [[COND:%.*]] = phi i32* [ [[TMP3]], [[COND_TRUE]] ], [ [[A]], [[COND_FALSE]] ]
-; IS________NPM-NEXT: [[TMP4:%.*]] = bitcast i32* [[COND]] to float*
-; IS________NPM-NEXT: ret float* [[TMP4]]
+; CHECK: Function Attrs: nofree nosync nounwind readnone
+; CHECK-LABEL: define {{[^@]+}}@scc_A
+; CHECK-SAME: (i32* nofree readnone 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 nonnull readnone dereferenceable(4) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[CALL]] to double*
+; CHECK-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(4) 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 dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
+; CHECK-NEXT: [[TMP3:%.*]] = bitcast float* [[CALL2]] to i32*
+; CHECK-NEXT: br label [[COND_END:%.*]]
+; CHECK: cond.false:
+; CHECK-NEXT: br label [[COND_END]]
+; CHECK: cond.end:
+; CHECK-NEXT: [[COND:%.*]] = phi i32* [ [[TMP3]], [[COND_TRUE]] ], [ [[A]], [[COND_FALSE]] ]
+; CHECK-NEXT: [[TMP4:%.*]] = bitcast i32* [[COND]] to float*
+; CHECK-NEXT: ret float* [[TMP4]]
;
entry:
%tobool = icmp ne i32* %a, null
; FIXME: the call1 below to scc_B should return dereferenceable_or_null(8) (as the callee does). Something prevented that deduction and needs to be investigated.
define i64* @scc_B(double* dereferenceable_or_null(8) %a) {
-; IS________NPM: Function Attrs: nofree nosync nounwind readnone
-; IS________NPM-LABEL: define {{[^@]+}}@scc_B
-; IS________NPM-SAME: (double* nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[TOBOOL:%.*]] = icmp ne double* [[A]], null
-; IS________NPM-NEXT: br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS________NPM: cond.true:
-; IS________NPM-NEXT: [[TMP0:%.*]] = bitcast double* [[A]] to i32*
-; IS________NPM-NEXT: [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
-; IS________NPM-NEXT: [[TMP1:%.*]] = bitcast float* [[CALL]] to double*
-; IS________NPM-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(4) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]]
-; IS________NPM-NEXT: [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i16*
-; IS________NPM-NEXT: [[CALL2:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
-; IS________NPM-NEXT: br label [[COND_END:%.*]]
-; IS________NPM: cond.false:
-; IS________NPM-NEXT: [[TMP3:%.*]] = bitcast double* [[A]] to i8*
-; IS________NPM-NEXT: br label [[COND_END]]
-; IS________NPM: cond.end:
-; IS________NPM-NEXT: [[COND:%.*]] = phi i8* [ [[CALL2]], [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
-; IS________NPM-NEXT: [[TMP4:%.*]] = bitcast i8* [[COND]] to i64*
-; IS________NPM-NEXT: ret i64* [[TMP4]]
+; CHECK: Function Attrs: nofree nosync nounwind readnone
+; CHECK-LABEL: define {{[^@]+}}@scc_B
+; CHECK-SAME: (double* nofree readnone 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 nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast float* [[CALL]] to double*
+; CHECK-NEXT: [[CALL1:%.*]] = call dereferenceable_or_null(4) 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 dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
+; CHECK-NEXT: br label [[COND_END:%.*]]
+; CHECK: cond.false:
+; CHECK-NEXT: [[TMP3:%.*]] = bitcast double* [[A]] to i8*
+; CHECK-NEXT: br label [[COND_END]]
+; CHECK: cond.end:
+; CHECK-NEXT: [[COND:%.*]] = phi i8* [ [[CALL2]], [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
+; CHECK-NEXT: [[TMP4:%.*]] = bitcast i8* [[COND]] to i64*
+; CHECK-NEXT: ret i64* [[TMP4]]
;
entry:
%tobool = icmp ne double* %a, null
; }
;
define void @test_not_captured_but_returned_calls(i64* %a) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_not_captured_but_returned_calls
-; IS__TUNIT____-SAME: (i64* nocapture nofree writeonly align 8 [[A:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: entry:
-; 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 nosync nounwind willreturn writeonly uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_not_captured_but_returned_calls
-; 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 i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A]]) #[[ATTR10:[0-9]+]]
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
+; TUNIT-LABEL: define {{[^@]+}}@test_not_captured_but_returned_calls
+; TUNIT-SAME: (i64* nocapture nofree writeonly align 8 [[A:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9:[0-9]+]]
+; TUNIT-NEXT: [[CALL1:%.*]] = call i64* @not_captured_but_returned_1(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable
+; CGSCC-LABEL: define {{[^@]+}}@test_not_captured_but_returned_calls
+; CGSCC-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A]]) #[[ATTR10:[0-9]+]]
+; CGSCC-NEXT: [[CALL1:%.*]] = call i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A]]) #[[ATTR10]]
+; CGSCC-NEXT: ret void
;
entry:
%call = call i64* @not_captured_but_returned_0(i64* %a)
;
; There should *not* be a no-capture attribute on %a
define i64* @negative_test_not_captured_but_returned_call_0a(i64* %a) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0a
-; IS__TUNIT____-SAME: (i64* nofree returned writeonly align 8 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9]]
-; IS__TUNIT____-NEXT: ret i64* [[A]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0a
-; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call noundef nonnull align 8 dereferenceable(8) i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: ret i64* [[CALL]]
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
+; TUNIT-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0a
+; TUNIT-SAME: (i64* nofree returned writeonly align 8 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9]]
+; TUNIT-NEXT: ret i64* [[A]]
+;
+; CGSCC: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable
+; CGSCC-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0a
+; CGSCC-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call noundef nonnull align 8 dereferenceable(8) i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A]]) #[[ATTR10]]
+; CGSCC-NEXT: ret i64* [[CALL]]
;
entry:
%call = call i64* @not_captured_but_returned_0(i64* %a)
;
; There should *not* be a no-capture attribute on %a
define void @negative_test_not_captured_but_returned_call_0b(i64* %a) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0b
-; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 [[A:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: entry:
-; 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* [[A]] to i64
-; IS__TUNIT____-NEXT: store i64 [[TMP0]], i64* [[A]], align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable
-; 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:%.*]]) #[[ATTR5]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64
-; IS__CGSCC____-NEXT: store i64 [[TMP0]], i64* [[A]], align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
+; TUNIT-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0b
+; TUNIT-SAME: (i64* nofree writeonly align 8 [[A:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9]]
+; TUNIT-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[A]] to i64
+; TUNIT-NEXT: store i64 [[TMP0]], i64* [[A]], align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable
+; CGSCC-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0b
+; CGSCC-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A]]) #[[ATTR10]]
+; CGSCC-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64
+; CGSCC-NEXT: store i64 [[TMP0]], i64* [[A]], align 8
+; CGSCC-NEXT: ret void
;
entry:
%call = call i64* @not_captured_but_returned_0(i64* %a)
;
; There should *not* be a no-capture attribute on %a
define i64* @negative_test_not_captured_but_returned_call_1a(i64* %a) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1a
-; IS__TUNIT____-SAME: (i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call 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 nosync nounwind willreturn writeonly uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1a
-; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) #[[ATTR5]] {
-; 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) [[A]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: ret i64* [[CALL]]
+; TUNIT: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
+; TUNIT-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1a
+; TUNIT-SAME: (i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: entry:
+; 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]]
+; TUNIT-NEXT: ret i64* [[CALL]]
+;
+; CGSCC: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable
+; CGSCC-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1a
+; CGSCC-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; 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) [[A]]) #[[ATTR10]]
+; CGSCC-NEXT: ret i64* [[CALL]]
;
entry:
%call = call i64* @not_captured_but_returned_1(i64* %a)
;
; There should *not* be a no-capture attribute on %a
define void @negative_test_not_captured_but_returned_call_1b(i64* %a) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1b
-; 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: [[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 nosync nounwind willreturn writeonly uwtable
-; 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:%.*]]) #[[ATTR6:[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) [[A]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64
-; IS__CGSCC____-NEXT: store i64 [[TMP0]], i64* [[CALL]], align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree noinline norecurse nosync nounwind willreturn writeonly uwtable
+; TUNIT-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1b
+; TUNIT-SAME: (i64* nofree writeonly align 8 [[A:%.*]]) #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call align 8 i64* @not_captured_but_returned_1(i64* nofree writeonly align 8 "no-capture-maybe-returned" [[A]]) #[[ATTR9]]
+; TUNIT-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64
+; TUNIT-NEXT: store i64 [[TMP0]], i64* [[CALL]], align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind willreturn writeonly uwtable
+; CGSCC-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_1b
+; CGSCC-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A:%.*]]) #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call align 8 i64* @not_captured_but_returned_1(i64* nofree noundef nonnull writeonly align 8 dereferenceable(16) [[A]]) #[[ATTR10]]
+; CGSCC-NEXT: [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64
+; CGSCC-NEXT: store i64 [[TMP0]], i64* [[CALL]], align 8
+; CGSCC-NEXT: ret void
;
entry:
%call = call i64* @not_captured_but_returned_1(i64* %a)
declare i32* @readonly_unknown(i32*, i32*) readonly
define void @not_captured_by_readonly_call(i32* %b) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind readonly uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call
-; IS__TUNIT____-SAME: (i32* nocapture readonly [[B:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[B]]) #[[ATTR6:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind readonly uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call
-; IS__CGSCC____-SAME: (i32* nocapture readonly [[B:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[B]]) #[[ATTR7:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: noinline nounwind readonly uwtable
+; TUNIT-LABEL: define {{[^@]+}}@not_captured_by_readonly_call
+; TUNIT-SAME: (i32* nocapture readonly [[B:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[B]]) #[[ATTR6:[0-9]+]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: noinline nounwind readonly uwtable
+; CGSCC-LABEL: define {{[^@]+}}@not_captured_by_readonly_call
+; CGSCC-SAME: (i32* nocapture readonly [[B:%.*]]) #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[B]]) #[[ATTR7:[0-9]+]]
+; CGSCC-NEXT: ret void
;
entry:
%call = call i32* @readonly_unknown(i32* %b, i32* %b)
; Make sure the returned flag on %r is strong enough to justify nocapture on %b but **not** on %r.
;
define i32* @not_captured_by_readonly_call_not_returned_either1(i32* %b, i32* returned %r) {
-; IS__TUNIT____: Function Attrs: nounwind readonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either1
-; IS__TUNIT____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR8]]
-; IS__TUNIT____-NEXT: ret i32* [[CALL]]
-;
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either1
-; IS__CGSCC____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: ret i32* [[CALL]]
+; TUNIT: Function Attrs: nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either1
+; TUNIT-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR8]]
+; TUNIT-NEXT: ret i32* [[CALL]]
+;
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either1
+; CGSCC-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR9]]
+; CGSCC-NEXT: ret i32* [[CALL]]
;
entry:
%call = call i32* @readonly_unknown(i32* %b, i32* %r) nounwind
declare i32* @readonly_unknown_r1a(i32*, i32* returned) readonly
define i32* @not_captured_by_readonly_call_not_returned_either2(i32* %b, i32* %r) {
-; IS__TUNIT____: Function Attrs: nounwind readonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either2
-; IS__TUNIT____-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR8]]
-; IS__TUNIT____-NEXT: ret i32* [[CALL]]
-;
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either2
-; IS__CGSCC____-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: ret i32* [[CALL]]
+; TUNIT: Function Attrs: nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either2
+; TUNIT-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR8]]
+; TUNIT-NEXT: ret i32* [[CALL]]
+;
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either2
+; CGSCC-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR9]]
+; CGSCC-NEXT: ret i32* [[CALL]]
;
entry:
%call = call i32* @readonly_unknown_r1a(i32* %b, i32* %r) nounwind
declare i32* @readonly_unknown_r1b(i32*, i32* returned) readonly nounwind
define i32* @not_captured_by_readonly_call_not_returned_either3(i32* %b, i32* %r) {
-; IS__TUNIT____: Function Attrs: nounwind readonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either3
-; IS__TUNIT____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) #[[ATTR8]]
-; IS__TUNIT____-NEXT: ret i32* [[CALL]]
-;
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either3
-; IS__CGSCC____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: ret i32* [[CALL]]
+; TUNIT: Function Attrs: nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either3
+; TUNIT-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) #[[ATTR8]]
+; TUNIT-NEXT: ret i32* [[CALL]]
+;
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either3
+; CGSCC-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) #[[ATTR9]]
+; CGSCC-NEXT: ret i32* [[CALL]]
;
entry:
%call = call i32* @readonly_unknown_r1b(i32* %b, i32* %r)
}
define i32* @not_captured_by_readonly_call_not_returned_either4(i32* %b, i32* %r) nounwind {
-; IS__TUNIT____: Function Attrs: nounwind readonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either4
-; IS__TUNIT____-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR6]]
-; IS__TUNIT____-NEXT: ret i32* [[CALL]]
-;
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either4
-; IS__CGSCC____-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: ret i32* [[CALL]]
+; TUNIT: Function Attrs: nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either4
+; TUNIT-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR6]]
+; TUNIT-NEXT: ret i32* [[CALL]]
+;
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either4
+; CGSCC-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: ret i32* [[CALL]]
;
entry:
%call = call i32* @readonly_unknown_r1a(i32* %b, i32* %r)
declare i32* @readonly_i32p(i32*) readonly
define void @nocapture_is_not_subsumed_2(i32* nocapture %b) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@nocapture_is_not_subsumed_2
-; IS__TUNIT____-SAME: (i32* nocapture [[B:%.*]]) {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @readonly_i32p(i32* readonly [[B]]) #[[ATTR6]]
-; IS__TUNIT____-NEXT: store i32 0, i32* [[CALL]], align 4
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@nocapture_is_not_subsumed_2
-; IS__CGSCC____-SAME: (i32* nocapture [[B:%.*]]) {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @readonly_i32p(i32* readonly [[B]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: store i32 0, i32* [[CALL]], align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@nocapture_is_not_subsumed_2
+; TUNIT-SAME: (i32* nocapture [[B:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @readonly_i32p(i32* readonly [[B]]) #[[ATTR6]]
+; TUNIT-NEXT: store i32 0, i32* [[CALL]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@nocapture_is_not_subsumed_2
+; CGSCC-SAME: (i32* nocapture [[B:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @readonly_i32p(i32* readonly [[B]]) #[[ATTR7]]
+; CGSCC-NEXT: store i32 0, i32* [[CALL]], align 4
+; CGSCC-NEXT: ret void
;
entry:
%call = call i32* @readonly_i32p(i32* %b)
attributes #0 = { noinline nounwind uwtable }
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone }
-; IS__TUNIT____: attributes #[[ATTR3]] = { noinline nounwind uwtable }
-; IS__TUNIT____: attributes #[[ATTR4]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
-; 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 }
+; TUNIT: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR2]] = { nofree nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR3]] = { noinline nounwind uwtable }
+; TUNIT: attributes #[[ATTR4]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
+; TUNIT: attributes #[[ATTR5]] = { nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
+; TUNIT: attributes #[[ATTR6]] = { readonly }
+; TUNIT: attributes #[[ATTR7]] = { noinline nounwind readonly uwtable }
+; TUNIT: attributes #[[ATTR8]] = { nounwind readonly }
+; TUNIT: attributes #[[ATTR9]] = { nofree nosync nounwind willreturn writeonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; 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 willreturn writeonly uwtable }
-; IS__CGSCC____: attributes #[[ATTR5]] = { argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable }
-; IS__CGSCC____: attributes #[[ATTR6]] = { nofree noinline nosync nounwind willreturn writeonly uwtable }
-; IS__CGSCC____: attributes #[[ATTR7]] = { readonly }
-; IS__CGSCC____: attributes #[[ATTR8]] = { noinline nounwind readonly uwtable }
-; IS__CGSCC____: attributes #[[ATTR9]] = { nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR10]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR3]] = { noinline nounwind uwtable }
+; CGSCC: attributes #[[ATTR4]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn writeonly uwtable }
+; CGSCC: attributes #[[ATTR5]] = { argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable }
+; CGSCC: attributes #[[ATTR6]] = { nofree noinline nosync nounwind willreturn writeonly uwtable }
+; CGSCC: attributes #[[ATTR7]] = { readonly }
+; CGSCC: attributes #[[ATTR8]] = { noinline nounwind readonly uwtable }
+; CGSCC: attributes #[[ATTR9]] = { nounwind readonly }
+; CGSCC: attributes #[[ATTR10]] = { nounwind willreturn writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
%"a" = type { i64 }
%"b" = type { i8 }
define hidden i64 @f1() align 2 {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@f1
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] align 2 {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i64 undef
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@f1
+; TUNIT-SAME: () #[[ATTR0:[0-9]+]] align 2 {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i64 undef
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
-; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] align 2 {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[REF_TMP:%.*]] = alloca [[A:%.*]], align 8
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i64 @f2() #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i64 [[CALL2]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f1
+; CGSCC-SAME: () #[[ATTR0:[0-9]+]] align 2 {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[REF_TMP:%.*]] = alloca [[A:%.*]], align 8
+; CGSCC-NEXT: [[CALL2:%.*]] = call i64 @f2() #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i64 [[CALL2]]
;
entry:
%ref.tmp = alloca %"a", align 8
}
define internal i64 @f2(%"a"* %this) align 2 {
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f2
-; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i64 undef
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f2
+; CGSCC-SAME: () #[[ATTR0]] align 2 {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i64 undef
;
entry:
%this.addr = alloca %"a"*, align 8
}
define internal void @f3(%"b"* %this) align 2 {
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f3
-; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f3
+; CGSCC-SAME: () #[[ATTR0]] align 2 {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret void
;
entry:
%this.addr = alloca %"b"*, align 8
}
define internal i1 @f4(%"b"* %this) align 2 {
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f4
-; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i1 undef
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f4
+; CGSCC-SAME: () #[[ATTR0]] align 2 {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i1 undef
;
entry:
%this.addr = alloca %"b"*, align 8
}
define internal %"a"* @f5(%"b"* %this) align 2 {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f5
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] align 2 {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret %a* undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f5
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] align 2 {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret %a* undef
;
entry:
%this.addr = alloca %"b"*, align 8
ret %"a"* %0
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
define void @mutual_recursion1() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion1
-; NOT_CGSCC_NPM-SAME: () #[[ATTR4:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@mutual_recursion1
+; TUNIT-SAME: () #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion1
-; IS__CGSCC_NPM-SAME: () #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@mutual_recursion1
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: ret void
;
call void @mutual_recursion2()
ret void
}
define void @mutual_recursion2() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion2
-; NOT_CGSCC_NPM-SAME: () #[[ATTR4]] {
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@mutual_recursion2
+; TUNIT-SAME: () #[[ATTR4]] {
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion2
-; IS__CGSCC_NPM-SAME: () #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@mutual_recursion2
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: ret void
;
call void @mutual_recursion1()
ret void
declare void @nofree_function() nofree readnone #0
define void @call_nofree_function() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_nofree_function
-; NOT_CGSCC_NPM-SAME: () #[[ATTR4]] {
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@call_nofree_function
+; TUNIT-SAME: () #[[ATTR4]] {
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@call_nofree_function
-; IS__CGSCC_NPM-SAME: () #[[ATTR5:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@call_nofree_function
+; CGSCC-SAME: () #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: ret void
;
tail call void @nofree_function()
ret void
; Check propagation.
define void @f1() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f1
-; NOT_CGSCC_NPM-SAME: () #[[ATTR4]] {
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@f1
+; TUNIT-SAME: () #[[ATTR4]] {
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1
-; IS__CGSCC_NPM-SAME: () #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@f1
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: ret void
;
tail call void @nofree_function()
ret void
}
define void @f2() #0 {
-; NOT_CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f2
-; NOT_CGSCC_NPM-SAME: () #[[ATTR4]] {
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@f2
+; TUNIT-SAME: () #[[ATTR4]] {
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2
-; IS__CGSCC_NPM-SAME: () #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@f2
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: ret void
;
tail call void @f1()
ret void
attributes #1 = { nounwind }
attributes #2 = { nobuiltin nounwind }
;.
-; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nounwind }
-; NOT_CGSCC_NPM: attributes #[[ATTR1]] = { noinline nounwind uwtable }
-; NOT_CGSCC_NPM: attributes #[[ATTR2]] = { nobuiltin nounwind }
-; NOT_CGSCC_NPM: attributes #[[ATTR3]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; NOT_CGSCC_NPM: attributes #[[ATTR4]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; NOT_CGSCC_NPM: attributes #[[ATTR5:[0-9]+]] = { nofree noinline nounwind readnone uwtable }
-; NOT_CGSCC_NPM: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR7]] = { nofree nounwind }
-; NOT_CGSCC_NPM: attributes #[[ATTR8:[0-9]+]] = { nobuiltin nofree nounwind }
-; NOT_CGSCC_NPM: attributes #[[ATTR9:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR10:[0-9]+]] = { nounwind willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR11]] = { readnone willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR12]] = { willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nounwind }
+; TUNIT: attributes #[[ATTR1]] = { noinline nounwind uwtable }
+; TUNIT: attributes #[[ATTR2]] = { nobuiltin nounwind }
+; TUNIT: attributes #[[ATTR3]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR4]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR5:[0-9]+]] = { nofree noinline nounwind readnone uwtable }
+; TUNIT: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; TUNIT: attributes #[[ATTR7]] = { nofree nounwind }
+; TUNIT: attributes #[[ATTR8:[0-9]+]] = { nobuiltin nofree nounwind }
+; TUNIT: attributes #[[ATTR9:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR10:[0-9]+]] = { nounwind willreturn }
+; TUNIT: attributes #[[ATTR11]] = { readnone willreturn }
+; TUNIT: 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 willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR4:[0-9]+]] = { nofree noinline nounwind readnone uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR8:[0-9]+]] = { nobuiltin nofree nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR9:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR10:[0-9]+]] = { nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR11]] = { readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR12]] = { willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nounwind }
+; CGSCC: attributes #[[ATTR1]] = { noinline nounwind uwtable }
+; CGSCC: attributes #[[ATTR2]] = { nobuiltin nounwind }
+; CGSCC: attributes #[[ATTR3]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR4:[0-9]+]] = { nofree noinline nounwind readnone uwtable }
+; CGSCC: attributes #[[ATTR5]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; CGSCC: attributes #[[ATTR7]] = { nofree nounwind }
+; CGSCC: attributes #[[ATTR8:[0-9]+]] = { nobuiltin nofree nounwind }
+; CGSCC: attributes #[[ATTR9:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR10:[0-9]+]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR11]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR12]] = { willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=15 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=15 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; Given an SCC where one of the functions can not be marked nonnull,
; can we still mark the other one which is trivially nonnull
define i8* @scc_binder(i1 %c) {
-; IS________NPM-LABEL: define {{[^@]+}}@scc_binder
-; IS________NPM-SAME: (i1 [[C:%.*]]) {
-; IS________NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]]
-; IS________NPM: rec:
-; IS________NPM-NEXT: [[TMP1:%.*]] = call i8* @test3(i1 noundef [[C]])
-; IS________NPM-NEXT: br label [[END]]
-; IS________NPM: end:
-; IS________NPM-NEXT: ret i8* null
+; CHECK-LABEL: define {{[^@]+}}@scc_binder
+; CHECK-SAME: (i1 [[C:%.*]]) {
+; CHECK-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]]
+; CHECK: rec:
+; CHECK-NEXT: [[TMP1:%.*]] = call i8* @test3(i1 noundef [[C]])
+; CHECK-NEXT: br label [[END]]
+; CHECK: end:
+; CHECK-NEXT: ret i8* null
;
br i1 %c, label %rec, label %end
rec:
; nonnull if neither can ever return null. (In this case, they
; just never return period.)
define i8* @test4_helper() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test4_helper
-; NOT_CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: ret i8* undef
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test4_helper
+; TUNIT-SAME: () #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: ret i8* undef
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4_helper
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: ret i8* undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test4_helper
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: ret i8* undef
;
%ret = call i8* @test4()
ret i8* %ret
}
define i8* @test4() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test4
-; NOT_CGSCC_NPM-SAME: () #[[ATTR3]] {
-; NOT_CGSCC_NPM-NEXT: ret i8* undef
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test4
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: ret i8* undef
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: ret i8* undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test4
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: ret i8* undef
;
%ret = call i8* @test4_helper()
ret i8* %ret
; 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__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-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]]
-; IS__CGSCC_NPM: rec:
-; IS__CGSCC_NPM-NEXT: br label [[END]]
-; IS__CGSCC_NPM: end:
-; IS__CGSCC_NPM-NEXT: ret i8* null
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test5_helper
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]]
+; TUNIT: rec:
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: ret i8* null
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test5_helper
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]]
+; CGSCC: rec:
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: ret i8* null
;
br i1 %c, label %rec, label %end
rec:
}
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
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test5
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; TUNIT-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-NEXT: ret i8* null
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test5
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: ret i8* null
;
%ret = call i8* @test5_helper(i1 %c)
ret i8* %ret
; Local analysis, but going through a self recursive phi
define i8* @test6a() {
;
-; NOT_CGSCC_NPM: Function Attrs: noreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6a
-; NOT_CGSCC_NPM-SAME: () #[[ATTR4:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: [[RET:%.*]] = call i8* @ret_nonnull()
-; NOT_CGSCC_NPM-NEXT: br label [[LOOP:%.*]]
-; NOT_CGSCC_NPM: loop:
-; NOT_CGSCC_NPM-NEXT: unreachable
-; NOT_CGSCC_NPM: exit:
-; NOT_CGSCC_NPM-NEXT: unreachable
-;
-; IS__CGSCC_NPM: Function Attrs: noreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6a
-; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i8* @ret_nonnull()
-; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__CGSCC_NPM: loop:
-; IS__CGSCC_NPM-NEXT: unreachable
-; IS__CGSCC_NPM: exit:
-; IS__CGSCC_NPM-NEXT: unreachable
+; TUNIT: Function Attrs: noreturn
+; TUNIT-LABEL: define {{[^@]+}}@test6a
+; TUNIT-SAME: () #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[RET:%.*]] = call i8* @ret_nonnull()
+; TUNIT-NEXT: br label [[LOOP:%.*]]
+; TUNIT: loop:
+; TUNIT-NEXT: unreachable
+; TUNIT: exit:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: noreturn
+; CGSCC-LABEL: define {{[^@]+}}@test6a
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[RET:%.*]] = call i8* @ret_nonnull()
+; CGSCC-NEXT: br label [[LOOP:%.*]]
+; CGSCC: loop:
+; CGSCC-NEXT: unreachable
+; CGSCC: exit:
+; CGSCC-NEXT: unreachable
;
entry:
%ret = call i8* @ret_nonnull()
}
define i8* @test6b(i1 %c) {
-; IS________NPM-LABEL: define {{[^@]+}}@test6b
-; IS________NPM-SAME: (i1 [[C:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[RET:%.*]] = call nonnull i8* @ret_nonnull()
-; IS________NPM-NEXT: br label [[LOOP:%.*]]
-; IS________NPM: loop:
-; IS________NPM-NEXT: [[PHI:%.*]] = phi i8* [ [[RET]], [[ENTRY:%.*]] ], [ [[RET]], [[LOOP]] ]
-; IS________NPM-NEXT: br i1 [[C]], label [[LOOP]], label [[EXIT:%.*]]
-; IS________NPM: exit:
-; IS________NPM-NEXT: ret i8* [[RET]]
+; CHECK-LABEL: define {{[^@]+}}@test6b
+; CHECK-SAME: (i1 [[C:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[RET:%.*]] = call nonnull i8* @ret_nonnull()
+; CHECK-NEXT: br label [[LOOP:%.*]]
+; CHECK: loop:
+; CHECK-NEXT: [[PHI:%.*]] = phi i8* [ [[RET]], [[ENTRY:%.*]] ], [ [[RET]], [[LOOP]] ]
+; CHECK-NEXT: br i1 [[C]], label [[LOOP]], label [[EXIT:%.*]]
+; CHECK: exit:
+; CHECK-NEXT: ret i8* [[RET]]
;
entry:
%ret = call i8* @ret_nonnull()
; Simple Argument Tests
declare i8* @unknown()
define void @test13_helper() {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test13_helper() {
-; NOT_CGSCC_NPM-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull()
-; NOT_CGSCC_NPM-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown()
-; NOT_CGSCC_NPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]]) #[[ATTR5:[0-9]+]]
-; NOT_CGSCC_NPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13_helper() {
-; IS__CGSCC_NPM-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull()
-; IS__CGSCC_NPM-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown()
-; IS__CGSCC_NPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]]) #[[ATTR4:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@test13_helper() {
+; TUNIT-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull()
+; TUNIT-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown()
+; TUNIT-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]+]]
+; TUNIT-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]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@test13_helper() {
+; CGSCC-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull()
+; CGSCC-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown()
+; CGSCC-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]+]]
+; CGSCC-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]]
+; CGSCC-NEXT: ret void
;
%nonnullptr = tail call i8* @ret_nonnull()
%maybenullptr = tail call i8* @unknown()
}
define internal void @test13(i8* %a, i8* %b, i8* %c) {
;
-; NOT_CGSCC_NPM: Function Attrs: nounwind
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test13
-; NOT_CGSCC_NPM-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) #[[ATTR5]] {
-; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13
-; IS__CGSCC_NPM-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) #[[ATTR4]] {
-; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@test13
+; TUNIT-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) #[[ATTR5]]
+; TUNIT-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@test13
+; CGSCC-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) #[[ATTR4]]
+; CGSCC-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
call void @use_i8_ptr(i8* %a)
call void @use_i8_ptr(i8* %b)
define internal i32* @f1(i32* %arg) {
; FIXME: missing nonnull It should be nonnull @f1(i32* nonnull readonly %arg)
-; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f1
-; NOT_CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR6:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: bb:
-; NOT_CGSCC_NPM-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null
-; NOT_CGSCC_NPM-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]]
-; NOT_CGSCC_NPM: bb1:
-; NOT_CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4
-; NOT_CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]]
-; NOT_CGSCC_NPM: bb4:
-; NOT_CGSCC_NPM-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1
-; NOT_CGSCC_NPM-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) #[[ATTR14:[0-9]+]]
-; NOT_CGSCC_NPM-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1
-; NOT_CGSCC_NPM-NEXT: br label [[BB9]]
-; NOT_CGSCC_NPM: bb6:
-; NOT_CGSCC_NPM-NEXT: [[TMP7:%.*]] = tail call i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) #[[ATTR14]]
-; NOT_CGSCC_NPM-NEXT: ret i32* [[TMP7]]
-; NOT_CGSCC_NPM: bb9:
-; NOT_CGSCC_NPM-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ]
-; NOT_CGSCC_NPM-NEXT: ret i32* [[TMP10]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1
-; IS__CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: bb:
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]]
-; IS__CGSCC_NPM: bb1:
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]]
-; IS__CGSCC_NPM: bb4:
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1
-; IS__CGSCC_NPM-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) #[[ATTR14:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1
-; IS__CGSCC_NPM-NEXT: br label [[BB9]]
-; IS__CGSCC_NPM: bb6:
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = tail call i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) #[[ATTR14]]
-; IS__CGSCC_NPM-NEXT: ret i32* [[TMP7]]
-; IS__CGSCC_NPM: bb9:
-; IS__CGSCC_NPM-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ]
-; IS__CGSCC_NPM-NEXT: ret i32* [[TMP10]]
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@f1
+; TUNIT-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null
+; TUNIT-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]]
+; TUNIT: bb1:
+; TUNIT-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0
+; TUNIT-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]]
+; TUNIT: bb4:
+; TUNIT-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1
+; TUNIT-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) #[[ATTR14:[0-9]+]]
+; TUNIT-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1
+; TUNIT-NEXT: br label [[BB9]]
+; TUNIT: bb6:
+; TUNIT-NEXT: [[TMP7:%.*]] = tail call i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) #[[ATTR14]]
+; TUNIT-NEXT: ret i32* [[TMP7]]
+; TUNIT: bb9:
+; TUNIT-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ]
+; TUNIT-NEXT: ret i32* [[TMP10]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@f1
+; CGSCC-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null
+; CGSCC-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]]
+; CGSCC: bb1:
+; CGSCC-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 0
+; CGSCC-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]]
+; CGSCC: bb4:
+; CGSCC-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1
+; CGSCC-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) #[[ATTR14:[0-9]+]]
+; CGSCC-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1
+; CGSCC-NEXT: br label [[BB9]]
+; CGSCC: bb6:
+; CGSCC-NEXT: [[TMP7:%.*]] = tail call i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) #[[ATTR14]]
+; CGSCC-NEXT: ret i32* [[TMP7]]
+; CGSCC: bb9:
+; CGSCC-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ]
+; CGSCC-NEXT: ret i32* [[TMP10]]
;
bb:
}
define internal i32* @f2(i32* %arg) {
-; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f2
-; NOT_CGSCC_NPM-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR6]] {
-; NOT_CGSCC_NPM-NEXT: bb:
-; NOT_CGSCC_NPM-NEXT: [[TMP:%.*]] = tail call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]]
-; NOT_CGSCC_NPM-NEXT: ret i32* [[TMP]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2
-; IS__CGSCC_NPM-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: bb:
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = tail call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]]
-; IS__CGSCC_NPM-NEXT: ret i32* [[TMP]]
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@f2
+; TUNIT-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR6]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = tail call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]]
+; TUNIT-NEXT: ret i32* [[TMP]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@f2
+; CGSCC-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = tail call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]]
+; CGSCC-NEXT: ret i32* [[TMP]]
;
bb:
%tmp = tail call i32* @f1(i32* %arg)
define dso_local noalias i32* @f3(i32* %arg) {
; FIXME: missing nonnull. It should be nonnull @f3(i32* nonnull readonly %arg)
-; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f3
-; NOT_CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR6]] {
-; NOT_CGSCC_NPM-NEXT: bb:
-; NOT_CGSCC_NPM-NEXT: [[TMP:%.*]] = call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]]
-; NOT_CGSCC_NPM-NEXT: ret i32* [[TMP]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3
-; IS__CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: bb:
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]]
-; IS__CGSCC_NPM-NEXT: ret i32* [[TMP]]
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@f3
+; TUNIT-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR6]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]]
+; TUNIT-NEXT: ret i32* [[TMP]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@f3
+; CGSCC-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR14]]
+; CGSCC-NEXT: ret i32* [[TMP]]
;
bb:
; FIXME: missing nonnull. It should be @f1(i32* nonnull readonly %arg)
; fun2(nonnull %a, %b)
; We can say that %a is nonnull but %b is not.
define void @f16(i8* %a, i8 * %b, i8 %c) {
-; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f16
-; NOT_CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR7:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; NOT_CGSCC_NPM: if.then:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: ret void
-; NOT_CGSCC_NPM: if.else:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f16
-; IS__CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR6:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; IS__CGSCC_NPM: if.then:
-; IS__CGSCC_NPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret void
-; IS__CGSCC_NPM: if.else:
-; IS__CGSCC_NPM-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@f16
+; TUNIT-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) #[[ATTR7]]
+; TUNIT-NEXT: ret void
+; TUNIT: if.else:
+; TUNIT-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) #[[ATTR7]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f16
+; CGSCC-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) #[[ATTR6]]
+; CGSCC-NEXT: ret void
+; CGSCC: if.else:
+; CGSCC-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) #[[ATTR6]]
+; CGSCC-NEXT: ret void
;
%cmp = icmp eq i8 %c, 0
br i1 %cmp, label %if.then, label %if.else
; We can say that %a is nonnull
define void @f17(i8* %a, i8 %c) {
;
-; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f17
-; NOT_CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) #[[ATTR7]] {
-; NOT_CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; NOT_CGSCC_NPM: if.then:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: br label [[CONT:%.*]]
-; NOT_CGSCC_NPM: if.else:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: br label [[CONT]]
-; NOT_CGSCC_NPM: cont:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f17
-; IS__CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; IS__CGSCC_NPM: if.then:
-; IS__CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: br label [[CONT:%.*]]
-; IS__CGSCC_NPM: if.else:
-; IS__CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: br label [[CONT]]
-; IS__CGSCC_NPM: cont:
-; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@f17
+; TUNIT-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: tail call void @fun0() #[[ATTR7]]
+; TUNIT-NEXT: br label [[CONT:%.*]]
+; TUNIT: if.else:
+; TUNIT-NEXT: tail call void @fun0() #[[ATTR7]]
+; TUNIT-NEXT: br label [[CONT]]
+; TUNIT: cont:
+; TUNIT-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR7]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f17
+; CGSCC-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: tail call void @fun0() #[[ATTR6]]
+; CGSCC-NEXT: br label [[CONT:%.*]]
+; CGSCC: if.else:
+; CGSCC-NEXT: tail call void @fun0() #[[ATTR6]]
+; CGSCC-NEXT: br label [[CONT]]
+; CGSCC: cont:
+; CGSCC-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR6]]
+; CGSCC-NEXT: ret void
;
%cmp = icmp eq i8 %c, 0
br i1 %cmp, label %if.then, label %if.else
; fun1(nonnull %a)
define void @f18(i8* %a, i8* %b, i8 %c) {
-; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f18
-; NOT_CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR7]] {
-; NOT_CGSCC_NPM-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; NOT_CGSCC_NPM: if.then:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: br label [[CONT:%.*]]
-; NOT_CGSCC_NPM: if.else:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: br label [[CONT]]
-; NOT_CGSCC_NPM: cont:
-; NOT_CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1
-; NOT_CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]]
-; NOT_CGSCC_NPM: cont.then:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: br label [[CONT2:%.*]]
-; NOT_CGSCC_NPM: cont.else:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: br label [[CONT2]]
-; NOT_CGSCC_NPM: cont2:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR7]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f18
-; IS__CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; IS__CGSCC_NPM: if.then:
-; IS__CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: br label [[CONT:%.*]]
-; IS__CGSCC_NPM: if.else:
-; IS__CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: br label [[CONT]]
-; IS__CGSCC_NPM: cont:
-; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]]
-; IS__CGSCC_NPM: cont.then:
-; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: br label [[CONT2:%.*]]
-; IS__CGSCC_NPM: cont.else:
-; IS__CGSCC_NPM-NEXT: tail call void @fun0() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: br label [[CONT2]]
-; IS__CGSCC_NPM: cont2:
-; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@f18
+; TUNIT-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0
+; TUNIT-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: tail call void @fun0() #[[ATTR7]]
+; TUNIT-NEXT: br label [[CONT:%.*]]
+; TUNIT: if.else:
+; TUNIT-NEXT: tail call void @fun0() #[[ATTR7]]
+; TUNIT-NEXT: br label [[CONT]]
+; TUNIT: cont:
+; TUNIT-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1
+; TUNIT-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]]
+; TUNIT: cont.then:
+; TUNIT-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR7]]
+; TUNIT-NEXT: br label [[CONT2:%.*]]
+; TUNIT: cont.else:
+; TUNIT-NEXT: tail call void @fun0() #[[ATTR7]]
+; TUNIT-NEXT: br label [[CONT2]]
+; TUNIT: cont2:
+; TUNIT-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR7]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f18
+; CGSCC-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0
+; CGSCC-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: tail call void @fun0() #[[ATTR6]]
+; CGSCC-NEXT: br label [[CONT:%.*]]
+; CGSCC: if.else:
+; CGSCC-NEXT: tail call void @fun0() #[[ATTR6]]
+; CGSCC-NEXT: br label [[CONT]]
+; CGSCC: cont:
+; CGSCC-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1
+; CGSCC-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]]
+; CGSCC: cont.then:
+; CGSCC-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR6]]
+; CGSCC-NEXT: br label [[CONT2:%.*]]
+; CGSCC: cont.else:
+; CGSCC-NEXT: tail call void @fun0() #[[ATTR6]]
+; CGSCC-NEXT: br label [[CONT2]]
+; CGSCC: cont2:
+; CGSCC-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR6]]
+; CGSCC-NEXT: ret void
;
%cmp1 = icmp eq i8 %c, 0
br i1 %cmp1, label %if.then, label %if.else
; TEST 19: Loop
define void @f19(i8* %a, i8* %b, i8 %c) {
-; NOT_CGSCC_NPM: Function Attrs: nounwind
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f19
-; NOT_CGSCC_NPM-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) #[[ATTR5]] {
-; NOT_CGSCC_NPM-NEXT: br label [[LOOP_HEADER:%.*]]
-; NOT_CGSCC_NPM: loop.header:
-; NOT_CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]]
-; NOT_CGSCC_NPM: loop.body:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: br label [[LOOP_HEADER]]
-; NOT_CGSCC_NPM: loop.exit:
-; NOT_CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f19
-; IS__CGSCC_NPM-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) #[[ATTR4]] {
-; IS__CGSCC_NPM-NEXT: br label [[LOOP_HEADER:%.*]]
-; IS__CGSCC_NPM: loop.header:
-; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]]
-; IS__CGSCC_NPM: loop.body:
-; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: br label [[LOOP_HEADER]]
-; IS__CGSCC_NPM: loop.exit:
-; IS__CGSCC_NPM-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@f19
+; TUNIT-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: br label [[LOOP_HEADER:%.*]]
+; TUNIT: loop.header:
+; TUNIT-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0
+; TUNIT-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]]
+; TUNIT: loop.body:
+; TUNIT-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR5]]
+; TUNIT-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: br label [[LOOP_HEADER]]
+; TUNIT: loop.exit:
+; TUNIT-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@f19
+; CGSCC-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: br label [[LOOP_HEADER:%.*]]
+; CGSCC: loop.header:
+; CGSCC-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0
+; CGSCC-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]]
+; CGSCC: loop.body:
+; CGSCC-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR4]]
+; CGSCC-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: br label [[LOOP_HEADER]]
+; CGSCC: loop.exit:
+; CGSCC-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
br label %loop.header
loop.header:
declare i32 @esfp(...)
define i1 @parent8(i8* %a, i8* %bogus1, i8* %b) personality i8* bitcast (i32 (...)* @esfp to i8*){
-; NOT_CGSCC_NPM: Function Attrs: nounwind
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@parent8
-; NOT_CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) #[[ATTR5]] personality i8* bitcast (i32 (...)* @esfp to i8*) {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]])
-; NOT_CGSCC_NPM-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]]
-; NOT_CGSCC_NPM: cont:
-; NOT_CGSCC_NPM-NEXT: ret i1 false
-; NOT_CGSCC_NPM: exc:
-; NOT_CGSCC_NPM-NEXT: [[LP:%.*]] = landingpad { i8*, i32 }
-; NOT_CGSCC_NPM-NEXT: filter [0 x i8*] zeroinitializer
-; NOT_CGSCC_NPM-NEXT: unreachable
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@parent8
-; IS__CGSCC_NPM-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) #[[ATTR4]] personality i8* bitcast (i32 (...)* @esfp to i8*) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]])
-; IS__CGSCC_NPM-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]]
-; IS__CGSCC_NPM: cont:
-; IS__CGSCC_NPM-NEXT: ret i1 false
-; IS__CGSCC_NPM: exc:
-; IS__CGSCC_NPM-NEXT: [[LP:%.*]] = landingpad { i8*, i32 }
-; IS__CGSCC_NPM-NEXT: filter [0 x i8*] zeroinitializer
-; IS__CGSCC_NPM-NEXT: unreachable
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@parent8
+; TUNIT-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) #[[ATTR5]] personality i8* bitcast (i32 (...)* @esfp to i8*) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]])
+; TUNIT-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]]
+; TUNIT: cont:
+; TUNIT-NEXT: ret i1 false
+; TUNIT: exc:
+; TUNIT-NEXT: [[LP:%.*]] = landingpad { i8*, i32 }
+; TUNIT-NEXT: filter [0 x i8*] zeroinitializer
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@parent8
+; CGSCC-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) #[[ATTR4]] personality i8* bitcast (i32 (...)* @esfp to i8*) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]])
+; CGSCC-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]]
+; CGSCC: cont:
+; CGSCC-NEXT: ret i1 false
+; CGSCC: exc:
+; CGSCC-NEXT: [[LP:%.*]] = landingpad { i8*, i32 }
+; CGSCC-NEXT: filter [0 x i8*] zeroinitializer
+; CGSCC-NEXT: unreachable
;
entry:
define i32* @gep1_no_null_opt(i32* %p) #0 {
; Should't be able to derive nonnull based on gep.
-; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@gep1_no_null_opt
-; NOT_CGSCC_NPM-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR9:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1
-; NOT_CGSCC_NPM-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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@gep1_no_null_opt
+; TUNIT-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR9:[0-9]+]] {
+; TUNIT-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1
+; TUNIT-NEXT: ret i32* [[Q]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@gep1_no_null_opt
+; CGSCC-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1
+; CGSCC-NEXT: ret i32* [[Q]]
;
%q = getelementptr inbounds i32, i32* %p, i32 1
ret i32* %q
; CHECK-NOT: @g2()
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____-NEXT: ret i32* inttoptr (i64 4 to i32*)
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@g2
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: ret i32* inttoptr (i64 4 to i32*)
;
ret i32* inttoptr (i64 4 to i32*)
}
define i32* @g1() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@g1
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i32* inttoptr (i64 4 to i32*)
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@g1
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i32* inttoptr (i64 4 to i32*)
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@g1
-; IS__CGSCC_NPM-SAME: () #[[ATTR9:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call noundef nonnull align 4 i32* @g2() #[[ATTR16:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32* [[C]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@g1
+; CGSCC-SAME: () #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef nonnull align 4 i32* @g2() #[[ATTR16:[0-9]+]]
+; CGSCC-NEXT: ret i32* [[C]]
;
%c = call i32* @g2()
ret i32* %c
declare void @use_i32_ptr(i32* readnone nocapture) nounwind
define internal void @called_by_weak(i32* %a) {
-; NOT_CGSCC_NPM: Function Attrs: nounwind
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@called_by_weak
-; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) #[[ATTR5]] {
-; NOT_CGSCC_NPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@called_by_weak
-; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) #[[ATTR4]] {
-; IS__CGSCC_NPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@called_by_weak
+; TUNIT-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@called_by_weak
+; CGSCC-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
call void @use_i32_ptr(i32* %a)
ret void
; Check we do not annotate the function interface of this weak function.
define weak_odr void @weak_caller(i32* nonnull %a) {
;
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@weak_caller
-; NOT_CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@weak_caller
+; TUNIT-SAME: (i32* nonnull [[A:%.*]]) {
+; TUNIT-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@weak_caller
-; IS__CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]]) {
-; IS__CGSCC_NPM-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@weak_caller
+; CGSCC-SAME: (i32* nonnull [[A:%.*]]) {
+; CGSCC-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
call void @called_by_weak(i32* %a)
ret void
; Expect nonnull
define internal void @control(i32* dereferenceable(4) %a) {
-; NOT_CGSCC_NPM: Function Attrs: nounwind
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@control
-; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] {
-; NOT_CGSCC_NPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@control
-; IS__CGSCC_NPM-SAME: (i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] {
-; IS__CGSCC_NPM-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nounwind
+; TUNIT-LABEL: define {{[^@]+}}@control
+; TUNIT-SAME: (i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind
+; CGSCC-LABEL: define {{[^@]+}}@control
+; CGSCC-SAME: (i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
call void @use_i32_ptr(i32* %a)
ret void
ret void
}
define void @make_live(i32* nonnull dereferenceable(8) %a) {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@make_live
-; NOT_CGSCC_NPM-SAME: (i32* noundef nonnull align 16 dereferenceable(8) [[A:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: call void @naked(i32* noundef nonnull align 16 dereferenceable(8) [[A]])
-; NOT_CGSCC_NPM-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: call void @optnone(i32* noundef nonnull align 16 dereferenceable(8) [[A]])
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@make_live
-; IS__CGSCC_NPM-SAME: (i32* noundef nonnull align 16 dereferenceable(8) [[A:%.*]]) {
-; IS__CGSCC_NPM-NEXT: call void @naked(i32* noundef nonnull align 16 dereferenceable(8) [[A]])
-; IS__CGSCC_NPM-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: call void @optnone(i32* noundef nonnull align 16 dereferenceable(8) [[A]])
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@make_live
+; TUNIT-SAME: (i32* noundef nonnull align 16 dereferenceable(8) [[A:%.*]]) {
+; TUNIT-NEXT: call void @naked(i32* noundef nonnull align 16 dereferenceable(8) [[A]])
+; TUNIT-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: call void @optnone(i32* noundef nonnull align 16 dereferenceable(8) [[A]])
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@make_live
+; CGSCC-SAME: (i32* noundef nonnull align 16 dereferenceable(8) [[A:%.*]]) {
+; CGSCC-NEXT: call void @naked(i32* noundef nonnull align 16 dereferenceable(8) [[A]])
+; CGSCC-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: call void @optnone(i32* noundef nonnull align 16 dereferenceable(8) [[A]])
+; CGSCC-NEXT: ret void
;
call void @naked(i32* nonnull dereferenceable(8) align 16 %a)
call void @control(i32* nonnull dereferenceable(8) align 16 %a)
declare i32 @g(i32*) willreturn nounwind
define i32 @nonnull_exec_ctx_1(i32* %a, i32 %b) {
;
-; IS__TUNIT_NPM: Function Attrs: nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1
-; IS__TUNIT_NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR7]] {
-; IS__TUNIT_NPM-NEXT: en:
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
-; IS__TUNIT_NPM: ex:
-; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR7]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP5]]
-; IS__TUNIT_NPM: hd:
-; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ]
-; IS__TUNIT_NPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR7]]
-; IS__TUNIT_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
-; IS__TUNIT_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1
-; IS__CGSCC_NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: en:
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
-; IS__CGSCC_NPM: ex:
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP5]]
-; IS__CGSCC_NPM: hd:
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ]
-; IS__CGSCC_NPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
-; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1
+; TUNIT-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: en:
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
+; TUNIT-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
+; TUNIT: ex:
+; TUNIT-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR7]]
+; TUNIT-NEXT: ret i32 [[TMP5]]
+; TUNIT: hd:
+; TUNIT-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ]
+; TUNIT-NEXT: tail call void @h(i32* [[A]]) #[[ATTR7]]
+; TUNIT-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
+; TUNIT-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
+; TUNIT-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1
+; CGSCC-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: en:
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
+; CGSCC-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
+; CGSCC: ex:
+; CGSCC-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i32 [[TMP5]]
+; CGSCC: hd:
+; CGSCC-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ]
+; CGSCC-NEXT: tail call void @h(i32* [[A]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
+; CGSCC-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
+; CGSCC-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
;
en:
%tmp3 = icmp eq i32 %b, 0
define i32 @nonnull_exec_ctx_1b(i32* %a, i32 %b) {
;
-; IS__TUNIT_NPM: Function Attrs: nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b
-; IS__TUNIT_NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR7]] {
-; IS__TUNIT_NPM-NEXT: en:
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
-; IS__TUNIT_NPM: ex:
-; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR7]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP5]]
-; IS__TUNIT_NPM: hd:
-; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ]
-; IS__TUNIT_NPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR7]]
-; IS__TUNIT_NPM-NEXT: br label [[HD2]]
-; IS__TUNIT_NPM: hd2:
-; IS__TUNIT_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
-; IS__TUNIT_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b
-; IS__CGSCC_NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: en:
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
-; IS__CGSCC_NPM: ex:
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP5]]
-; IS__CGSCC_NPM: hd:
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ]
-; IS__CGSCC_NPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: br label [[HD2]]
-; IS__CGSCC_NPM: hd2:
-; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
-; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b
+; TUNIT-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: en:
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
+; TUNIT-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
+; TUNIT: ex:
+; TUNIT-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR7]]
+; TUNIT-NEXT: ret i32 [[TMP5]]
+; TUNIT: hd:
+; TUNIT-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ]
+; TUNIT-NEXT: tail call void @h(i32* [[A]]) #[[ATTR7]]
+; TUNIT-NEXT: br label [[HD2]]
+; TUNIT: hd2:
+; TUNIT-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
+; TUNIT-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
+; TUNIT-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b
+; CGSCC-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: en:
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
+; CGSCC-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
+; CGSCC: ex:
+; CGSCC-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i32 [[TMP5]]
+; CGSCC: hd:
+; CGSCC-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ]
+; CGSCC-NEXT: tail call void @h(i32* [[A]]) #[[ATTR6]]
+; CGSCC-NEXT: br label [[HD2]]
+; CGSCC: hd2:
+; CGSCC-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
+; CGSCC-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
+; CGSCC-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
;
en:
%tmp3 = icmp eq i32 %b, 0
define i32 @nonnull_exec_ctx_2(i32* %a, i32 %b) willreturn nounwind {
;
-; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2
-; NOT_CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR7]] {
-; NOT_CGSCC_NPM-NEXT: en:
-; NOT_CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
-; NOT_CGSCC_NPM: ex:
-; NOT_CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret i32 [[TMP5]]
-; NOT_CGSCC_NPM: hd:
-; NOT_CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ]
-; NOT_CGSCC_NPM-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
-; NOT_CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
-; NOT_CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2
-; IS__CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: en:
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
-; IS__CGSCC_NPM: ex:
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP5]]
-; IS__CGSCC_NPM: hd:
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ]
-; IS__CGSCC_NPM-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
-; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2
+; TUNIT-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: en:
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
+; TUNIT-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
+; TUNIT: ex:
+; TUNIT-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i32 [[TMP5]]
+; TUNIT: hd:
+; TUNIT-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ]
+; TUNIT-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
+; TUNIT-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
+; TUNIT-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2
+; CGSCC-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: en:
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
+; CGSCC-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
+; CGSCC: ex:
+; CGSCC-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: ret i32 [[TMP5]]
+; CGSCC: hd:
+; CGSCC-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ]
+; CGSCC-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
+; CGSCC-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
+; CGSCC-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
;
en:
%tmp3 = icmp eq i32 %b, 0
define i32 @nonnull_exec_ctx_2b(i32* %a, i32 %b) willreturn nounwind {
;
-; NOT_CGSCC_NPM: Function Attrs: nounwind willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b
-; NOT_CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR7]] {
-; NOT_CGSCC_NPM-NEXT: en:
-; NOT_CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
-; NOT_CGSCC_NPM: ex:
-; NOT_CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret i32 [[TMP5]]
-; NOT_CGSCC_NPM: hd:
-; NOT_CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ]
-; NOT_CGSCC_NPM-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: br label [[HD2]]
-; NOT_CGSCC_NPM: hd2:
-; NOT_CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
-; NOT_CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
-; NOT_CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b
-; IS__CGSCC_NPM-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: en:
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
-; IS__CGSCC_NPM: ex:
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP5]]
-; IS__CGSCC_NPM: hd:
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ]
-; IS__CGSCC_NPM-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: br label [[HD2]]
-; IS__CGSCC_NPM: hd2:
-; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
-; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
+; TUNIT: Function Attrs: nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b
+; TUNIT-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR7]] {
+; TUNIT-NEXT: en:
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
+; TUNIT-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
+; TUNIT: ex:
+; TUNIT-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i32 [[TMP5]]
+; TUNIT: hd:
+; TUNIT-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ]
+; TUNIT-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR5]]
+; TUNIT-NEXT: br label [[HD2]]
+; TUNIT: hd2:
+; TUNIT-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
+; TUNIT-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
+; TUNIT-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
+;
+; CGSCC: Function Attrs: nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b
+; CGSCC-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] {
+; CGSCC-NEXT: en:
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0
+; CGSCC-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]]
+; CGSCC: ex:
+; CGSCC-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: ret i32 [[TMP5]]
+; CGSCC: hd:
+; CGSCC-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ]
+; CGSCC-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR4]]
+; CGSCC-NEXT: br label [[HD2]]
+; CGSCC: hd2:
+; CGSCC-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1
+; CGSCC-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]]
+; CGSCC-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]]
;
en:
%tmp3 = icmp eq i32 %b, 0
declare void @sink(i32*)
define void @PR43833(i32* %0, i32 %1) {
-; IS________NPM-LABEL: define {{[^@]+}}@PR43833
-; IS________NPM-SAME: (i32* [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
-; IS________NPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP1]], 1
-; IS________NPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP7:%.*]]
-; IS________NPM: 4:
-; IS________NPM-NEXT: [[TMP5:%.*]] = zext i32 [[TMP1]] to i64
-; IS________NPM-NEXT: [[TMP6:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 [[TMP5]]
-; IS________NPM-NEXT: br label [[TMP8:%.*]]
-; IS________NPM: 7:
-; IS________NPM-NEXT: ret void
-; IS________NPM: 8:
-; IS________NPM-NEXT: [[TMP9:%.*]] = phi i32 [ 1, [[TMP4]] ], [ [[TMP10:%.*]], [[TMP8]] ]
-; IS________NPM-NEXT: tail call void @sink(i32* nonnull [[TMP6]])
-; IS________NPM-NEXT: [[TMP10]] = add nuw nsw i32 [[TMP9]], 1
-; IS________NPM-NEXT: [[TMP11:%.*]] = icmp eq i32 [[TMP10]], [[TMP1]]
-; IS________NPM-NEXT: br i1 [[TMP11]], label [[TMP7]], label [[TMP8]]
+; CHECK-LABEL: define {{[^@]+}}@PR43833
+; CHECK-SAME: (i32* [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
+; CHECK-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP1]], 1
+; CHECK-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP7:%.*]]
+; CHECK: 4:
+; CHECK-NEXT: [[TMP5:%.*]] = zext i32 [[TMP1]] to i64
+; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 [[TMP5]]
+; CHECK-NEXT: br label [[TMP8:%.*]]
+; CHECK: 7:
+; CHECK-NEXT: ret void
+; CHECK: 8:
+; CHECK-NEXT: [[TMP9:%.*]] = phi i32 [ 1, [[TMP4]] ], [ [[TMP10:%.*]], [[TMP8]] ]
+; CHECK-NEXT: tail call void @sink(i32* nonnull [[TMP6]])
+; CHECK-NEXT: [[TMP10]] = add nuw nsw i32 [[TMP9]], 1
+; CHECK-NEXT: [[TMP11:%.*]] = icmp eq i32 [[TMP10]], [[TMP1]]
+; CHECK-NEXT: br i1 [[TMP11]], label [[TMP7]], label [[TMP8]]
;
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %7
; Adjusted from PR43833
define void @PR43833_simple(i32* %0, i32 %1) {
-; IS________NPM-LABEL: define {{[^@]+}}@PR43833_simple
-; IS________NPM-SAME: (i32* [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
-; IS________NPM-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
-; IS________NPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP7:%.*]]
-; IS________NPM: 4:
-; IS________NPM-NEXT: [[TMP5:%.*]] = zext i32 [[TMP1]] to i64
-; IS________NPM-NEXT: [[TMP6:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 [[TMP5]]
-; IS________NPM-NEXT: br label [[TMP8:%.*]]
-; IS________NPM: 7:
-; IS________NPM-NEXT: ret void
-; IS________NPM: 8:
-; IS________NPM-NEXT: [[TMP9:%.*]] = phi i32 [ 1, [[TMP4]] ], [ [[TMP10:%.*]], [[TMP8]] ]
-; IS________NPM-NEXT: tail call void @sink(i32* nonnull [[TMP6]])
-; IS________NPM-NEXT: [[TMP10]] = add nuw nsw i32 [[TMP9]], 1
-; IS________NPM-NEXT: [[TMP11:%.*]] = icmp eq i32 [[TMP10]], [[TMP1]]
-; IS________NPM-NEXT: br i1 [[TMP11]], label [[TMP7]], label [[TMP8]]
+; CHECK-LABEL: define {{[^@]+}}@PR43833_simple
+; CHECK-SAME: (i32* [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
+; CHECK-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
+; CHECK-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP7:%.*]]
+; CHECK: 4:
+; CHECK-NEXT: [[TMP5:%.*]] = zext i32 [[TMP1]] to i64
+; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 [[TMP5]]
+; CHECK-NEXT: br label [[TMP8:%.*]]
+; CHECK: 7:
+; CHECK-NEXT: ret void
+; CHECK: 8:
+; CHECK-NEXT: [[TMP9:%.*]] = phi i32 [ 1, [[TMP4]] ], [ [[TMP10:%.*]], [[TMP8]] ]
+; CHECK-NEXT: tail call void @sink(i32* nonnull [[TMP6]])
+; CHECK-NEXT: [[TMP10]] = add nuw nsw i32 [[TMP9]], 1
+; CHECK-NEXT: [[TMP11:%.*]] = icmp eq i32 [[TMP10]], [[TMP1]]
+; CHECK-NEXT: br i1 [[TMP11]], label [[TMP7]], label [[TMP8]]
;
%3 = icmp ne i32 %1, 0
br i1 %3, label %4, label %7
; ATTRIBUTOR-NEXT: [[TMP1:%.*]] = call i8* @unknown()
; ATTRIBUTOR-NEXT: ret void
;
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_assume_pos
-; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR13]] [ "nonnull"(i8* [[ARG]]) ]
-; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i8* @unknown()
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@nonnull_assume_pos
+; TUNIT-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) {
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR13]] [ "nonnull"(i8* [[ARG]]) ]
+; TUNIT-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]]
+; TUNIT-NEXT: [[TMP1:%.*]] = call i8* @unknown()
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_assume_pos
-; IS__CGSCC_NPM-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) {
-; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR13]] [ "nonnull"(i8* [[ARG]]) ]
-; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i8* @unknown()
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@nonnull_assume_pos
+; CGSCC-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) {
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR13]] [ "nonnull"(i8* [[ARG]]) ]
+; CGSCC-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]]
+; CGSCC-NEXT: [[TMP1:%.*]] = call i8* @unknown()
+; CGSCC-NEXT: ret void
;
call void @llvm.assume(i1 true) ["nonnull"(i8* %arg)]
call void @use_i8_ptr(i8* %arg)
; ATTRIBUTOR-NEXT: ret void
;
;
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_assume_neg
-; NOT_CGSCC_NPM-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i8* @unknown()
-; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ]
-; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: [[TMP2:%.*]] = call i8* @unknown()
-; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ]
-; NOT_CGSCC_NPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]]
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nonnull_assume_neg
-; IS__CGSCC_NPM-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) {
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = call i8* @unknown()
-; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ]
-; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = call i8* @unknown()
-; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ]
-; IS__CGSCC_NPM-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@nonnull_assume_neg
+; TUNIT-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) {
+; TUNIT-NEXT: [[TMP1:%.*]] = call i8* @unknown()
+; TUNIT-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) #[[ATTR5]]
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ]
+; TUNIT-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]]
+; TUNIT-NEXT: [[TMP2:%.*]] = call i8* @unknown()
+; TUNIT-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]]
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ]
+; TUNIT-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@nonnull_assume_neg
+; CGSCC-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) {
+; CGSCC-NEXT: [[TMP1:%.*]] = call i8* @unknown()
+; CGSCC-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) #[[ATTR4]]
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ]
+; CGSCC-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]]
+; CGSCC-NEXT: [[TMP2:%.*]] = call i8* @unknown()
+; CGSCC-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]]
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ]
+; CGSCC-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
call i8* @unknown()
call void @use_i8_ptr(i8* %arg)
attributes #0 = { null_pointer_is_valid }
attributes #1 = { nounwind willreturn}
;.
-; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR4]] = { noreturn }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nounwind }
-; IS__TUNIT____: attributes #[[ATTR6]] = { argmemonly nofree nosync nounwind readonly }
-; IS__TUNIT____: attributes #[[ATTR7]] = { nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR8:[0-9]+]] = { nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR10]] = { naked }
-; IS__TUNIT____: attributes #[[ATTR11]] = { noinline optnone }
-; IS__TUNIT____: attributes #[[ATTR12]] = { nofree nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR13]] = { willreturn }
-; IS__TUNIT____: attributes #[[ATTR14]] = { nofree nosync nounwind readonly }
-; IS__TUNIT____: attributes #[[ATTR15]] = { readonly willreturn }
+; TUNIT: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR4]] = { noreturn }
+; TUNIT: attributes #[[ATTR5]] = { nounwind }
+; TUNIT: attributes #[[ATTR6]] = { argmemonly nofree nosync nounwind readonly }
+; TUNIT: attributes #[[ATTR7]] = { nounwind willreturn }
+; TUNIT: attributes #[[ATTR8:[0-9]+]] = { nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
+; TUNIT: attributes #[[ATTR10]] = { naked }
+; TUNIT: attributes #[[ATTR11]] = { noinline optnone }
+; TUNIT: attributes #[[ATTR12]] = { nofree nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR13]] = { willreturn }
+; TUNIT: attributes #[[ATTR14]] = { nofree nosync nounwind readonly }
+; TUNIT: attributes #[[ATTR15]] = { readonly willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn }
-; 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]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR10]] = { naked }
-; IS__CGSCC_NPM: attributes #[[ATTR11]] = { noinline optnone }
-; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nofree nounwind readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR13]] = { willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR14]] = { nofree nosync nounwind readonly }
-; IS__CGSCC_NPM: attributes #[[ATTR15]] = { readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR16]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR3]] = { noreturn }
+; CGSCC: attributes #[[ATTR4]] = { nounwind }
+; CGSCC: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind readonly }
+; CGSCC: attributes #[[ATTR6]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR7:[0-9]+]] = { nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
+; CGSCC: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR10]] = { naked }
+; CGSCC: attributes #[[ATTR11]] = { noinline optnone }
+; CGSCC: attributes #[[ATTR12]] = { nofree nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR13]] = { willreturn }
+; CGSCC: attributes #[[ATTR14]] = { nofree nosync nounwind readonly }
+; CGSCC: attributes #[[ATTR15]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR16]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define i32 @leaf() {
; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
}
define i32 @indirect_rec() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec
-; NOT_CGSCC_NPM-SAME: () #[[ATTR1]] {
-; NOT_CGSCC_NPM-NEXT: ret i32 undef
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@indirect_rec
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i32 undef
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: ret i32 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@indirect_rec
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: ret i32 undef
;
%a = call i32 @indirect_rec2()
ret i32 %a
}
define i32 @indirect_rec2() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec2
-; NOT_CGSCC_NPM-SAME: () #[[ATTR1]] {
-; NOT_CGSCC_NPM-NEXT: ret i32 undef
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@indirect_rec2
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i32 undef
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@indirect_rec2
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: ret i32 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@indirect_rec2
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: ret i32 undef
;
%a = call i32 @indirect_rec()
ret i32 %a
ret i32 %a
}
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() #[[ATTR2]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync readnone
+; TUNIT-LABEL: define {{[^@]+}}@m
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: [[A:%.*]] = call i32 @called_by_norecurse() #[[ATTR2]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: norecurse nosync readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@m
-; IS__CGSCC____-SAME: () #[[ATTR6]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse()
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: norecurse nosync readnone
+; CGSCC-LABEL: define {{[^@]+}}@m
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: [[A:%.*]] = call i32 @called_by_norecurse()
+; CGSCC-NEXT: ret void
;
%a = call i32 @called_by_norecurse()
ret void
}
define internal i32 @called_by_norecurse_indirectly() {
-; IS__TUNIT____: Function Attrs: norecurse nosync readnone
-; IS__TUNIT____-LABEL: define {{[^@]+}}@called_by_norecurse_indirectly
-; IS__TUNIT____-SAME: () #[[ATTR6]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @k()
-; IS__TUNIT____-NEXT: ret i32 [[A]]
+; TUNIT: Function Attrs: norecurse nosync readnone
+; TUNIT-LABEL: define {{[^@]+}}@called_by_norecurse_indirectly
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: [[A:%.*]] = call i32 @k()
+; TUNIT-NEXT: ret i32 [[A]]
;
-; IS__CGSCC____: Function Attrs: nosync readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@called_by_norecurse_indirectly
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @k()
-; IS__CGSCC____-NEXT: ret i32 [[A]]
+; CGSCC: Function Attrs: nosync readnone
+; CGSCC-LABEL: define {{[^@]+}}@called_by_norecurse_indirectly
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[A:%.*]] = call i32 @k()
+; CGSCC-NEXT: ret i32 [[A]]
;
%a = call i32 @k()
ret i32 %a
}
define internal i32 @o() {
-; IS__TUNIT____: Function Attrs: norecurse nosync readnone
-; IS__TUNIT____-LABEL: define {{[^@]+}}@o
-; IS__TUNIT____-SAME: () #[[ATTR6]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse_indirectly() #[[ATTR2]]
-; IS__TUNIT____-NEXT: ret i32 [[A]]
+; TUNIT: Function Attrs: norecurse nosync readnone
+; TUNIT-LABEL: define {{[^@]+}}@o
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: [[A:%.*]] = call i32 @called_by_norecurse_indirectly() #[[ATTR2]]
+; TUNIT-NEXT: ret i32 [[A]]
;
-; IS__CGSCC____: Function Attrs: norecurse nosync readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@o
-; IS__CGSCC____-SAME: () #[[ATTR6]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @called_by_norecurse_indirectly()
-; IS__CGSCC____-NEXT: ret i32 [[A]]
+; CGSCC: Function Attrs: norecurse nosync readnone
+; CGSCC-LABEL: define {{[^@]+}}@o
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: [[A:%.*]] = call i32 @called_by_norecurse_indirectly()
+; CGSCC-NEXT: ret i32 [[A]]
;
%a = call i32 @called_by_norecurse_indirectly()
ret i32 %a
}
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() #[[ATTR2]]
-; IS__TUNIT____-NEXT: ret i32 [[A]]
+; TUNIT: Function Attrs: norecurse nosync readnone
+; TUNIT-LABEL: define {{[^@]+}}@p
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: [[A:%.*]] = call i32 @o() #[[ATTR2]]
+; TUNIT-NEXT: ret i32 [[A]]
;
-; IS__CGSCC____: Function Attrs: norecurse nosync readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@p
-; IS__CGSCC____-SAME: () #[[ATTR6]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = call i32 @o()
-; IS__CGSCC____-NEXT: ret i32 [[A]]
+; CGSCC: Function Attrs: norecurse nosync readnone
+; CGSCC-LABEL: define {{[^@]+}}@p
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: [[A:%.*]] = call i32 @o()
+; CGSCC-NEXT: ret i32 [[A]]
;
%a = call i32 @o()
ret i32 %a
}
define void @f(i32 %x) {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@f
-; NOT_CGSCC_NPM-SAME: (i32 [[X:%.*]]) #[[ATTR1]] {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
-; NOT_CGSCC_NPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
-; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
-; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; NOT_CGSCC_NPM: if.then:
-; NOT_CGSCC_NPM-NEXT: br label [[IF_END]]
-; NOT_CGSCC_NPM: if.end:
-; NOT_CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@f
+; TUNIT-SAME: (i32 [[X:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: ret void
;
-; 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-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC_NPM: if.then:
-; IS__CGSCC_NPM-NEXT: br label [[IF_END]]
-; IS__CGSCC_NPM: if.end:
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f
+; CGSCC-SAME: (i32 [[X:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: ret void
;
entry:
%x.addr = alloca i32, align 4
}
define i1 @test_rec_neg(i1 %c) norecurse {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_rec_neg
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[RC1:%.*]] = call i1 @rec(i1 noundef true)
-; IS__TUNIT____-NEXT: br i1 [[RC1]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[RC2:%.*]] = call i1 @rec(i1 [[C]])
-; IS__TUNIT____-NEXT: ret i1 [[RC2]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: ret i1 [[RC1]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@test_rec_neg
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: [[RC1:%.*]] = call i1 @rec(i1 noundef true)
+; TUNIT-NEXT: br i1 [[RC1]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[RC2:%.*]] = call i1 @rec(i1 [[C]])
+; TUNIT-NEXT: ret i1 [[RC2]]
+; TUNIT: f:
+; TUNIT-NEXT: ret i1 [[RC1]]
;
-; IS__CGSCC____: Function Attrs: norecurse
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_rec_neg
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[RC1:%.*]] = call noundef i1 @rec(i1 noundef true)
-; IS__CGSCC____-NEXT: br i1 [[RC1]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[RC2:%.*]] = call noundef i1 @rec(i1 [[C]])
-; IS__CGSCC____-NEXT: ret i1 [[RC2]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: ret i1 [[RC1]]
+; CGSCC: Function Attrs: norecurse
+; CGSCC-LABEL: define {{[^@]+}}@test_rec_neg
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: [[RC1:%.*]] = call noundef i1 @rec(i1 noundef true)
+; CGSCC-NEXT: br i1 [[RC1]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[RC2:%.*]] = call noundef i1 @rec(i1 [[C]])
+; CGSCC-NEXT: ret i1 [[RC2]]
+; CGSCC: f:
+; CGSCC-NEXT: ret i1 [[RC1]]
;
%rc1 = call i1 @rec(i1 true)
br i1 %rc1, label %t, label %f
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; Test cases specifically designed for the "no-return" function attribute.
; We use FIXME's to indicate problems and missing attributes.
; }
;
define i32 @multiple_noreturn_calls(i32 %a) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@multiple_noreturn_calls
-; IS__TUNIT____-SAME: (i32 [[A:%.*]]) #[[ATTR3:[0-9]+]] {
-; 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:%.*]]
-; IS__TUNIT____: cond.true:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: cond.false:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: cond.end:
-; IS__TUNIT____-NEXT: unreachable
-;
-; IS__CGSCC____: Function Attrs: nofree noinline noreturn nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@multiple_noreturn_calls
-; IS__CGSCC____-SAME: (i32 [[A:%.*]]) #[[ATTR1]] {
-; 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: unreachable
-; IS__CGSCC____: cond.false:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: cond.end:
-; IS__CGSCC____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@multiple_noreturn_calls
+; TUNIT-SAME: (i32 [[A:%.*]]) #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
+; TUNIT-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; TUNIT: cond.true:
+; TUNIT-NEXT: unreachable
+; TUNIT: cond.false:
+; TUNIT-NEXT: unreachable
+; TUNIT: cond.end:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nofree noinline noreturn nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@multiple_noreturn_calls
+; CGSCC-SAME: (i32 [[A:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0
+; CGSCC-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CGSCC: cond.true:
+; CGSCC-NEXT: unreachable
+; CGSCC: cond.false:
+; CGSCC-NEXT: unreachable
+; CGSCC: cond.end:
+; CGSCC-NEXT: unreachable
;
entry:
%cmp = icmp eq i32 %a, 0
; FIXME: we should derive "UB" as an argument and report it to the user on request.
define i32 @endless_loop_but_willreturn() willreturn {
-; IS__TUNIT____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@endless_loop_but_willreturn
-; IS__TUNIT____-SAME: () #[[ATTR4:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: br label [[WHILE_BODY:%.*]]
-; IS__TUNIT____: while.body:
-; IS__TUNIT____-NEXT: br label [[WHILE_BODY]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@endless_loop_but_willreturn
-; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]]
-; IS__CGSCC____: while.body:
-; IS__CGSCC____-NEXT: br label [[WHILE_BODY]]
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@endless_loop_but_willreturn
+; TUNIT-SAME: () #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[WHILE_BODY:%.*]]
+; TUNIT: while.body:
+; TUNIT-NEXT: br label [[WHILE_BODY]]
+;
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@endless_loop_but_willreturn
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[WHILE_BODY:%.*]]
+; CGSCC: while.body:
+; CGSCC-NEXT: br label [[WHILE_BODY]]
;
entry:
br label %while.body
; TEST 6b: willreturn means *not* no-return or UB
define i32 @UB_and_willreturn() willreturn {
-; IS__TUNIT____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@UB_and_willreturn
-; IS__TUNIT____-SAME: () #[[ATTR4]] {
-; 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: () #[[ATTR3]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@UB_and_willreturn
+; TUNIT-SAME: () #[[ATTR4]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@UB_and_willreturn
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: unreachable
;
entry:
unreachable
attributes #0 = { noinline nounwind uwtable }
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree noinline norecurse noreturn nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR2]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable }
+; TUNIT: attributes #[[ATTR3]] = { nofree noinline norecurse noreturn nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR4]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR2]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable }
+; CGSCC: attributes #[[ATTR3]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; Test cases designed for the nosync function attribute.
; volatile operation in same scc but dead. Call volatile_load defined in TEST 8.
define i32 @scc1(i32* %0) noinline nounwind uwtable {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@scc1
-; IS__TUNIT____-SAME: (i32* nofree [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__TUNIT____-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR19:[0-9]+]]
-; IS__TUNIT____-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree align 4 [[TMP0]]) #[[ATTR19]]
-; IS__TUNIT____-NEXT: ret i32 [[VAL]]
+; TUNIT: Function Attrs: argmemonly nofree noinline nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@scc1
+; TUNIT-SAME: (i32* nofree [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR19:[0-9]+]]
+; TUNIT-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree align 4 [[TMP0]]) #[[ATTR19]]
+; TUNIT-NEXT: ret i32 [[VAL]]
;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline nounwind uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1
-; IS__CGSCC_NPM-SAME: (i32* nofree [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR19:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree noundef align 4 [[TMP0]]) #[[ATTR14:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[VAL]]
+; CGSCC: Function Attrs: argmemonly nofree noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@scc1
+; CGSCC-SAME: (i32* nofree [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR19:[0-9]+]]
+; CGSCC-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree noundef align 4 [[TMP0]]) #[[ATTR14:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[VAL]]
;
tail call void @scc2(i32* %0);
%val = tail call i32 @volatile_load(i32* %0);
; It is odd to add nocapture but a result of the llvm.memcpy nocapture.
;
define i32 @memcpy_volatile(i8* %ptr1, i8* %ptr2) {
-; NOT_CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nounwind willreturn
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@memcpy_volatile
-; NOT_CGSCC_OPM-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8* nocapture nofree readonly [[PTR2:%.*]]) #[[ATTR10:[0-9]+]] {
-; NOT_CGSCC_OPM-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) #[[ATTR20:[0-9]+]]
-; NOT_CGSCC_OPM-NEXT: ret i32 4
+; CHECK: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; CHECK-LABEL: define {{[^@]+}}@memcpy_volatile
+; CHECK-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8* nocapture nofree readonly [[PTR2:%.*]]) #[[ATTR10:[0-9]+]] {
+; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) #[[ATTR20:[0-9]+]]
+; CHECK-NEXT: ret i32 4
;
call void @llvm.memcpy(i8* %ptr1, i8* %ptr2, i32 8, i1 1)
ret i32 4
; It is odd to add nocapture but a result of the llvm.memset nocapture.
;
define i32 @memset_non_volatile(i8* %ptr1, i8 %val) {
-; NOT_CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@memset_non_volatile
-; NOT_CGSCC_OPM-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8 [[VAL:%.*]]) #[[ATTR11:[0-9]+]] {
-; NOT_CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) #[[ATTR21:[0-9]+]]
-; NOT_CGSCC_OPM-NEXT: ret i32 4
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CHECK-LABEL: define {{[^@]+}}@memset_non_volatile
+; CHECK-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8 [[VAL:%.*]]) #[[ATTR11:[0-9]+]] {
+; CHECK-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) #[[ATTR21:[0-9]+]]
+; CHECK-NEXT: ret i32 4
;
call void @llvm.memset(i8* %ptr1, i8 %val, i32 8, i1 0)
ret i32 4
}
define float @cos_test2(float %x) {
-; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@cos_test2
-; NOT_CGSCC_OPM-SAME: (float [[X:%.*]]) #[[ATTR15]] {
-; NOT_CGSCC_OPM-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) #[[ATTR22:[0-9]+]]
-; NOT_CGSCC_OPM-NEXT: ret float [[C]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@cos_test2
+; CHECK-SAME: (float [[X:%.*]]) #[[ATTR15]] {
+; CHECK-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) #[[ATTR22:[0-9]+]]
+; CHECK-NEXT: ret float [[C]]
;
%c = call float @llvm.cos(float %x)
ret float %c
}
;.
-; NOT_CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind optsize readnone ssp willreturn uwtable }
-; NOT_CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn uwtable }
-; NOT_CGSCC_OPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nounwind willreturn uwtable }
-; NOT_CGSCC_OPM: attributes #[[ATTR3]] = { noinline nosync nounwind uwtable }
-; NOT_CGSCC_OPM: attributes #[[ATTR4]] = { noinline nounwind uwtable }
-; NOT_CGSCC_OPM: attributes #[[ATTR5]] = { argmemonly nofree noinline nounwind uwtable }
-; NOT_CGSCC_OPM: attributes #[[ATTR6]] = { nofree norecurse nounwind willreturn }
-; NOT_CGSCC_OPM: attributes #[[ATTR7]] = { nofree norecurse nounwind }
-; NOT_CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn }
-; NOT_CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind }
-; NOT_CGSCC_OPM: attributes #[[ATTR10]] = { argmemonly nofree norecurse nounwind willreturn }
-; NOT_CGSCC_OPM: attributes #[[ATTR11]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; NOT_CGSCC_OPM: attributes #[[ATTR12:[0-9]+]] = { convergent readnone }
-; NOT_CGSCC_OPM: attributes #[[ATTR13]] = { readnone }
-; NOT_CGSCC_OPM: attributes #[[ATTR14]] = { nounwind }
-; NOT_CGSCC_OPM: attributes #[[ATTR15]] = { nofree norecurse nosync nounwind readnone willreturn }
-; NOT_CGSCC_OPM: attributes #[[ATTR16:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn }
-; NOT_CGSCC_OPM: attributes #[[ATTR17:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; NOT_CGSCC_OPM: attributes #[[ATTR18:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; NOT_CGSCC_OPM: attributes #[[ATTR19]] = { nofree nounwind }
-; NOT_CGSCC_OPM: attributes #[[ATTR20]] = { willreturn }
-; NOT_CGSCC_OPM: attributes #[[ATTR21]] = { willreturn writeonly }
-; NOT_CGSCC_OPM: attributes #[[ATTR22]] = { readnone willreturn }
+; CHECK: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind optsize readnone ssp willreturn uwtable }
+; CHECK: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn uwtable }
+; CHECK: attributes #[[ATTR2]] = { argmemonly nofree norecurse nounwind willreturn uwtable }
+; CHECK: attributes #[[ATTR3]] = { noinline nosync nounwind uwtable }
+; CHECK: attributes #[[ATTR4]] = { noinline nounwind uwtable }
+; CHECK: attributes #[[ATTR5]] = { argmemonly nofree noinline nounwind uwtable }
+; CHECK: attributes #[[ATTR6]] = { nofree norecurse nounwind willreturn }
+; CHECK: attributes #[[ATTR7]] = { nofree norecurse nounwind }
+; CHECK: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn }
+; CHECK: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind }
+; CHECK: attributes #[[ATTR10]] = { argmemonly nofree norecurse nounwind willreturn }
+; CHECK: attributes #[[ATTR11]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CHECK: attributes #[[ATTR12:[0-9]+]] = { convergent readnone }
+; CHECK: attributes #[[ATTR13]] = { readnone }
+; CHECK: attributes #[[ATTR14]] = { nounwind }
+; CHECK: attributes #[[ATTR15]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CHECK: attributes #[[ATTR16:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn }
+; CHECK: attributes #[[ATTR17:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; CHECK: attributes #[[ATTR18:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; CHECK: attributes #[[ATTR19]] = { nofree nounwind }
+; CHECK: attributes #[[ATTR20]] = { willreturn }
+; CHECK: attributes #[[ATTR21]] = { willreturn writeonly }
+; CHECK: attributes #[[ATTR22]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
declare void @unknown()
}
define void @callback_caller() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@callback_caller() {
-; IS__TUNIT____-NEXT: call void @callback_broker(void (i8*)* noundef @argument_dead_callback_callee, i8* noalias nocapture nofree readnone align 4294967296 undef)
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@callback_caller() {
+; TUNIT-NEXT: call void @callback_broker(void (i8*)* noundef @argument_dead_callback_callee, i8* noalias nocapture nofree readnone align 4294967296 undef)
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@callback_caller() {
-; IS__CGSCC____-NEXT: call void @callback_broker(void (i8*)* noundef @argument_dead_callback_callee, i8* noalias nocapture nofree noundef readnone align 4294967296 null)
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@callback_caller() {
+; CGSCC-NEXT: call void @callback_broker(void (i8*)* noundef @argument_dead_callback_callee, i8* noalias nocapture nofree noundef readnone align 4294967296 null)
+; CGSCC-NEXT: ret void
;
call void @callback_broker(void (i8*)* @argument_dead_callback_callee, i8* null)
ret void
; try to come up with a different scheme to verify the `noundef` is dropped if
; signature rewriting is not happening.
define internal void @callee_with_dead_noundef_arg(i1 noundef %create, ...) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@callee_with_dead_noundef_arg
-; IS__TUNIT____-SAME: (i1 [[CREATE:%.*]], ...) {
-; IS__TUNIT____-NEXT: call void @unknown()
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@callee_with_dead_noundef_arg
+; TUNIT-SAME: (i1 [[CREATE:%.*]], ...) {
+; TUNIT-NEXT: call void @unknown()
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@callee_with_dead_noundef_arg
-; IS__CGSCC____-SAME: (i1 noundef [[CREATE:%.*]], ...) {
-; IS__CGSCC____-NEXT: call void @unknown()
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@callee_with_dead_noundef_arg
+; CGSCC-SAME: (i1 noundef [[CREATE:%.*]], ...) {
+; CGSCC-NEXT: call void @unknown()
+; CGSCC-NEXT: ret void
;
call void @unknown()
ret void
}
define void @caller_with_unused_arg(i1 %c) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller_with_unused_arg
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) {
-; IS__TUNIT____-NEXT: call void (i1, ...) @callee_with_dead_noundef_arg(i1 undef)
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@caller_with_unused_arg
+; TUNIT-SAME: (i1 [[C:%.*]]) {
+; TUNIT-NEXT: call void (i1, ...) @callee_with_dead_noundef_arg(i1 undef)
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller_with_unused_arg
-; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) {
-; IS__CGSCC____-NEXT: call void (i1, ...) @callee_with_dead_noundef_arg(i1 noundef [[C]])
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@caller_with_unused_arg
+; CGSCC-SAME: (i1 noundef [[C:%.*]]) {
+; CGSCC-NEXT: call void (i1, ...) @callee_with_dead_noundef_arg(i1 noundef [[C]])
+; CGSCC-NEXT: ret void
;
call void (i1, ...) @callee_with_dead_noundef_arg(i1 %c)
ret void
; signature rewriting is not happening.
define void @caller_with_noundef_arg() {
;
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller_with_noundef_arg() {
-; IS__TUNIT____-NEXT: call void (i1, ...) @callee_with_dead_arg(i1 undef)
-; IS__TUNIT____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@caller_with_noundef_arg() {
+; TUNIT-NEXT: call void (i1, ...) @callee_with_dead_arg(i1 undef)
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller_with_noundef_arg() {
-; IS__CGSCC____-NEXT: call void (i1, ...) @callee_with_dead_arg(i1 noundef true)
-; IS__CGSCC____-NEXT: ret void
+; CGSCC-LABEL: define {{[^@]+}}@caller_with_noundef_arg() {
+; CGSCC-NEXT: call void (i1, ...) @callee_with_dead_arg(i1 noundef true)
+; CGSCC-NEXT: ret void
;
call void (i1, ...) @callee_with_dead_arg(i1 noundef true)
ret void
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; TEST 1
define i32 @foo1() {
; TEST 2
define i32 @scc1_foo() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_foo
-; NOT_CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: ret i32 1
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@scc1_foo
+; TUNIT-SAME: () #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: ret i32 1
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_foo
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: ret i32 1
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@scc1_foo
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: ret i32 1
;
%1 = call i32 @scc1_bar()
ret i32 1
; TEST 3
define i32 @scc1_bar() {
-; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_bar
-; NOT_CGSCC_NPM-SAME: () #[[ATTR1]] {
-; NOT_CGSCC_NPM-NEXT: ret i32 1
+; TUNIT: Function Attrs: nofree nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@scc1_bar
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i32 1
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1_bar
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: ret i32 1
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@scc1_bar
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: ret i32 1
;
%1 = call i32 @scc1_foo()
ret i32 1
}
define i32 @catch_thing_user() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@catch_thing_user() {
-; IS__TUNIT____-NEXT: [[CATCH_THING_CALL:%.*]] = call i32 @catch_thing()
-; IS__TUNIT____-NEXT: ret i32 -1
+; TUNIT-LABEL: define {{[^@]+}}@catch_thing_user() {
+; TUNIT-NEXT: [[CATCH_THING_CALL:%.*]] = call i32 @catch_thing()
+; TUNIT-NEXT: ret i32 -1
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@catch_thing_user() {
-; IS__CGSCC____-NEXT: [[CATCH_THING_CALL:%.*]] = call noundef i32 @catch_thing()
-; IS__CGSCC____-NEXT: ret i32 [[CATCH_THING_CALL]]
+; CGSCC-LABEL: define {{[^@]+}}@catch_thing_user() {
+; CGSCC-NEXT: [[CATCH_THING_CALL:%.*]] = call noundef i32 @catch_thing()
+; CGSCC-NEXT: ret i32 [[CATCH_THING_CALL]]
;
%catch_thing_call = call i32 @catch_thing()
ret i32 %catch_thing_call
declare void @__cxa_end_catch()
;.
-; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; NOT_CGSCC_NPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
; CHECK: @[[GLOB2:[0-9]+]] = private unnamed_addr constant [[STRUCT_IDENT_T:%.*]] { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @[[GLOB0]], i32 0, i32 0) }, align 8
;.
define dso_local void @func(float* nocapture %a, float* %b, i32 %N) local_unnamed_addr #0 {
-; IS__TUNIT_NPM: Function Attrs: nounwind uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@func
-; IS__TUNIT_NPM-SAME: (float* nocapture nofree writeonly [[A:%.*]], float* nocapture nofree readonly [[B:%.*]], i32 [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[A_ADDR:%.*]] = alloca float*, align 8
-; IS__TUNIT_NPM-NEXT: [[B_ADDR:%.*]] = alloca float*, align 8
-; IS__TUNIT_NPM-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store float* [[A]], float** [[A_ADDR]], align 8
-; IS__TUNIT_NPM-NEXT: store float* [[B]], float** [[B_ADDR]], align 8
-; 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) @[[GLOB2]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float**, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef, float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A_ADDR]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B_ADDR]])
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@func
+; TUNIT-SAME: (float* nocapture nofree writeonly [[A:%.*]], float* nocapture nofree readonly [[B:%.*]], i32 [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[A_ADDR:%.*]] = alloca float*, align 8
+; TUNIT-NEXT: [[B_ADDR:%.*]] = alloca float*, align 8
+; TUNIT-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store float* [[A]], float** [[A_ADDR]], align 8
+; TUNIT-NEXT: store float* [[B]], float** [[B_ADDR]], align 8
+; TUNIT-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB2]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float**, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef, float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A_ADDR]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B_ADDR]])
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@func
-; IS__CGSCC____-SAME: (float* nocapture nofree [[A:%.*]], float* nofree [[B:%.*]], i32 [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[A_ADDR:%.*]] = alloca float*, align 8
-; IS__CGSCC____-NEXT: [[B_ADDR:%.*]] = alloca float*, align 8
-; IS__CGSCC____-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: store float* [[A]], float** [[A_ADDR]], align 8
-; IS__CGSCC____-NEXT: store float* [[B]], float** [[B_ADDR]], align 8
-; IS__CGSCC____-NEXT: store i32 199, i32* [[N_ADDR]], align 4
-; IS__CGSCC____-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB2]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float**, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nofree noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float** nofree noundef nonnull readonly align 8 dereferenceable(8) [[A_ADDR]], float** nofree noundef nonnull readonly align 8 dereferenceable(8) [[B_ADDR]])
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@func
+; CGSCC-SAME: (float* nocapture nofree [[A:%.*]], float* nofree [[B:%.*]], i32 [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[A_ADDR:%.*]] = alloca float*, align 8
+; CGSCC-NEXT: [[B_ADDR:%.*]] = alloca float*, align 8
+; CGSCC-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store float* [[A]], float** [[A_ADDR]], align 8
+; CGSCC-NEXT: store float* [[B]], float** [[B_ADDR]], align 8
+; CGSCC-NEXT: store i32 199, i32* [[N_ADDR]], align 4
+; CGSCC-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB2]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float**, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nofree noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float** nofree noundef nonnull readonly align 8 dereferenceable(8) [[A_ADDR]], float** nofree noundef nonnull readonly align 8 dereferenceable(8) [[B_ADDR]])
+; CGSCC-NEXT: ret void
;
entry:
%a.addr = alloca float*, align 8
; FIXME: %N should not be loaded but 199 should be used.
define internal void @.omp_outlined.(i32* noalias nocapture readonly %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %N, float** nocapture nonnull readonly align 8 dereferenceable(8) %a, float** nocapture nonnull readonly align 8 dereferenceable(8) %b) #1 {
-; IS__TUNIT_NPM: Function Attrs: alwaysinline nofree norecurse nounwind uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@.omp_outlined.
-; IS__TUNIT_NPM-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) [[N:%.*]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: br label [[OMP_PRECOND_THEN:%.*]]
-; IS__TUNIT_NPM: omp.precond.then:
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[DOTOMP_LB]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP0]])
-; IS__TUNIT_NPM-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[DOTOMP_UB]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
-; IS__TUNIT_NPM-NEXT: store i32 197, i32* [[DOTOMP_UB]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[DOTOMP_STRIDE]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP2]])
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast i32* [[DOTOMP_IS_LAST]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP3]])
-; IS__TUNIT_NPM-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
-; IS__TUNIT_NPM-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP4]], 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__TUNIT_NPM-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
-; IS__TUNIT_NPM-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP5]], 197
-; IS__TUNIT_NPM-NEXT: [[COND:%.*]] = select i1 [[CMP4]], i32 197, i32 [[TMP5]]
-; IS__TUNIT_NPM-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
-; IS__TUNIT_NPM-NEXT: [[CMP513:%.*]] = icmp sgt i32 [[TMP6]], [[COND]]
-; IS__TUNIT_NPM-NEXT: br i1 [[CMP513]], label [[OMP_LOOP_EXIT:%.*]], label [[OMP_INNER_FOR_BODY_LR_PH:%.*]]
-; IS__TUNIT_NPM: omp.inner.for.body.lr.ph:
-; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = load float*, float** [[B]], align 8
-; IS__TUNIT_NPM-NEXT: [[TMP8:%.*]] = load float*, float** [[A]], align 8
-; IS__TUNIT_NPM-NEXT: [[TMP9:%.*]] = sext i32 [[TMP6]] to i64
-; IS__TUNIT_NPM-NEXT: [[TMP10:%.*]] = sext i32 [[COND]] to i64
-; IS__TUNIT_NPM-NEXT: br label [[OMP_INNER_FOR_BODY:%.*]]
-; IS__TUNIT_NPM: omp.inner.for.body:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[OMP_INNER_FOR_BODY]] ], [ [[TMP9]], [[OMP_INNER_FOR_BODY_LR_PH]] ]
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds float, float* [[TMP7]], i64 [[INDVARS_IV_NEXT]]
-; IS__TUNIT_NPM-NEXT: [[TMP11:%.*]] = load float, float* [[ARRAYIDX]], align 4
-; IS__TUNIT_NPM-NEXT: [[CONV7:%.*]] = fadd float [[TMP11]], 1.000000e+00
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds float, float* [[TMP8]], i64 [[INDVARS_IV_NEXT]]
-; IS__TUNIT_NPM-NEXT: store float [[CONV7]], float* [[ARRAYIDX9]], align 4
-; IS__TUNIT_NPM-NEXT: [[CMP5:%.*]] = icmp slt i64 [[INDVARS_IV]], [[TMP10]]
-; IS__TUNIT_NPM-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY]], label [[OMP_LOOP_EXIT]]
-; IS__TUNIT_NPM: omp.loop.exit:
-; IS__TUNIT_NPM-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP4]])
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP3]])
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP2]])
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP0]])
-; IS__TUNIT_NPM-NEXT: br label [[OMP_PRECOND_END:%.*]]
-; IS__TUNIT_NPM: omp.precond.end:
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: alwaysinline nofree norecurse nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@.omp_outlined.
+; TUNIT-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) [[N:%.*]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: br label [[OMP_PRECOND_THEN:%.*]]
+; TUNIT: omp.precond.then:
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast i32* [[DOTOMP_LB]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP0]])
+; TUNIT-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = bitcast i32* [[DOTOMP_UB]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
+; TUNIT-NEXT: store i32 197, i32* [[DOTOMP_UB]], align 4
+; TUNIT-NEXT: [[TMP2:%.*]] = bitcast i32* [[DOTOMP_STRIDE]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP2]])
+; TUNIT-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
+; TUNIT-NEXT: [[TMP3:%.*]] = bitcast i32* [[DOTOMP_IS_LAST]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP3]])
+; TUNIT-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
+; TUNIT-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
+; TUNIT-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP4]], 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)
+; TUNIT-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
+; TUNIT-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP5]], 197
+; TUNIT-NEXT: [[COND:%.*]] = select i1 [[CMP4]], i32 197, i32 [[TMP5]]
+; TUNIT-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
+; TUNIT-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
+; TUNIT-NEXT: [[CMP513:%.*]] = icmp sgt i32 [[TMP6]], [[COND]]
+; TUNIT-NEXT: br i1 [[CMP513]], label [[OMP_LOOP_EXIT:%.*]], label [[OMP_INNER_FOR_BODY_LR_PH:%.*]]
+; TUNIT: omp.inner.for.body.lr.ph:
+; TUNIT-NEXT: [[TMP7:%.*]] = load float*, float** [[B]], align 8
+; TUNIT-NEXT: [[TMP8:%.*]] = load float*, float** [[A]], align 8
+; TUNIT-NEXT: [[TMP9:%.*]] = sext i32 [[TMP6]] to i64
+; TUNIT-NEXT: [[TMP10:%.*]] = sext i32 [[COND]] to i64
+; TUNIT-NEXT: br label [[OMP_INNER_FOR_BODY:%.*]]
+; TUNIT: omp.inner.for.body:
+; TUNIT-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[OMP_INNER_FOR_BODY]] ], [ [[TMP9]], [[OMP_INNER_FOR_BODY_LR_PH]] ]
+; TUNIT-NEXT: [[INDVARS_IV_NEXT]] = add nsw i64 [[INDVARS_IV]], 1
+; TUNIT-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds float, float* [[TMP7]], i64 [[INDVARS_IV_NEXT]]
+; TUNIT-NEXT: [[TMP11:%.*]] = load float, float* [[ARRAYIDX]], align 4
+; TUNIT-NEXT: [[CONV7:%.*]] = fadd float [[TMP11]], 1.000000e+00
+; TUNIT-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds float, float* [[TMP8]], i64 [[INDVARS_IV_NEXT]]
+; TUNIT-NEXT: store float [[CONV7]], float* [[ARRAYIDX9]], align 4
+; TUNIT-NEXT: [[CMP5:%.*]] = icmp slt i64 [[INDVARS_IV]], [[TMP10]]
+; TUNIT-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY]], label [[OMP_LOOP_EXIT]]
+; TUNIT: omp.loop.exit:
+; TUNIT-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP4]])
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP3]])
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP2]])
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP0]])
+; TUNIT-NEXT: br label [[OMP_PRECOND_END:%.*]]
+; TUNIT: omp.precond.end:
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: alwaysinline nofree norecurse nounwind uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@.omp_outlined.
-; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[N:%.*]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[N]], align 4
-; IS__CGSCC_NPM-NEXT: [[SUB2:%.*]] = add nsw i32 [[TMP0]], -2
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP0]], 1
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
-; IS__CGSCC_NPM: omp.precond.then:
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[DOTOMP_LB]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
-; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[DOTOMP_UB]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP2]])
-; IS__CGSCC_NPM-NEXT: store i32 [[SUB2]], i32* [[DOTOMP_UB]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast i32* [[DOTOMP_STRIDE]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP3]])
-; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = bitcast i32* [[DOTOMP_IS_LAST]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP4]])
-; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
-; IS__CGSCC_NPM-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], 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__CGSCC_NPM-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
-; IS__CGSCC_NPM-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP6]], [[SUB2]]
-; IS__CGSCC_NPM-NEXT: [[COND:%.*]] = select i1 [[CMP4]], i32 [[SUB2]], i32 [[TMP6]]
-; IS__CGSCC_NPM-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
-; IS__CGSCC_NPM-NEXT: [[CMP513:%.*]] = icmp sgt i32 [[TMP7]], [[COND]]
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP513]], label [[OMP_LOOP_EXIT:%.*]], label [[OMP_INNER_FOR_BODY_LR_PH:%.*]]
-; IS__CGSCC_NPM: omp.inner.for.body.lr.ph:
-; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = load float*, float** [[B]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = load float*, float** [[A]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP10:%.*]] = sext i32 [[TMP7]] to i64
-; IS__CGSCC_NPM-NEXT: [[TMP11:%.*]] = sext i32 [[COND]] to i64
-; IS__CGSCC_NPM-NEXT: br label [[OMP_INNER_FOR_BODY:%.*]]
-; IS__CGSCC_NPM: omp.inner.for.body:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[OMP_INNER_FOR_BODY]] ], [ [[TMP10]], [[OMP_INNER_FOR_BODY_LR_PH]] ]
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nsw i64 [[INDVARS_IV]], 1
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds float, float* [[TMP8]], i64 [[INDVARS_IV_NEXT]]
-; IS__CGSCC_NPM-NEXT: [[TMP12:%.*]] = load float, float* [[ARRAYIDX]], align 4
-; IS__CGSCC_NPM-NEXT: [[CONV7:%.*]] = fadd float [[TMP12]], 1.000000e+00
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds float, float* [[TMP9]], i64 [[INDVARS_IV_NEXT]]
-; IS__CGSCC_NPM-NEXT: store float [[CONV7]], float* [[ARRAYIDX9]], align 4
-; IS__CGSCC_NPM-NEXT: [[CMP5:%.*]] = icmp slt i64 [[INDVARS_IV]], [[TMP11]]
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY]], label [[OMP_LOOP_EXIT]]
-; IS__CGSCC_NPM: omp.loop.exit:
-; IS__CGSCC_NPM-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP5]])
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP4]])
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP3]])
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP2]])
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
-; IS__CGSCC_NPM-NEXT: br label [[OMP_PRECOND_END]]
-; IS__CGSCC_NPM: omp.precond.end:
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: alwaysinline nofree norecurse nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@.omp_outlined.
+; CGSCC-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[N:%.*]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[N]], align 4
+; CGSCC-NEXT: [[SUB2:%.*]] = add nsw i32 [[TMP0]], -2
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP0]], 1
+; CGSCC-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
+; CGSCC: omp.precond.then:
+; CGSCC-NEXT: [[TMP1:%.*]] = bitcast i32* [[DOTOMP_LB]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
+; CGSCC-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
+; CGSCC-NEXT: [[TMP2:%.*]] = bitcast i32* [[DOTOMP_UB]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP2]])
+; CGSCC-NEXT: store i32 [[SUB2]], i32* [[DOTOMP_UB]], align 4
+; CGSCC-NEXT: [[TMP3:%.*]] = bitcast i32* [[DOTOMP_STRIDE]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP3]])
+; CGSCC-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
+; CGSCC-NEXT: [[TMP4:%.*]] = bitcast i32* [[DOTOMP_IS_LAST]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP4]])
+; CGSCC-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
+; CGSCC-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
+; CGSCC-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], 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)
+; CGSCC-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
+; CGSCC-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP6]], [[SUB2]]
+; CGSCC-NEXT: [[COND:%.*]] = select i1 [[CMP4]], i32 [[SUB2]], i32 [[TMP6]]
+; CGSCC-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
+; CGSCC-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
+; CGSCC-NEXT: [[CMP513:%.*]] = icmp sgt i32 [[TMP7]], [[COND]]
+; CGSCC-NEXT: br i1 [[CMP513]], label [[OMP_LOOP_EXIT:%.*]], label [[OMP_INNER_FOR_BODY_LR_PH:%.*]]
+; CGSCC: omp.inner.for.body.lr.ph:
+; CGSCC-NEXT: [[TMP8:%.*]] = load float*, float** [[B]], align 8
+; CGSCC-NEXT: [[TMP9:%.*]] = load float*, float** [[A]], align 8
+; CGSCC-NEXT: [[TMP10:%.*]] = sext i32 [[TMP7]] to i64
+; CGSCC-NEXT: [[TMP11:%.*]] = sext i32 [[COND]] to i64
+; CGSCC-NEXT: br label [[OMP_INNER_FOR_BODY:%.*]]
+; CGSCC: omp.inner.for.body:
+; CGSCC-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[OMP_INNER_FOR_BODY]] ], [ [[TMP10]], [[OMP_INNER_FOR_BODY_LR_PH]] ]
+; CGSCC-NEXT: [[INDVARS_IV_NEXT]] = add nsw i64 [[INDVARS_IV]], 1
+; CGSCC-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds float, float* [[TMP8]], i64 [[INDVARS_IV_NEXT]]
+; CGSCC-NEXT: [[TMP12:%.*]] = load float, float* [[ARRAYIDX]], align 4
+; CGSCC-NEXT: [[CONV7:%.*]] = fadd float [[TMP12]], 1.000000e+00
+; CGSCC-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds float, float* [[TMP9]], i64 [[INDVARS_IV_NEXT]]
+; CGSCC-NEXT: store float [[CONV7]], float* [[ARRAYIDX9]], align 4
+; CGSCC-NEXT: [[CMP5:%.*]] = icmp slt i64 [[INDVARS_IV]], [[TMP11]]
+; CGSCC-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY]], label [[OMP_LOOP_EXIT]]
+; CGSCC: omp.loop.exit:
+; CGSCC-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP5]])
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP4]])
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP3]])
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP2]])
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[TMP1]])
+; CGSCC-NEXT: br label [[OMP_PRECOND_END]]
+; CGSCC: omp.precond.end:
+; CGSCC-NEXT: ret void
;
entry:
%.omp.lb = alloca i32, align 4
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
%struct.test.b = type { i32, i32 }
%struct.test.a = type { %struct.test.b, i32, i8*}
define void @foo(i8* %ptr) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[TMP0:%.*]] = alloca [[STRUCT_TEST_A:%.*]], align 8
-; IS__TUNIT____-NEXT: br label [[CALL_BR:%.*]]
-; IS__TUNIT____: call.br:
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_TEST_A]], %struct.test.a* [[TMP0]], i64 0, i32 2
-; IS__TUNIT____-NEXT: tail call void @bar(%struct.test.a* noalias nocapture nofree noundef nonnull readonly byval([[STRUCT_TEST_A]]) align 8 dereferenceable(24) [[TMP0]]) #[[ATTR2:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (i8* nocapture nofree readnone [[PTR:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = alloca [[STRUCT_TEST_A:%.*]], align 8
+; TUNIT-NEXT: br label [[CALL_BR:%.*]]
+; TUNIT: call.br:
+; TUNIT-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_TEST_A]], %struct.test.a* [[TMP0]], i64 0, i32 2
+; TUNIT-NEXT: tail call void @bar(%struct.test.a* noalias nocapture nofree noundef nonnull readonly byval([[STRUCT_TEST_A]]) align 8 dereferenceable(24) [[TMP0]]) #[[ATTR2:[0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = alloca [[STRUCT_TEST_A:%.*]], align 8
-; IS__CGSCC____-NEXT: br label [[CALL_BR:%.*]]
-; IS__CGSCC____: call.br:
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_TEST_A]], %struct.test.a* [[TMP0]], i64 0, i32 2
-; IS__CGSCC____-NEXT: store i8* [[PTR]], i8** [[TMP1]], align 8
-; IS__CGSCC____-NEXT: tail call void @bar(%struct.test.a* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_TEST_A]]) align 8 dereferenceable(24) [[TMP0]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = alloca [[STRUCT_TEST_A:%.*]], align 8
+; CGSCC-NEXT: br label [[CALL_BR:%.*]]
+; CGSCC: call.br:
+; CGSCC-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_TEST_A]], %struct.test.a* [[TMP0]], i64 0, i32 2
+; CGSCC-NEXT: store i8* [[PTR]], i8** [[TMP1]], align 8
+; CGSCC-NEXT: tail call void @bar(%struct.test.a* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_TEST_A]]) align 8 dereferenceable(24) [[TMP0]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret void
;
entry:
%0 = alloca %struct.test.a, align 8
ret void
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR2]] = { nounwind willreturn writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; Test for multiple potential values
;
; bool potential_test1(bool c) { return iszero(c ? 1 : -1); }
define internal i1 @iszero1(i32 %c) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero1
-; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0
-; IS__CGSCC____-NEXT: ret i1 [[CMP]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@iszero1
+; CGSCC-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%cmp = icmp eq i32 %c, 0
ret i1 %cmp
}
define i1 @potential_test1(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test1
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: ret i1 false
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test1
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[ARG:%.*]] = select i1 [[C]], i32 -1, i32 1
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i1 @iszero1(i32 noundef [[ARG]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test1
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: ret i1 false
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test1
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[ARG:%.*]] = select i1 [[C]], i32 -1, i32 1
+; CGSCC-NEXT: [[RET:%.*]] = call i1 @iszero1(i32 noundef [[ARG]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: ret i1 [[RET]]
;
%arg = select i1 %c, i32 -1, i32 1
%ret = call i1 @iszero1(i32 %arg)
}
define internal i32 @call_with_two_values(i32 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@call_with_two_values
-; IS__TUNIT_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @iszero2(i32 noundef [[C]]) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[MINUSC:%.*]] = sub i32 0, [[C]]
-; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @iszero2(i32 [[MINUSC]]) #[[ATTR1]], !range [[RNG0]]
-; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@call_with_two_values
-; IS__CGSCC_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @iszero2(i32 noundef [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[MINUSC:%.*]] = sub i32 0, [[C]]
-; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @iszero2(i32 [[MINUSC]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@call_with_two_values
+; TUNIT-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[CSRET1:%.*]] = call i32 @iszero2(i32 noundef [[C]]) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]]
+; TUNIT-NEXT: [[MINUSC:%.*]] = sub i32 0, [[C]]
+; TUNIT-NEXT: [[CSRET2:%.*]] = call i32 @iszero2(i32 [[MINUSC]]) #[[ATTR1]], !range [[RNG0]]
+; TUNIT-NEXT: [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
+; TUNIT-NEXT: ret i32 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@call_with_two_values
+; CGSCC-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[CSRET1:%.*]] = call i32 @iszero2(i32 noundef [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[MINUSC:%.*]] = sub i32 0, [[C]]
+; CGSCC-NEXT: [[CSRET2:%.*]] = call i32 @iszero2(i32 [[MINUSC]]) #[[ATTR2]]
+; CGSCC-NEXT: [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
+; CGSCC-NEXT: ret i32 [[RET]]
;
%csret1 = call i32 @iszero2(i32 %c)
%minusc = sub i32 0, %c
}
define i32 @potential_test2(i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test2
-; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @call_with_two_values(i32 noundef 1) #[[ATTR1]], !range [[RNG1:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @call_with_two_values(i32 noundef -1) #[[ATTR1]], !range [[RNG1]]
-; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test2
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @call_with_two_values(i32 noundef 1) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @call_with_two_values(i32 noundef -1) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test2
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[CSRET1:%.*]] = call i32 @call_with_two_values(i32 noundef 1) #[[ATTR1]], !range [[RNG1:![0-9]+]]
+; TUNIT-NEXT: [[CSRET2:%.*]] = call i32 @call_with_two_values(i32 noundef -1) #[[ATTR1]], !range [[RNG1]]
+; TUNIT-NEXT: [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
+; TUNIT-NEXT: ret i32 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test2
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[CSRET1:%.*]] = call i32 @call_with_two_values(i32 noundef 1) #[[ATTR2]]
+; CGSCC-NEXT: [[CSRET2:%.*]] = call i32 @call_with_two_values(i32 noundef -1) #[[ATTR2]]
+; CGSCC-NEXT: [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
+; CGSCC-NEXT: ret i32 [[RET]]
;
%csret1 = call i32 @call_with_two_values(i32 1)
%csret2 = call i32 @call_with_two_values(i32 -1)
; int potential_test3() { return zero_or_one(iszero(0))+zero_or_one(iszero(1)); }
define internal i32 @iszero3(i32 %c) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero3
-; 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]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@iszero3
+; CGSCC-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0
+; CGSCC-NEXT: [[RET:%.*]] = zext i1 [[CMP]] to i32
+; CGSCC-NEXT: ret i32 [[RET]]
;
%cmp = icmp eq i32 %c, 0
%ret = zext i1 %cmp to i32
}
define internal i32 @less_than_two(i32 %c) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@less_than_two
-; IS__CGSCC____-SAME: (i32 [[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]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@less_than_two
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 2
+; CGSCC-NEXT: [[RET:%.*]] = zext i1 [[CMP]] to i32
+; CGSCC-NEXT: ret i32 [[RET]]
;
%cmp = icmp slt i32 %c, 2
%ret = zext i1 %cmp to i32
}
define i32 @potential_test3() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test3
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i32 2
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test3
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = call i32 @iszero3(i32 noundef 0) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 [[CMP1]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = call i32 @iszero3(i32 noundef 1) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 [[CMP2]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = add i32 [[TRUE1]], [[TRUE2]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test3
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: ret i32 2
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test3
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: [[CMP1:%.*]] = call i32 @iszero3(i32 noundef 0) #[[ATTR2]]
+; CGSCC-NEXT: [[TRUE1:%.*]] = call i32 @less_than_two(i32 [[CMP1]]) #[[ATTR2]]
+; CGSCC-NEXT: [[CMP2:%.*]] = call i32 @iszero3(i32 noundef 1) #[[ATTR2]]
+; CGSCC-NEXT: [[TRUE2:%.*]] = call i32 @less_than_two(i32 [[CMP2]]) #[[ATTR2]]
+; CGSCC-NEXT: [[RET:%.*]] = add i32 [[TRUE1]], [[TRUE2]]
+; CGSCC-NEXT: ret i32 [[RET]]
;
%cmp1 = call i32 @iszero3(i32 0)
%true1 = call i32 @less_than_two(i32 %cmp1)
; int potential_test7(int c) { return return1or3(c) == return3or4(c); }
define i32 @potential_test4(i32 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test4
-; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: [[CSRET:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT: [[FALSE:%.*]] = icmp eq i32 [[CSRET]], 2
-; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = zext i1 [[FALSE]] to i32
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test4
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[FALSE:%.*]] = icmp eq i32 [[CSRET]], 2
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = zext i1 [[FALSE]] to i32
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test4
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[CSRET:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]]
+; TUNIT-NEXT: [[FALSE:%.*]] = icmp eq i32 [[CSRET]], 2
+; TUNIT-NEXT: [[RET:%.*]] = zext i1 [[FALSE]] to i32
+; TUNIT-NEXT: ret i32 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test4
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[CSRET:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[FALSE:%.*]] = icmp eq i32 [[CSRET]], 2
+; CGSCC-NEXT: [[RET:%.*]] = zext i1 [[FALSE]] to i32
+; CGSCC-NEXT: ret i32 [[RET]]
;
%csret = call i32 @return1or3(i32 %c)
%false = icmp eq i32 %csret, 2
}
define i32 @potential_test5(i32 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test5
-; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return2or4(i32 [[C]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT: [[FALSE:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
-; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = zext i1 [[FALSE]] to i32
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test5
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return2or4(i32 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[FALSE:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = zext i1 [[FALSE]] to i32
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test5
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]]
+; TUNIT-NEXT: [[CSRET2:%.*]] = call i32 @return2or4(i32 [[C]]) #[[ATTR1]]
+; TUNIT-NEXT: [[FALSE:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
+; TUNIT-NEXT: [[RET:%.*]] = zext i1 [[FALSE]] to i32
+; TUNIT-NEXT: ret i32 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test5
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[CSRET2:%.*]] = call i32 @return2or4(i32 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[FALSE:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
+; CGSCC-NEXT: [[RET:%.*]] = zext i1 [[FALSE]] to i32
+; CGSCC-NEXT: ret i32 [[RET]]
;
%csret1 = call i32 @return1or3(i32 %c)
%csret2 = call i32 @return2or4(i32 %c)
}
define i1 @potential_test6(i32 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3
-; IS__TUNIT_NPM-NEXT: ret i1 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test6
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3
-; IS__CGSCC_NPM-NEXT: ret i1 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test6
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]]
+; TUNIT-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3
+; TUNIT-NEXT: ret i1 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test6
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3
+; CGSCC-NEXT: ret i1 [[RET]]
;
%csret1 = call i32 @return1or3(i32 %c)
%ret = icmp eq i32 %csret1, 3
}
define i1 @potential_test7(i32 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test7
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test7
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]]
+; TUNIT-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR1]]
+; TUNIT-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
+; TUNIT-NEXT: ret i1 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test7
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
+; CGSCC-NEXT: ret i1 [[RET]]
;
%csret1 = call i32 @return1or3(i32 %c)
%csret2 = call i32 @return3or4(i32 %c)
; propagate argument to callsite argument
define internal i1 @cmp_with_four(i32 %c) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@cmp_with_four
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 4
-; IS__CGSCC____-NEXT: ret i1 [[CMP]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cmp_with_four
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 4
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%cmp = icmp eq i32 %c, 4
ret i1 %cmp
}
define internal i1 @wrapper(i32 %c) {
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@wrapper
-; IS__CGSCC_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i1 @cmp_with_four(i32 noundef [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[RET]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@wrapper
+; CGSCC-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[RET:%.*]] = call i1 @cmp_with_four(i32 noundef [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: ret i1 [[RET]]
;
%ret = call i1 @cmp_with_four(i32 %c)
ret i1 %ret
}
define i1 @potential_test8() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test8
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i1 false
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test8
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[RES1:%.*]] = call i1 @wrapper(i32 noundef 1) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[RES3:%.*]] = call i1 @wrapper(i32 noundef 3) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[RES5:%.*]] = call i1 @wrapper(i32 noundef 5) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[RES13:%.*]] = or i1 [[RES1]], [[RES3]]
-; IS__CGSCC_NPM-NEXT: [[RES135:%.*]] = or i1 [[RES13]], [[RES5]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[RES135]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test8
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: ret i1 false
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test8
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: [[RES1:%.*]] = call i1 @wrapper(i32 noundef 1) #[[ATTR2]]
+; CGSCC-NEXT: [[RES3:%.*]] = call i1 @wrapper(i32 noundef 3) #[[ATTR2]]
+; CGSCC-NEXT: [[RES5:%.*]] = call i1 @wrapper(i32 noundef 5) #[[ATTR2]]
+; CGSCC-NEXT: [[RES13:%.*]] = or i1 [[RES1]], [[RES3]]
+; CGSCC-NEXT: [[RES135:%.*]] = or i1 [[RES13]], [[RES5]]
+; CGSCC-NEXT: ret i1 [[RES135]]
;
%res1 = call i1 @wrapper(i32 1)
%res3 = call i1 @wrapper(i32 3)
}
define i1 @potential_test9() {
-; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@potential_test9
-; IS________NPM-SAME: () #[[ATTR0]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: br label [[COND:%.*]]
-; IS________NPM: cond:
-; IS________NPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[I_1:%.*]], [[INC:%.*]] ]
-; IS________NPM-NEXT: [[C_0:%.*]] = phi i32 [ 1, [[ENTRY]] ], [ [[C_1:%.*]], [[INC]] ]
-; IS________NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 10
-; IS________NPM-NEXT: br i1 [[CMP]], label [[BODY:%.*]], label [[END:%.*]]
-; IS________NPM: body:
-; IS________NPM-NEXT: [[C_1]] = mul i32 [[C_0]], -1
-; IS________NPM-NEXT: br label [[INC]]
-; IS________NPM: inc:
-; IS________NPM-NEXT: [[I_1]] = add i32 [[I_0]], 1
-; IS________NPM-NEXT: br label [[COND]]
-; IS________NPM: end:
-; IS________NPM-NEXT: [[RET:%.*]] = icmp eq i32 [[C_0]], 0
-; IS________NPM-NEXT: ret i1 [[RET]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@potential_test9
+; CHECK-SAME: () #[[ATTR0]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[COND:%.*]]
+; CHECK: cond:
+; CHECK-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[I_1:%.*]], [[INC:%.*]] ]
+; CHECK-NEXT: [[C_0:%.*]] = phi i32 [ 1, [[ENTRY]] ], [ [[C_1:%.*]], [[INC]] ]
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 10
+; CHECK-NEXT: br i1 [[CMP]], label [[BODY:%.*]], label [[END:%.*]]
+; CHECK: body:
+; CHECK-NEXT: [[C_1]] = mul i32 [[C_0]], -1
+; CHECK-NEXT: br label [[INC]]
+; CHECK: inc:
+; CHECK-NEXT: [[I_1]] = add i32 [[I_0]], 1
+; CHECK-NEXT: br label [[COND]]
+; CHECK: end:
+; CHECK-NEXT: [[RET:%.*]] = icmp eq i32 [[C_0]], 0
+; CHECK-NEXT: ret i1 [[RET]]
;
entry:
br label %cond
}
define i1 @potential_test10(i32 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test10
-; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: [[RET:%.*]] = call i32 @may_return_undef(i32 [[C]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[RET]], 0
-; IS__TUNIT_NPM-NEXT: ret i1 [[CMP]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test10
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @may_return_undef(i32 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[RET]], 0
-; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test10
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[RET:%.*]] = call i32 @may_return_undef(i32 [[C]]) #[[ATTR1]]
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32 [[RET]], 0
+; TUNIT-NEXT: ret i1 [[CMP]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test10
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[RET:%.*]] = call i32 @may_return_undef(i32 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32 [[RET]], 0
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%ret = call i32 @may_return_undef(i32 %c)
%cmp = icmp eq i32 %ret, 0
; FIXME: returned value can be simplified to 0
define i32 @potential_test11(i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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]]) #[[ATTR1]], !range [[RNG0]]
-; IS__TUNIT_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR1]], !range [[RNG2:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR1]], !range [[RNG0]]
-; IS__TUNIT_NPM-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]]
-; IS__TUNIT_NPM-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[ACC2]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test11
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR2]]
-; 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test11
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR1]], !range [[RNG0]]
+; TUNIT-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR1]], !range [[RNG2:![0-9]+]]
+; TUNIT-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR1]], !range [[RNG0]]
+; TUNIT-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]]
+; TUNIT-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]]
+; TUNIT-NEXT: ret i32 [[ACC2]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test11
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]]
+; CGSCC-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]]
+; CGSCC-NEXT: ret i32 [[ACC2]]
;
%zero1 = call i32 @optimize_undef_1(i1 %c)
%zero2 = call i32 @optimize_undef_2(i1 %c)
; FIXME: returned value can be simplified to 0
define i32 @potential_test12(i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test12
-; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test12
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test12
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[ZERO:%.*]] = call i32 @optimize_poison_1(i1 [[C]]) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[ZERO]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test12
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[ZERO:%.*]] = call i32 @optimize_poison_1(i1 [[C]]) #[[ATTR2]]
+; CGSCC-NEXT: ret i32 [[ZERO]]
;
%zero = call i32 @optimize_poison_1(i1 %c)
ret i32 %zero
}
define i32 @potential_test13_caller1() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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) #[[ATTR1]], !range [[RNG0]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller1
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test13_caller1
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR1]], !range [[RNG0]]
+; TUNIT-NEXT: ret i32 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test13_caller1
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR2]]
+; CGSCC-NEXT: ret i32 [[RET]]
;
%ret = call i32 @potential_test13_callee(i32 0)
ret i32 %ret
}
define i32 @potential_test13_caller2() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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) #[[ATTR1]], !range [[RNG0]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller2
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test13_caller2
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR1]], !range [[RNG0]]
+; TUNIT-NEXT: ret i32 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test13_caller2
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR2]]
+; CGSCC-NEXT: ret i32 [[RET]]
;
%ret = call i32 @potential_test13_callee(i32 1)
ret i32 %ret
}
define i32 @potential_test13_caller3() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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) #[[ATTR1]], !range [[RNG0]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller3
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR2]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@potential_test13_caller3
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR1]], !range [[RNG0]]
+; TUNIT-NEXT: ret i32 [[RET]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@potential_test13_caller3
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR2]]
+; CGSCC-NEXT: ret i32 [[RET]]
;
%ret = call i32 @potential_test13_callee(i32 undef)
ret i32 %ret
}
;.
-; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readnone willreturn }
;.
-; IS__TUNIT____: [[META0:![0-9]+]] = !{i32 0, i32 2}
-; IS__TUNIT____: [[META1:![0-9]+]] = !{i32 0, i32 3}
-; IS__TUNIT____: [[META2:![0-9]+]] = !{i32 -1, i32 1}
+; TUNIT: [[META0:![0-9]+]] = !{i32 0, i32 2}
+; TUNIT: [[META1:![0-9]+]] = !{i32 0, i32 3}
+; TUNIT: [[META2:![0-9]+]] = !{i32 -1, i32 1}
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; FIXME: CGSCC is not looking at callees and calleers even though it could be allowed.
}
define i32 @test0-range-check(i32* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test0-range-check
-; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR3:[0-9]+]], !range [[RNG0]]
-; IS__TUNIT____-NEXT: ret i32 [[A]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test0-range-check
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[A]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test0-range-check
+; TUNIT-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR3:[0-9]+]], !range [[RNG0]]
+; TUNIT-NEXT: ret i32 [[A]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test0-range-check
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[A:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[A]]
;
%a = tail call i32 @test0(i32* %p)
ret i32 %a
; TEST0 icmp test
define void @test0-icmp-check(i32* %p){
; ret = [0, 10)
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test0-icmp-check
-; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) {
-; IS__TUNIT____-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR3]], !range [[RNG0]]
-; IS__TUNIT____-NEXT: [[CMP_EQ_1:%.*]] = icmp eq i32 [[RET]], 10
-; IS__TUNIT____-NEXT: [[CMP_EQ_2:%.*]] = icmp eq i32 [[RET]], 9
-; IS__TUNIT____-NEXT: [[CMP_EQ_3:%.*]] = icmp eq i32 [[RET]], 8
-; IS__TUNIT____-NEXT: [[CMP_EQ_4:%.*]] = icmp eq i32 [[RET]], 1
-; IS__TUNIT____-NEXT: [[CMP_EQ_5:%.*]] = icmp eq i32 [[RET]], 0
-; IS__TUNIT____-NEXT: [[CMP_EQ_6:%.*]] = icmp eq i32 [[RET]], -1
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_EQ_1]], i1 [[CMP_EQ_2]], i1 [[CMP_EQ_3]])
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_EQ_4]], i1 [[CMP_EQ_5]], i1 [[CMP_EQ_6]])
-; IS__TUNIT____-NEXT: [[CMP_NE_1:%.*]] = icmp ne i32 [[RET]], 10
-; IS__TUNIT____-NEXT: [[CMP_NE_2:%.*]] = icmp ne i32 [[RET]], 9
-; IS__TUNIT____-NEXT: [[CMP_NE_3:%.*]] = icmp ne i32 [[RET]], 8
-; IS__TUNIT____-NEXT: [[CMP_NE_4:%.*]] = icmp ne i32 [[RET]], 1
-; IS__TUNIT____-NEXT: [[CMP_NE_5:%.*]] = icmp ne i32 [[RET]], 0
-; IS__TUNIT____-NEXT: [[CMP_NE_6:%.*]] = icmp ne i32 [[RET]], -1
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_NE_1]], i1 [[CMP_NE_2]], i1 [[CMP_NE_3]])
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_NE_4]], i1 [[CMP_NE_5]], i1 [[CMP_NE_6]])
-; IS__TUNIT____-NEXT: [[CMP_UGT_1:%.*]] = icmp ugt i32 [[RET]], 10
-; IS__TUNIT____-NEXT: [[CMP_UGT_2:%.*]] = icmp ugt i32 [[RET]], 9
-; IS__TUNIT____-NEXT: [[CMP_UGT_3:%.*]] = icmp ugt i32 [[RET]], 8
-; IS__TUNIT____-NEXT: [[CMP_UGT_4:%.*]] = icmp ugt i32 [[RET]], 1
-; IS__TUNIT____-NEXT: [[CMP_UGT_5:%.*]] = icmp ugt i32 [[RET]], 0
-; IS__TUNIT____-NEXT: [[CMP_UGT_6:%.*]] = icmp ugt i32 [[RET]], -1
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_UGT_1]], i1 [[CMP_UGT_2]], i1 [[CMP_UGT_3]])
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_UGT_4]], i1 [[CMP_UGT_5]], i1 [[CMP_UGT_6]])
-; IS__TUNIT____-NEXT: [[CMP_UGE_1:%.*]] = icmp uge i32 [[RET]], 10
-; IS__TUNIT____-NEXT: [[CMP_UGE_2:%.*]] = icmp uge i32 [[RET]], 9
-; IS__TUNIT____-NEXT: [[CMP_UGE_3:%.*]] = icmp uge i32 [[RET]], 8
-; IS__TUNIT____-NEXT: [[CMP_UGE_4:%.*]] = icmp uge i32 [[RET]], 1
-; IS__TUNIT____-NEXT: [[CMP_UGE_5:%.*]] = icmp uge i32 [[RET]], 0
-; IS__TUNIT____-NEXT: [[CMP_UGE_6:%.*]] = icmp uge i32 [[RET]], -1
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_UGE_1]], i1 [[CMP_UGE_2]], i1 [[CMP_UGE_3]])
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_UGE_4]], i1 [[CMP_UGE_5]], i1 [[CMP_UGE_6]])
-; IS__TUNIT____-NEXT: [[CMP_SGT_1:%.*]] = icmp sgt i32 [[RET]], 10
-; IS__TUNIT____-NEXT: [[CMP_SGT_2:%.*]] = icmp sgt i32 [[RET]], 9
-; IS__TUNIT____-NEXT: [[CMP_SGT_3:%.*]] = icmp sgt i32 [[RET]], 8
-; IS__TUNIT____-NEXT: [[CMP_SGT_4:%.*]] = icmp sgt i32 [[RET]], 1
-; IS__TUNIT____-NEXT: [[CMP_SGT_5:%.*]] = icmp sgt i32 [[RET]], 0
-; IS__TUNIT____-NEXT: [[CMP_SGT_6:%.*]] = icmp sgt i32 [[RET]], -1
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_SGT_1]], i1 [[CMP_SGT_2]], i1 [[CMP_SGT_3]])
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_SGT_4]], i1 [[CMP_SGT_5]], i1 [[CMP_SGT_6]])
-; IS__TUNIT____-NEXT: [[CMP_GTE_1:%.*]] = icmp sge i32 [[RET]], 10
-; IS__TUNIT____-NEXT: [[CMP_GTE_2:%.*]] = icmp sge i32 [[RET]], 9
-; IS__TUNIT____-NEXT: [[CMP_GTE_3:%.*]] = icmp sge i32 [[RET]], 8
-; IS__TUNIT____-NEXT: [[CMP_GTE_4:%.*]] = icmp sge i32 [[RET]], 1
-; IS__TUNIT____-NEXT: [[CMP_GTE_5:%.*]] = icmp sge i32 [[RET]], 0
-; IS__TUNIT____-NEXT: [[CMP_GTE_6:%.*]] = icmp sge i32 [[RET]], -1
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_GTE_1]], i1 [[CMP_GTE_2]], i1 [[CMP_GTE_3]])
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_GTE_4]], i1 [[CMP_GTE_5]], i1 [[CMP_GTE_6]])
-; IS__TUNIT____-NEXT: [[CMP_SLT_1:%.*]] = icmp slt i32 [[RET]], 10
-; IS__TUNIT____-NEXT: [[CMP_SLT_2:%.*]] = icmp slt i32 [[RET]], 9
-; IS__TUNIT____-NEXT: [[CMP_SLT_3:%.*]] = icmp slt i32 [[RET]], 8
-; IS__TUNIT____-NEXT: [[CMP_SLT_4:%.*]] = icmp slt i32 [[RET]], 1
-; IS__TUNIT____-NEXT: [[CMP_SLT_5:%.*]] = icmp slt i32 [[RET]], 0
-; IS__TUNIT____-NEXT: [[CMP_SLT_6:%.*]] = icmp slt i32 [[RET]], -1
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_SLT_1]], i1 [[CMP_SLT_2]], i1 [[CMP_SLT_3]])
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_SLT_4]], i1 [[CMP_SLT_5]], i1 [[CMP_SLT_6]])
-; IS__TUNIT____-NEXT: [[CMP_LTE_1:%.*]] = icmp sle i32 [[RET]], 10
-; IS__TUNIT____-NEXT: [[CMP_LTE_2:%.*]] = icmp sle i32 [[RET]], 9
-; IS__TUNIT____-NEXT: [[CMP_LTE_3:%.*]] = icmp sle i32 [[RET]], 8
-; IS__TUNIT____-NEXT: [[CMP_LTE_4:%.*]] = icmp sle i32 [[RET]], 1
-; IS__TUNIT____-NEXT: [[CMP_LTE_5:%.*]] = icmp sle i32 [[RET]], 0
-; IS__TUNIT____-NEXT: [[CMP_LTE_6:%.*]] = icmp sle i32 [[RET]], -1
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_LTE_1]], i1 [[CMP_LTE_2]], i1 [[CMP_LTE_3]])
-; IS__TUNIT____-NEXT: tail call void @use3(i1 [[CMP_LTE_4]], i1 [[CMP_LTE_5]], i1 [[CMP_LTE_6]])
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test0-icmp-check
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) {
-; IS__CGSCC____-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[CMP_EQ_1:%.*]] = icmp eq i32 [[RET]], 10
-; IS__CGSCC____-NEXT: [[CMP_EQ_2:%.*]] = icmp eq i32 [[RET]], 9
-; IS__CGSCC____-NEXT: [[CMP_EQ_3:%.*]] = icmp eq i32 [[RET]], 8
-; IS__CGSCC____-NEXT: [[CMP_EQ_4:%.*]] = icmp eq i32 [[RET]], 1
-; IS__CGSCC____-NEXT: [[CMP_EQ_5:%.*]] = icmp eq i32 [[RET]], 0
-; IS__CGSCC____-NEXT: [[CMP_EQ_6:%.*]] = icmp eq i32 [[RET]], -1
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_EQ_1]], i1 [[CMP_EQ_2]], i1 [[CMP_EQ_3]])
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_EQ_4]], i1 [[CMP_EQ_5]], i1 [[CMP_EQ_6]])
-; IS__CGSCC____-NEXT: [[CMP_NE_1:%.*]] = icmp ne i32 [[RET]], 10
-; IS__CGSCC____-NEXT: [[CMP_NE_2:%.*]] = icmp ne i32 [[RET]], 9
-; IS__CGSCC____-NEXT: [[CMP_NE_3:%.*]] = icmp ne i32 [[RET]], 8
-; IS__CGSCC____-NEXT: [[CMP_NE_4:%.*]] = icmp ne i32 [[RET]], 1
-; IS__CGSCC____-NEXT: [[CMP_NE_5:%.*]] = icmp ne i32 [[RET]], 0
-; IS__CGSCC____-NEXT: [[CMP_NE_6:%.*]] = icmp ne i32 [[RET]], -1
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_NE_1]], i1 [[CMP_NE_2]], i1 [[CMP_NE_3]])
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_NE_4]], i1 [[CMP_NE_5]], i1 [[CMP_NE_6]])
-; IS__CGSCC____-NEXT: [[CMP_UGT_1:%.*]] = icmp ugt i32 [[RET]], 10
-; IS__CGSCC____-NEXT: [[CMP_UGT_2:%.*]] = icmp ugt i32 [[RET]], 9
-; IS__CGSCC____-NEXT: [[CMP_UGT_3:%.*]] = icmp ugt i32 [[RET]], 8
-; IS__CGSCC____-NEXT: [[CMP_UGT_4:%.*]] = icmp ugt i32 [[RET]], 1
-; IS__CGSCC____-NEXT: [[CMP_UGT_5:%.*]] = icmp ugt i32 [[RET]], 0
-; IS__CGSCC____-NEXT: [[CMP_UGT_6:%.*]] = icmp ugt i32 [[RET]], -1
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_UGT_1]], i1 [[CMP_UGT_2]], i1 [[CMP_UGT_3]])
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_UGT_4]], i1 [[CMP_UGT_5]], i1 [[CMP_UGT_6]])
-; IS__CGSCC____-NEXT: [[CMP_UGE_1:%.*]] = icmp uge i32 [[RET]], 10
-; IS__CGSCC____-NEXT: [[CMP_UGE_2:%.*]] = icmp uge i32 [[RET]], 9
-; IS__CGSCC____-NEXT: [[CMP_UGE_3:%.*]] = icmp uge i32 [[RET]], 8
-; IS__CGSCC____-NEXT: [[CMP_UGE_4:%.*]] = icmp uge i32 [[RET]], 1
-; IS__CGSCC____-NEXT: [[CMP_UGE_5:%.*]] = icmp uge i32 [[RET]], 0
-; IS__CGSCC____-NEXT: [[CMP_UGE_6:%.*]] = icmp uge i32 [[RET]], -1
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_UGE_1]], i1 [[CMP_UGE_2]], i1 [[CMP_UGE_3]])
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_UGE_4]], i1 [[CMP_UGE_5]], i1 [[CMP_UGE_6]])
-; IS__CGSCC____-NEXT: [[CMP_SGT_1:%.*]] = icmp sgt i32 [[RET]], 10
-; IS__CGSCC____-NEXT: [[CMP_SGT_2:%.*]] = icmp sgt i32 [[RET]], 9
-; IS__CGSCC____-NEXT: [[CMP_SGT_3:%.*]] = icmp sgt i32 [[RET]], 8
-; IS__CGSCC____-NEXT: [[CMP_SGT_4:%.*]] = icmp sgt i32 [[RET]], 1
-; IS__CGSCC____-NEXT: [[CMP_SGT_5:%.*]] = icmp sgt i32 [[RET]], 0
-; IS__CGSCC____-NEXT: [[CMP_SGT_6:%.*]] = icmp sgt i32 [[RET]], -1
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_SGT_1]], i1 [[CMP_SGT_2]], i1 [[CMP_SGT_3]])
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_SGT_4]], i1 [[CMP_SGT_5]], i1 [[CMP_SGT_6]])
-; IS__CGSCC____-NEXT: [[CMP_GTE_1:%.*]] = icmp sge i32 [[RET]], 10
-; IS__CGSCC____-NEXT: [[CMP_GTE_2:%.*]] = icmp sge i32 [[RET]], 9
-; IS__CGSCC____-NEXT: [[CMP_GTE_3:%.*]] = icmp sge i32 [[RET]], 8
-; IS__CGSCC____-NEXT: [[CMP_GTE_4:%.*]] = icmp sge i32 [[RET]], 1
-; IS__CGSCC____-NEXT: [[CMP_GTE_5:%.*]] = icmp sge i32 [[RET]], 0
-; IS__CGSCC____-NEXT: [[CMP_GTE_6:%.*]] = icmp sge i32 [[RET]], -1
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_GTE_1]], i1 [[CMP_GTE_2]], i1 [[CMP_GTE_3]])
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_GTE_4]], i1 [[CMP_GTE_5]], i1 [[CMP_GTE_6]])
-; IS__CGSCC____-NEXT: [[CMP_SLT_1:%.*]] = icmp slt i32 [[RET]], 10
-; IS__CGSCC____-NEXT: [[CMP_SLT_2:%.*]] = icmp slt i32 [[RET]], 9
-; IS__CGSCC____-NEXT: [[CMP_SLT_3:%.*]] = icmp slt i32 [[RET]], 8
-; IS__CGSCC____-NEXT: [[CMP_SLT_4:%.*]] = icmp slt i32 [[RET]], 1
-; IS__CGSCC____-NEXT: [[CMP_SLT_5:%.*]] = icmp slt i32 [[RET]], 0
-; IS__CGSCC____-NEXT: [[CMP_SLT_6:%.*]] = icmp slt i32 [[RET]], -1
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_SLT_1]], i1 [[CMP_SLT_2]], i1 [[CMP_SLT_3]])
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_SLT_4]], i1 [[CMP_SLT_5]], i1 [[CMP_SLT_6]])
-; IS__CGSCC____-NEXT: [[CMP_LTE_1:%.*]] = icmp sle i32 [[RET]], 10
-; IS__CGSCC____-NEXT: [[CMP_LTE_2:%.*]] = icmp sle i32 [[RET]], 9
-; IS__CGSCC____-NEXT: [[CMP_LTE_3:%.*]] = icmp sle i32 [[RET]], 8
-; IS__CGSCC____-NEXT: [[CMP_LTE_4:%.*]] = icmp sle i32 [[RET]], 1
-; IS__CGSCC____-NEXT: [[CMP_LTE_5:%.*]] = icmp sle i32 [[RET]], 0
-; IS__CGSCC____-NEXT: [[CMP_LTE_6:%.*]] = icmp sle i32 [[RET]], -1
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_LTE_1]], i1 [[CMP_LTE_2]], i1 [[CMP_LTE_3]])
-; IS__CGSCC____-NEXT: tail call void @use3(i1 [[CMP_LTE_4]], i1 [[CMP_LTE_5]], i1 [[CMP_LTE_6]])
-; IS__CGSCC____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@test0-icmp-check
+; TUNIT-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) {
+; TUNIT-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR3]], !range [[RNG0]]
+; TUNIT-NEXT: [[CMP_EQ_1:%.*]] = icmp eq i32 [[RET]], 10
+; TUNIT-NEXT: [[CMP_EQ_2:%.*]] = icmp eq i32 [[RET]], 9
+; TUNIT-NEXT: [[CMP_EQ_3:%.*]] = icmp eq i32 [[RET]], 8
+; TUNIT-NEXT: [[CMP_EQ_4:%.*]] = icmp eq i32 [[RET]], 1
+; TUNIT-NEXT: [[CMP_EQ_5:%.*]] = icmp eq i32 [[RET]], 0
+; TUNIT-NEXT: [[CMP_EQ_6:%.*]] = icmp eq i32 [[RET]], -1
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_EQ_1]], i1 [[CMP_EQ_2]], i1 [[CMP_EQ_3]])
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_EQ_4]], i1 [[CMP_EQ_5]], i1 [[CMP_EQ_6]])
+; TUNIT-NEXT: [[CMP_NE_1:%.*]] = icmp ne i32 [[RET]], 10
+; TUNIT-NEXT: [[CMP_NE_2:%.*]] = icmp ne i32 [[RET]], 9
+; TUNIT-NEXT: [[CMP_NE_3:%.*]] = icmp ne i32 [[RET]], 8
+; TUNIT-NEXT: [[CMP_NE_4:%.*]] = icmp ne i32 [[RET]], 1
+; TUNIT-NEXT: [[CMP_NE_5:%.*]] = icmp ne i32 [[RET]], 0
+; TUNIT-NEXT: [[CMP_NE_6:%.*]] = icmp ne i32 [[RET]], -1
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_NE_1]], i1 [[CMP_NE_2]], i1 [[CMP_NE_3]])
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_NE_4]], i1 [[CMP_NE_5]], i1 [[CMP_NE_6]])
+; TUNIT-NEXT: [[CMP_UGT_1:%.*]] = icmp ugt i32 [[RET]], 10
+; TUNIT-NEXT: [[CMP_UGT_2:%.*]] = icmp ugt i32 [[RET]], 9
+; TUNIT-NEXT: [[CMP_UGT_3:%.*]] = icmp ugt i32 [[RET]], 8
+; TUNIT-NEXT: [[CMP_UGT_4:%.*]] = icmp ugt i32 [[RET]], 1
+; TUNIT-NEXT: [[CMP_UGT_5:%.*]] = icmp ugt i32 [[RET]], 0
+; TUNIT-NEXT: [[CMP_UGT_6:%.*]] = icmp ugt i32 [[RET]], -1
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_UGT_1]], i1 [[CMP_UGT_2]], i1 [[CMP_UGT_3]])
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_UGT_4]], i1 [[CMP_UGT_5]], i1 [[CMP_UGT_6]])
+; TUNIT-NEXT: [[CMP_UGE_1:%.*]] = icmp uge i32 [[RET]], 10
+; TUNIT-NEXT: [[CMP_UGE_2:%.*]] = icmp uge i32 [[RET]], 9
+; TUNIT-NEXT: [[CMP_UGE_3:%.*]] = icmp uge i32 [[RET]], 8
+; TUNIT-NEXT: [[CMP_UGE_4:%.*]] = icmp uge i32 [[RET]], 1
+; TUNIT-NEXT: [[CMP_UGE_5:%.*]] = icmp uge i32 [[RET]], 0
+; TUNIT-NEXT: [[CMP_UGE_6:%.*]] = icmp uge i32 [[RET]], -1
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_UGE_1]], i1 [[CMP_UGE_2]], i1 [[CMP_UGE_3]])
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_UGE_4]], i1 [[CMP_UGE_5]], i1 [[CMP_UGE_6]])
+; TUNIT-NEXT: [[CMP_SGT_1:%.*]] = icmp sgt i32 [[RET]], 10
+; TUNIT-NEXT: [[CMP_SGT_2:%.*]] = icmp sgt i32 [[RET]], 9
+; TUNIT-NEXT: [[CMP_SGT_3:%.*]] = icmp sgt i32 [[RET]], 8
+; TUNIT-NEXT: [[CMP_SGT_4:%.*]] = icmp sgt i32 [[RET]], 1
+; TUNIT-NEXT: [[CMP_SGT_5:%.*]] = icmp sgt i32 [[RET]], 0
+; TUNIT-NEXT: [[CMP_SGT_6:%.*]] = icmp sgt i32 [[RET]], -1
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_SGT_1]], i1 [[CMP_SGT_2]], i1 [[CMP_SGT_3]])
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_SGT_4]], i1 [[CMP_SGT_5]], i1 [[CMP_SGT_6]])
+; TUNIT-NEXT: [[CMP_GTE_1:%.*]] = icmp sge i32 [[RET]], 10
+; TUNIT-NEXT: [[CMP_GTE_2:%.*]] = icmp sge i32 [[RET]], 9
+; TUNIT-NEXT: [[CMP_GTE_3:%.*]] = icmp sge i32 [[RET]], 8
+; TUNIT-NEXT: [[CMP_GTE_4:%.*]] = icmp sge i32 [[RET]], 1
+; TUNIT-NEXT: [[CMP_GTE_5:%.*]] = icmp sge i32 [[RET]], 0
+; TUNIT-NEXT: [[CMP_GTE_6:%.*]] = icmp sge i32 [[RET]], -1
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_GTE_1]], i1 [[CMP_GTE_2]], i1 [[CMP_GTE_3]])
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_GTE_4]], i1 [[CMP_GTE_5]], i1 [[CMP_GTE_6]])
+; TUNIT-NEXT: [[CMP_SLT_1:%.*]] = icmp slt i32 [[RET]], 10
+; TUNIT-NEXT: [[CMP_SLT_2:%.*]] = icmp slt i32 [[RET]], 9
+; TUNIT-NEXT: [[CMP_SLT_3:%.*]] = icmp slt i32 [[RET]], 8
+; TUNIT-NEXT: [[CMP_SLT_4:%.*]] = icmp slt i32 [[RET]], 1
+; TUNIT-NEXT: [[CMP_SLT_5:%.*]] = icmp slt i32 [[RET]], 0
+; TUNIT-NEXT: [[CMP_SLT_6:%.*]] = icmp slt i32 [[RET]], -1
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_SLT_1]], i1 [[CMP_SLT_2]], i1 [[CMP_SLT_3]])
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_SLT_4]], i1 [[CMP_SLT_5]], i1 [[CMP_SLT_6]])
+; TUNIT-NEXT: [[CMP_LTE_1:%.*]] = icmp sle i32 [[RET]], 10
+; TUNIT-NEXT: [[CMP_LTE_2:%.*]] = icmp sle i32 [[RET]], 9
+; TUNIT-NEXT: [[CMP_LTE_3:%.*]] = icmp sle i32 [[RET]], 8
+; TUNIT-NEXT: [[CMP_LTE_4:%.*]] = icmp sle i32 [[RET]], 1
+; TUNIT-NEXT: [[CMP_LTE_5:%.*]] = icmp sle i32 [[RET]], 0
+; TUNIT-NEXT: [[CMP_LTE_6:%.*]] = icmp sle i32 [[RET]], -1
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_LTE_1]], i1 [[CMP_LTE_2]], i1 [[CMP_LTE_3]])
+; TUNIT-NEXT: tail call void @use3(i1 [[CMP_LTE_4]], i1 [[CMP_LTE_5]], i1 [[CMP_LTE_6]])
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@test0-icmp-check
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) {
+; CGSCC-NEXT: [[RET:%.*]] = tail call i32 @test0(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5]]
+; CGSCC-NEXT: [[CMP_EQ_1:%.*]] = icmp eq i32 [[RET]], 10
+; CGSCC-NEXT: [[CMP_EQ_2:%.*]] = icmp eq i32 [[RET]], 9
+; CGSCC-NEXT: [[CMP_EQ_3:%.*]] = icmp eq i32 [[RET]], 8
+; CGSCC-NEXT: [[CMP_EQ_4:%.*]] = icmp eq i32 [[RET]], 1
+; CGSCC-NEXT: [[CMP_EQ_5:%.*]] = icmp eq i32 [[RET]], 0
+; CGSCC-NEXT: [[CMP_EQ_6:%.*]] = icmp eq i32 [[RET]], -1
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_EQ_1]], i1 [[CMP_EQ_2]], i1 [[CMP_EQ_3]])
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_EQ_4]], i1 [[CMP_EQ_5]], i1 [[CMP_EQ_6]])
+; CGSCC-NEXT: [[CMP_NE_1:%.*]] = icmp ne i32 [[RET]], 10
+; CGSCC-NEXT: [[CMP_NE_2:%.*]] = icmp ne i32 [[RET]], 9
+; CGSCC-NEXT: [[CMP_NE_3:%.*]] = icmp ne i32 [[RET]], 8
+; CGSCC-NEXT: [[CMP_NE_4:%.*]] = icmp ne i32 [[RET]], 1
+; CGSCC-NEXT: [[CMP_NE_5:%.*]] = icmp ne i32 [[RET]], 0
+; CGSCC-NEXT: [[CMP_NE_6:%.*]] = icmp ne i32 [[RET]], -1
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_NE_1]], i1 [[CMP_NE_2]], i1 [[CMP_NE_3]])
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_NE_4]], i1 [[CMP_NE_5]], i1 [[CMP_NE_6]])
+; CGSCC-NEXT: [[CMP_UGT_1:%.*]] = icmp ugt i32 [[RET]], 10
+; CGSCC-NEXT: [[CMP_UGT_2:%.*]] = icmp ugt i32 [[RET]], 9
+; CGSCC-NEXT: [[CMP_UGT_3:%.*]] = icmp ugt i32 [[RET]], 8
+; CGSCC-NEXT: [[CMP_UGT_4:%.*]] = icmp ugt i32 [[RET]], 1
+; CGSCC-NEXT: [[CMP_UGT_5:%.*]] = icmp ugt i32 [[RET]], 0
+; CGSCC-NEXT: [[CMP_UGT_6:%.*]] = icmp ugt i32 [[RET]], -1
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_UGT_1]], i1 [[CMP_UGT_2]], i1 [[CMP_UGT_3]])
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_UGT_4]], i1 [[CMP_UGT_5]], i1 [[CMP_UGT_6]])
+; CGSCC-NEXT: [[CMP_UGE_1:%.*]] = icmp uge i32 [[RET]], 10
+; CGSCC-NEXT: [[CMP_UGE_2:%.*]] = icmp uge i32 [[RET]], 9
+; CGSCC-NEXT: [[CMP_UGE_3:%.*]] = icmp uge i32 [[RET]], 8
+; CGSCC-NEXT: [[CMP_UGE_4:%.*]] = icmp uge i32 [[RET]], 1
+; CGSCC-NEXT: [[CMP_UGE_5:%.*]] = icmp uge i32 [[RET]], 0
+; CGSCC-NEXT: [[CMP_UGE_6:%.*]] = icmp uge i32 [[RET]], -1
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_UGE_1]], i1 [[CMP_UGE_2]], i1 [[CMP_UGE_3]])
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_UGE_4]], i1 [[CMP_UGE_5]], i1 [[CMP_UGE_6]])
+; CGSCC-NEXT: [[CMP_SGT_1:%.*]] = icmp sgt i32 [[RET]], 10
+; CGSCC-NEXT: [[CMP_SGT_2:%.*]] = icmp sgt i32 [[RET]], 9
+; CGSCC-NEXT: [[CMP_SGT_3:%.*]] = icmp sgt i32 [[RET]], 8
+; CGSCC-NEXT: [[CMP_SGT_4:%.*]] = icmp sgt i32 [[RET]], 1
+; CGSCC-NEXT: [[CMP_SGT_5:%.*]] = icmp sgt i32 [[RET]], 0
+; CGSCC-NEXT: [[CMP_SGT_6:%.*]] = icmp sgt i32 [[RET]], -1
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_SGT_1]], i1 [[CMP_SGT_2]], i1 [[CMP_SGT_3]])
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_SGT_4]], i1 [[CMP_SGT_5]], i1 [[CMP_SGT_6]])
+; CGSCC-NEXT: [[CMP_GTE_1:%.*]] = icmp sge i32 [[RET]], 10
+; CGSCC-NEXT: [[CMP_GTE_2:%.*]] = icmp sge i32 [[RET]], 9
+; CGSCC-NEXT: [[CMP_GTE_3:%.*]] = icmp sge i32 [[RET]], 8
+; CGSCC-NEXT: [[CMP_GTE_4:%.*]] = icmp sge i32 [[RET]], 1
+; CGSCC-NEXT: [[CMP_GTE_5:%.*]] = icmp sge i32 [[RET]], 0
+; CGSCC-NEXT: [[CMP_GTE_6:%.*]] = icmp sge i32 [[RET]], -1
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_GTE_1]], i1 [[CMP_GTE_2]], i1 [[CMP_GTE_3]])
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_GTE_4]], i1 [[CMP_GTE_5]], i1 [[CMP_GTE_6]])
+; CGSCC-NEXT: [[CMP_SLT_1:%.*]] = icmp slt i32 [[RET]], 10
+; CGSCC-NEXT: [[CMP_SLT_2:%.*]] = icmp slt i32 [[RET]], 9
+; CGSCC-NEXT: [[CMP_SLT_3:%.*]] = icmp slt i32 [[RET]], 8
+; CGSCC-NEXT: [[CMP_SLT_4:%.*]] = icmp slt i32 [[RET]], 1
+; CGSCC-NEXT: [[CMP_SLT_5:%.*]] = icmp slt i32 [[RET]], 0
+; CGSCC-NEXT: [[CMP_SLT_6:%.*]] = icmp slt i32 [[RET]], -1
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_SLT_1]], i1 [[CMP_SLT_2]], i1 [[CMP_SLT_3]])
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_SLT_4]], i1 [[CMP_SLT_5]], i1 [[CMP_SLT_6]])
+; CGSCC-NEXT: [[CMP_LTE_1:%.*]] = icmp sle i32 [[RET]], 10
+; CGSCC-NEXT: [[CMP_LTE_2:%.*]] = icmp sle i32 [[RET]], 9
+; CGSCC-NEXT: [[CMP_LTE_3:%.*]] = icmp sle i32 [[RET]], 8
+; CGSCC-NEXT: [[CMP_LTE_4:%.*]] = icmp sle i32 [[RET]], 1
+; CGSCC-NEXT: [[CMP_LTE_5:%.*]] = icmp sle i32 [[RET]], 0
+; CGSCC-NEXT: [[CMP_LTE_6:%.*]] = icmp sle i32 [[RET]], -1
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_LTE_1]], i1 [[CMP_LTE_2]], i1 [[CMP_LTE_3]])
+; CGSCC-NEXT: tail call void @use3(i1 [[CMP_LTE_4]], i1 [[CMP_LTE_5]], i1 [[CMP_LTE_6]])
+; CGSCC-NEXT: ret void
;
%ret = tail call i32 @test0(i32 *%p)
define i1 @test1-check(i32* %p) {
;
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test1-check
-; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR3]], !range [[RNG2:![0-9]+]]
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500
-; IS__TUNIT____-NEXT: ret i1 [[CMP]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test1-check
+; TUNIT-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR3]], !range [[RNG2:![0-9]+]]
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500
+; TUNIT-NEXT: ret i1 [[CMP]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test1-check
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500
-; IS__CGSCC____-NEXT: ret i1 [[CMP]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test1-check
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[RES:%.*]] = tail call i32 @test1(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5]]
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32 [[RES]], 500
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%res = tail call i32 @test1(i32* %p)
%cmp = icmp eq i32 %res, 500
}
define i32 @test2_check(i32* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_check
-; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = tail call i32 @test2(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp slt i32 [[CALL]], 5
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: br label [[RETURN:%.*]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ 2, [[IF_THEN]] ], [ 3, [[IF_END]] ]
-; IS__TUNIT____-NEXT: ret i32 [[RETVAL_0]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_check
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = tail call i32 @test2(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 [[CALL]], 5
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: br label [[RETURN:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ 2, [[IF_THEN]] ], [ 3, [[IF_END]] ]
-; IS__CGSCC____-NEXT: ret i32 [[RETVAL_0]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test2_check
+; TUNIT-SAME: (i32* nocapture nofree readonly align 4 [[P:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = tail call i32 @test2(i32* nocapture nofree readonly align 4 [[P]]) #[[ATTR3]]
+; TUNIT-NEXT: [[CMP:%.*]] = icmp slt i32 [[CALL]], 5
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: br label [[RETURN:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32 [ 2, [[IF_THEN]] ], [ 3, [[IF_END]] ]
+; TUNIT-NEXT: ret i32 [[RETVAL_0]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test2_check
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = tail call i32 @test2(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[P]]) #[[ATTR5]]
+; CGSCC-NEXT: [[CMP:%.*]] = icmp slt i32 [[CALL]], 5
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: br label [[RETURN:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32 [ 2, [[IF_THEN]] ], [ 3, [[IF_END]] ]
+; CGSCC-NEXT: ret i32 [[RETVAL_0]]
;
entry:
%call = tail call i32 @test2(i32* %p)
declare dso_local void @unkown()
define internal i32 @r1(i32) local_unnamed_addr {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@r1
-; IS__TUNIT_NPM-SAME: () local_unnamed_addr #[[ATTR1:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: br label [[TMP4:%.*]]
-; IS__TUNIT_NPM: 1:
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP7:%.*]], 10000
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[F:%.*]]
-; IS__TUNIT_NPM: 3:
-; IS__TUNIT_NPM-NEXT: ret i32 20
-; IS__TUNIT_NPM: f:
-; IS__TUNIT_NPM-NEXT: ret i32 10
-; IS__TUNIT_NPM: 4:
-; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP0:%.*]] ], [ [[TMP8:%.*]], [[TMP4]] ]
-; IS__TUNIT_NPM-NEXT: [[TMP6:%.*]] = phi i32 [ 0, [[TMP0]] ], [ [[TMP7]], [[TMP4]] ]
-; IS__TUNIT_NPM-NEXT: [[TMP7]] = add nuw nsw i32 [[TMP5]], [[TMP6]]
-; IS__TUNIT_NPM-NEXT: [[TMP8]] = add nuw nsw i32 [[TMP5]], 1
-; IS__TUNIT_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 100
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP9]], label [[TMP1:%.*]], label [[TMP4]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@r1
-; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR2:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: br label [[TMP4:%.*]]
-; IS__CGSCC_NPM: 1:
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP7:%.*]], 10000
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[F:%.*]]
-; IS__CGSCC_NPM: 3:
-; IS__CGSCC_NPM-NEXT: ret i32 20
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: ret i32 10
-; IS__CGSCC_NPM: 4:
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP0:%.*]] ], [ [[TMP8:%.*]], [[TMP4]] ]
-; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = phi i32 [ 0, [[TMP0]] ], [ [[TMP7]], [[TMP4]] ]
-; IS__CGSCC_NPM-NEXT: [[TMP7]] = add nuw nsw i32 [[TMP5]], [[TMP6]]
-; IS__CGSCC_NPM-NEXT: [[TMP8]] = add nuw nsw i32 [[TMP5]], 1
-; IS__CGSCC_NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 100
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP9]], label [[TMP1:%.*]], label [[TMP4]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@r1
+; TUNIT-SAME: () local_unnamed_addr #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: br label [[TMP4:%.*]]
+; TUNIT: 1:
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP7:%.*]], 10000
+; TUNIT-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[F:%.*]]
+; TUNIT: 3:
+; TUNIT-NEXT: ret i32 20
+; TUNIT: f:
+; TUNIT-NEXT: ret i32 10
+; TUNIT: 4:
+; TUNIT-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP0:%.*]] ], [ [[TMP8:%.*]], [[TMP4]] ]
+; TUNIT-NEXT: [[TMP6:%.*]] = phi i32 [ 0, [[TMP0]] ], [ [[TMP7]], [[TMP4]] ]
+; TUNIT-NEXT: [[TMP7]] = add nuw nsw i32 [[TMP5]], [[TMP6]]
+; TUNIT-NEXT: [[TMP8]] = add nuw nsw i32 [[TMP5]], 1
+; TUNIT-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 100
+; TUNIT-NEXT: br i1 [[TMP9]], label [[TMP1:%.*]], label [[TMP4]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@r1
+; CGSCC-SAME: () local_unnamed_addr #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: br label [[TMP4:%.*]]
+; CGSCC: 1:
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP7:%.*]], 10000
+; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[F:%.*]]
+; CGSCC: 3:
+; CGSCC-NEXT: ret i32 20
+; CGSCC: f:
+; CGSCC-NEXT: ret i32 10
+; CGSCC: 4:
+; CGSCC-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP0:%.*]] ], [ [[TMP8:%.*]], [[TMP4]] ]
+; CGSCC-NEXT: [[TMP6:%.*]] = phi i32 [ 0, [[TMP0]] ], [ [[TMP7]], [[TMP4]] ]
+; CGSCC-NEXT: [[TMP7]] = add nuw nsw i32 [[TMP5]], [[TMP6]]
+; CGSCC-NEXT: [[TMP8]] = add nuw nsw i32 [[TMP5]], 1
+; CGSCC-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 100
+; CGSCC-NEXT: br i1 [[TMP9]], label [[TMP1:%.*]], label [[TMP4]]
;
br label %5
}
define void @f1(i32){
-; IS__TUNIT____-LABEL: define {{[^@]+}}@f1
-; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) {
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = tail call i32 @r1() #[[ATTR4:[0-9]+]]
-; IS__TUNIT____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 15
-; IS__TUNIT____-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]]
-; IS__TUNIT____: 4:
-; IS__TUNIT____-NEXT: tail call void @unkown()
-; IS__TUNIT____-NEXT: br label [[TMP5]]
-; IS__TUNIT____: 5:
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]]) {
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = tail call i32 @r1() #[[ATTR6:[0-9]+]]
-; IS__CGSCC____-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 15
-; IS__CGSCC____-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]]
-; IS__CGSCC____: 4:
-; IS__CGSCC____-NEXT: tail call void @unkown()
-; IS__CGSCC____-NEXT: br label [[TMP5]]
-; IS__CGSCC____: 5:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@f1
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) {
+; TUNIT-NEXT: [[TMP2:%.*]] = tail call i32 @r1() #[[ATTR4:[0-9]+]]
+; TUNIT-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 15
+; TUNIT-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]]
+; TUNIT: 4:
+; TUNIT-NEXT: tail call void @unkown()
+; TUNIT-NEXT: br label [[TMP5]]
+; TUNIT: 5:
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@f1
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) {
+; CGSCC-NEXT: [[TMP2:%.*]] = tail call i32 @r1() #[[ATTR6:[0-9]+]]
+; CGSCC-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 15
+; CGSCC-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]]
+; CGSCC: 4:
+; CGSCC-NEXT: tail call void @unkown()
+; CGSCC-NEXT: br label [[TMP5]]
+; CGSCC: 5:
+; CGSCC-NEXT: ret void
;
%2 = tail call i32 @r1(i32 %0)
%3 = icmp sgt i32 %2, 15
; }
; }
define dso_local i32 @test4-f1(i32 %u) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4-f1
-; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] {
-; 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test4-f1
+; TUNIT-SAME: (i32 [[U:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ]
+; TUNIT-NEXT: ret i32 [[RETVAL_0]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test4-f1
+; CGSCC-SAME: (i32 [[U:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[U]], [[IF_THEN]] ], [ 0, [[ENTRY:%.*]] ]
+; CGSCC-NEXT: ret i32 [[RETVAL_0]]
;
; FIXME: RETVAL_0 >= 0
entry:
define dso_local i32 @test4-g1(i32 %u) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4-g1
-; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[CALL]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4-g1
-; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test4-g1
+; TUNIT-SAME: (i32 [[U:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i32 [[CALL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test4-g1
+; CGSCC-SAME: (i32 [[U:%.*]]) #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = tail call i32 @test4-f1(i32 [[U]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i32 [[CALL]]
;
; FIXME: %call should have range [0, inf]
; }
; }
define dso_local i32 @test4-f2(i32 %u) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4-f2
-; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR2]] {
-; 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test4-f2
+; TUNIT-SAME: (i32 [[U:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: [[ADD:%.*]] = add nuw nsw i32 [[U]], 1
+; TUNIT-NEXT: br label [[RETURN:%.*]]
+; TUNIT: if.else:
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ]
+; TUNIT-NEXT: ret i32 [[RETVAL_0]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test4-f2
+; CGSCC-SAME: (i32 [[U:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[U]], -1
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[ADD:%.*]] = add nuw nsw i32 [[U]], 1
+; CGSCC-NEXT: br label [[RETURN:%.*]]
+; CGSCC: if.else:
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ 1, [[IF_ELSE]] ]
+; CGSCC-NEXT: ret i32 [[RETVAL_0]]
;
entry:
%cmp = icmp sgt i32 %u, -1
define dso_local i32 @test4-g2(i32 %u) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test4-g2
-; IS__TUNIT_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR4]], !range [[RNG3:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[CALL]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test4-g2
-; IS__CGSCC_NPM-SAME: (i32 [[U:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test4-g2
+; TUNIT-SAME: (i32 [[U:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR4]], !range [[RNG3:![0-9]+]]
+; TUNIT-NEXT: ret i32 [[CALL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test4-g2
+; CGSCC-SAME: (i32 [[U:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = tail call i32 @test4-f2(i32 [[U]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i32 [[CALL]]
;
entry:
%call = tail call i32 @test4-f2(i32 %u)
}
define dso_local i32 @test-5() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test-5() {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @rec(i32 noundef 0)
-; IS__TUNIT____-NEXT: ret i32 [[CALL]]
+; TUNIT-LABEL: define {{[^@]+}}@test-5() {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32 @rec(i32 noundef 0)
+; TUNIT-NEXT: ret i32 [[CALL]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test-5() {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call noundef i32 @rec(i32 noundef 0)
-; IS__CGSCC____-NEXT: ret i32 [[CALL]]
+; CGSCC-LABEL: define {{[^@]+}}@test-5() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call noundef i32 @rec(i32 noundef 0)
+; CGSCC-NEXT: ret i32 [[CALL]]
;
entry:
%call = call i32 @rec(i32 0)
; FIXME: All but the return is not needed anymore
define dso_local zeroext i1 @phi(i32 %arg) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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: [[DOT02:%.*]] = phi i32 [ 1, [[BB1]] ], [ 2, [[BB2]] ]
-; 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: [[TMP6:%.*]] = add nsw i32 [[DOT02]], 1
-; IS__TUNIT_NPM-NEXT: br label [[BB9:%.*]]
-; IS__TUNIT_NPM: bb7:
-; IS__TUNIT_NPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[DOT02]], 2
-; IS__TUNIT_NPM-NEXT: br label [[BB9]]
-; IS__TUNIT_NPM: bb9:
-; IS__TUNIT_NPM-NEXT: [[DOT01:%.*]] = phi i32 [ [[TMP6]], [[BB5]] ], [ [[TMP8]], [[BB7]] ]
-; IS__TUNIT_NPM-NEXT: [[TMP10:%.*]] = icmp eq i32 [[DOT01]], 5
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP10]], label [[BB11:%.*]], label [[BB12:%.*]]
-; IS__TUNIT_NPM: bb11:
-; IS__TUNIT_NPM-NEXT: br label [[BB13:%.*]]
-; IS__TUNIT_NPM: bb12:
-; IS__TUNIT_NPM-NEXT: br label [[BB13]]
-; IS__TUNIT_NPM: bb13:
-; IS__TUNIT_NPM-NEXT: [[DOT0:%.*]] = phi i1 [ true, [[BB11]] ], [ false, [[BB12]] ]
-; IS__TUNIT_NPM-NEXT: ret i1 [[DOT0]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi
-; IS__CGSCC_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] {
-; 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: [[DOT02:%.*]] = phi i32 [ 1, [[BB1]] ], [ 2, [[BB2]] ]
-; 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: [[TMP6:%.*]] = add nsw i32 [[DOT02]], 1
-; IS__CGSCC_NPM-NEXT: br label [[BB9:%.*]]
-; IS__CGSCC_NPM: bb7:
-; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[DOT02]], 2
-; IS__CGSCC_NPM-NEXT: br label [[BB9]]
-; IS__CGSCC_NPM: bb9:
-; IS__CGSCC_NPM-NEXT: [[DOT01:%.*]] = phi i32 [ [[TMP6]], [[BB5]] ], [ [[TMP8]], [[BB7]] ]
-; IS__CGSCC_NPM-NEXT: [[TMP10:%.*]] = icmp eq i32 [[DOT01]], 5
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP10]], label [[BB11:%.*]], label [[BB12:%.*]]
-; IS__CGSCC_NPM: bb11:
-; IS__CGSCC_NPM-NEXT: br label [[BB13:%.*]]
-; IS__CGSCC_NPM: bb12:
-; IS__CGSCC_NPM-NEXT: br label [[BB13]]
-; IS__CGSCC_NPM: bb13:
-; IS__CGSCC_NPM-NEXT: [[DOT0:%.*]] = phi i1 [ true, [[BB11]] ], [ false, [[BB12]] ]
-; IS__CGSCC_NPM-NEXT: ret i1 [[DOT0]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@phi
+; TUNIT-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5
+; TUNIT-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]]
+; TUNIT: bb1:
+; TUNIT-NEXT: br label [[BB3:%.*]]
+; TUNIT: bb2:
+; TUNIT-NEXT: br label [[BB3]]
+; TUNIT: bb3:
+; TUNIT-NEXT: [[DOT02:%.*]] = phi i32 [ 1, [[BB1]] ], [ 2, [[BB2]] ]
+; TUNIT-NEXT: [[TMP4:%.*]] = icmp sgt i32 [[ARG]], 10
+; TUNIT-NEXT: br i1 [[TMP4]], label [[BB5:%.*]], label [[BB7:%.*]]
+; TUNIT: bb5:
+; TUNIT-NEXT: [[TMP6:%.*]] = add nsw i32 [[DOT02]], 1
+; TUNIT-NEXT: br label [[BB9:%.*]]
+; TUNIT: bb7:
+; TUNIT-NEXT: [[TMP8:%.*]] = add nsw i32 [[DOT02]], 2
+; TUNIT-NEXT: br label [[BB9]]
+; TUNIT: bb9:
+; TUNIT-NEXT: [[DOT01:%.*]] = phi i32 [ [[TMP6]], [[BB5]] ], [ [[TMP8]], [[BB7]] ]
+; TUNIT-NEXT: [[TMP10:%.*]] = icmp eq i32 [[DOT01]], 5
+; TUNIT-NEXT: br i1 [[TMP10]], label [[BB11:%.*]], label [[BB12:%.*]]
+; TUNIT: bb11:
+; TUNIT-NEXT: br label [[BB13:%.*]]
+; TUNIT: bb12:
+; TUNIT-NEXT: br label [[BB13]]
+; TUNIT: bb13:
+; TUNIT-NEXT: [[DOT0:%.*]] = phi i1 [ true, [[BB11]] ], [ false, [[BB12]] ]
+; TUNIT-NEXT: ret i1 [[DOT0]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@phi
+; CGSCC-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = icmp sgt i32 [[ARG]], 5
+; CGSCC-NEXT: br i1 [[TMP]], label [[BB1:%.*]], label [[BB2:%.*]]
+; CGSCC: bb1:
+; CGSCC-NEXT: br label [[BB3:%.*]]
+; CGSCC: bb2:
+; CGSCC-NEXT: br label [[BB3]]
+; CGSCC: bb3:
+; CGSCC-NEXT: [[DOT02:%.*]] = phi i32 [ 1, [[BB1]] ], [ 2, [[BB2]] ]
+; CGSCC-NEXT: [[TMP4:%.*]] = icmp sgt i32 [[ARG]], 10
+; CGSCC-NEXT: br i1 [[TMP4]], label [[BB5:%.*]], label [[BB7:%.*]]
+; CGSCC: bb5:
+; CGSCC-NEXT: [[TMP6:%.*]] = add nsw i32 [[DOT02]], 1
+; CGSCC-NEXT: br label [[BB9:%.*]]
+; CGSCC: bb7:
+; CGSCC-NEXT: [[TMP8:%.*]] = add nsw i32 [[DOT02]], 2
+; CGSCC-NEXT: br label [[BB9]]
+; CGSCC: bb9:
+; CGSCC-NEXT: [[DOT01:%.*]] = phi i32 [ [[TMP6]], [[BB5]] ], [ [[TMP8]], [[BB7]] ]
+; CGSCC-NEXT: [[TMP10:%.*]] = icmp eq i32 [[DOT01]], 5
+; CGSCC-NEXT: br i1 [[TMP10]], label [[BB11:%.*]], label [[BB12:%.*]]
+; CGSCC: bb11:
+; CGSCC-NEXT: br label [[BB13:%.*]]
+; CGSCC: bb12:
+; CGSCC-NEXT: br label [[BB13]]
+; CGSCC: bb13:
+; CGSCC-NEXT: [[DOT0:%.*]] = phi i1 [ true, [[BB11]] ], [ false, [[BB12]] ]
+; CGSCC-NEXT: ret i1 [[DOT0]]
;
bb:
%tmp = icmp sgt i32 %arg, 5
}
define dso_local i1 @select(i32 %a) local_unnamed_addr #0 {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
-; IS__TUNIT_NPM-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
-; IS__TUNIT_NPM-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
-; IS__TUNIT_NPM-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
-; IS__TUNIT_NPM-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
-; IS__TUNIT_NPM-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
-; IS__TUNIT_NPM-NEXT: ret i1 [[CMP6]]
-;
-; 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 #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
-; IS__CGSCC_NPM-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
-; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
-; IS__CGSCC_NPM-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
-; IS__CGSCC_NPM-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
-; IS__CGSCC_NPM-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
-; IS__CGSCC_NPM-NEXT: ret i1 [[CMP6]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@select
+; TUNIT-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
+; TUNIT-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
+; TUNIT-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
+; TUNIT-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
+; TUNIT-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
+; TUNIT-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
+; TUNIT-NEXT: ret i1 [[CMP6]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@select
+; CGSCC-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
+; CGSCC-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
+; CGSCC-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
+; CGSCC-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
+; CGSCC-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
+; CGSCC-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
+; CGSCC-NEXT: ret i1 [[CMP6]]
;
entry:
%cmp = icmp sgt i32 %a, 5
}
define dso_local i32 @select_zext(i32 %a) local_unnamed_addr #0 {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
-; IS__TUNIT_NPM-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
-; IS__TUNIT_NPM-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
-; IS__TUNIT_NPM-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
-; IS__TUNIT_NPM-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
-; IS__TUNIT_NPM-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
-; IS__TUNIT_NPM-NEXT: [[DOT13:%.*]] = zext i1 [[CMP6]] to i32
-; IS__TUNIT_NPM-NEXT: ret i32 [[DOT13]]
-;
-; 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 #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
-; IS__CGSCC_NPM-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
-; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
-; IS__CGSCC_NPM-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
-; IS__CGSCC_NPM-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
-; IS__CGSCC_NPM-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
-; IS__CGSCC_NPM-NEXT: [[DOT13:%.*]] = zext i1 [[CMP6]] to i32
-; IS__CGSCC_NPM-NEXT: ret i32 [[DOT13]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@select_zext
+; TUNIT-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
+; TUNIT-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
+; TUNIT-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
+; TUNIT-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
+; TUNIT-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
+; TUNIT-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
+; TUNIT-NEXT: [[DOT13:%.*]] = zext i1 [[CMP6]] to i32
+; TUNIT-NEXT: ret i32 [[DOT13]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@select_zext
+; CGSCC-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
+; CGSCC-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
+; CGSCC-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
+; CGSCC-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
+; CGSCC-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
+; CGSCC-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
+; CGSCC-NEXT: [[DOT13:%.*]] = zext i1 [[CMP6]] to i32
+; CGSCC-NEXT: ret i32 [[DOT13]]
;
entry:
%cmp = icmp sgt i32 %a, 5
}
define dso_local i64 @select_int2ptr_bitcast_ptr2int(i32 %a) local_unnamed_addr #0 {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
-; IS__TUNIT_NPM-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
-; IS__TUNIT_NPM-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
-; IS__TUNIT_NPM-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
-; IS__TUNIT_NPM-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
-; IS__TUNIT_NPM-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
-; IS__TUNIT_NPM-NEXT: [[I2P:%.*]] = inttoptr i1 [[CMP6]] 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_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 #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
-; IS__CGSCC_NPM-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
-; IS__CGSCC_NPM-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
-; IS__CGSCC_NPM-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
-; IS__CGSCC_NPM-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
-; IS__CGSCC_NPM-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
-; IS__CGSCC_NPM-NEXT: [[I2P:%.*]] = inttoptr i1 [[CMP6]] 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int
+; TUNIT-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
+; TUNIT-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
+; TUNIT-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
+; TUNIT-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
+; TUNIT-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
+; TUNIT-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
+; TUNIT-NEXT: [[I2P:%.*]] = inttoptr i1 [[CMP6]] to i1*
+; TUNIT-NEXT: [[BC:%.*]] = bitcast i1* [[I2P]] to i32*
+; TUNIT-NEXT: [[P2I:%.*]] = ptrtoint i32* [[BC]] to i64
+; TUNIT-NEXT: ret i64 [[P2I]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@select_int2ptr_bitcast_ptr2int
+; CGSCC-SAME: (i32 [[A:%.*]]) local_unnamed_addr #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 5
+; CGSCC-NEXT: [[DOT:%.*]] = select i1 [[CMP]], i32 1, i32 2
+; CGSCC-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[A]], 10
+; CGSCC-NEXT: [[Y_0_V:%.*]] = select i1 [[CMP1]], i32 1, i32 2
+; CGSCC-NEXT: [[Y_0:%.*]] = add nuw nsw i32 [[DOT]], [[Y_0_V]]
+; CGSCC-NEXT: [[CMP6:%.*]] = icmp eq i32 [[Y_0]], 5
+; CGSCC-NEXT: [[I2P:%.*]] = inttoptr i1 [[CMP6]] to i1*
+; CGSCC-NEXT: [[BC:%.*]] = bitcast i1* [[I2P]] to i32*
+; CGSCC-NEXT: [[P2I:%.*]] = ptrtoint i32* [[BC]] to i64
+; CGSCC-NEXT: ret i64 [[P2I]]
;
entry:
%cmp = icmp sgt i32 %a, 5
; }
define i1 @f_fcmp(float %a, float %b) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f_fcmp
-; IS__CGSCC_NPM-SAME: (float [[A:%.*]], float [[B:%.*]]) #[[ATTR2]] {
-; 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@f_fcmp
+; TUNIT-SAME: (float [[A:%.*]], float [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[R:%.*]] = fcmp uge float [[A]], [[B]]
+; TUNIT-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false
+; TUNIT-NEXT: ret i1 [[S]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@f_fcmp
+; CGSCC-SAME: (float [[A:%.*]], float [[B:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[R:%.*]] = fcmp uge float [[A]], [[B]]
+; CGSCC-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false
+; CGSCC-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_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@d_fcmp
-; IS__CGSCC_NPM-SAME: (double [[A:%.*]], double [[B:%.*]]) #[[ATTR2]] {
-; 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@d_fcmp
+; TUNIT-SAME: (double [[A:%.*]], double [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[R:%.*]] = fcmp oeq double [[A]], [[B]]
+; TUNIT-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false
+; TUNIT-NEXT: ret i1 [[S]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@d_fcmp
+; CGSCC-SAME: (double [[A:%.*]], double [[B:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[R:%.*]] = fcmp oeq double [[A]], [[B]]
+; CGSCC-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false
+; CGSCC-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_NPM: Function Attrs: nofree norecurse 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_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:%.*]]) #[[ATTR2]] {
-; 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@dp_icmp
+; TUNIT-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[R:%.*]] = icmp sge double* [[A]], [[B]]
+; TUNIT-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false
+; TUNIT-NEXT: ret i1 [[S]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@dp_icmp
+; CGSCC-SAME: (double* nofree readnone [[A:%.*]], double* nofree readnone [[B:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[R:%.*]] = icmp sge double* [[A]], [[B]]
+; CGSCC-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false
+; CGSCC-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_NPM: Function Attrs: nofree norecurse 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_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:%.*]]) #[[ATTR2]] {
-; 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ip_icmp
+; TUNIT-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[R:%.*]] = icmp ult i8* [[A]], [[B]]
+; TUNIT-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false
+; TUNIT-NEXT: ret i1 [[S]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ip_icmp
+; CGSCC-SAME: (i8* nofree readnone [[A:%.*]], i8* nofree readnone [[B:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[R:%.*]] = icmp ult i8* [[A]], [[B]]
+; CGSCC-NEXT: [[S:%.*]] = select i1 [[R]], i1 [[R]], i1 false
+; CGSCC-NEXT: ret i1 [[S]]
;
%r = icmp ult i8* %a, %b
%s = select i1 %r, i1 %r, i1 0
ret i1 %s
}
define i1 @fcmp_caller(float %fa, float %fb, double %da, double %db, double* %dpa, double* %dpb, i8* %ipa, i8* %ipb) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]]
-; IS__TUNIT_NPM-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]]
-; IS__TUNIT_NPM-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[O3]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree 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:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR6]]
-; 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]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[O3]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@fcmp_caller
+; TUNIT-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]] {
+; TUNIT-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR4]]
+; TUNIT-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]]
+; TUNIT-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]]
+; TUNIT-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]]
+; TUNIT-NEXT: ret i1 [[O3]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@fcmp_caller
+; CGSCC-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:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[R1:%.*]] = call i1 @f_fcmp(float [[FA]], float [[FB]]) #[[ATTR6]]
+; CGSCC-NEXT: [[R2:%.*]] = call i1 @d_fcmp(double [[DA]], double [[DB]]) #[[ATTR6]]
+; CGSCC-NEXT: [[R3:%.*]] = call i1 @dp_icmp(double* noalias nofree readnone [[DPA]], double* noalias nofree readnone [[DPB]]) #[[ATTR6]]
+; CGSCC-NEXT: [[R4:%.*]] = call i1 @ip_icmp(i8* noalias nofree readnone [[IPA]], i8* noalias nofree readnone [[IPB]]) #[[ATTR6]]
+; CGSCC-NEXT: [[O1:%.*]] = or i1 [[R1]], [[R2]]
+; CGSCC-NEXT: [[O2:%.*]] = or i1 [[R3]], [[R4]]
+; CGSCC-NEXT: [[O3:%.*]] = or i1 [[O1]], [[O2]]
+; CGSCC-NEXT: ret i1 [[O3]]
;
%r1 = call i1 @f_fcmp(float %fa, float %fb)
%r2 = call i1 @d_fcmp(double %da, double %db)
}
define i8 @ret_two() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret_two
-; IS__TUNIT_NPM-SAME: () #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: ret i8 2
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ret_two
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-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: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: ret i8 2
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ret_two
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: ret i8 2
;
ret i8 2
}
define i8 @ret_undef() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret_undef
-; IS__TUNIT_NPM-SAME: () #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: ret i8 undef
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ret_undef
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-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: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: ret i8 undef
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ret_undef
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-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_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@undef_collapse_1
-; IS__CGSCC_NPM-SAME: () #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i8 @ret_undef() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[S:%.*]] = shl i8 [[C]], 2
-; IS__CGSCC_NPM-NEXT: ret i8 [[S]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@undef_collapse_1
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 0
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@undef_collapse_1
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: [[C:%.*]] = call i8 @ret_undef() #[[ATTR6]]
+; CGSCC-NEXT: [[S:%.*]] = shl i8 [[C]], 2
+; CGSCC-NEXT: ret i8 [[S]]
;
%c = call i8 @ret_undef()
%s = shl i8 %c, 2
; Verify we collapse undef to a value and return something non-undef here.
define i8 @undef_collapse_2() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@undef_collapse_2
-; IS__CGSCC_NPM-SAME: () #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i8 @ret_two() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[S:%.*]] = shl i8 undef, [[C]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[S]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@undef_collapse_2
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 0
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@undef_collapse_2
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: [[C:%.*]] = call i8 @ret_two() #[[ATTR6]]
+; CGSCC-NEXT: [[S:%.*]] = shl i8 undef, [[C]]
+; CGSCC-NEXT: ret i8 [[S]]
;
%c = call i8 @ret_two()
%s = shl i8 undef, %c
define i8 @undef_collapse_caller() {
;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@undef_collapse_caller
-; IS__TUNIT_NPM-SAME: () #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: ret i8 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@undef_collapse_caller
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 0
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@undef_collapse_caller
-; IS__CGSCC_NPM-SAME: () #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[C1:%.*]] = call i8 @undef_collapse_1() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[C2:%.*]] = call i8 @undef_collapse_2() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = add i8 [[C1]], [[C2]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[A]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@undef_collapse_caller
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: [[C1:%.*]] = call i8 @undef_collapse_1() #[[ATTR6]]
+; CGSCC-NEXT: [[C2:%.*]] = call i8 @undef_collapse_2() #[[ATTR6]]
+; CGSCC-NEXT: [[A:%.*]] = add i8 [[C1]], [[C2]]
+; CGSCC-NEXT: ret i8 [[A]]
;
%c1 = call i8 @undef_collapse_1()
%c2 = call i8 @undef_collapse_2()
}
define i32 @ret1or2(i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ret1or2
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2
-; IS__CGSCC_NPM-NEXT: ret i32 [[S]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ret1or2
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2
+; TUNIT-NEXT: ret i32 [[S]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ret1or2
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[S:%.*]] = select i1 [[C]], i32 1, i32 2
+; CGSCC-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_NPM: Function Attrs: nofree norecurse 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: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[INDIRECTION:%.*]] = select i1 [[C3]], i32 [[R1]], i32 [[R2]]
-; IS__TUNIT_NPM-NEXT: [[A:%.*]] = add i32 [[R1]], [[INDIRECTION]]
-; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 4
-; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2
-; IS__TUNIT_NPM-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[F]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callee_range_1
-; IS__CGSCC_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[INDIRECTION:%.*]] = select i1 [[C3]], i32 [[R1]], i32 [[R2]]
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = add i32 [[R1]], [[INDIRECTION]]
-; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 4
-; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2
-; IS__CGSCC_NPM-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[F]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@callee_range_1
+; TUNIT-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR4]]
+; TUNIT-NEXT: [[INDIRECTION:%.*]] = select i1 [[C3]], i32 [[R1]], i32 [[R2]]
+; TUNIT-NEXT: [[A:%.*]] = add i32 [[R1]], [[INDIRECTION]]
+; TUNIT-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 4
+; TUNIT-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2
+; TUNIT-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]]
+; TUNIT-NEXT: ret i1 [[F]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callee_range_1
+; CGSCC-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]], i1 [[C3:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR6]]
+; CGSCC-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR6]]
+; CGSCC-NEXT: [[INDIRECTION:%.*]] = select i1 [[C3]], i32 [[R1]], i32 [[R2]]
+; CGSCC-NEXT: [[A:%.*]] = add i32 [[R1]], [[INDIRECTION]]
+; CGSCC-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 4
+; CGSCC-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2
+; CGSCC-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]]
+; CGSCC-NEXT: ret i1 [[F]]
;
%r1 = call i32 @ret1or2(i1 %c1)
%r2 = call i32 @ret1or2(i1 %c2)
define i1 @callee_range_2(i1 %c1, i1 %c2) {
;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[A:%.*]] = add i32 [[R1]], [[R2]]
-; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 3
-; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2
-; IS__TUNIT_NPM-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[F]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callee_range_2
-; IS__CGSCC_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR6]]
-; 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
-; IS__CGSCC_NPM-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[F]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@callee_range_2
+; TUNIT-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR4]]
+; TUNIT-NEXT: [[A:%.*]] = add i32 [[R1]], [[R2]]
+; TUNIT-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 3
+; TUNIT-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2
+; TUNIT-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]]
+; TUNIT-NEXT: ret i1 [[F]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callee_range_2
+; CGSCC-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR6]]
+; CGSCC-NEXT: [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR6]]
+; CGSCC-NEXT: [[A:%.*]] = add i32 [[R1]], [[R2]]
+; CGSCC-NEXT: [[I1:%.*]] = icmp sle i32 [[A]], 3
+; CGSCC-NEXT: [[I2:%.*]] = icmp sge i32 [[A]], 2
+; CGSCC-NEXT: [[F:%.*]] = and i1 [[I1]], [[I2]]
+; CGSCC-NEXT: ret i1 [[F]]
;
%r1 = call i32 @ret1or2(i1 %c1)
%r2 = call i32 @ret1or2(i1 %c2)
define i32 @ret100() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret100
-; IS__TUNIT_NPM-SAME: () #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: ret i32 100
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ret100
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-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: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: ret i32 100
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ret100
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: ret i32 100
;
ret i32 100
}
define i1 @ctx_adjustment(i32 %V) {
;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ctx_adjustment
-; 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:
-; IS__TUNIT_NPM-NEXT: br label [[END:%.*]]
-; IS__TUNIT_NPM: if.false:
-; IS__TUNIT_NPM-NEXT: br label [[END]]
-; IS__TUNIT_NPM: end:
-; IS__TUNIT_NPM-NEXT: [[PHI:%.*]] = phi i32 [ [[V]], [[IF_TRUE]] ], [ 100, [[IF_FALSE]] ]
-; IS__TUNIT_NPM-NEXT: [[C2:%.*]] = icmp sge i32 [[PHI]], 100
-; IS__TUNIT_NPM-NEXT: ret i1 [[C2]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ctx_adjustment
-; IS__CGSCC_NPM-SAME: (i32 [[V:%.*]]) #[[ATTR3]] {
-; 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:
-; IS__CGSCC_NPM-NEXT: br label [[END:%.*]]
-; IS__CGSCC_NPM: if.false:
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @ret100() #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: br label [[END]]
-; IS__CGSCC_NPM: end:
-; IS__CGSCC_NPM-NEXT: [[PHI:%.*]] = phi i32 [ [[V]], [[IF_TRUE]] ], [ [[CALL]], [[IF_FALSE]] ]
-; IS__CGSCC_NPM-NEXT: [[C2:%.*]] = icmp sge i32 [[PHI]], 100
-; IS__CGSCC_NPM-NEXT: ret i1 [[C2]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ctx_adjustment
+; TUNIT-SAME: (i32 [[V:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[C1:%.*]] = icmp sge i32 [[V]], 100
+; TUNIT-NEXT: br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
+; TUNIT: if.true:
+; TUNIT-NEXT: br label [[END:%.*]]
+; TUNIT: if.false:
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: [[PHI:%.*]] = phi i32 [ [[V]], [[IF_TRUE]] ], [ 100, [[IF_FALSE]] ]
+; TUNIT-NEXT: [[C2:%.*]] = icmp sge i32 [[PHI]], 100
+; TUNIT-NEXT: ret i1 [[C2]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ctx_adjustment
+; CGSCC-SAME: (i32 [[V:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[C1:%.*]] = icmp sge i32 [[V]], 100
+; CGSCC-NEXT: br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
+; CGSCC: if.true:
+; CGSCC-NEXT: br label [[END:%.*]]
+; CGSCC: if.false:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @ret100() #[[ATTR6]]
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: [[PHI:%.*]] = phi i32 [ [[V]], [[IF_TRUE]] ], [ [[CALL]], [[IF_FALSE]] ]
+; CGSCC-NEXT: [[C2:%.*]] = icmp sge i32 [[PHI]], 100
+; CGSCC-NEXT: ret i1 [[C2]]
;
%c1 = icmp sge i32 %V, 100
br i1 %c1, label %if.true, label %if.false
define i32 @func(i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@func
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@func
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1
+; TUNIT-NEXT: ret i32 [[RET]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@func
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[RET:%.*]] = select i1 [[C]], i32 0, i32 1
+; CGSCC-NEXT: ret i32 [[RET]]
;
%ret = select i1 %c, i32 0, i32 1
ret i32 %ret
}
define i32 @simplify_callsite_argument(i1 %d) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@simplify_callsite_argument
-; 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 [[C]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET1]]
-; IS__TUNIT_NPM: f:
-; IS__TUNIT_NPM-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RET2]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@simplify_callsite_argument
-; IS__CGSCC_NPM-SAME: (i1 [[D:%.*]]) #[[ATTR3]] {
-; 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 noundef i32 @func(i1 noundef [[C]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET1]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: [[RET2:%.*]] = call noundef i32 @func(i1 noundef false) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET2]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@simplify_callsite_argument
+; TUNIT-SAME: (i1 [[D:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[C:%.*]] = select i1 [[D]], i1 true, i1 false
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i32 [[RET1]]
+; TUNIT: f:
+; TUNIT-NEXT: [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR4]]
+; TUNIT-NEXT: ret i32 [[RET2]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@simplify_callsite_argument
+; CGSCC-SAME: (i1 [[D:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[C:%.*]] = select i1 [[D]], i1 true, i1 false
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[RET1:%.*]] = call noundef i32 @func(i1 noundef [[C]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i32 [[RET1]]
+; CGSCC: f:
+; CGSCC-NEXT: [[RET2:%.*]] = call noundef i32 @func(i1 noundef false) #[[ATTR6]]
+; CGSCC-NEXT: ret i32 [[RET2]]
;
%c = select i1 %d, i1 true, i1 false
br i1 %c, label %t, label %f
define internal i32 @less_than_65536(i32 %arg) {
;
-; 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:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536
-; IS__CGSCC_NPM-NEXT: ret i32 [[SHRINKED]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@less_than_65536
+; CGSCC-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536
+; CGSCC-NEXT: ret i32 [[SHRINKED]]
;
%shrinked = udiv i32 %arg, 65536
ret i32 %shrinked
}
define internal i1 @is_less_than_65536(i32 %arg) {
-; 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:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536
-; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@is_less_than_65536
+; CGSCC-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%cmp = icmp ult i32 %arg, 65536
ret i1 %cmp
}
define i1 @check_divided_range(i32 %arg) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@check_divided_range
-; IS__TUNIT_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: ret i1 true
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@check_divided_range
-; IS__CGSCC_NPM-SAME: (i32 [[ARG:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = and i1 [[TRUE1]], [[TRUE2]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@check_divided_range
+; TUNIT-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: ret i1 true
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@check_divided_range
+; CGSCC-SAME: (i32 [[ARG:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[CSRET1:%.*]] = call i32 @less_than_65536(i32 noundef 0) #[[ATTR6]]
+; CGSCC-NEXT: [[CSRET2:%.*]] = call i32 @less_than_65536(i32 [[ARG]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET1]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_65536(i32 [[CSRET2]]) #[[ATTR6]]
+; CGSCC-NEXT: [[RET:%.*]] = and i1 [[TRUE1]], [[TRUE2]]
+; CGSCC-NEXT: ret i1 [[RET]]
;
%csret1 = call i32 @less_than_65536(i32 0)
%csret2 = call i32 @less_than_65536(i32 %arg)
define internal i32 @cast_and_return(i1 %c) {
;
-; 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:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = zext i1 [[C]] to i32
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cast_and_return
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[RET:%.*]] = zext i1 [[C]] to i32
+; CGSCC-NEXT: ret i32 [[RET]]
;
%ret = zext i1 %c to i32
ret i32 %ret
}
define internal i1 @is_less_than_3(i32 %c) {
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@is_less_than_3
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 3
-; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@is_less_than_3
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 3
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%cmp = icmp slt i32 %c, 3
ret i1 %cmp
}
define i1 @check_casted_range(i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@check_casted_range
-; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: ret i1 true
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@check_casted_range
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @cast_and_return(i1 noundef true) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @cast_and_return(i1 [[C]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = call i1 @is_less_than_3(i32 [[ADD]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[RET]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@check_casted_range
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: ret i1 true
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@check_casted_range
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[CSRET1:%.*]] = call i32 @cast_and_return(i1 noundef true) #[[ATTR6]]
+; CGSCC-NEXT: [[CSRET2:%.*]] = call i32 @cast_and_return(i1 [[C]]) #[[ATTR6]]
+; CGSCC-NEXT: [[ADD:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
+; CGSCC-NEXT: [[RET:%.*]] = call i1 @is_less_than_3(i32 [[ADD]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[RET]]
;
%csret1 = call i32 @cast_and_return(i1 true)
%csret2 = call i32 @cast_and_return(i1 %c)
}
define internal i32 @less_than_100_1(i32 %c) {
-; 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:%.*]]) #[[ATTR2]] {
-; 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
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@less_than_100_1
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [
+; CGSCC-NEXT: i32 0, label [[ONZERO:%.*]]
+; CGSCC-NEXT: i32 1, label [[ONONE:%.*]]
+; CGSCC-NEXT: i32 2, label [[ONTWO:%.*]]
+; CGSCC-NEXT: i32 3, label [[ONTHREE:%.*]]
+; CGSCC-NEXT: i32 4, label [[ONFOUR:%.*]]
+; CGSCC-NEXT: i32 5, label [[ONFIVE:%.*]]
+; CGSCC-NEXT: i32 6, label [[ONSIX:%.*]]
+; CGSCC-NEXT: ]
+; CGSCC: onzero:
+; CGSCC-NEXT: ret i32 0
+; CGSCC: onone:
+; CGSCC-NEXT: ret i32 1
+; CGSCC: ontwo:
+; CGSCC-NEXT: ret i32 2
+; CGSCC: onthree:
+; CGSCC-NEXT: ret i32 3
+; CGSCC: onfour:
+; CGSCC-NEXT: ret i32 4
+; CGSCC: onfive:
+; CGSCC-NEXT: ret i32 5
+; CGSCC: onsix:
+; CGSCC-NEXT: ret i32 6
+; CGSCC: otherwise:
+; CGSCC-NEXT: ret i32 99
;
switch i32 %c, label %otherwise [ i32 0, label %onzero
i32 1, label %onone
}
define internal i1 @is_less_than_100_1(i32 %c) {
-; 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: (i32 noundef [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100
-; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@is_less_than_100_1
+; CGSCC-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%cmp = icmp slt i32 %c, 100
ret i1 %cmp
}
define i1 @propagate_range1(i32 %c){
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@propagate_range1
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET:%.*]] = call i32 @less_than_100_1(i32 [[C]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[TRUE:%.*]] = call i1 @is_less_than_100_1(i32 noundef [[CSRET]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[TRUE]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@propagate_range1
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: ret i1 true
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@propagate_range1
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[CSRET:%.*]] = call i32 @less_than_100_1(i32 [[C]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TRUE:%.*]] = call i1 @is_less_than_100_1(i32 noundef [[CSRET]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[TRUE]]
;
%csret = call i32 @less_than_100_1(i32 %c)
%true = call i1 @is_less_than_100_1(i32 %csret)
define internal i32 @less_than_100_2(i32 %c) {
;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@less_than_100_2
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] {
-; 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
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@less_than_100_2
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [
+; TUNIT-NEXT: i32 0, label [[ONZERO:%.*]]
+; TUNIT-NEXT: i32 1, label [[ONONE:%.*]]
+; TUNIT-NEXT: i32 2, label [[ONTWO:%.*]]
+; TUNIT-NEXT: i32 3, label [[ONTHREE:%.*]]
+; TUNIT-NEXT: i32 4, label [[ONFOUR:%.*]]
+; TUNIT-NEXT: i32 5, label [[ONFIVE:%.*]]
+; TUNIT-NEXT: i32 6, label [[ONSIX:%.*]]
+; TUNIT-NEXT: ]
+; TUNIT: onzero:
+; TUNIT-NEXT: ret i32 0
+; TUNIT: onone:
+; TUNIT-NEXT: ret i32 1
+; TUNIT: ontwo:
+; TUNIT-NEXT: ret i32 2
+; TUNIT: onthree:
+; TUNIT-NEXT: ret i32 3
+; TUNIT: onfour:
+; TUNIT-NEXT: ret i32 4
+; TUNIT: onfive:
+; TUNIT-NEXT: ret i32 5
+; TUNIT: onsix:
+; TUNIT-NEXT: ret i32 6
+; TUNIT: otherwise:
+; TUNIT-NEXT: ret i32 99
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@less_than_100_2
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [
+; CGSCC-NEXT: i32 0, label [[ONZERO:%.*]]
+; CGSCC-NEXT: i32 1, label [[ONONE:%.*]]
+; CGSCC-NEXT: i32 2, label [[ONTWO:%.*]]
+; CGSCC-NEXT: i32 3, label [[ONTHREE:%.*]]
+; CGSCC-NEXT: i32 4, label [[ONFOUR:%.*]]
+; CGSCC-NEXT: i32 5, label [[ONFIVE:%.*]]
+; CGSCC-NEXT: i32 6, label [[ONSIX:%.*]]
+; CGSCC-NEXT: ]
+; CGSCC: onzero:
+; CGSCC-NEXT: ret i32 0
+; CGSCC: onone:
+; CGSCC-NEXT: ret i32 1
+; CGSCC: ontwo:
+; CGSCC-NEXT: ret i32 2
+; CGSCC: onthree:
+; CGSCC-NEXT: ret i32 3
+; CGSCC: onfour:
+; CGSCC-NEXT: ret i32 4
+; CGSCC: onfive:
+; CGSCC-NEXT: ret i32 5
+; CGSCC: onsix:
+; CGSCC-NEXT: ret i32 6
+; CGSCC: otherwise:
+; CGSCC-NEXT: ret i32 99
;
switch i32 %c, label %otherwise [ i32 0, label %onzero
i32 1, label %onone
define internal i1 @is_less_than_100_2(i32 %c) {
;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@is_less_than_100_2
+; TUNIT-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100
+; TUNIT-NEXT: ret i1 [[CMP]]
;
-; 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:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100
-; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@is_less_than_100_2
+; CGSCC-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%cmp = icmp slt i32 %c, 100
ret i1 %cmp
}
define i1 @propagate_range2(i32 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse 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) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[CSRET2:%.*]] = call noundef i32 @less_than_100_2(i32 [[C]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[TRUE:%.*]] = and i1 [[TRUE1]], [[TRUE2]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[TRUE]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@propagate_range2
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[CSRET1:%.*]] = call i32 @less_than_100_2(i32 noundef 0) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[CSRET2:%.*]] = call i32 @less_than_100_2(i32 [[C]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[TRUE:%.*]] = and i1 [[TRUE1]], [[TRUE2]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[TRUE]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@propagate_range2
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[CSRET1:%.*]] = call noundef i32 @less_than_100_2(i32 noundef 0) #[[ATTR4]]
+; TUNIT-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) #[[ATTR4]]
+; TUNIT-NEXT: [[CSRET2:%.*]] = call noundef i32 @less_than_100_2(i32 [[C]]) #[[ATTR4]]
+; TUNIT-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR4]]
+; TUNIT-NEXT: [[TRUE:%.*]] = and i1 [[TRUE1]], [[TRUE2]]
+; TUNIT-NEXT: ret i1 [[TRUE]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@propagate_range2
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[CSRET1:%.*]] = call i32 @less_than_100_2(i32 noundef 0) #[[ATTR6]]
+; CGSCC-NEXT: [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) #[[ATTR6]]
+; CGSCC-NEXT: [[CSRET2:%.*]] = call i32 @less_than_100_2(i32 [[C]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TRUE:%.*]] = and i1 [[TRUE1]], [[TRUE2]]
+; CGSCC-NEXT: ret i1 [[TRUE]]
;
%csret1 = call i32 @less_than_100_2(i32 0)
%true1 = call i1 @is_less_than_100_2(i32 %csret1)
}
define internal i1 @non_zero(i8 %v) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_zero
-; IS__TUNIT_NPM-SAME: (i8 [[V:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: [[R:%.*]] = icmp ne i8 [[V]], 0
-; IS__TUNIT_NPM-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: (i8 [[V:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = icmp ne i8 [[V]], 0
-; IS__CGSCC_NPM-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@non_zero
+; TUNIT-SAME: (i8 [[V:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[R:%.*]] = icmp ne i8 [[V]], 0
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@non_zero
+; CGSCC-SAME: (i8 [[V:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[R:%.*]] = icmp ne i8 [[V]], 0
+; CGSCC-NEXT: ret i1 [[R]]
;
%r = icmp ne i8 %v, 0
ret i1 %r
; Avoid range metadata for %l below
define i1 @context(i8* %p) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse 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-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:%.*]]
-; IS__TUNIT_NPM: t:
-; IS__TUNIT_NPM-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[R]]
-; IS__TUNIT_NPM: f:
-; IS__TUNIT_NPM-NEXT: ret i1 false
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@context
-; IS__CGSCC_NPM-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR1]] {
-; 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:%.*]]
-; IS__CGSCC_NPM: t:
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[R]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: ret i1 false
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@context
+; TUNIT-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1
+; TUNIT-NEXT: [[C:%.*]] = icmp slt i8 0, [[L]]
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[R]]
+; TUNIT: f:
+; TUNIT-NEXT: ret i1 false
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@context
+; CGSCC-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1
+; CGSCC-NEXT: [[C:%.*]] = icmp slt i8 0, [[L]]
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[R:%.*]] = call i1 @non_zero(i8 [[L]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[R]]
+; CGSCC: f:
+; CGSCC-NEXT: ret i1 false
;
%l = load i8, i8* %p
%c = icmp slt i8 0, %l
}
define i1 @loop_1(i32 %N) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@loop_1
-; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: br label [[HEADER:%.*]]
-; IS__TUNIT_NPM: header:
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[AND:%.*]], [[HEADER]] ]
-; IS__TUNIT_NPM-NEXT: [[INC:%.*]] = add i32 [[I]], 1
-; IS__TUNIT_NPM-NEXT: [[AND]] = and i32 [[INC]], 9999
-; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp ne i32 [[N]], [[AND]]
-; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[HEADER]], label [[EXIT:%.*]]
-; IS__TUNIT_NPM: exit:
-; IS__TUNIT_NPM-NEXT: [[R:%.*]] = icmp sle i32 [[I]], 5
-; IS__TUNIT_NPM-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@loop_1
-; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br label [[HEADER:%.*]]
-; IS__CGSCC_NPM: header:
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[AND:%.*]], [[HEADER]] ]
-; IS__CGSCC_NPM-NEXT: [[INC:%.*]] = add i32 [[I]], 1
-; IS__CGSCC_NPM-NEXT: [[AND]] = and i32 [[INC]], 9999
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp ne i32 [[N]], [[AND]]
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[HEADER]], label [[EXIT:%.*]]
-; IS__CGSCC_NPM: exit:
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = icmp sle i32 [[I]], 5
-; IS__CGSCC_NPM-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@loop_1
+; TUNIT-SAME: (i32 [[N:%.*]]) #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[HEADER:%.*]]
+; TUNIT: header:
+; TUNIT-NEXT: [[I:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[AND:%.*]], [[HEADER]] ]
+; TUNIT-NEXT: [[INC:%.*]] = add i32 [[I]], 1
+; TUNIT-NEXT: [[AND]] = and i32 [[INC]], 9999
+; TUNIT-NEXT: [[CMP:%.*]] = icmp ne i32 [[N]], [[AND]]
+; TUNIT-NEXT: br i1 [[CMP]], label [[HEADER]], label [[EXIT:%.*]]
+; TUNIT: exit:
+; TUNIT-NEXT: [[R:%.*]] = icmp sle i32 [[I]], 5
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@loop_1
+; CGSCC-SAME: (i32 [[N:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[HEADER:%.*]]
+; CGSCC: header:
+; CGSCC-NEXT: [[I:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[AND:%.*]], [[HEADER]] ]
+; CGSCC-NEXT: [[INC:%.*]] = add i32 [[I]], 1
+; CGSCC-NEXT: [[AND]] = and i32 [[INC]], 9999
+; CGSCC-NEXT: [[CMP:%.*]] = icmp ne i32 [[N]], [[AND]]
+; CGSCC-NEXT: br i1 [[CMP]], label [[HEADER]], label [[EXIT:%.*]]
+; CGSCC: exit:
+; CGSCC-NEXT: [[R:%.*]] = icmp sle i32 [[I]], 5
+; CGSCC-NEXT: ret i1 [[R]]
;
entry:
br label %header
!0 = !{i32 0, i32 10}
!1 = !{i32 10, i32 100}
;.
-; IS__TUNIT_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind readonly willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR3]] = { nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR4]] = { nofree nosync nounwind readnone willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR5]] = { readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR6]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR5]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR6]] = { readnone willreturn }
;.
-; 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}
+; TUNIT: [[RNG0]] = !{i32 0, i32 10}
+; TUNIT: [[RNG1]] = !{i32 10, i32 100}
+; TUNIT: [[RNG2]] = !{i32 200, i32 1091}
+; TUNIT: [[RNG3]] = !{i32 1, i32 -2147483648}
;.
-; IS__CGSCC____: [[RNG0]] = !{i32 0, i32 10}
-; IS__CGSCC____: [[RNG1]] = !{i32 10, i32 100}
+; CGSCC: [[RNG0]] = !{i32 0, i32 10}
+; CGSCC: [[RNG1]] = !{i32 10, i32 100}
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define void @non_recursive_asm_fn() #0 {
; CHECK: Function Attrs: norecurse
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; This is an evolved example to stress test SCC parameter attribute propagation.
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
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:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR3:[0-9]+]]
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly align 4 [[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]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: ret i32* [[W0]]
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@external_ret2_nrw
+; TUNIT-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR3:[0-9]+]]
+; TUNIT-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
+; TUNIT-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly align 4 [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR3]]
+; TUNIT-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
+; TUNIT-NEXT: ret i32* [[W0]]
;
-; 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:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; 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 align 4 [[R0]], i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly align 4 [[R0]], i32* nofree writeonly [[W0]]) #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT: ret i32* [[W0]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@external_ret2_nrw
+; CGSCC-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR2:[0-9]+]]
+; CGSCC-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]]
+; CGSCC-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly align 4 [[R0]], i32* nofree writeonly [[W0]]) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]]
+; CGSCC-NEXT: ret i32* [[W0]]
;
entry:
%call = call i32* @internal_ret0_nw(i32* %n0, i32* %w0)
}
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 [[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
-; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32* [[N0]], null
-; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: br label [[RETURN:%.*]]
-; IS__TUNIT____: if.end:
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL5]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ]
-; IS__TUNIT____-NEXT: ret i32* [[RETVAL_0]]
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@internal_ret0_nw
+; TUNIT-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[R0:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[R1:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp ne i32* [[N0]], null
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: br label [[RETURN:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: store i32 3, i32* [[R0]], align 4
+; TUNIT-NEXT: store i32 5, i32* [[R1]], align 4
+; TUNIT-NEXT: store i32 1, i32* [[W0]], align 4
+; 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]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; TUNIT-NEXT: [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL5]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ]
+; TUNIT-NEXT: ret i32* [[RETVAL_0]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_ret0_nw
-; IS__CGSCC____-SAME: (i32* nofree [[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
-; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32* [[N0]], null
-; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: br label [[RETURN:%.*]]
-; IS__CGSCC____: if.end:
-; 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) [[W0]]) #[[ATTR3]]
-; 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) [[W0]]) #[[ATTR3]]
-; 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]] ]
-; IS__CGSCC____-NEXT: ret i32* [[RETVAL_0]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@internal_ret0_nw
+; CGSCC-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[R0:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[R1:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp ne i32* [[N0]], null
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: br label [[RETURN:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: store i32 3, i32* [[R0]], align 4
+; CGSCC-NEXT: store i32 5, i32* [[R1]], align 4
+; CGSCC-NEXT: store i32 1, i32* [[W0]], align 4
+; 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]]
+; 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]]
+; 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]]
+; 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) [[W0]]) #[[ATTR3]]
+; 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) [[W0]]) #[[ATTR3]]
+; CGSCC-NEXT: [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL5]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ]
+; CGSCC-NEXT: ret i32* [[RETVAL_0]]
;
entry:
%r0 = alloca i32, align 4
}
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 align 4 [[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
-; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL8]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ]
-; IS__TUNIT____-NEXT: ret i32* undef
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@internal_ret1_rrw
+; TUNIT-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree align 4 [[R1:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: br label [[RETURN:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[R0]], align 4
+; TUNIT-NEXT: [[TMP2:%.*]] = load i32, i32* [[R1]], align 4
+; TUNIT-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], [[TMP2]]
+; TUNIT-NEXT: store i32 [[ADD]], i32* [[W0]], align 4
+; TUNIT-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; TUNIT-NEXT: [[CALL3:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; TUNIT-NEXT: [[CALL8:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL8]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ]
+; TUNIT-NEXT: ret i32* undef
;
-; 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 align 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
-; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; 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: [[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) [[W0]]) #[[ATTR3]]
-; 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) [[W0]]) #[[ATTR3]]
-; 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]] ]
-; IS__CGSCC____-NEXT: ret i32* undef
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@internal_ret1_rrw
+; CGSCC-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree align 4 [[R1:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: br label [[RETURN:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]]
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* [[R0]], align 4
+; CGSCC-NEXT: [[TMP2:%.*]] = load i32, i32* [[R1]], align 4
+; CGSCC-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], [[TMP2]]
+; CGSCC-NEXT: store i32 [[ADD]], i32* [[W0]], align 4
+; 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]]
+; 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]]
+; 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]]
+; 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]]
+; 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]]
+; 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) [[W0]]) #[[ATTR3]]
+; 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) [[W0]]) #[[ATTR3]]
+; 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]]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL8]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ]
+; CGSCC-NEXT: ret i32* undef
;
entry:
%0 = load i32, i32* %r0, align 4
}
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 [[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
-; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; 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]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL4]], [[IF_END]] ], [ [[W0]], [[IF_THEN]] ]
-; IS__TUNIT____-NEXT: ret i32* [[RETVAL_0]]
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@internal_ret1_rw
+; TUNIT-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: br label [[RETURN:%.*]]
+; TUNIT: if.end:
+; 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]]) #[[ATTR3]]
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[R0]], align 4
+; TUNIT-NEXT: store i32 [[TMP1]], i32* [[W0]], align 4
+; 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]]) #[[ATTR3]]
+; TUNIT-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; 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]]) #[[ATTR3]]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL4]], [[IF_END]] ], [ [[W0]], [[IF_THEN]] ]
+; TUNIT-NEXT: ret i32* [[RETVAL_0]]
;
-; 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 [[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
-; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; 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: [[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) [[W0]]) #[[ATTR3]]
-; 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]] ]
-; IS__CGSCC____-NEXT: ret i32* [[RETVAL_0]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@internal_ret1_rw
+; CGSCC-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: br label [[RETURN:%.*]]
+; CGSCC: if.end:
+; 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]]
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* [[R0]], align 4
+; CGSCC-NEXT: store i32 [[TMP1]], i32* [[W0]], align 4
+; 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]]
+; 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]]
+; 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) [[W0]]) #[[ATTR3]]
+; 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]]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL4]], [[IF_END]] ], [ [[W0]], [[IF_THEN]] ]
+; CGSCC-NEXT: ret i32* [[RETVAL_0]]
;
entry:
%0 = load i32, i32* %r0, align 4
}
define i32* @external_source_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@external_source_ret2_nrw
-; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR2:[0-9]+]] {
-; 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]]) #[[ATTR4:[0-9]+]]
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: ret i32* [[W0]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@external_source_ret2_nrw
+; TUNIT-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; 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]]) #[[ATTR4:[0-9]+]]
+; TUNIT-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
+; TUNIT-NEXT: ret i32* [[W0]]
;
-; 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 [[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 [[W0]]) #[[ATTR4:[0-9]+]]
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: ret i32* [[CALL1]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@external_source_ret2_nrw
+; CGSCC-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly [[W0]]) #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
+; CGSCC-NEXT: ret i32* [[CALL1]]
;
entry:
%call = call i32* @external_sink_ret2_nrw(i32* %n0, i32* %r0, i32* %w0)
; Verify that we see only expected attribute sets, the above lines only check
; for a subset relation.
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind }
+; TUNIT: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind }
+; TUNIT: attributes #[[ATTR3]] = { nofree nosync nounwind }
+; TUNIT: attributes #[[ATTR4]] = { 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 }
-; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR3]] = { nounwind }
+; CGSCC: attributes #[[ATTR4]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
@x = global i32 0
}
define void @test8_2(i32* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test8_2
-; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: store i32 10, i32* [[P]], align 4
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test8_2
-; IS__CGSCC____-SAME: (i32* nofree writeonly [[P:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call align 4 i32* @test8_1(i32* noalias nofree readnone [[P]]) #[[ATTR13:[0-9]+]]
-; IS__CGSCC____-NEXT: store i32 10, i32* [[CALL]], align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test8_2
+; TUNIT-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store i32 10, i32* [[P]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test8_2
+; CGSCC-SAME: (i32* nofree writeonly [[P:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call align 4 i32* @test8_1(i32* noalias nofree readnone [[P]]) #[[ATTR13:[0-9]+]]
+; CGSCC-NEXT: store i32 10, i32* [[CALL]], align 4
+; CGSCC-NEXT: ret void
;
entry:
%call = call i32* @test8_1(i32* %p)
; CHECK-NOT: readnone
; CHECK-NOT: readonly
define void @test9(<4 x i32*> %ptrs, <4 x i32>%val) {
-; IS__TUNIT____: Function Attrs: nofree norecurse 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 <i1 true, i1 false, i1 true, i1 false>) #[[ATTR12:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test9
-; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) #[[ATTR0]] {
-; 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 <i1 true, i1 false, i1 true, i1 false>) #[[ATTR14:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test9
+; TUNIT-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef <i1 true, i1 false, i1 true, i1 false>) #[[ATTR12:[0-9]+]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test9
+; CGSCC-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef <i1 true, i1 false, i1 true, i1 false>) #[[ATTR14:[0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32>%val, <4 x i32*> %ptrs, i32 4, <4 x i1><i1 true, i1 false, i1 true, i1 false>)
ret void
; CHECK: declare <4 x i32> @llvm.masked.gather
declare <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*>, i32, <4 x i1>, <4 x i32>)
define <4 x i32> @test10(<4 x i32*> %ptrs) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test10
-; IS__TUNIT____-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR6:[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 <i1 true, i1 false, i1 true, i1 false>, <4 x i32> undef) #[[ATTR13:[0-9]+]]
-; IS__TUNIT____-NEXT: ret <4 x i32> [[RES]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test10
-; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR7:[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 <i1 true, i1 false, i1 true, i1 false>, <4 x i32> undef) #[[ATTR15:[0-9]+]]
-; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test10
+; TUNIT-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef <i1 true, i1 false, i1 true, i1 false>, <4 x i32> undef) #[[ATTR13:[0-9]+]]
+; TUNIT-NEXT: ret <4 x i32> [[RES]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test10
+; CGSCC-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR7:[0-9]+]] {
+; CGSCC-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef <i1 true, i1 false, i1 true, i1 false>, <4 x i32> undef) #[[ATTR15:[0-9]+]]
+; 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><i1 true, i1 false, i1 true, i1 false>, <4 x i32>undef)
ret <4 x i32> %res
; CHECK: declare <4 x i32> @test11_1
declare <4 x i32> @test11_1(<4 x i32*>) argmemonly nounwind readonly
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:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) #[[ATTR11:[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:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) #[[ATTR12:[0-9]+]]
-; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]]
+; TUNIT: Function Attrs: argmemonly nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@test11_2
+; TUNIT-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) #[[ATTR11:[0-9]+]]
+; TUNIT-NEXT: ret <4 x i32> [[RES]]
+;
+; CGSCC: Function Attrs: argmemonly nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@test11_2
+; CGSCC-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) #[[ATTR12:[0-9]+]]
+; CGSCC-NEXT: ret <4 x i32> [[RES]]
;
%res = call <4 x i32> @test11_1(<4 x i32*> %ptrs)
ret <4 x i32> %res
declare <4 x i32> @test12_1(<4 x i32*>) argmemonly nounwind
; CHECK-NOT: readnone
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:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR14:[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:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR16:[0-9]+]]
-; IS__CGSCC____-NEXT: ret <4 x i32> [[RES]]
+; TUNIT: Function Attrs: argmemonly nounwind
+; TUNIT-LABEL: define {{[^@]+}}@test12_2
+; TUNIT-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR14:[0-9]+]]
+; TUNIT-NEXT: ret <4 x i32> [[RES]]
+;
+; CGSCC: Function Attrs: argmemonly nounwind
+; CGSCC-LABEL: define {{[^@]+}}@test12_2
+; CGSCC-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR16:[0-9]+]]
+; CGSCC-NEXT: ret <4 x i32> [[RES]]
;
%res = call <4 x i32> @test12_1(<4 x i32*> %ptrs)
ret <4 x i32> %res
}
define i32 @volatile_load(i32* %p) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@volatile_load
-; IS__TUNIT____-SAME: (i32* nofree noundef align 4 [[P:%.*]]) #[[ATTR9:[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:%.*]]) #[[ATTR10:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[LOAD:%.*]] = load volatile i32, i32* [[P]], align 4
-; IS__CGSCC____-NEXT: ret i32 [[LOAD]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@volatile_load
+; TUNIT-SAME: (i32* nofree noundef align 4 [[P:%.*]]) #[[ATTR9:[0-9]+]] {
+; TUNIT-NEXT: [[LOAD:%.*]] = load volatile i32, i32* [[P]], align 4
+; TUNIT-NEXT: ret i32 [[LOAD]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@volatile_load
+; CGSCC-SAME: (i32* nofree noundef align 4 [[P:%.*]]) #[[ATTR10:[0-9]+]] {
+; CGSCC-NEXT: [[LOAD:%.*]] = load volatile i32, i32* [[P]], align 4
+; CGSCC-NEXT: ret i32 [[LOAD]]
;
%load = load volatile i32, i32* %p
ret i32 %load
}
define void @byval_not_readnone_1(i8* byval(i8) %written) readnone {
-; IS__TUNIT____: Function Attrs: readnone
-; IS__TUNIT____-LABEL: define {{[^@]+}}@byval_not_readnone_1
-; IS__TUNIT____-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR10:[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:%.*]]) #[[ATTR11:[0-9]+]] {
-; IS__CGSCC____-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]])
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: readnone
+; TUNIT-LABEL: define {{[^@]+}}@byval_not_readnone_1
+; TUNIT-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR10:[0-9]+]] {
+; TUNIT-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]])
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: readnone
+; CGSCC-LABEL: define {{[^@]+}}@byval_not_readnone_1
+; CGSCC-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR11:[0-9]+]] {
+; CGSCC-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]])
+; CGSCC-NEXT: ret void
;
call void @escape_i8(i8* %written)
ret void
}
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 byval(i8) [[READ_ONLY]]) #[[ATTR2]]
-; IS__TUNIT____-NEXT: call void @byval_not_readnone_1(i8* noalias nocapture readnone byval(i8) [[READ_ONLY]])
-; IS__TUNIT____-NEXT: call void @byval_no_fnarg(i8* nocapture nofree readonly byval(i8) [[READ_ONLY]]) #[[ATTR15:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@testbyval
-; IS__CGSCC____-SAME: (i8* nocapture noundef nonnull readonly dereferenceable(1) [[READ_ONLY:%.*]]) {
-; IS__CGSCC____-NEXT: call void @byval_not_readonly_1(i8* noalias nocapture noundef nonnull readonly byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT: call void @byval_not_readnone_1(i8* noalias nocapture noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]])
-; IS__CGSCC____-NEXT: call void @byval_no_fnarg(i8* noalias nocapture nofree noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR17:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@testbyval
+; TUNIT-SAME: (i8* nocapture readonly [[READ_ONLY:%.*]]) {
+; TUNIT-NEXT: call void @byval_not_readonly_1(i8* nocapture readonly byval(i8) [[READ_ONLY]]) #[[ATTR2]]
+; TUNIT-NEXT: call void @byval_not_readnone_1(i8* noalias nocapture readnone byval(i8) [[READ_ONLY]])
+; TUNIT-NEXT: call void @byval_no_fnarg(i8* nocapture nofree readonly byval(i8) [[READ_ONLY]]) #[[ATTR15:[0-9]+]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@testbyval
+; CGSCC-SAME: (i8* nocapture noundef nonnull readonly dereferenceable(1) [[READ_ONLY:%.*]]) {
+; CGSCC-NEXT: call void @byval_not_readonly_1(i8* noalias nocapture noundef nonnull readonly byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR2]]
+; CGSCC-NEXT: call void @byval_not_readnone_1(i8* noalias nocapture noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]])
+; CGSCC-NEXT: call void @byval_no_fnarg(i8* noalias nocapture nofree noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR17:[0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @byval_not_readonly_1(i8* byval(i8) %read_only)
call void @byval_not_readonly_2(i8* byval(i8) %read_only)
declare void @val_use(i8 %ptr) readonly nounwind
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:%.*]]) #[[ATTR11]] {
-; IS__TUNIT____-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) #[[ATTR11]]
-; IS__TUNIT____-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) #[[ATTR11]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nounwind readonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_uses
-; IS__CGSCC____-SAME: (i8* nocapture readonly [[PTR:%.*]]) #[[ATTR12]] {
-; IS__CGSCC____-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) #[[ATTR12]]
-; IS__CGSCC____-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) #[[ATTR12]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nounwind readonly
+; TUNIT-LABEL: define {{[^@]+}}@ptr_uses
+; TUNIT-SAME: (i8* nocapture readonly [[PTR:%.*]]) #[[ATTR11]] {
+; TUNIT-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) #[[ATTR11]]
+; TUNIT-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) #[[ATTR11]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nounwind readonly
+; CGSCC-LABEL: define {{[^@]+}}@ptr_uses
+; CGSCC-SAME: (i8* nocapture readonly [[PTR:%.*]]) #[[ATTR12]] {
+; CGSCC-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) #[[ATTR12]]
+; CGSCC-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) #[[ATTR12]]
+; CGSCC-NEXT: ret void
;
%call_ptr = call i8* @maybe_returned_ptr(i8* %ptr)
%call_val = call i8 @maybe_returned_val(i8* %call_ptr)
ret i32 %l
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { readonly }
-; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { nocallback nofree nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR5:[0-9]+]] = { nocallback nofree nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR7]] = { argmemonly nounwind readonly }
-; IS__TUNIT____: attributes #[[ATTR8]] = { argmemonly nounwind }
-; IS__TUNIT____: attributes #[[ATTR9]] = { argmemonly nofree norecurse nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR10]] = { readnone }
-; IS__TUNIT____: attributes #[[ATTR11]] = { nounwind readonly }
-; IS__TUNIT____: attributes #[[ATTR12]] = { willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR13]] = { readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR14]] = { nounwind }
-; IS__TUNIT____: attributes #[[ATTR15]] = { nounwind writeonly }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { readonly }
+; TUNIT: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR4:[0-9]+]] = { nocallback nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR5:[0-9]+]] = { nocallback nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR7]] = { argmemonly nounwind readonly }
+; TUNIT: attributes #[[ATTR8]] = { argmemonly nounwind }
+; TUNIT: attributes #[[ATTR9]] = { argmemonly nofree norecurse nounwind willreturn }
+; TUNIT: attributes #[[ATTR10]] = { readnone }
+; TUNIT: attributes #[[ATTR11]] = { nounwind readonly }
+; TUNIT: attributes #[[ATTR12]] = { willreturn writeonly }
+; TUNIT: attributes #[[ATTR13]] = { readonly willreturn }
+; TUNIT: attributes #[[ATTR14]] = { nounwind }
+; TUNIT: attributes #[[ATTR15]] = { nounwind writeonly }
;.
-; 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:[0-9]+]] = { nocallback nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR8]] = { argmemonly nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nounwind }
-; IS__CGSCC____: attributes #[[ATTR10]] = { argmemonly nofree norecurse nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR11]] = { readnone }
-; IS__CGSCC____: attributes #[[ATTR12]] = { nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR13]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR14]] = { willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR15]] = { readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR16]] = { nounwind }
-; IS__CGSCC____: attributes #[[ATTR17]] = { nounwind writeonly }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { readonly }
+; CGSCC: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR5:[0-9]+]] = { nocallback nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR8]] = { argmemonly nounwind readonly }
+; CGSCC: attributes #[[ATTR9]] = { argmemonly nounwind }
+; CGSCC: attributes #[[ATTR10]] = { argmemonly nofree norecurse nounwind willreturn }
+; CGSCC: attributes #[[ATTR11]] = { readnone }
+; CGSCC: attributes #[[ATTR12]] = { nounwind readonly }
+; CGSCC: attributes #[[ATTR13]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR14]] = { willreturn writeonly }
+; CGSCC: attributes #[[ATTR15]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR16]] = { nounwind }
+; CGSCC: attributes #[[ATTR17]] = { nounwind writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define void @_ZN6openmc13FilterBinIterC1ERKNS_5TallyERNS_8ParticleE(i1 %c1, i1 %c2) {
; CHECK: Function Attrs: nofree norecurse nosync nounwind
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; Test cases specifically designed for the "returned" argument attribute.
; We use FIXME's to indicate problems and missing attributes.
}
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:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[R]]) #[[ATTR10:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[R]]
-;
-; 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:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[R]]) #[[ATTR7:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[R]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@scc_r1
+; TUNIT-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[R]]) #[[ATTR10:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[R]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@scc_r1
+; CGSCC-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[R]]) #[[ATTR7:[0-9]+]]
+; CGSCC-NEXT: ret i32 [[R]]
;
entry:
%call = call i32 @sink_r0(i32 %r)
}
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____-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: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR10]]
-; 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: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[R]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: if.end12:
-; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; 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]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[COND_END]]
-; IS__TUNIT____: cond.end:
-; IS__TUNIT____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__TUNIT____-NEXT: ret i32 [[R]]
-;
-; 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____-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: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[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: [[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 [[R]], 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 [[B]], i32 [[R]], i32 [[R]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[R]], i32 undef) #[[ATTR7]]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: if.end12:
-; IS__CGSCC____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
-; IS__CGSCC____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; 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: br label [[COND_END]]
-; IS__CGSCC____: cond.end:
-; IS__CGSCC____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__CGSCC____-NEXT: ret i32 [[R]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@scc_r2
+; TUNIT-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[RETURN:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
+; TUNIT: if.then3:
+; TUNIT-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 undef) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[R]], i32 undef) #[[ATTR10]]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: if.end12:
+; TUNIT-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; TUNIT: cond.true:
+; TUNIT-NEXT: br label [[COND_END:%.*]]
+; TUNIT: cond.false:
+; TUNIT-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[COND_END]]
+; TUNIT: cond.end:
+; TUNIT-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; TUNIT-NEXT: ret i32 [[R]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@scc_r2
+; CGSCC-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: br label [[RETURN:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
+; CGSCC: if.then3:
+; CGSCC-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 undef) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[R]], i32 undef) #[[ATTR7]]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: if.end12:
+; CGSCC-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CGSCC: cond.true:
+; CGSCC-NEXT: br label [[COND_END:%.*]]
+; CGSCC: cond.false:
+; CGSCC-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: br label [[COND_END]]
+; CGSCC: cond.end:
+; CGSCC-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; CGSCC-NEXT: ret i32 [[R]]
;
entry:
%cmp = icmp sgt i32 %a, %b
}
define i32 @scc_rX(i32 %a, i32 %b, i32 %r) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@scc_rX
-; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[R:%.*]]) #[[ATTR2:[0-9]+]] {
-; 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: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR10]]
-; 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: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[B]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[B]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: if.end12:
-; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; 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]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[COND_END]]
-; IS__TUNIT____: cond.end:
-; IS__TUNIT____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[B]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__TUNIT____-NEXT: ret i32 [[RETVAL_0]]
-;
-; 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____-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: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[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: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[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 [[R]], i32 [[R]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[B]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT: [[CALL10:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[B]], i32 [[B]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: if.end12:
-; IS__CGSCC____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
-; IS__CGSCC____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; 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: br label [[COND_END]]
-; IS__CGSCC____: cond.end:
-; IS__CGSCC____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL1]], [[IF_THEN]] ], [ [[CALL11]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__CGSCC____-NEXT: ret i32 [[RETVAL_0]]
+; TUNIT: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@scc_rX
+; TUNIT-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[R:%.*]]) #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[RETURN:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
+; TUNIT: if.then3:
+; TUNIT-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 undef) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[B]]) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[B]], i32 undef) #[[ATTR10]]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: if.end12:
+; TUNIT-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; TUNIT: cond.true:
+; TUNIT-NEXT: br label [[COND_END:%.*]]
+; TUNIT: cond.false:
+; TUNIT-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[COND_END]]
+; TUNIT: cond.end:
+; TUNIT-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[B]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; TUNIT-NEXT: ret i32 [[RETVAL_0]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@scc_rX
+; CGSCC-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[R:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR8:[0-9]+]]
+; CGSCC-NEXT: br label [[RETURN:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
+; CGSCC: if.then3:
+; CGSCC-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR8]]
+; CGSCC-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR8]]
+; CGSCC-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 [[R]]) #[[ATTR8]]
+; CGSCC-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR8]]
+; CGSCC-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[B]]) #[[ATTR8]]
+; CGSCC-NEXT: [[CALL10:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR8]]
+; CGSCC-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[B]], i32 [[B]]) #[[ATTR8]]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: if.end12:
+; CGSCC-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CGSCC: cond.true:
+; CGSCC-NEXT: br label [[COND_END:%.*]]
+; CGSCC: cond.false:
+; CGSCC-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR8]]
+; CGSCC-NEXT: br label [[COND_END]]
+; CGSCC: cond.end:
+; CGSCC-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL1]], [[IF_THEN]] ], [ [[CALL11]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; CGSCC-NEXT: ret i32 [[RETVAL_0]]
;
entry:
%cmp = icmp sgt i32 %a, %b
}
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* nocapture nofree readnone [[A:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret double* [[R]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_scc_r1
-; IS__CGSCC____-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nofree readnone returned [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: ret double* [[R]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@ptr_scc_r1
+; TUNIT-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: ret double* [[R]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@ptr_scc_r1
+; CGSCC-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nofree readnone returned [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: ret double* [[R]]
;
entry:
%call = call double* @ptr_sink_r0(double* %r)
}
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* nocapture nofree readnone [[A:%.*]], double* nocapture nofree readnone [[B:%.*]], double* nofree readnone returned "no-capture-maybe-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: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; 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: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[B]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: if.end12:
-; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; 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 nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[COND_END]]
-; IS__TUNIT____: cond.end:
-; IS__TUNIT____-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi double* [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__TUNIT____-NEXT: ret double* [[R]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_scc_r2
-; IS__CGSCC____-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nocapture 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: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone [[R]]) #[[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: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture 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 nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR7]]
-; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone [[R]], 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]]
-; IS__CGSCC____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; 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 nocapture nofree readnone [[A]], double* noalias nocapture 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]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi double* [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__CGSCC____-NEXT: ret double* [[R]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@ptr_scc_r2
+; TUNIT-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nocapture nofree readnone [[B:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp ugt double* [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[RETURN:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[CMP2:%.*]] = icmp ult double* [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
+; TUNIT: if.then3:
+; TUNIT-NEXT: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[B]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: if.end12:
+; TUNIT-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]]
+; TUNIT-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; TUNIT: cond.true:
+; TUNIT-NEXT: br label [[COND_END:%.*]]
+; TUNIT: cond.false:
+; TUNIT-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[COND_END]]
+; TUNIT: cond.end:
+; TUNIT-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
+; TUNIT-NEXT: br label [[RETURN]]
+; TUNIT: return:
+; TUNIT-NEXT: [[RETVAL_0:%.*]] = phi double* [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; TUNIT-NEXT: ret double* [[R]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@ptr_scc_r2
+; CGSCC-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nocapture nofree readnone [[B:%.*]], double* nofree readnone returned [[R:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp ugt double* [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: br label [[RETURN:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[CMP2:%.*]] = icmp ult double* [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
+; CGSCC: if.then3:
+; CGSCC-NEXT: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone [[B]], double* noalias nocapture nofree readnone undef) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR7]]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: if.end12:
+; CGSCC-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]]
+; CGSCC-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CGSCC: cond.true:
+; CGSCC-NEXT: br label [[COND_END:%.*]]
+; CGSCC: cond.false:
+; CGSCC-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone [[R]]) #[[ATTR7]]
+; CGSCC-NEXT: br label [[COND_END]]
+; CGSCC: cond.end:
+; CGSCC-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
+; CGSCC-NEXT: br label [[RETURN]]
+; CGSCC: return:
+; CGSCC-NEXT: [[RETVAL_0:%.*]] = phi double* [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; CGSCC-NEXT: ret double* [[R]]
;
entry:
%cmp = icmp ugt double* %a, %b
; }
;
define i32* @rt0(i32* %a) #0 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt0
-; IS__TUNIT____-SAME: (i32* nofree noundef nonnull readonly returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt0(i32* nofree noundef nonnull readonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[A]]) #[[ATTR11:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32* [[A]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt0
-; IS__CGSCC____-SAME: (i32* nofree noundef nonnull readonly returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt0(i32* nofree noundef nonnull readonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[A]]) #[[ATTR9:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32* [[A]]
+; TUNIT: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable
+; TUNIT-LABEL: define {{[^@]+}}@rt0
+; TUNIT-SAME: (i32* nofree noundef nonnull readonly returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @rt0(i32* nofree noundef nonnull readonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[A]]) #[[ATTR11:[0-9]+]]
+; TUNIT-NEXT: ret i32* [[A]]
+;
+; CGSCC: Function Attrs: argmemonly nofree noinline nosync nounwind readonly uwtable
+; CGSCC-LABEL: define {{[^@]+}}@rt0
+; CGSCC-SAME: (i32* nofree noundef nonnull readonly returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @rt0(i32* nofree noundef nonnull readonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[A]]) #[[ATTR9:[0-9]+]]
+; CGSCC-NEXT: ret i32* [[A]]
;
entry:
%v = load i32, i32* %a, align 4
; }
;
define i32* @rt1(i32* %a) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt1
-; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32* undef
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt1
-; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32* undef
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@rt1
+; TUNIT-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i32* undef
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@rt1
+; CGSCC-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i32* undef
;
entry:
%v = load i32, i32* %a, align 4
; TEST another SCC test
;
define i32* @rt2_helper(i32* %a) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt2_helper
-; IS__TUNIT____-SAME: (i32* nofree readnone returned [[A:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret i32* [[A]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt2_helper
-; IS__CGSCC____-SAME: (i32* nofree readnone returned [[A:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: ret i32* [[A]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@rt2_helper
+; TUNIT-SAME: (i32* nofree readnone returned [[A:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) #[[ATTR10]]
+; TUNIT-NEXT: ret i32* [[A]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@rt2_helper
+; CGSCC-SAME: (i32* nofree readnone returned [[A:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) #[[ATTR7]]
+; CGSCC-NEXT: ret i32* [[A]]
;
entry:
%call = call i32* @rt2(i32* %a, i32* %a)
}
define i32* @rt2(i32* %a, i32 *%b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt2
-; IS__TUNIT____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[A]], [[IF_THEN]] ]
-; IS__TUNIT____-NEXT: ret i32* [[SEL]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt2
-; IS__CGSCC____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: br label [[IF_END]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[A]], [[IF_THEN]] ]
-; IS__CGSCC____-NEXT: ret i32* [[SEL]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@rt2
+; TUNIT-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[A]], [[IF_THEN]] ]
+; TUNIT-NEXT: ret i32* [[SEL]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@rt2
+; CGSCC-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) #[[ATTR7]]
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[A]], [[IF_THEN]] ]
+; CGSCC-NEXT: ret i32* [[SEL]]
;
entry:
%cmp = icmp eq i32* %a, null
; TEST another SCC test
;
define i32* @rt3_helper(i32* %a, i32* %b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt3_helper
-; IS__TUNIT____-SAME: (i32* nocapture 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 nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret i32* [[B]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt3_helper
-; IS__CGSCC____-SAME: (i32* nocapture 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 nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: ret i32* [[B]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@rt3_helper
+; TUNIT-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @rt3(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR10]]
+; TUNIT-NEXT: ret i32* [[B]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@rt3_helper
+; CGSCC-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @rt3(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR7]]
+; CGSCC-NEXT: ret i32* [[B]]
;
entry:
%call = call i32* @rt3(i32* %a, i32* %b)
}
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* nocapture 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 nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[B]], [[IF_THEN]] ]
-; IS__TUNIT____-NEXT: ret i32* [[B]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt3
-; IS__CGSCC____-SAME: (i32* nocapture 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 nocapture 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:%.*]] ], [ [[B]], [[IF_THEN]] ]
-; IS__CGSCC____-NEXT: ret i32* [[B]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@rt3
+; TUNIT-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @rt3_helper(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[B]], [[IF_THEN]] ]
+; TUNIT-NEXT: ret i32* [[B]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@rt3
+; CGSCC-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @rt3_helper(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR7]]
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[B]], [[IF_THEN]] ]
+; CGSCC-NEXT: ret i32* [[B]]
;
entry:
%cmp = icmp eq i32* %a, null
declare void @unknown_fn(i32* (i32*)*) #0
define i32* @calls_unknown_fn(i32* %r) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@calls_unknown_fn
-; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__TUNIT____-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) #[[ATTR12:[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:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) #[[ATTR10:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32* [[R]]
+; TUNIT: Function Attrs: noinline nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@calls_unknown_fn
+; TUNIT-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) #[[ATTR12:[0-9]+]]
+; TUNIT-NEXT: ret i32* [[R]]
+;
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@calls_unknown_fn
+; CGSCC-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) #[[ATTR10:[0-9]+]]
+; CGSCC-NEXT: ret i32* [[R]]
;
tail call void @unknown_fn(i32* (i32*)* nonnull @calls_unknown_fn)
ret i32* %r
; Verify the maybe-redefined function is not annotated:
;
define linkonce_odr i32* @maybe_redefined_fn(i32* %r) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@maybe_redefined_fn
-; IS__TUNIT____-SAME: (i32* [[R:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32* [[R]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@maybe_redefined_fn
-; IS__CGSCC____-SAME: (i32* [[R:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32* [[R]]
+; TUNIT: Function Attrs: noinline nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@maybe_redefined_fn
+; TUNIT-SAME: (i32* [[R:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i32* [[R]]
+;
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@maybe_redefined_fn
+; CGSCC-SAME: (i32* [[R:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i32* [[R]]
;
entry:
ret i32* %r
}
define i32* @calls_maybe_redefined_fn(i32* %r) #0 {
-; IS__TUNIT____: Function Attrs: noinline norecurse nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn
-; IS__TUNIT____-SAME: (i32* returned [[R:%.*]]) #[[ATTR6:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) #[[ATTR12]]
-; 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:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: ret i32* [[R]]
+; TUNIT: Function Attrs: noinline norecurse nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn
+; TUNIT-SAME: (i32* returned [[R:%.*]]) #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) #[[ATTR12]]
+; TUNIT-NEXT: ret i32* [[R]]
+;
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn
+; CGSCC-SAME: (i32* returned [[R:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) #[[ATTR10]]
+; CGSCC-NEXT: ret i32* [[R]]
;
entry:
%call = call i32* @maybe_redefined_fn(i32* %r)
; Verify the maybe-redefined function is not annotated:
;
define linkonce_odr i32* @maybe_redefined_fn2(i32* %r) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@maybe_redefined_fn2
-; IS__TUNIT____-SAME: (i32* [[R:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32* [[R]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@maybe_redefined_fn2
-; IS__CGSCC____-SAME: (i32* [[R:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32* [[R]]
+; TUNIT: Function Attrs: noinline nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@maybe_redefined_fn2
+; TUNIT-SAME: (i32* [[R:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret i32* [[R]]
+;
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@maybe_redefined_fn2
+; CGSCC-SAME: (i32* [[R:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: ret i32* [[R]]
;
entry:
ret i32* %r
}
define i32* @calls_maybe_redefined_fn2(i32* %r) #0 {
-; IS__TUNIT____: Function Attrs: noinline norecurse nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn2
-; IS__TUNIT____-SAME: (i32* [[R:%.*]]) #[[ATTR6]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) #[[ATTR12]]
-; 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:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: ret i32* [[CALL]]
+; TUNIT: Function Attrs: noinline norecurse nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn2
+; TUNIT-SAME: (i32* [[R:%.*]]) #[[ATTR6]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) #[[ATTR12]]
+; TUNIT-NEXT: ret i32* [[CALL]]
+;
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn2
+; CGSCC-SAME: (i32* [[R:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) #[[ATTR10]]
+; CGSCC-NEXT: ret i32* [[CALL]]
;
entry:
%call = call i32* @maybe_redefined_fn2(i32* %r)
; }
;
define double @recursion_select_and_phi(i32 %a, double %b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursion_select_and_phi
-; IS__TUNIT____-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: ret double [[B]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursion_select_and_phi
-; IS__CGSCC____-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT: br label [[IF_END]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: ret double [[B]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@recursion_select_and_phi
+; TUNIT-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) #[[ATTR10]]
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: ret double [[B]]
+;
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@recursion_select_and_phi
+; CGSCC-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) #[[ATTR7]]
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: ret double [[B]]
;
entry:
%dec = add nsw i32 %a, -1
declare i32* @unknown(i32*)
define i32* @ret_arg_or_unknown(i32* %b) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_arg_or_unknown
-; IS__TUNIT____-SAME: (i32* [[B:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
-; IS__TUNIT____: ret_arg:
-; IS__TUNIT____-NEXT: ret i32* [[B]]
-; IS__TUNIT____: ret_unknown:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
-; IS__TUNIT____-NEXT: ret i32* [[CALL]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_arg_or_unknown
-; IS__CGSCC____-SAME: (i32* [[B:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
-; IS__CGSCC____: ret_arg:
-; IS__CGSCC____-NEXT: ret i32* [[B]]
-; IS__CGSCC____: ret_unknown:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
-; IS__CGSCC____-NEXT: ret i32* [[CALL]]
+; TUNIT: Function Attrs: noinline nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@ret_arg_or_unknown
+; TUNIT-SAME: (i32* [[B:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
+; TUNIT-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
+; TUNIT: ret_arg:
+; TUNIT-NEXT: ret i32* [[B]]
+; TUNIT: ret_unknown:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
+; TUNIT-NEXT: ret i32* [[CALL]]
+;
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@ret_arg_or_unknown
+; CGSCC-SAME: (i32* [[B:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
+; CGSCC-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
+; CGSCC: ret_arg:
+; CGSCC-NEXT: ret i32* [[B]]
+; CGSCC: ret_unknown:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
+; CGSCC-NEXT: ret i32* [[CALL]]
;
entry:
%cmp = icmp eq i32* %b, null
}
define i32* @ret_arg_or_unknown_through_phi(i32* %b) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi
-; IS__TUNIT____-SAME: (i32* [[B:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
-; IS__TUNIT____: ret_arg:
-; IS__TUNIT____-NEXT: br label [[R:%.*]]
-; IS__TUNIT____: ret_unknown:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
-; IS__TUNIT____-NEXT: br label [[R]]
-; IS__TUNIT____: r:
-; IS__TUNIT____-NEXT: [[PHI:%.*]] = phi i32* [ [[B]], [[RET_ARG]] ], [ [[CALL]], [[RET_UNKNOWN]] ]
-; IS__TUNIT____-NEXT: ret i32* [[PHI]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi
-; IS__CGSCC____-SAME: (i32* [[B:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
-; IS__CGSCC____: ret_arg:
-; IS__CGSCC____-NEXT: br label [[R:%.*]]
-; IS__CGSCC____: ret_unknown:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
-; IS__CGSCC____-NEXT: br label [[R]]
-; IS__CGSCC____: r:
-; IS__CGSCC____-NEXT: [[PHI:%.*]] = phi i32* [ [[B]], [[RET_ARG]] ], [ [[CALL]], [[RET_UNKNOWN]] ]
-; IS__CGSCC____-NEXT: ret i32* [[PHI]]
+; TUNIT: Function Attrs: noinline nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi
+; TUNIT-SAME: (i32* [[B:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
+; TUNIT-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
+; TUNIT: ret_arg:
+; TUNIT-NEXT: br label [[R:%.*]]
+; TUNIT: ret_unknown:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
+; TUNIT-NEXT: br label [[R]]
+; TUNIT: r:
+; TUNIT-NEXT: [[PHI:%.*]] = phi i32* [ [[B]], [[RET_ARG]] ], [ [[CALL]], [[RET_UNKNOWN]] ]
+; TUNIT-NEXT: ret i32* [[PHI]]
+;
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi
+; CGSCC-SAME: (i32* [[B:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
+; CGSCC-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
+; CGSCC: ret_arg:
+; CGSCC-NEXT: br label [[R:%.*]]
+; CGSCC: ret_unknown:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
+; CGSCC-NEXT: br label [[R]]
+; CGSCC: r:
+; CGSCC-NEXT: [[PHI:%.*]] = phi i32* [ [[B]], [[RET_ARG]] ], [ [[CALL]], [[RET_UNKNOWN]] ]
+; CGSCC-NEXT: ret i32* [[PHI]]
;
entry:
%cmp = icmp eq i32* %b, null
declare void @noreturn() noreturn;
define i32 @deadblockphi3(i32 %A, i1 %c) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockphi3
-; IS__TUNIT____-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]]
-; IS__TUNIT____: unreachablecall:
-; IS__TUNIT____-NEXT: call void @noreturn() #[[ATTR7:[0-9]+]]
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: unreachableblock2:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: unreachableblock3:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: r:
-; IS__TUNIT____-NEXT: ret i32 [[A]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockphi3
-; IS__CGSCC____-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]]
-; IS__CGSCC____: unreachablecall:
-; IS__CGSCC____-NEXT: call void @noreturn() #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: unreachableblock2:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: unreachableblock3:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: r:
-; IS__CGSCC____-NEXT: ret i32 [[A]]
+; TUNIT: Function Attrs: noinline nounwind uwtable
+; TUNIT-LABEL: define {{[^@]+}}@deadblockphi3
+; TUNIT-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]]
+; TUNIT: unreachablecall:
+; TUNIT-NEXT: call void @noreturn() #[[ATTR7:[0-9]+]]
+; TUNIT-NEXT: unreachable
+; TUNIT: unreachableblock2:
+; TUNIT-NEXT: unreachable
+; TUNIT: unreachableblock3:
+; TUNIT-NEXT: unreachable
+; TUNIT: r:
+; TUNIT-NEXT: ret i32 [[A]]
+;
+; CGSCC: Function Attrs: noinline nounwind uwtable
+; CGSCC-LABEL: define {{[^@]+}}@deadblockphi3
+; CGSCC-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]]
+; CGSCC: unreachablecall:
+; CGSCC-NEXT: call void @noreturn() #[[ATTR5:[0-9]+]]
+; CGSCC-NEXT: unreachable
+; CGSCC: unreachableblock2:
+; CGSCC-NEXT: unreachable
+; CGSCC: unreachableblock3:
+; CGSCC-NEXT: unreachable
+; CGSCC: r:
+; CGSCC-NEXT: ret i32 [[A]]
;
entry:
br i1 %c, label %r, label %unreachablecall
; We can use the return information of the weak function non_exact_4.
; FIXME: %c2 and %c3 should be replaced but not %c0 or %c1!
define i32 @exact(i32* align 8 %a, i32* align 8 %b) {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@exact
-; IS__TUNIT____-SAME: (i32* align 8 [[A:%.*]], i32* align 8 [[B:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[C0:%.*]] = call i32 @non_exact_0()
-; IS__TUNIT____-NEXT: [[C1:%.*]] = call i32 @non_exact_1(i32 noundef 1)
-; IS__TUNIT____-NEXT: [[C2:%.*]] = call i32 @non_exact_2(i32 noundef 2)
-; IS__TUNIT____-NEXT: [[C3:%.*]] = call align 32 i32* @non_exact_3(i32* align 32 [[A]])
-; IS__TUNIT____-NEXT: [[C4:%.*]] = call align 16 i32* @non_exact_4(i32* align 32 [[B]])
-; IS__TUNIT____-NEXT: [[C3L:%.*]] = load i32, i32* [[A]], align 32
-; IS__TUNIT____-NEXT: [[C4L:%.*]] = load i32, i32* [[C4]], align 16
-; IS__TUNIT____-NEXT: [[ADD1:%.*]] = add i32 [[C0]], [[C1]]
-; IS__TUNIT____-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], 2
-; IS__TUNIT____-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[C3L]]
-; IS__TUNIT____-NEXT: [[ADD4:%.*]] = add i32 [[ADD3]], [[C4L]]
-; IS__TUNIT____-NEXT: ret i32 [[ADD4]]
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@exact
-; IS__CGSCC____-SAME: (i32* align 8 [[A:%.*]], i32* align 8 [[B:%.*]]) {
-; IS__CGSCC____-NEXT: [[C0:%.*]] = call i32 @non_exact_0()
-; IS__CGSCC____-NEXT: [[C1:%.*]] = call i32 @non_exact_1(i32 noundef 1)
-; IS__CGSCC____-NEXT: [[C2:%.*]] = call i32 @non_exact_2(i32 noundef 2)
-; IS__CGSCC____-NEXT: [[C3:%.*]] = call align 32 i32* @non_exact_3(i32* align 32 [[A]])
-; IS__CGSCC____-NEXT: [[C4:%.*]] = call align 16 i32* @non_exact_4(i32* align 32 [[B]])
-; IS__CGSCC____-NEXT: [[C3L:%.*]] = load i32, i32* [[C3]], align 32
-; IS__CGSCC____-NEXT: [[C4L:%.*]] = load i32, i32* [[C4]], align 16
-; IS__CGSCC____-NEXT: [[ADD1:%.*]] = add i32 [[C0]], [[C1]]
-; IS__CGSCC____-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], [[C2]]
-; IS__CGSCC____-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[C3L]]
-; IS__CGSCC____-NEXT: [[ADD4:%.*]] = add i32 [[ADD3]], [[C4L]]
-; IS__CGSCC____-NEXT: ret i32 [[ADD4]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@exact
+; TUNIT-SAME: (i32* align 8 [[A:%.*]], i32* align 8 [[B:%.*]]) #[[ATTR8:[0-9]+]] {
+; TUNIT-NEXT: [[C0:%.*]] = call i32 @non_exact_0()
+; TUNIT-NEXT: [[C1:%.*]] = call i32 @non_exact_1(i32 noundef 1)
+; TUNIT-NEXT: [[C2:%.*]] = call i32 @non_exact_2(i32 noundef 2)
+; TUNIT-NEXT: [[C3:%.*]] = call align 32 i32* @non_exact_3(i32* align 32 [[A]])
+; TUNIT-NEXT: [[C4:%.*]] = call align 16 i32* @non_exact_4(i32* align 32 [[B]])
+; TUNIT-NEXT: [[C3L:%.*]] = load i32, i32* [[A]], align 32
+; TUNIT-NEXT: [[C4L:%.*]] = load i32, i32* [[C4]], align 16
+; TUNIT-NEXT: [[ADD1:%.*]] = add i32 [[C0]], [[C1]]
+; TUNIT-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], 2
+; TUNIT-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[C3L]]
+; TUNIT-NEXT: [[ADD4:%.*]] = add i32 [[ADD3]], [[C4L]]
+; TUNIT-NEXT: ret i32 [[ADD4]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@exact
+; CGSCC-SAME: (i32* align 8 [[A:%.*]], i32* align 8 [[B:%.*]]) {
+; CGSCC-NEXT: [[C0:%.*]] = call i32 @non_exact_0()
+; CGSCC-NEXT: [[C1:%.*]] = call i32 @non_exact_1(i32 noundef 1)
+; CGSCC-NEXT: [[C2:%.*]] = call i32 @non_exact_2(i32 noundef 2)
+; CGSCC-NEXT: [[C3:%.*]] = call align 32 i32* @non_exact_3(i32* align 32 [[A]])
+; CGSCC-NEXT: [[C4:%.*]] = call align 16 i32* @non_exact_4(i32* align 32 [[B]])
+; CGSCC-NEXT: [[C3L:%.*]] = load i32, i32* [[C3]], align 32
+; CGSCC-NEXT: [[C4L:%.*]] = load i32, i32* [[C4]], align 16
+; CGSCC-NEXT: [[ADD1:%.*]] = add i32 [[C0]], [[C1]]
+; CGSCC-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], [[C2]]
+; CGSCC-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[C3L]]
+; CGSCC-NEXT: [[ADD4:%.*]] = add i32 [[ADD3]], [[C4L]]
+; CGSCC-NEXT: ret i32 [[ADD4]]
;
%c0 = call i32 @non_exact_0()
%c1 = call i32 @non_exact_1(i32 1)
ret i32* %bc
}
define i32* @use_const() #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@use_const
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i32* bitcast (i8* @G to i32*)
+; TUNIT: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@use_const
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: ret i32* bitcast (i8* @G to i32*)
;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@use_const
-; IS__CGSCC____-SAME: () #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[C:%.*]] = call noundef nonnull dereferenceable(1) i32* @ret_const() #[[ATTR11:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32* [[C]]
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@use_const
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef nonnull dereferenceable(1) i32* @ret_const() #[[ATTR11:[0-9]+]]
+; CGSCC-NEXT: ret i32* [[C]]
;
%c = call i32* @ret_const()
ret i32* %c
}
define i32* @dont_use_const() #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@dont_use_const
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i32* bitcast (i8* @G to i32*)
+; TUNIT: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@dont_use_const
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: ret i32* bitcast (i8* @G to i32*)
;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@dont_use_const
-; IS__CGSCC____-SAME: () #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[C:%.*]] = musttail call noundef nonnull dereferenceable(1) i32* @ret_const() #[[ATTR11]]
-; IS__CGSCC____-NEXT: ret i32* [[C]]
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@dont_use_const
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: [[C:%.*]] = musttail call noundef nonnull dereferenceable(1) i32* @ret_const() #[[ATTR11]]
+; CGSCC-NEXT: ret i32* [[C]]
;
%c = musttail call i32* @ret_const()
ret i32* %c
attributes #0 = { noinline nounwind uwtable }
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable }
-; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree noinline nosync nounwind readonly uwtable }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR5]] = { noinline nounwind uwtable }
-; IS__TUNIT____: attributes #[[ATTR6]] = { noinline norecurse nounwind uwtable }
-; IS__TUNIT____: attributes #[[ATTR7]] = { noreturn }
-; IS__TUNIT____: attributes #[[ATTR8]] = { norecurse }
-; IS__TUNIT____: attributes #[[ATTR9:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR10]] = { nofree nosync nounwind readnone }
-; IS__TUNIT____: attributes #[[ATTR11]] = { nofree nosync nounwind readonly }
-; IS__TUNIT____: attributes #[[ATTR12]] = { nounwind }
-; IS__TUNIT____: attributes #[[ATTR13:[0-9]+]] = { nounwind readnone }
+; TUNIT: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable }
+; TUNIT: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable }
+; TUNIT: attributes #[[ATTR3]] = { argmemonly nofree noinline nosync nounwind readonly uwtable }
+; TUNIT: attributes #[[ATTR4]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR5]] = { noinline nounwind uwtable }
+; TUNIT: attributes #[[ATTR6]] = { noinline norecurse nounwind uwtable }
+; TUNIT: attributes #[[ATTR7]] = { noreturn }
+; TUNIT: attributes #[[ATTR8]] = { norecurse }
+; TUNIT: attributes #[[ATTR9:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR10]] = { nofree nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR11]] = { nofree nosync nounwind readonly }
+; TUNIT: attributes #[[ATTR12]] = { nounwind }
+; TUNIT: attributes #[[ATTR13:[0-9]+]] = { nounwind readnone }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable }
-; IS__CGSCC____: attributes #[[ATTR2]] = { argmemonly nofree noinline nosync nounwind readonly uwtable }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR4]] = { noinline nounwind uwtable }
-; IS__CGSCC____: attributes #[[ATTR5]] = { noreturn }
-; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR7]] = { nofree nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR8]] = { nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR9]] = { nofree nosync nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR10]] = { nounwind }
-; IS__CGSCC____: attributes #[[ATTR11]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable }
+; CGSCC: attributes #[[ATTR2]] = { argmemonly nofree noinline nosync nounwind readonly uwtable }
+; CGSCC: attributes #[[ATTR3]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR4]] = { noinline nounwind uwtable }
+; CGSCC: attributes #[[ATTR5]] = { noreturn }
+; CGSCC: attributes #[[ATTR6:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR7]] = { nofree nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR8]] = { nounwind readnone }
+; CGSCC: attributes #[[ATTR9]] = { nofree nosync nounwind readonly }
+; CGSCC: attributes #[[ATTR10]] = { nounwind }
+; CGSCC: attributes #[[ATTR11]] = { readnone willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
}
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____-NEXT: ret i32* null
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ret_null
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: ret i32* null
;
ret i32* null
}
define void @load_null_propagated() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@load_null_propagated
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@load_null_propagated
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@load_null_propagated
-; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@load_null_propagated
+; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: ret void
;
%ptr = call i32* @ret_null()
%a = load i32, i32* %ptr
}
define void @store_wholly_unreachable_volatile() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@store_wholly_unreachable_volatile
-; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__TUNIT____-NEXT: store volatile i32 5, i32* null, align 4294967296
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@store_wholly_unreachable_volatile
-; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: store volatile i32 5, i32* null, align 4294967296
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@store_wholly_unreachable_volatile
+; TUNIT-SAME: () #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: store volatile i32 5, i32* null, align 4294967296
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@store_wholly_unreachable_volatile
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: store volatile i32 5, i32* null, align 4294967296
+; CGSCC-NEXT: ret void
;
store volatile i32 5, i32* null
ret void
}
define void @store_null_pointer_is_defined() null_pointer_is_valid {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined
-; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__TUNIT____-NEXT: store i32 5, i32* null, align 4294967296
-; 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: () #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: store i32 5, i32* null, align 4294967296
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@store_null_pointer_is_defined
+; TUNIT-SAME: () #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: store i32 5, i32* null, align 4294967296
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@store_null_pointer_is_defined
+; CGSCC-SAME: () #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: store i32 5, i32* null, align 4294967296
+; CGSCC-NEXT: ret void
;
store i32 5, i32* null
ret void
; ATTRIBUTOR-LABEL: @store_null_propagated(
; ATTRIBUTOR-NEXT: unreachable
;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@store_null_propagated
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@store_null_propagated
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@store_null_propagated
-; IS__CGSCC____-SAME: () #[[ATTR5:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[PTR:%.*]] = call noalias align 4294967296 i32* @ret_null() #[[ATTR10:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@store_null_propagated
+; CGSCC-SAME: () #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: [[PTR:%.*]] = call noalias align 4294967296 i32* @ret_null() #[[ATTR10:[0-9]+]]
+; CGSCC-NEXT: ret void
;
%ptr = call i32* @ret_null()
store i32 5, i32* %ptr
; -- AtomicRMW tests --
define void @atomicrmw_wholly_unreachable() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_wholly_unreachable
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@atomicrmw_wholly_unreachable
+; TUNIT-SAME: () #[[ATTR2]] {
+; 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____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@atomicrmw_wholly_unreachable
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: unreachable
;
%a = atomicrmw add i32* null, i32 1 acquire
ret void
}
define void @atomicrmw_single_bb_unreachable(i1 %cond) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable
-; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: e:
-; IS__TUNIT____-NEXT: ret void
-;
-; 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____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: e:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable
+; TUNIT-SAME: (i1 [[COND:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: unreachable
+; TUNIT: e:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable
+; CGSCC-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: unreachable
+; CGSCC: e:
+; CGSCC-NEXT: ret void
;
br i1 %cond, label %t, label %e
t:
}
define void @atomicrmw_null_pointer_is_defined() null_pointer_is_valid {
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_null_pointer_is_defined
-; 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: () #[[ATTR6:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = atomicrmw add i32* null, i32 1 acquire, align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn
+; TUNIT-LABEL: define {{[^@]+}}@atomicrmw_null_pointer_is_defined
+; TUNIT-SAME: () #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: [[A:%.*]] = atomicrmw add i32* null, i32 1 acquire, align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn
+; CGSCC-LABEL: define {{[^@]+}}@atomicrmw_null_pointer_is_defined
+; CGSCC-SAME: () #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: [[A:%.*]] = atomicrmw add i32* null, i32 1 acquire, align 4
+; CGSCC-NEXT: ret void
;
%a = atomicrmw add i32* null, i32 1 acquire
ret void
; ATTRIBUTOR-LABEL: @atomicrmw_null_propagated(
; ATTRIBUTOR-NEXT: unreachable
;
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_null_propagated
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@atomicrmw_null_propagated
+; TUNIT-SAME: () #[[ATTR2]] {
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_null_propagated
-; IS__CGSCC____-SAME: () #[[ATTR7:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[PTR:%.*]] = call noalias i32* @ret_null() #[[ATTR10]]
-; IS__CGSCC____-NEXT: [[A:%.*]] = atomicrmw add i32* [[PTR]], i32 1 acquire, align 4
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@atomicrmw_null_propagated
+; CGSCC-SAME: () #[[ATTR7:[0-9]+]] {
+; CGSCC-NEXT: [[PTR:%.*]] = call noalias i32* @ret_null() #[[ATTR10]]
+; CGSCC-NEXT: [[A:%.*]] = atomicrmw add i32* [[PTR]], i32 1 acquire, align 4
+; CGSCC-NEXT: ret void
;
%ptr = call i32* @ret_null()
%a = atomicrmw add i32* %ptr, i32 1 acquire
; -- AtomicCmpXchg tests --
define void @atomiccmpxchg_wholly_unreachable() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_wholly_unreachable
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@atomiccmpxchg_wholly_unreachable
+; TUNIT-SAME: () #[[ATTR2]] {
+; 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____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@atomiccmpxchg_wholly_unreachable
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: unreachable
;
%a = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic
ret void
}
define void @atomiccmpxchg_single_bb_unreachable(i1 %cond) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable
-; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: e:
-; IS__TUNIT____-NEXT: ret void
-;
-; 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____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: e:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable
+; TUNIT-SAME: (i1 [[COND:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: unreachable
+; TUNIT: e:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable
+; CGSCC-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: unreachable
+; CGSCC: e:
+; CGSCC-NEXT: ret void
;
br i1 %cond, label %t, label %e
t:
}
define void @atomiccmpxchg_null_pointer_is_defined() null_pointer_is_valid {
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_pointer_is_defined
-; IS__TUNIT____-SAME: () #[[ATTR4]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic, 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: () #[[ATTR6]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic, align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn
+; TUNIT-LABEL: define {{[^@]+}}@atomiccmpxchg_null_pointer_is_defined
+; TUNIT-SAME: () #[[ATTR4]] {
+; TUNIT-NEXT: [[A:%.*]] = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic, align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nounwind null_pointer_is_valid willreturn
+; CGSCC-LABEL: define {{[^@]+}}@atomiccmpxchg_null_pointer_is_defined
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: [[A:%.*]] = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic, align 4
+; CGSCC-NEXT: ret void
;
%a = cmpxchg i32* null, i32 2, i32 3 acq_rel monotonic
ret void
; ATTRIBUTOR-LABEL: @atomiccmpxchg_null_propagated(
; ATTRIBUTOR-NEXT: unreachable
;
-; IS__TUNIT____: Function Attrs: nofree norecurse nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_propagated
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@atomiccmpxchg_null_propagated
+; TUNIT-SAME: () #[[ATTR2]] {
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_null_propagated
-; IS__CGSCC____-SAME: () #[[ATTR7]] {
-; IS__CGSCC____-NEXT: [[PTR:%.*]] = call noalias i32* @ret_null() #[[ATTR10]]
-; IS__CGSCC____-NEXT: [[A:%.*]] = cmpxchg i32* [[PTR]], i32 2, i32 3 acq_rel monotonic, align 4
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@atomiccmpxchg_null_propagated
+; CGSCC-SAME: () #[[ATTR7]] {
+; CGSCC-NEXT: [[PTR:%.*]] = call noalias i32* @ret_null() #[[ATTR10]]
+; CGSCC-NEXT: [[A:%.*]] = cmpxchg i32* [[PTR]], i32 2, i32 3 acq_rel monotonic, align 4
+; CGSCC-NEXT: ret void
;
%ptr = call i32* @ret_null()
%a = cmpxchg i32* %ptr, i32 2, i32 3 acq_rel monotonic
; Note: The unreachable on %t and %e is _not_ from AAUndefinedBehavior
define i32 @cond_br_on_undef() {
-; IS__TUNIT____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef
-; IS__TUNIT____-SAME: () #[[ATTR5:[0-9]+]] {
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: e:
-; IS__TUNIT____-NEXT: unreachable
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef
-; IS__CGSCC____-SAME: () #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: e:
-; IS__CGSCC____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@cond_br_on_undef
+; TUNIT-SAME: () #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: unreachable
+; TUNIT: t:
+; TUNIT-NEXT: unreachable
+; TUNIT: e:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cond_br_on_undef
+; CGSCC-SAME: () #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: unreachable
+; CGSCC: t:
+; CGSCC-NEXT: unreachable
+; CGSCC: e:
+; CGSCC-NEXT: unreachable
;
br i1 undef, label %t, label %e
t:
}
define void @cond_br_on_undef_interproc() {
-; IS__TUNIT____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc
-; IS__TUNIT____-SAME: () #[[ATTR5]] {
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: e:
-; IS__TUNIT____-NEXT: unreachable
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[COND:%.*]] = call i1 @ret_undef() #[[ATTR10]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret void
-; IS__CGSCC____: e:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: unreachable
+; TUNIT: t:
+; TUNIT-NEXT: unreachable
+; TUNIT: e:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[COND:%.*]] = call i1 @ret_undef() #[[ATTR10]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: ret void
+; CGSCC: e:
+; CGSCC-NEXT: ret void
;
%cond = call i1 @ret_undef()
br i1 %cond, label %t, label %e
; More complicated interproc deduction of undef
define void @cond_br_on_undef_interproc2() {
-; IS__TUNIT____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc2
-; IS__TUNIT____-SAME: () #[[ATTR5]] {
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: e:
-; IS__TUNIT____-NEXT: unreachable
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc2
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[COND:%.*]] = call i1 @ret_undef2() #[[ATTR10]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret void
-; IS__CGSCC____: e:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc2
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: unreachable
+; TUNIT: t:
+; TUNIT-NEXT: unreachable
+; TUNIT: e:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cond_br_on_undef_interproc2
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[COND:%.*]] = call i1 @ret_undef2() #[[ATTR10]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: ret void
+; CGSCC: e:
+; CGSCC-NEXT: ret void
;
%cond = call i1 @ret_undef2()
br i1 %cond, label %t, label %e
; Branch on undef because of uninitialized value.
; FIXME: Currently it doesn't propagate the undef.
define i32 @cond_br_on_undef_uninit() {
-; IS__TUNIT____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef_uninit
-; IS__TUNIT____-SAME: () #[[ATTR5]] {
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: e:
-; IS__TUNIT____-NEXT: unreachable
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef_uninit
-; IS__CGSCC____-SAME: () #[[ATTR8]] {
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: e:
-; IS__CGSCC____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@cond_br_on_undef_uninit
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: unreachable
+; TUNIT: t:
+; TUNIT-NEXT: unreachable
+; TUNIT: e:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cond_br_on_undef_uninit
+; CGSCC-SAME: () #[[ATTR8]] {
+; CGSCC-NEXT: unreachable
+; CGSCC: t:
+; CGSCC-NEXT: unreachable
+; CGSCC: e:
+; CGSCC-NEXT: unreachable
;
%alloc = alloca i1
%cond = load i1, i1* %alloc
; MODULE-NOT: @callee(
define internal i32 @callee(i1 %C, i32* %A) {
;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@callee
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: T:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: F:
-; IS__CGSCC____-NEXT: ret i32 1
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callee
+; CGSCC-SAME: () #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: unreachable
+; CGSCC: T:
+; CGSCC-NEXT: unreachable
+; CGSCC: F:
+; CGSCC-NEXT: ret i32 1
;
entry:
%A.0 = load i32, i32* null
}
define i32 @foo() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i32 1
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: ret i32 1
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[X:%.*]] = call noundef i32 @callee() #[[ATTR10]]
-; IS__CGSCC____-NEXT: ret i32 [[X]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[X:%.*]] = call noundef i32 @callee() #[[ATTR10]]
+; CGSCC-NEXT: ret i32 [[X]]
;
%X = call i32 @callee(i1 false, i32* null)
ret i32 %X
; Tests for argument position
define void @arg_nonnull_1(i32* nonnull %a) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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:[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:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__CGSCC____-NEXT: store i32 0, i32* [[A]], align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_1
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: store i32 0, i32* [[A]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_1
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: store i32 0, i32* [[A]], align 4
+; CGSCC-NEXT: ret void
;
store i32 0, i32* %a
ret void
}
define void @arg_nonnull_1_noundef_1(i32* nonnull noundef %a) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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____-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:%.*]]) #[[ATTR9]] {
-; IS__CGSCC____-NEXT: store i32 0, i32* [[A]], align 4
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_1_noundef_1
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR6]] {
+; TUNIT-NEXT: store i32 0, i32* [[A]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_1_noundef_1
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: store i32 0, i32* [[A]], align 4
+; CGSCC-NEXT: ret void
;
store i32 0, i32* %a
ret void
}
define void @arg_nonnull_12(i32* nonnull %a, i32* nonnull %b, i32* %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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____-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null
-; IS__TUNIT____-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i32 0, i32* [[A]], align 4
-; IS__TUNIT____-NEXT: br label [[RET:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i32 1, i32* [[B]], align 4
-; IS__TUNIT____-NEXT: br label [[RET]]
-; IS__TUNIT____: ret:
-; IS__TUNIT____-NEXT: ret void
-;
-; 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:%.*]]) #[[ATTR9]] {
-; IS__CGSCC____-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null
-; IS__CGSCC____-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i32 0, i32* [[A]], align 4
-; IS__CGSCC____-NEXT: br label [[RET:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i32 1, i32* [[B]], align 4
-; IS__CGSCC____-NEXT: br label [[RET]]
-; IS__CGSCC____: ret:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_12
+; TUNIT-SAME: (i32* nocapture nofree nonnull writeonly [[A:%.*]], i32* nocapture nofree nonnull writeonly [[B:%.*]], i32* nofree writeonly [[C:%.*]]) #[[ATTR6]] {
+; TUNIT-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null
+; TUNIT-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i32 0, i32* [[A]], align 4
+; TUNIT-NEXT: br label [[RET:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i32 1, i32* [[B]], align 4
+; TUNIT-NEXT: br label [[RET]]
+; TUNIT: ret:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_12
+; CGSCC-SAME: (i32* nocapture nofree nonnull writeonly [[A:%.*]], i32* nocapture nofree nonnull writeonly [[B:%.*]], i32* nofree writeonly [[C:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null
+; CGSCC-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i32 0, i32* [[A]], align 4
+; CGSCC-NEXT: br label [[RET:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i32 1, i32* [[B]], align 4
+; CGSCC-NEXT: br label [[RET]]
+; CGSCC: ret:
+; CGSCC-NEXT: ret void
;
%d = icmp eq i32* %c, null
br i1 %d, label %t, label %f
}
define void @arg_nonnull_12_noundef_2(i32* nonnull %a, i32* noundef nonnull %b, i32* %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse 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____-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null
-; IS__TUNIT____-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i32 0, i32* [[A]], align 4
-; IS__TUNIT____-NEXT: br label [[RET:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i32 1, i32* [[B]], align 4
-; IS__TUNIT____-NEXT: br label [[RET]]
-; IS__TUNIT____: ret:
-; IS__TUNIT____-NEXT: ret void
-;
-; 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:%.*]]) #[[ATTR9]] {
-; IS__CGSCC____-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null
-; IS__CGSCC____-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i32 0, i32* [[A]], align 4
-; IS__CGSCC____-NEXT: br label [[RET:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i32 1, i32* [[B]], align 4
-; IS__CGSCC____-NEXT: br label [[RET]]
-; IS__CGSCC____: ret:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_12_noundef_2
+; TUNIT-SAME: (i32* nocapture nofree nonnull writeonly [[A:%.*]], i32* nocapture nofree noundef nonnull writeonly [[B:%.*]], i32* nofree writeonly [[C:%.*]]) #[[ATTR6]] {
+; TUNIT-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null
+; TUNIT-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i32 0, i32* [[A]], align 4
+; TUNIT-NEXT: br label [[RET:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i32 1, i32* [[B]], align 4
+; TUNIT-NEXT: br label [[RET]]
+; TUNIT: ret:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_12_noundef_2
+; CGSCC-SAME: (i32* nocapture nofree nonnull writeonly [[A:%.*]], i32* nocapture nofree noundef nonnull writeonly [[B:%.*]], i32* nofree writeonly [[C:%.*]]) #[[ATTR9]] {
+; CGSCC-NEXT: [[D:%.*]] = icmp eq i32* [[C]], null
+; CGSCC-NEXT: br i1 [[D]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i32 0, i32* [[A]], align 4
+; CGSCC-NEXT: br label [[RET:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i32 1, i32* [[B]], align 4
+; CGSCC-NEXT: br label [[RET]]
+; CGSCC: ret:
+; CGSCC-NEXT: ret void
;
%d = icmp eq i32* %c, null
br i1 %d, label %t, label %f
; Pass null directly to argument with nonnull attribute
define void @arg_nonnull_violation1_1() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_1
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_violation1_1
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_1
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_violation1_1
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: unreachable
;
call void @arg_nonnull_1(i32* null)
ret void
}
define void @arg_nonnull_violation1_2() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_2
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_violation1_2
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation1_2
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_violation1_2
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: unreachable
;
call void @arg_nonnull_1_noundef_1(i32* null)
ret void
; A case that depends on value simplification
define void @arg_nonnull_violation2_1(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_1
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_violation2_1
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_1
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_violation2_1
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: unreachable
;
%null = getelementptr i32, i32* null, i32 0
%mustnull = select i1 %c, i32* null, i32* %null
}
define void @arg_nonnull_violation2_2(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_2
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_violation2_2
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: unreachable
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation2_2
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_violation2_2
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: unreachable
;
%null = getelementptr i32, i32* null, i32 0
%mustnull = select i1 %c, i32* null, i32* %null
; Cases for single and multiple violation at a callsite
define void @arg_nonnull_violation3_1(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1
-; 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:[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 4294967296 null) #[[ATTR7]]
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: ret:
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; 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]]) #[[ATTR11:[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 4294967296 null) #[[ATTR11]]
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: ret:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[PTR:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; 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]+]]
+; 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 4294967296 null) #[[ATTR7]]
+; TUNIT-NEXT: unreachable
+; TUNIT: f:
+; TUNIT-NEXT: unreachable
+; TUNIT: ret:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[PTR:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; 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]]) #[[ATTR11:[0-9]+]]
+; 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 4294967296 null) #[[ATTR11]]
+; CGSCC-NEXT: unreachable
+; CGSCC: f:
+; CGSCC-NEXT: unreachable
+; CGSCC: ret:
+; CGSCC-NEXT: ret void
;
%ptr = alloca i32
br i1 %c, label %t, label %f
}
define void @arg_nonnull_violation3_2(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2
-; 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 4294967296 null) #[[ATTR7]]
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: ret:
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; 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]]) #[[ATTR11]]
-; 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 4294967296 null) #[[ATTR11]]
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: ret:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: [[PTR:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; 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]]
+; 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 4294967296 null) #[[ATTR7]]
+; TUNIT-NEXT: unreachable
+; TUNIT: f:
+; TUNIT-NEXT: unreachable
+; TUNIT: ret:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[PTR:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; 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]]) #[[ATTR11]]
+; 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 4294967296 null) #[[ATTR11]]
+; CGSCC-NEXT: unreachable
+; CGSCC: f:
+; CGSCC-NEXT: unreachable
+; CGSCC: ret:
+; CGSCC-NEXT: ret void
;
%ptr = alloca i32
br i1 %c, label %t, label %f
}
define i32 @violate_noundef_nonpointer() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@violate_noundef_nonpointer
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i32 undef
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@violate_noundef_nonpointer
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: ret i32 undef
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@violate_noundef_nonpointer
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@violate_noundef_nonpointer
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: unreachable
;
%ret = call i32 @argument_noundef1(i32 undef)
ret i32 %ret
}
define i32* @violate_noundef_pointer() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@violate_noundef_pointer
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i32* undef
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@violate_noundef_pointer
+; TUNIT-SAME: () #[[ATTR0]] {
+; TUNIT-NEXT: ret i32* undef
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@violate_noundef_pointer
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: ret i32* undef
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@violate_noundef_pointer
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: ret i32* undef
;
%ret = call i32* @argument_noundef2(i32* undef)
ret i32* %ret
}
define internal noundef i32 @assumed_undef_is_ok(i1 %c, i32 %arg) {
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assumed_undef_is_ok
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[REC:%.*]], label [[RET:%.*]]
-; IS__CGSCC____: rec:
-; IS__CGSCC____-NEXT: br label [[RET]]
-; IS__CGSCC____: ret:
-; IS__CGSCC____-NEXT: ret i32 0
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assumed_undef_is_ok
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: br i1 [[C]], label [[REC:%.*]], label [[RET:%.*]]
+; CGSCC: rec:
+; CGSCC-NEXT: br label [[RET]]
+; CGSCC: ret:
+; CGSCC-NEXT: ret i32 0
;
%stack = alloca i32
store i32 %arg, i32* %stack
}
define noundef i32 @assumed_undef_is_ok_caller(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assumed_undef_is_ok_caller
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i32 0
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assumed_undef_is_ok_caller
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: ret i32 0
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assumed_undef_is_ok_caller
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @assumed_undef_is_ok(i1 [[C]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT: ret i32 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assumed_undef_is_ok_caller
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @assumed_undef_is_ok(i1 [[C]]) #[[ATTR10]]
+; CGSCC-NEXT: ret i32 [[CALL]]
;
%call = call i32 @assumed_undef_is_ok(i1 %c, i32 undef)
ret i32 %call
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree norecurse nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree norecurse nounwind null_pointer_is_valid willreturn }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { nofree norecurse nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly }
+; TUNIT: attributes #[[ATTR4]] = { nofree norecurse nounwind null_pointer_is_valid willreturn }
+; TUNIT: attributes #[[ATTR5]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; 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 nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nofree norecurse nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR6]] = { nofree norecurse nounwind null_pointer_is_valid willreturn }
-; IS__CGSCC____: attributes #[[ATTR7]] = { nofree nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR10]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR11]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { nofree norecurse nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly }
+; CGSCC: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR6]] = { nofree norecurse nounwind null_pointer_is_valid willreturn }
+; CGSCC: attributes #[[ATTR7]] = { nofree nounwind willreturn }
+; CGSCC: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR9]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR10]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR11]] = { nounwind willreturn writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
declare void @llvm.assume(i1)
declare void @useI1p(i1*)
}
define i1 @drop_assume_1c_nr() norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@drop_assume_1c_nr
-; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR4:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i1 true
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@drop_assume_1c_nr
-; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i1 true
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@drop_assume_1c_nr
+; TUNIT-SAME: () #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR4:[0-9]+]]
+; TUNIT-NEXT: ret i1 true
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@drop_assume_1c_nr
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR5:[0-9]+]]
+; CGSCC-NEXT: ret i1 true
;
%stack = alloca i1
store i1 true, i1* %stack
}
define i1 @keep_assume_3c_nr() norecurse {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@keep_assume_3c_nr
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
-; IS__TUNIT____-NEXT: ret i1 [[L]]
-;
-; IS__CGSCC____: Function Attrs: norecurse
-; IS__CGSCC____-LABEL: define {{[^@]+}}@keep_assume_3c_nr
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
-; IS__CGSCC____-NEXT: ret i1 [[L]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@keep_assume_3c_nr
+; TUNIT-SAME: () #[[ATTR2]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
+; TUNIT-NEXT: ret i1 [[L]]
+;
+; CGSCC: Function Attrs: norecurse
+; CGSCC-LABEL: define {{[^@]+}}@keep_assume_3c_nr
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
+; CGSCC-NEXT: ret i1 [[L]]
;
%stack = alloca i1
store i1 true, i1* %stack
ret i1 %l
}
define i1 @keep_assume_4c_nr() norecurse {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@keep_assume_4c_nr
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
-; IS__TUNIT____-NEXT: ret i1 [[L4]]
-;
-; IS__CGSCC____: Function Attrs: norecurse
-; IS__CGSCC____-LABEL: define {{[^@]+}}@keep_assume_4c_nr
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
-; IS__CGSCC____-NEXT: ret i1 [[L4]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@keep_assume_4c_nr
+; TUNIT-SAME: () #[[ATTR2]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
+; TUNIT-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
+; TUNIT-NEXT: ret i1 [[L4]]
+;
+; CGSCC: Function Attrs: norecurse
+; CGSCC-LABEL: define {{[^@]+}}@keep_assume_4c_nr
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
+; CGSCC-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
+; CGSCC-NEXT: ret i1 [[L4]]
;
%stack = alloca i1
store i1 true, i1* %stack
}
define i1 @drop_assume_1_nr(i1 %arg) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@drop_assume_1_nr
-; IS__TUNIT____-SAME: (i1 returned [[ARG:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[ARG]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@drop_assume_1_nr
-; IS__CGSCC____-SAME: (i1 returned [[ARG:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i1 [[ARG]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@drop_assume_1_nr
+; TUNIT-SAME: (i1 returned [[ARG:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[ARG]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@drop_assume_1_nr
+; CGSCC-SAME: (i1 returned [[ARG:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR5]]
+; CGSCC-NEXT: ret i1 [[ARG]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @keep_assume_3_nr(i1 %arg) norecurse {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@keep_assume_3_nr
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
-; IS__TUNIT____-NEXT: ret i1 [[L]]
-;
-; IS__CGSCC____: Function Attrs: norecurse
-; IS__CGSCC____-LABEL: define {{[^@]+}}@keep_assume_3_nr
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
-; IS__CGSCC____-NEXT: ret i1 [[L]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@keep_assume_3_nr
+; TUNIT-SAME: (i1 [[ARG:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
+; TUNIT-NEXT: ret i1 [[L]]
+;
+; CGSCC: Function Attrs: norecurse
+; CGSCC-LABEL: define {{[^@]+}}@keep_assume_3_nr
+; CGSCC-SAME: (i1 [[ARG:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
+; CGSCC-NEXT: ret i1 [[L]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @keep_assume_4_nr(i1 %arg) norecurse {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@keep_assume_4_nr
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
-; IS__TUNIT____-NEXT: ret i1 [[L]]
-;
-; IS__CGSCC____: Function Attrs: norecurse
-; IS__CGSCC____-LABEL: define {{[^@]+}}@keep_assume_4_nr
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
-; IS__CGSCC____-NEXT: ret i1 [[L]]
+; TUNIT: Function Attrs: norecurse
+; TUNIT-LABEL: define {{[^@]+}}@keep_assume_4_nr
+; TUNIT-SAME: (i1 [[ARG:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
+; TUNIT-NEXT: ret i1 [[L]]
+;
+; CGSCC: Function Attrs: norecurse
+; CGSCC-LABEL: define {{[^@]+}}@keep_assume_4_nr
+; CGSCC-SAME: (i1 [[ARG:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
+; CGSCC-NEXT: ret i1 [[L]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_1_nr(i1 %arg, i1 %cond) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_1_nr
-; IS__TUNIT____-SAME: (i1 returned [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: ret i1 [[ARG]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_1_nr
-; IS__CGSCC____-SAME: (i1 returned [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: ret i1 [[ARG]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_1_nr
+; TUNIT-SAME: (i1 returned [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: ret i1 [[ARG]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_1_nr
+; CGSCC-SAME: (i1 returned [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: ret i1 [[ARG]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define void @assume_1b_nr(i1 %arg, i1 %cond) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_1b_nr
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_1b_nr
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_1b_nr
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_1b_nr
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: ret void
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_2_nr(i1 %arg, i1 %cond) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_2_nr
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[L]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_2_nr
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i1 [[L]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_2_nr
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[L]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_2_nr
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: ret i1 [[L]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define void @assume_2b_nr(i1 %arg, i1 %cond) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_2b_nr
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_2b_nr
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_2b_nr
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_2b_nr
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: ret void
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_3_nr(i1 %arg, i1 %cond) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_3_nr
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_3_nr
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_3_nr
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5:[0-9]+]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_3_nr
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6:[0-9]+]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_4_nr(i1 %arg, i1 %cond) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_4_nr
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_4_nr
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
-; IS__CGSCC____-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_4_nr
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_4_nr
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_5_nr(i1 %arg, i1 %cond) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_5_nr
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_5_nr
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
-; IS__CGSCC____-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_5_nr
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR4]]
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR4]]
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_5_nr
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR5]]
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR5]]
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
+; CGSCC-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_5c_nr(i1 %cond) norecurse {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_5c_nr
-; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_5c_nr
-; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
-; IS__CGSCC____-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_5c_nr
+; TUNIT-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR4]]
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR4]]
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_5c_nr
+; CGSCC-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR5]]
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR5]]
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
+; CGSCC-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%stack = alloca i1
store i1 true, i1* %stack
}
define i1 @drop_assume_1c() {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@drop_assume_1c
-; IS__TUNIT____-SAME: () #[[ATTR3]] {
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 true
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@drop_assume_1c
-; IS__CGSCC____-SAME: () #[[ATTR3]] {
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i1 true
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@drop_assume_1c
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 true
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@drop_assume_1c
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR5]]
+; CGSCC-NEXT: ret i1 true
;
%stack = alloca i1
store i1 true, i1* %stack
}
define i1 @keep_assume_3c() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@keep_assume_3c() {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
-; IS__TUNIT____-NEXT: ret i1 [[L]]
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@keep_assume_3c() {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
-; IS__CGSCC____-NEXT: ret i1 [[L]]
+; TUNIT-LABEL: define {{[^@]+}}@keep_assume_3c() {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
+; TUNIT-NEXT: ret i1 [[L]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@keep_assume_3c() {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
+; CGSCC-NEXT: ret i1 [[L]]
;
%stack = alloca i1
store i1 true, i1* %stack
ret i1 %l
}
define i1 @keep_assume_4c() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@keep_assume_4c() {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
-; IS__TUNIT____-NEXT: ret i1 [[L4]]
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@keep_assume_4c() {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
-; IS__CGSCC____-NEXT: ret i1 [[L4]]
+; TUNIT-LABEL: define {{[^@]+}}@keep_assume_4c() {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
+; TUNIT-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
+; TUNIT-NEXT: ret i1 [[L4]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@keep_assume_4c() {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
+; CGSCC-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
+; CGSCC-NEXT: ret i1 [[L4]]
;
%stack = alloca i1
store i1 true, i1* %stack
}
define i1 @drop_assume_1(i1 %arg) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@drop_assume_1
-; IS__TUNIT____-SAME: (i1 returned [[ARG:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[ARG]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@drop_assume_1
-; IS__CGSCC____-SAME: (i1 returned [[ARG:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i1 [[ARG]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@drop_assume_1
+; TUNIT-SAME: (i1 returned [[ARG:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[ARG]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@drop_assume_1
+; CGSCC-SAME: (i1 returned [[ARG:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR5]]
+; CGSCC-NEXT: ret i1 [[ARG]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @keep_assume_3(i1 %arg) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@keep_assume_3
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]]) {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
-; IS__TUNIT____-NEXT: ret i1 [[L]]
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@keep_assume_3
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]]) {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
-; IS__CGSCC____-NEXT: ret i1 [[L]]
+; TUNIT-LABEL: define {{[^@]+}}@keep_assume_3
+; TUNIT-SAME: (i1 [[ARG:%.*]]) {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
+; TUNIT-NEXT: ret i1 [[L]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@keep_assume_3
+; CGSCC-SAME: (i1 [[ARG:%.*]]) {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: call void @useI1p(i1* noundef nonnull dereferenceable(1) [[STACK]])
+; CGSCC-NEXT: ret i1 [[L]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @keep_assume_4(i1 %arg) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@keep_assume_4
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]]) {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
-; IS__TUNIT____-NEXT: ret i1 [[L]]
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@keep_assume_4
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]]) {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
-; IS__CGSCC____-NEXT: ret i1 [[L]]
+; TUNIT-LABEL: define {{[^@]+}}@keep_assume_4
+; TUNIT-SAME: (i1 [[ARG:%.*]]) {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
+; TUNIT-NEXT: ret i1 [[L]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@keep_assume_4
+; CGSCC-SAME: (i1 [[ARG:%.*]]) {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: call void @useI1p(i1* noalias nocapture noundef nonnull dereferenceable(1) [[STACK]])
+; CGSCC-NEXT: ret i1 [[L]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_1(i1 %arg, i1 %cond) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_1
-; IS__TUNIT____-SAME: (i1 returned [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: ret i1 [[ARG]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_1
-; IS__CGSCC____-SAME: (i1 returned [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: ret i1 [[ARG]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_1
+; TUNIT-SAME: (i1 returned [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: ret i1 [[ARG]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_1
+; CGSCC-SAME: (i1 returned [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[ARG]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: ret i1 [[ARG]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define void @assume_1b(i1 %arg, i1 %cond) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_1b
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_1b
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_1b
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_1b
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: ret void
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_2(i1 %arg, i1 %cond) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_2
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[L]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_2
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i1 [[L]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_2
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[L]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_2
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: ret i1 [[L]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define void @assume_2b(i1 %arg, i1 %cond) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_2b
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_2b
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_2b
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_2b
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: ret void
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_3(i1 %arg, i1 %cond) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_3
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_3
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
-; IS__CGSCC____-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_3
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_3
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_4(i1 %arg, i1 %cond) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_4
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_4
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
-; IS__CGSCC____-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_4
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_4
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L]]) #[[ATTR5]]
+; CGSCC-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_5(i1 %arg, i1 %cond) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_5
-; IS__TUNIT____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_5
-; IS__CGSCC____-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
-; IS__CGSCC____-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_5
+; TUNIT-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR4]]
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR4]]
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_5
+; CGSCC-SAME: (i1 [[ARG:%.*]], i1 [[COND:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 [[ARG]], i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR5]]
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR5]]
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
+; CGSCC-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%stack = alloca i1
store i1 %arg, i1* %stack
}
define i1 @assume_5c(i1 %cond) {
-; IS__TUNIT____: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@assume_5c
-; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br label [[M:%.*]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: br label [[M]]
-; IS__TUNIT____: m:
-; IS__TUNIT____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__TUNIT____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@assume_5c
-; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: [[STACK:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i1 true, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br label [[M:%.*]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1 false, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: br label [[M]]
-; IS__CGSCC____: m:
-; IS__CGSCC____-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
-; IS__CGSCC____-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
-; IS__CGSCC____-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@assume_5c
+; TUNIT-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR4]]
+; TUNIT-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i1 true, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR4]]
+; TUNIT-NEXT: br label [[M:%.*]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1 false, i1* [[STACK]], align 1
+; TUNIT-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR4]]
+; TUNIT-NEXT: br label [[M]]
+; TUNIT: m:
+; TUNIT-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; TUNIT-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR4]]
+; TUNIT-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR5]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@assume_5c
+; CGSCC-SAME: (i1 [[COND:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L1:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L1]]) #[[ATTR5]]
+; CGSCC-NEXT: br i1 [[COND]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i1 true, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L2:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L2]]) #[[ATTR5]]
+; CGSCC-NEXT: br label [[M:%.*]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1 false, i1* [[STACK]], align 1
+; CGSCC-NEXT: [[L3:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L3]]) #[[ATTR5]]
+; CGSCC-NEXT: br label [[M]]
+; CGSCC: m:
+; CGSCC-NEXT: [[L4:%.*]] = load i1, i1* [[STACK]], align 1
+; CGSCC-NEXT: call void @llvm.assume(i1 noundef [[L4]]) #[[ATTR5]]
+; CGSCC-NEXT: [[R:%.*]] = call i1 @readI1p(i1* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[STACK]]) #[[ATTR6]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%stack = alloca i1
store i1 true, i1* %stack
}
;.
-; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { norecurse }
-; IS__TUNIT____: attributes #[[ATTR3]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR4]] = { willreturn }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR2]] = { norecurse }
+; TUNIT: attributes #[[ATTR3]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR4]] = { willreturn }
+; TUNIT: attributes #[[ATTR5]] = { nofree nosync nounwind readonly willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { norecurse }
-; IS__CGSCC____: attributes #[[ATTR3]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { inaccessiblememonly nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR5]] = { willreturn }
-; IS__CGSCC____: attributes #[[ATTR6]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR2]] = { norecurse }
+; CGSCC: attributes #[[ATTR3]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR4]] = { inaccessiblememonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR5]] = { willreturn }
+; CGSCC: attributes #[[ATTR6]] = { readonly willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
@G = internal global i32 undef, align 4, !dbg !0
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target triple = "amdgcn-amd-amdhsa"
; CHECK: @[[UNREACHABLENONKERNEL:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(3) global i32 0, align 4
;.
define dso_local void @kernel(i32 %C) norecurse "kernel" {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@kernel
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: call void @level1Kernel(i32 [[C]]) #[[ATTR3:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@kernel
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: call void @level1Kernel(i32 [[C]]) #[[ATTR3:[0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: norecurse nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@kernel
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @level1Kernel(i32 [[C]]) #[[ATTR4:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: norecurse nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@kernel
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @level1Kernel(i32 [[C]]) #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: ret void
;
entry:
call void @level1Kernel(i32 %C)
}
define internal void @level1Kernel(i32 %C) {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level1Kernel
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: call void @level2Kernelall_early() #[[ATTR4:[0-9]+]]
-; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
-; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: call void @level2Kernela() #[[ATTR3]]
-; IS__TUNIT____-NEXT: br label [[IF_END:%.*]]
-; IS__TUNIT____: if.else:
-; IS__TUNIT____-NEXT: call void @level2Kernelb() #[[ATTR3]]
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: call void @level2Kernelall_late() #[[ATTR5:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@level1Kernel
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: call void @level2Kernelall_early() #[[ATTR4:[0-9]+]]
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: call void @level2Kernela() #[[ATTR3]]
+; TUNIT-NEXT: br label [[IF_END:%.*]]
+; TUNIT: if.else:
+; TUNIT-NEXT: call void @level2Kernelb() #[[ATTR3]]
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: call void @level2Kernelall_late() #[[ATTR5:[0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: norecurse nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level1Kernel
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @level2Kernelall_early() #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
-; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: call void @level2Kernela() #[[ATTR4]]
-; IS__CGSCC____-NEXT: br label [[IF_END:%.*]]
-; IS__CGSCC____: if.else:
-; IS__CGSCC____-NEXT: call void @level2Kernelb() #[[ATTR4]]
-; IS__CGSCC____-NEXT: br label [[IF_END]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: call void @level2Kernelall_late() #[[ATTR6:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: norecurse nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@level1Kernel
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @level2Kernelall_early() #[[ATTR5:[0-9]+]]
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: call void @level2Kernela() #[[ATTR4]]
+; CGSCC-NEXT: br label [[IF_END:%.*]]
+; CGSCC: if.else:
+; CGSCC-NEXT: call void @level2Kernelb() #[[ATTR4]]
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: call void @level2Kernelall_late() #[[ATTR6:[0-9]+]]
+; CGSCC-NEXT: ret void
;
entry:
call void @level2Kernelall_early()
}
define internal void @level2Kernela() {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level2Kernela
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
-; IS__TUNIT____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef 42) #[[ATTR6:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@level2Kernela
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
+; TUNIT-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef 42) #[[ATTR6:[0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level2Kernela
-; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
-; IS__CGSCC____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef [[TMP2]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@level2Kernela
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
+; CGSCC-NEXT: [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
+; CGSCC-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef [[TMP2]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
entry:
%0 = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
}
define internal void @level2Kernelb() {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level2Kernelb
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
-; IS__TUNIT____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef 42) #[[ATTR6]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@level2Kernelb
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
+; TUNIT-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef 42) #[[ATTR6]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level2Kernelb
-; IS__CGSCC____-SAME: () #[[ATTR3]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
-; IS__CGSCC____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef [[TMP2]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@level2Kernelb
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
+; CGSCC-NEXT: [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
+; CGSCC-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef [[TMP2]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
entry:
%0 = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
}
define internal void @level2Kernelall_late() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level2Kernelall_late
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@level2Kernelall_late
+; TUNIT-SAME: () #[[ATTR2]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level2Kernelall_late
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@level2Kernelall_late
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
+; CGSCC-NEXT: ret void
;
entry:
store i32 1, i32 *addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
@UnreachableNonKernel = internal addrspace(3) global i32 0, align 4
define dso_local void @non_kernel(i32 %C) norecurse {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@non_kernel
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: call void @level1(i32 [[C]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@non_kernel
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: call void @level1(i32 [[C]]) #[[ATTR3]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: norecurse nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_kernel
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @level1(i32 [[C]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: norecurse nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@non_kernel
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: call void @level1(i32 [[C]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
entry:
call void @level1(i32 %C)
}
define internal void @level1(i32 %C) {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level1
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[LOCAL:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT: call void @level2all_early(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
-; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: call void @level2a() #[[ATTR3]]
-; IS__TUNIT____-NEXT: br label [[IF_END:%.*]]
-; IS__TUNIT____: if.else:
-; IS__TUNIT____-NEXT: call void @level2b() #[[ATTR3]]
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: call void @level2all_late(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@level1
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[LOCAL:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: call void @level2all_early(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR4]]
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: call void @level2a() #[[ATTR3]]
+; TUNIT-NEXT: br label [[IF_END:%.*]]
+; TUNIT: if.else:
+; TUNIT-NEXT: call void @level2b() #[[ATTR3]]
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: call void @level2all_late(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: norecurse nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level1
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[LOCAL:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: call void @level2all_early(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
-; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: call void @level2a(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: br label [[IF_END:%.*]]
-; IS__CGSCC____: if.else:
-; IS__CGSCC____-NEXT: call void @level2b(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: br label [[IF_END]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: call void @level2all_late(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR6]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: norecurse nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@level1
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[LOCAL:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: call void @level2all_early(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR5]]
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: call void @level2a(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR4]]
+; CGSCC-NEXT: br label [[IF_END:%.*]]
+; CGSCC: if.else:
+; CGSCC-NEXT: call void @level2b(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR4]]
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: call void @level2all_late(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR6]]
+; CGSCC-NEXT: ret void
;
entry:
%local = alloca i32
}
define internal void @level2all_early(i32* %addr) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level2all_early
-; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@level2all_early
+; TUNIT-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level2all_early
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
-; IS__CGSCC____-NEXT: store i32 17, i32* [[ADDR]], align 4
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@level2all_early
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
+; CGSCC-NEXT: store i32 17, i32* [[ADDR]], align 4
+; CGSCC-NEXT: ret void
;
entry:
store i32 1, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
}
define internal void @level2a(i32* %addr) {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level2a
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__TUNIT____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 17) #[[ATTR6]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@level2a
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
+; TUNIT-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 17) #[[ATTR6]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level2a
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__CGSCC____-NEXT: [[QQQQ2:%.*]] = load i32, i32* [[ADDR]], align 4
-; IS__CGSCC____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 [[QQQQ2]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@level2a
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
+; CGSCC-NEXT: [[QQQQ2:%.*]] = load i32, i32* [[ADDR]], align 4
+; CGSCC-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 [[QQQQ2]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
entry:
%0 = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
}
define internal void @level2b(i32* %addr) {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level2b
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__TUNIT____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 17) #[[ATTR6]]
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@level2b
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
+; TUNIT-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 17) #[[ATTR6]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level2b
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load i32, i32* [[ADDR]], align 4
-; IS__CGSCC____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 [[TMP2]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@level2b
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
+; CGSCC-NEXT: [[TMP2:%.*]] = load i32, i32* [[ADDR]], align 4
+; CGSCC-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 [[TMP2]]) #[[ATTR4]]
+; CGSCC-NEXT: ret void
;
entry:
%0 = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
}
define internal void @level2all_late(i32* %addr) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level2all_late
-; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@level2all_late
+; TUNIT-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level2all_late
-; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__CGSCC____-NEXT: store i32 5, i32* [[ADDR]], align 4
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@level2all_late
+; CGSCC-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
+; CGSCC-NEXT: store i32 5, i32* [[ADDR]], align 4
+; CGSCC-NEXT: ret void
;
entry:
store i32 1, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
declare dso_local void @use(i32, i32, i32) nosync norecurse nounwind
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { norecurse nosync nounwind "kernel" }
-; IS__TUNIT____: attributes #[[ATTR1]] = { norecurse nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nosync nounwind writeonly }
-; IS__TUNIT____: attributes #[[ATTR6]] = { nounwind }
+; TUNIT: attributes #[[ATTR0]] = { norecurse nosync nounwind "kernel" }
+; TUNIT: attributes #[[ATTR1]] = { norecurse nosync nounwind }
+; TUNIT: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR3]] = { nosync nounwind }
+; TUNIT: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR5]] = { nosync nounwind writeonly }
+; TUNIT: attributes #[[ATTR6]] = { nounwind }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { norecurse nosync nounwind "kernel" }
-; IS__CGSCC____: attributes #[[ATTR1]] = { norecurse nosync nounwind }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nosync nounwind }
-; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind }
-; IS__CGSCC____: attributes #[[ATTR5]] = { nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR6]] = { nounwind writeonly }
+; CGSCC: attributes #[[ATTR0]] = { norecurse nosync nounwind "kernel" }
+; CGSCC: attributes #[[ATTR1]] = { norecurse nosync nounwind }
+; CGSCC: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR3]] = { nosync nounwind }
+; CGSCC: attributes #[[ATTR4]] = { nounwind }
+; CGSCC: attributes #[[ATTR5]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR6]] = { nounwind writeonly }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=17 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=17 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
}
define internal i1 @recursive_inst_generator(i1 %c, i1* %p) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_inst_generator
-; IS__TUNIT____-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
-; IS__TUNIT____-NEXT: [[A:%.*]] = call i1* @geti1Ptr()
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[P]]) #[[ATTR6:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i1 [[R1]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
-; IS__TUNIT____-NEXT: ret i1 [[R2]]
+; TUNIT-LABEL: define {{[^@]+}}@recursive_inst_generator
+; TUNIT-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
+; TUNIT-NEXT: [[A:%.*]] = call i1* @geti1Ptr()
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[P]]) #[[ATTR6:[0-9]+]]
+; TUNIT-NEXT: ret i1 [[R1]]
+; TUNIT: f:
+; TUNIT-NEXT: [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
+; TUNIT-NEXT: ret i1 [[R2]]
;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_inst_generator
-; IS__CGSCC____-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
-; IS__CGSCC____-NEXT: [[A:%.*]] = call i1* @geti1Ptr()
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[P]])
-; IS__CGSCC____-NEXT: ret i1 [[R1]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
-; IS__CGSCC____-NEXT: ret i1 [[R2]]
+; CGSCC-LABEL: define {{[^@]+}}@recursive_inst_generator
+; CGSCC-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
+; CGSCC-NEXT: [[A:%.*]] = call i1* @geti1Ptr()
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[P]])
+; CGSCC-NEXT: ret i1 [[R1]]
+; CGSCC: f:
+; CGSCC-NEXT: [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
+; CGSCC-NEXT: ret i1 [[R2]]
;
%a = call i1* @geti1Ptr()
br i1 %c, label %t, label %f
; FIXME: This should *not* return true.
define i1 @recursive_alloca_compare_caller(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare(i1 [[C]], i1* undef) #[[ATTR1]]
-; IS__TUNIT____-NEXT: ret i1 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare(i1 [[C]], i1* undef) #[[ATTR1]]
+; TUNIT-NEXT: ret i1 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare(i1 [[C]], i1* undef) #[[ATTR4:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i1 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare(i1 [[C]], i1* undef) #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT: ret i1 [[CALL]]
;
%call = call i1 @recursive_alloca_compare(i1 %c, i1* undef)
ret i1 %call
; Make sure we do *not* simplify this to return 0 or 1, return 42 is ok though.
define internal i8 @recursive_alloca_load_return(i1 %c, i8* %p, i8 %v) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_alloca_load_return
-; IS__TUNIT____-SAME: (i1 [[C:%.*]], i8* nocapture nofree nonnull readonly [[P:%.*]], i8 noundef [[V:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT: store i8 [[V]], i8* [[A]], align 1
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: store i8 0, i8* [[A]], align 1
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1
-; IS__TUNIT____-NEXT: ret i8 [[L]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i8 @recursive_alloca_load_return(i1 noundef true, i8* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[A]], i8 noundef 1) #[[ATTR4:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i8 [[CALL]]
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@recursive_alloca_load_return
+; TUNIT-SAME: (i1 [[C:%.*]], i8* nocapture nofree nonnull readonly [[P:%.*]], i8 noundef [[V:%.*]]) #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: [[A:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: store i8 [[V]], i8* [[A]], align 1
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: store i8 0, i8* [[A]], align 1
+; TUNIT-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1
+; TUNIT-NEXT: ret i8 [[L]]
+; TUNIT: f:
+; TUNIT-NEXT: [[CALL:%.*]] = call i8 @recursive_alloca_load_return(i1 noundef true, i8* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[A]], i8 noundef 1) #[[ATTR4:[0-9]+]]
+; TUNIT-NEXT: ret i8 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_alloca_load_return
-; IS__CGSCC____-SAME: (i1 [[C:%.*]], i8* nocapture nofree nonnull readonly [[P:%.*]], i8 noundef [[V:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i8, align 1
-; IS__CGSCC____-NEXT: store i8 [[V]], i8* [[A]], align 1
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: store i8 0, i8* [[A]], align 1
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1
-; IS__CGSCC____-NEXT: ret i8 [[L]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i8 @recursive_alloca_load_return(i1 noundef true, i8* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[A]], i8 noundef 1) #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i8 [[CALL]]
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@recursive_alloca_load_return
+; CGSCC-SAME: (i1 [[C:%.*]], i8* nocapture nofree nonnull readonly [[P:%.*]], i8 noundef [[V:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: [[A:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: store i8 [[V]], i8* [[A]], align 1
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: store i8 0, i8* [[A]], align 1
+; CGSCC-NEXT: [[L:%.*]] = load i8, i8* [[P]], align 1
+; CGSCC-NEXT: ret i8 [[L]]
+; CGSCC: f:
+; CGSCC-NEXT: [[CALL:%.*]] = call i8 @recursive_alloca_load_return(i1 noundef true, i8* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[A]], i8 noundef 1) #[[ATTR3:[0-9]+]]
+; CGSCC-NEXT: ret i8 [[CALL]]
;
%a = alloca i8
store i8 %v, i8* %a
}
define i8 @recursive_alloca_load_return_caller(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_alloca_load_return_caller
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i8 @recursive_alloca_load_return(i1 [[C]], i8* undef, i8 noundef 42) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i8 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@recursive_alloca_load_return_caller
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call i8 @recursive_alloca_load_return(i1 [[C]], i8* undef, i8 noundef 42) #[[ATTR4]]
+; TUNIT-NEXT: ret i8 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_alloca_load_return_caller
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i8 @recursive_alloca_load_return(i1 [[C]], i8* undef, i8 noundef 42) #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i8 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@recursive_alloca_load_return_caller
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i8 @recursive_alloca_load_return(i1 [[C]], i8* undef, i8 noundef 42) #[[ATTR5:[0-9]+]]
+; CGSCC-NEXT: ret i8 [[CALL]]
;
%call = call i8 @recursive_alloca_load_return(i1 %c, i8* undef, i8 42)
ret i8 %call
; Make sure we do *not* return true.
define internal i1 @recursive_alloca_compare_global1(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_alloca_compare_global1
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[P:%.*]] = load i1*, i1** @G1, align 8
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i1* [[A]], [[P]]
-; IS__TUNIT____-NEXT: ret i1 [[CMP]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: store i1* [[A]], i1** @G1, align 8
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global1(i1 noundef true) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[CALL]]
+; TUNIT: Function Attrs: nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@recursive_alloca_compare_global1
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: [[A:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[P:%.*]] = load i1*, i1** @G1, align 8
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i1* [[A]], [[P]]
+; TUNIT-NEXT: ret i1 [[CMP]]
+; TUNIT: f:
+; TUNIT-NEXT: store i1* [[A]], i1** @G1, align 8
+; TUNIT-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global1(i1 noundef true) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_alloca_compare_global1
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[P:%.*]] = load i1*, i1** @G1, align 8
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i1* [[A]], [[P]]
-; IS__CGSCC____-NEXT: ret i1 [[CMP]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: store i1* [[A]], i1** @G1, align 8
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global1(i1 noundef true) #[[ATTR3]]
-; IS__CGSCC____-NEXT: ret i1 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@recursive_alloca_compare_global1
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[A:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[P:%.*]] = load i1*, i1** @G1, align 8
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i1* [[A]], [[P]]
+; CGSCC-NEXT: ret i1 [[CMP]]
+; CGSCC: f:
+; CGSCC-NEXT: store i1* [[A]], i1** @G1, align 8
+; CGSCC-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global1(i1 noundef true) #[[ATTR3]]
+; CGSCC-NEXT: ret i1 [[CALL]]
;
%a = alloca i1
br i1 %c, label %t, label %f
; FIXME: This should *not* return true.
define i1 @recursive_alloca_compare_caller_global1(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller_global1
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global1(i1 [[C]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller_global1
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global1(i1 [[C]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller_global1
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global1(i1 [[C]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i1 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller_global1
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global1(i1 [[C]]) #[[ATTR5]]
+; CGSCC-NEXT: ret i1 [[CALL]]
;
%call = call i1 @recursive_alloca_compare_global1(i1 %c)
ret i1 %call
}
define internal i1 @recursive_alloca_compare_global2(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_alloca_compare_global2
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i1, align 1
-; IS__TUNIT____-NEXT: [[P:%.*]] = load i1*, i1** @G2, align 8
-; IS__TUNIT____-NEXT: store i1* [[A]], i1** @G2, align 8
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i1* [[A]], [[P]]
-; IS__TUNIT____-NEXT: ret i1 [[CMP]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global2(i1 noundef true) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[CALL]]
+; TUNIT: Function Attrs: nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@recursive_alloca_compare_global2
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: [[A:%.*]] = alloca i1, align 1
+; TUNIT-NEXT: [[P:%.*]] = load i1*, i1** @G2, align 8
+; TUNIT-NEXT: store i1* [[A]], i1** @G2, align 8
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i1* [[A]], [[P]]
+; TUNIT-NEXT: ret i1 [[CMP]]
+; TUNIT: f:
+; TUNIT-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global2(i1 noundef true) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_alloca_compare_global2
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i1, align 1
-; IS__CGSCC____-NEXT: [[P:%.*]] = load i1*, i1** @G2, align 8
-; IS__CGSCC____-NEXT: store i1* [[A]], i1** @G2, align 8
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i1* [[A]], [[P]]
-; IS__CGSCC____-NEXT: ret i1 [[CMP]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global2(i1 noundef true) #[[ATTR3]]
-; IS__CGSCC____-NEXT: ret i1 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@recursive_alloca_compare_global2
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[A:%.*]] = alloca i1, align 1
+; CGSCC-NEXT: [[P:%.*]] = load i1*, i1** @G2, align 8
+; CGSCC-NEXT: store i1* [[A]], i1** @G2, align 8
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i1* [[A]], [[P]]
+; CGSCC-NEXT: ret i1 [[CMP]]
+; CGSCC: f:
+; CGSCC-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global2(i1 noundef true) #[[ATTR3]]
+; CGSCC-NEXT: ret i1 [[CALL]]
;
%a = alloca i1
%p = load i1*, i1** @G2
; FIXME: This should *not* return true.
define i1 @recursive_alloca_compare_caller_global2(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller_global2
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global2(i1 [[C]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller_global2
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global2(i1 [[C]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller_global2
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global2(i1 [[C]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i1 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@recursive_alloca_compare_caller_global2
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i1 @recursive_alloca_compare_global2(i1 [[C]]) #[[ATTR5]]
+; CGSCC-NEXT: ret i1 [[CALL]]
;
%call = call i1 @recursive_alloca_compare_global2(i1 %c)
ret i1 %call
}
define internal i1 @recursive_inst_compare_global3(i1 %c) {
;
-; IS__TUNIT____: Function Attrs: nofree nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_inst_compare_global3
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR4]] {
-; IS__TUNIT____-NEXT: [[P:%.*]] = load i1, i1* @G3, align 1
-; IS__TUNIT____-NEXT: store i1 [[C]], i1* @G3, align 1
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i1 [[C]], [[P]]
-; IS__TUNIT____-NEXT: ret i1 [[CMP]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_compare_global3(i1 noundef true) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[CALL]]
+; TUNIT: Function Attrs: nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@recursive_inst_compare_global3
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: [[P:%.*]] = load i1, i1* @G3, align 1
+; TUNIT-NEXT: store i1 [[C]], i1* @G3, align 1
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i1 [[C]], [[P]]
+; TUNIT-NEXT: ret i1 [[CMP]]
+; TUNIT: f:
+; TUNIT-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_compare_global3(i1 noundef true) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_inst_compare_global3
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[P:%.*]] = load i1, i1* @G3, align 1
-; IS__CGSCC____-NEXT: store i1 [[C]], i1* @G3, align 1
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i1 [[C]], [[P]]
-; IS__CGSCC____-NEXT: ret i1 [[CMP]]
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_compare_global3(i1 noundef true) #[[ATTR3]]
-; IS__CGSCC____-NEXT: ret i1 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@recursive_inst_compare_global3
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[P:%.*]] = load i1, i1* @G3, align 1
+; CGSCC-NEXT: store i1 [[C]], i1* @G3, align 1
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i1 [[C]], [[P]]
+; CGSCC-NEXT: ret i1 [[CMP]]
+; CGSCC: f:
+; CGSCC-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_compare_global3(i1 noundef true) #[[ATTR3]]
+; CGSCC-NEXT: ret i1 [[CALL]]
;
%p = load i1, i1* @G3
store i1 %c, i1* @G3
; FIXME: This should *not* return true.
define i1 @recursive_inst_compare_caller_global3(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_inst_compare_caller_global3
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_compare_global3(i1 [[C]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: ret i1 [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@recursive_inst_compare_caller_global3
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR5]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_compare_global3(i1 [[C]]) #[[ATTR4]]
+; TUNIT-NEXT: ret i1 [[CALL]]
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_inst_compare_caller_global3
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_compare_global3(i1 [[C]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: ret i1 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@recursive_inst_compare_caller_global3
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_compare_global3(i1 [[C]]) #[[ATTR5]]
+; CGSCC-NEXT: ret i1 [[CALL]]
;
%call = call i1 @recursive_inst_compare_global3(i1 %c)
ret i1 %call
}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone }
-; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR6]] = { nounwind readnone }
+; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR3]] = { argmemonly nofree nosync nounwind }
+; TUNIT: attributes #[[ATTR4]] = { nofree nosync nounwind }
+; TUNIT: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind }
+; TUNIT: attributes #[[ATTR6]] = { nounwind readnone }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nofree nosync nounwind }
-; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR5]] = { nounwind }
+; CGSCC: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR3]] = { nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR4]] = { nounwind readnone }
+; CGSCC: attributes #[[ATTR5]] = { nounwind }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; 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 -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
+; 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,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; Most reduced from the OpenMC app running OpenMP offloading code, caused crashes before as we
; mixed local and remote (=intra and inter procedural) values.
%struct2 = type <{ ptr, i64, i64, i32, [4 x i8] }>
define i64 @t1(ptr %first, ptr %first.addr, ptr %0) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t1
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST:%.*]], ptr nocapture nofree readnone [[FIRST_ADDR:%.*]], ptr nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[FIRST_ADDR1:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: store ptr [[FIRST]], ptr [[FIRST]], align 8
-; IS__TUNIT____-NEXT: br label [[IF_END:%.*]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call ptr @foo.4(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST]]) #[[ATTR3:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i64 0
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t1
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST:%.*]], ptr nocapture nofree readnone [[FIRST_ADDR:%.*]], ptr nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[FIRST_ADDR1:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT: store ptr [[FIRST]], ptr [[FIRST]], align 8
-; IS__CGSCC____-NEXT: br label [[IF_END:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call ptr @foo.4(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST]]) #[[ATTR6:[0-9]+]]
-; IS__CGSCC____-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds double, ptr [[CALL]], i64 -1
-; IS__CGSCC____-NEXT: ret i64 0
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@t1
+; TUNIT-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST:%.*]], ptr nocapture nofree readnone [[FIRST_ADDR:%.*]], ptr nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[FIRST_ADDR1:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: store ptr [[FIRST]], ptr [[FIRST]], align 8
+; TUNIT-NEXT: br label [[IF_END:%.*]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[CALL:%.*]] = call ptr @foo.4(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST]]) #[[ATTR3:[0-9]+]]
+; TUNIT-NEXT: ret i64 0
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@t1
+; CGSCC-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST:%.*]], ptr nocapture nofree readnone [[FIRST_ADDR:%.*]], ptr nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[FIRST_ADDR1:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: store ptr [[FIRST]], ptr [[FIRST]], align 8
+; CGSCC-NEXT: br label [[IF_END:%.*]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[CALL:%.*]] = call ptr @foo.4(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST]]) #[[ATTR6:[0-9]+]]
+; CGSCC-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds double, ptr [[CALL]], i64 -1
+; CGSCC-NEXT: ret i64 0
;
entry:
%first.addr1 = alloca ptr, i32 0, align 8
}
define internal ptr @foo.4(ptr %__first) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo.4
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[__FIRST:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[__FIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: store ptr [[__FIRST]], ptr [[__FIRST]], align 8
-; IS__TUNIT____-NEXT: ret ptr undef
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo.4
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[__FIRST:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[__FIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT: store ptr [[__FIRST]], ptr [[__FIRST]], align 8
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call noalias noundef nonnull align 8 dereferenceable(8) ptr @bar(ptr noalias nofree noundef nonnull readnone align 8 dereferenceable(8) [[__FIRST]]) #[[ATTR7:[0-9]+]]
-; IS__CGSCC____-NEXT: ret ptr [[CALL1]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@foo.4
+; TUNIT-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[__FIRST:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[__FIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: store ptr [[__FIRST]], ptr [[__FIRST]], align 8
+; TUNIT-NEXT: ret ptr undef
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@foo.4
+; CGSCC-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[__FIRST:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[__FIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: store ptr [[__FIRST]], ptr [[__FIRST]], align 8
+; CGSCC-NEXT: [[CALL1:%.*]] = call noalias noundef nonnull align 8 dereferenceable(8) ptr @bar(ptr noalias nofree noundef nonnull readnone align 8 dereferenceable(8) [[__FIRST]]) #[[ATTR7:[0-9]+]]
+; CGSCC-NEXT: ret ptr [[CALL1]]
;
entry:
%__first.addr = alloca ptr, i32 0, align 8
}
define internal ptr @bar(ptr %QQfirst) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC____-SAME: (ptr noalias nofree noundef nonnull readnone returned align 8 dereferenceable(8) "no-capture-maybe-returned" [[QQFIRST:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[QQFIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT: store ptr [[QQFIRST]], ptr [[QQFIRST_ADDR]], align 8
-; IS__CGSCC____-NEXT: br label [[WHILE_COND:%.*]]
-; IS__CGSCC____: while.cond:
-; IS__CGSCC____-NEXT: br label [[WHILE_END:%.*]]
-; IS__CGSCC____: while.end:
-; IS__CGSCC____-NEXT: ret ptr [[QQFIRST]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@bar
+; CGSCC-SAME: (ptr noalias nofree noundef nonnull readnone returned align 8 dereferenceable(8) "no-capture-maybe-returned" [[QQFIRST:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[QQFIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: store ptr [[QQFIRST]], ptr [[QQFIRST_ADDR]], align 8
+; CGSCC-NEXT: br label [[WHILE_COND:%.*]]
+; CGSCC: while.cond:
+; CGSCC-NEXT: br label [[WHILE_END:%.*]]
+; CGSCC: while.end:
+; CGSCC-NEXT: ret ptr [[QQFIRST]]
;
entry:
%QQfirst.addr = alloca ptr, i32 0, align 8
}
define ptr @t2(ptr %this, ptr %this.addr, ptr %this1) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t2
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call [[S:%.*]] @foo.1(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4:[0-9]+]]
-; IS__TUNIT____-NEXT: [[TEST_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__TUNIT____-NEXT: ret ptr [[TEST_RET]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t2
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call [[S:%.*]] @foo.1(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8:[0-9]+]]
-; IS__CGSCC____-NEXT: [[TEST_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__CGSCC____-NEXT: ret ptr [[TEST_RET]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@t2
+; TUNIT-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; TUNIT-NEXT: [[CALL:%.*]] = call [[S:%.*]] @foo.1(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4:[0-9]+]]
+; TUNIT-NEXT: [[TEST_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
+; TUNIT-NEXT: ret ptr [[TEST_RET]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@t2
+; CGSCC-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; CGSCC-NEXT: [[CALL:%.*]] = call [[S:%.*]] @foo.1(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8:[0-9]+]]
+; CGSCC-NEXT: [[TEST_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
+; CGSCC-NEXT: ret ptr [[TEST_RET]]
;
entry:
store ptr %this, ptr %this, align 8
}
define internal %S @foo.1(ptr %foo.this) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@foo.1
-; IS__TUNIT_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[FOO_THIS:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__TUNIT_NPM-NEXT: store ptr [[FOO_THIS]], ptr [[FOO_THIS]], align 8
-; IS__TUNIT_NPM-NEXT: call void @bar.2(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FOO_THIS]]) #[[ATTR5:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[FOO_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__TUNIT_NPM-NEXT: ret [[S]] [[FOO_RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo.1
-; IS__CGSCC_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[FOO_THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_NPM-NEXT: store ptr [[FOO_THIS]], ptr [[FOO_THIS]], align 8
-; IS__CGSCC_NPM-NEXT: call void @bar.2(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FOO_THIS]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[FOO_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_NPM-NEXT: ret [[S]] [[FOO_RET]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo.1
+; TUNIT-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[FOO_THIS:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
+; TUNIT-NEXT: store ptr [[FOO_THIS]], ptr [[FOO_THIS]], align 8
+; TUNIT-NEXT: call void @bar.2(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FOO_THIS]]) #[[ATTR5:[0-9]+]]
+; TUNIT-NEXT: [[FOO_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
+; TUNIT-NEXT: ret [[S]] [[FOO_RET]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo.1
+; CGSCC-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[FOO_THIS:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
+; CGSCC-NEXT: store ptr [[FOO_THIS]], ptr [[FOO_THIS]], align 8
+; CGSCC-NEXT: call void @bar.2(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FOO_THIS]]) #[[ATTR6]]
+; CGSCC-NEXT: [[FOO_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
+; CGSCC-NEXT: ret [[S]] [[FOO_RET]]
;
entry:
%retval = alloca %S, i32 0, align 8
}
define internal void @bar.2(ptr %bar.this, ptr %bar.data) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bar.2
-; IS__TUNIT_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: store ptr [[BAR_DATA]], ptr [[BAR_THIS]], align 8
-; IS__TUNIT_NPM-NEXT: call void @baz(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA]]) #[[ATTR5]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar.2
-; IS__CGSCC_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: store ptr [[BAR_DATA]], ptr [[BAR_THIS]], align 8
-; IS__CGSCC_NPM-NEXT: call void @baz(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@bar.2
+; TUNIT-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store ptr [[BAR_DATA]], ptr [[BAR_THIS]], align 8
+; TUNIT-NEXT: call void @baz(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@bar.2
+; CGSCC-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store ptr [[BAR_DATA]], ptr [[BAR_THIS]], align 8
+; CGSCC-NEXT: call void @baz(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA]]) #[[ATTR6]]
+; CGSCC-NEXT: ret void
;
entry:
store ptr %bar.data, ptr %bar.this, align 8
}
define internal void @baz(ptr %baz.this, ptr %baz.data) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@baz
-; IS__TUNIT____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_DATA:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: store ptr [[BAZ_DATA]], ptr [[BAZ_THIS]], align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@baz
-; IS__CGSCC____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_THIS:%.*]], ptr nofree writeonly [[BAZ_DATA:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: store ptr [[BAZ_DATA]], ptr [[BAZ_THIS]], align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@baz
+; TUNIT-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_DATA:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store ptr [[BAZ_DATA]], ptr [[BAZ_THIS]], align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@baz
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_THIS:%.*]], ptr nofree writeonly [[BAZ_DATA:%.*]]) #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store ptr [[BAZ_DATA]], ptr [[BAZ_THIS]], align 8
+; CGSCC-NEXT: ret void
;
entry:
store ptr %baz.data, ptr %baz.this, align 8
}
define ptr @foo(ptr %this, ptr %this.addr, ptr %this1) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call [[S:%.*]] @bar.5(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT: [[FOO_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__TUNIT____-NEXT: ret ptr [[FOO_RET]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call [[S:%.*]] @bar.5(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT: [[FOO_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__CGSCC____-NEXT: ret ptr [[FOO_RET]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@foo
+; TUNIT-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; TUNIT-NEXT: [[CALL:%.*]] = call [[S:%.*]] @bar.5(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4]]
+; TUNIT-NEXT: [[FOO_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
+; TUNIT-NEXT: ret ptr [[FOO_RET]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@foo
+; CGSCC-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; CGSCC-NEXT: [[CALL:%.*]] = call [[S:%.*]] @bar.5(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
+; CGSCC-NEXT: [[FOO_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
+; CGSCC-NEXT: ret ptr [[FOO_RET]]
;
entry:
store ptr %this, ptr %this, align 8
}
define internal %S @bar.5(ptr %this) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bar.5
-; IS__TUNIT_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__TUNIT_NPM-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT_NPM-NEXT: call void @baz.6(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: [[BAR_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__TUNIT_NPM-NEXT: ret [[S]] [[BAR_RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar.5
-; IS__CGSCC_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_NPM-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC_NPM-NEXT: call void @baz.6(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
-; IS__CGSCC_NPM-NEXT: [[BAR_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_NPM-NEXT: ret [[S]] [[BAR_RET]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@bar.5
+; TUNIT-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
+; TUNIT-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; TUNIT-NEXT: call void @baz.6(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4]]
+; TUNIT-NEXT: [[BAR_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
+; TUNIT-NEXT: ret [[S]] [[BAR_RET]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@bar.5
+; CGSCC-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
+; CGSCC-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; CGSCC-NEXT: call void @baz.6(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
+; CGSCC-NEXT: [[BAR_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
+; CGSCC-NEXT: ret [[S]] [[BAR_RET]]
;
entry:
%retval = alloca %S, i32 0, align 8
}
define internal void @baz.6(ptr %this, ptr %data) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@baz.6
-; IS__TUNIT_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__TUNIT_NPM-NEXT: call void @boom(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@baz.6
-; IS__CGSCC_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC_NPM-NEXT: call void @boom(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA]]) #[[ATTR8]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@baz.6
+; TUNIT-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
+; TUNIT-NEXT: call void @boom(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA]]) #[[ATTR4]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@baz.6
+; CGSCC-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
+; CGSCC-NEXT: call void @boom(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA]]) #[[ATTR8]]
+; CGSCC-NEXT: ret void
;
entry:
store ptr %data, ptr %this, align 8
}
define internal void @boom(ptr %this, ptr %data) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@boom
-; IS__TUNIT____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: store ptr [[DATA]], ptr [[DATA_ADDR]], align 8
-; IS__TUNIT____-NEXT: [[V:%.*]] = load ptr, ptr [[DATA_ADDR]], align 8
-; IS__TUNIT____-NEXT: store ptr [[V]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@boom
-; IS__CGSCC____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree [[DATA:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT: store ptr [[DATA]], ptr [[DATA_ADDR]], align 8
-; IS__CGSCC____-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@boom
+; TUNIT-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: store ptr [[DATA]], ptr [[DATA_ADDR]], align 8
+; TUNIT-NEXT: [[V:%.*]] = load ptr, ptr [[DATA_ADDR]], align 8
+; TUNIT-NEXT: store ptr [[V]], ptr [[THIS]], align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@boom
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree [[DATA:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: store ptr [[DATA]], ptr [[DATA_ADDR]], align 8
+; CGSCC-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
+; CGSCC-NEXT: ret void
;
entry:
%data.addr = alloca ptr, i32 0, align 8
; Taken from https://github.com/llvm/llvm-project/issues/54981
define dso_local void @spam() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@spam
-; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: bb:
-; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[X:%.*]] = fptosi float undef to i32
-; IS__TUNIT_NPM-NEXT: store i32 [[X]], ptr [[TMP]], align 4
-; IS__TUNIT_NPM-NEXT: br label [[BB16:%.*]]
-; IS__TUNIT_NPM: bb16:
-; IS__TUNIT_NPM-NEXT: [[TMP18:%.*]] = icmp eq i32 [[X]], 0
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP18]], label [[BB35:%.*]], label [[BB19:%.*]]
-; IS__TUNIT_NPM: bb19:
-; IS__TUNIT_NPM-NEXT: [[TMP21:%.*]] = load float, ptr [[TMP]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP22:%.*]] = fadd fast float [[TMP21]], 0.000000e+00
-; IS__TUNIT_NPM-NEXT: br label [[BB23:%.*]]
-; IS__TUNIT_NPM: bb23:
-; IS__TUNIT_NPM-NEXT: [[TMP24:%.*]] = phi <2 x float> [ undef, [[BB19]] ], [ [[TMP26:%.*]], [[BB34:%.*]] ]
-; IS__TUNIT_NPM-NEXT: br label [[BB25:%.*]]
-; IS__TUNIT_NPM: bb25:
-; IS__TUNIT_NPM-NEXT: [[TMP26]] = phi <2 x float> [ [[TMP30:%.*]], [[BB28:%.*]] ], [ [[TMP24]], [[BB23]] ]
-; IS__TUNIT_NPM-NEXT: [[TMP27:%.*]] = icmp ult i32 undef, 8
-; IS__TUNIT_NPM-NEXT: br i1 [[TMP27]], label [[BB28]], label [[BB34]]
-; IS__TUNIT_NPM: bb28:
-; IS__TUNIT_NPM-NEXT: [[TMP29:%.*]] = insertelement <2 x float> [[TMP26]], float undef, i32 0
-; IS__TUNIT_NPM-NEXT: [[TMP30]] = insertelement <2 x float> [[TMP29]], float [[TMP22]], i32 1
-; IS__TUNIT_NPM-NEXT: br label [[BB25]]
-; IS__TUNIT_NPM: bb34:
-; IS__TUNIT_NPM-NEXT: br label [[BB23]]
-; IS__TUNIT_NPM: bb35:
-; IS__TUNIT_NPM-NEXT: unreachable
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@spam
-; IS__CGSCC_NPM-SAME: () #[[ATTR5:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: bb:
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[X:%.*]] = fptosi float undef to i32
-; IS__CGSCC_NPM-NEXT: store i32 [[X]], ptr [[TMP]], align 4
-; IS__CGSCC_NPM-NEXT: br label [[BB16:%.*]]
-; IS__CGSCC_NPM: bb16:
-; IS__CGSCC_NPM-NEXT: [[TMP18:%.*]] = icmp eq i32 [[X]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP18]], label [[BB35:%.*]], label [[BB19:%.*]]
-; IS__CGSCC_NPM: bb19:
-; IS__CGSCC_NPM-NEXT: [[TMP21:%.*]] = load float, ptr [[TMP]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP22:%.*]] = fadd fast float [[TMP21]], 0.000000e+00
-; IS__CGSCC_NPM-NEXT: br label [[BB23:%.*]]
-; IS__CGSCC_NPM: bb23:
-; IS__CGSCC_NPM-NEXT: [[TMP24:%.*]] = phi <2 x float> [ undef, [[BB19]] ], [ [[TMP26:%.*]], [[BB34:%.*]] ]
-; IS__CGSCC_NPM-NEXT: br label [[BB25:%.*]]
-; IS__CGSCC_NPM: bb25:
-; IS__CGSCC_NPM-NEXT: [[TMP26]] = phi <2 x float> [ [[TMP30:%.*]], [[BB28:%.*]] ], [ [[TMP24]], [[BB23]] ]
-; IS__CGSCC_NPM-NEXT: [[TMP27:%.*]] = icmp ult i32 undef, 8
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP27]], label [[BB28]], label [[BB34]]
-; IS__CGSCC_NPM: bb28:
-; IS__CGSCC_NPM-NEXT: [[TMP29:%.*]] = insertelement <2 x float> [[TMP26]], float undef, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP30]] = insertelement <2 x float> [[TMP29]], float [[TMP22]], i32 1
-; IS__CGSCC_NPM-NEXT: br label [[BB25]]
-; IS__CGSCC_NPM: bb34:
-; IS__CGSCC_NPM-NEXT: br label [[BB23]]
-; IS__CGSCC_NPM: bb35:
-; IS__CGSCC_NPM-NEXT: unreachable
+; TUNIT: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@spam
+; TUNIT-SAME: () #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: bb:
+; TUNIT-NEXT: [[TMP:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[X:%.*]] = fptosi float undef to i32
+; TUNIT-NEXT: store i32 [[X]], ptr [[TMP]], align 4
+; TUNIT-NEXT: br label [[BB16:%.*]]
+; TUNIT: bb16:
+; TUNIT-NEXT: [[TMP18:%.*]] = icmp eq i32 [[X]], 0
+; TUNIT-NEXT: br i1 [[TMP18]], label [[BB35:%.*]], label [[BB19:%.*]]
+; TUNIT: bb19:
+; TUNIT-NEXT: [[TMP21:%.*]] = load float, ptr [[TMP]], align 4
+; TUNIT-NEXT: [[TMP22:%.*]] = fadd fast float [[TMP21]], 0.000000e+00
+; TUNIT-NEXT: br label [[BB23:%.*]]
+; TUNIT: bb23:
+; TUNIT-NEXT: [[TMP24:%.*]] = phi <2 x float> [ undef, [[BB19]] ], [ [[TMP26:%.*]], [[BB34:%.*]] ]
+; TUNIT-NEXT: br label [[BB25:%.*]]
+; TUNIT: bb25:
+; TUNIT-NEXT: [[TMP26]] = phi <2 x float> [ [[TMP30:%.*]], [[BB28:%.*]] ], [ [[TMP24]], [[BB23]] ]
+; TUNIT-NEXT: [[TMP27:%.*]] = icmp ult i32 undef, 8
+; TUNIT-NEXT: br i1 [[TMP27]], label [[BB28]], label [[BB34]]
+; TUNIT: bb28:
+; TUNIT-NEXT: [[TMP29:%.*]] = insertelement <2 x float> [[TMP26]], float undef, i32 0
+; TUNIT-NEXT: [[TMP30]] = insertelement <2 x float> [[TMP29]], float [[TMP22]], i32 1
+; TUNIT-NEXT: br label [[BB25]]
+; TUNIT: bb34:
+; TUNIT-NEXT: br label [[BB23]]
+; TUNIT: bb35:
+; TUNIT-NEXT: unreachable
+;
+; CGSCC: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@spam
+; CGSCC-SAME: () #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: bb:
+; CGSCC-NEXT: [[TMP:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[X:%.*]] = fptosi float undef to i32
+; CGSCC-NEXT: store i32 [[X]], ptr [[TMP]], align 4
+; CGSCC-NEXT: br label [[BB16:%.*]]
+; CGSCC: bb16:
+; CGSCC-NEXT: [[TMP18:%.*]] = icmp eq i32 [[X]], 0
+; CGSCC-NEXT: br i1 [[TMP18]], label [[BB35:%.*]], label [[BB19:%.*]]
+; CGSCC: bb19:
+; CGSCC-NEXT: [[TMP21:%.*]] = load float, ptr [[TMP]], align 4
+; CGSCC-NEXT: [[TMP22:%.*]] = fadd fast float [[TMP21]], 0.000000e+00
+; CGSCC-NEXT: br label [[BB23:%.*]]
+; CGSCC: bb23:
+; CGSCC-NEXT: [[TMP24:%.*]] = phi <2 x float> [ undef, [[BB19]] ], [ [[TMP26:%.*]], [[BB34:%.*]] ]
+; CGSCC-NEXT: br label [[BB25:%.*]]
+; CGSCC: bb25:
+; CGSCC-NEXT: [[TMP26]] = phi <2 x float> [ [[TMP30:%.*]], [[BB28:%.*]] ], [ [[TMP24]], [[BB23]] ]
+; CGSCC-NEXT: [[TMP27:%.*]] = icmp ult i32 undef, 8
+; CGSCC-NEXT: br i1 [[TMP27]], label [[BB28]], label [[BB34]]
+; CGSCC: bb28:
+; CGSCC-NEXT: [[TMP29:%.*]] = insertelement <2 x float> [[TMP26]], float undef, i32 0
+; CGSCC-NEXT: [[TMP30]] = insertelement <2 x float> [[TMP29]], float [[TMP22]], i32 1
+; CGSCC-NEXT: br label [[BB25]]
+; CGSCC: bb34:
+; CGSCC-NEXT: br label [[BB23]]
+; CGSCC: bb35:
+; CGSCC-NEXT: unreachable
;
bb:
%tmp = alloca i32, align 4
}
define double @t4(ptr %this, ptr %this.addr, ptr %this1) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t4
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[THIS_ADDR1:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call [[S:%.*]] @t4a(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR5:[0-9]+]]
-; IS__TUNIT____-NEXT: ret double 0.000000e+00
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t4
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[THIS_ADDR1:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call [[S:%.*]] @t4a(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__CGSCC____-NEXT: ret double 0.000000e+00
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@t4
+; TUNIT-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[THIS_ADDR1:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; TUNIT-NEXT: [[CALL:%.*]] = call [[S:%.*]] @t4a(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR5:[0-9]+]]
+; TUNIT-NEXT: ret double 0.000000e+00
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@t4
+; CGSCC-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[THIS_ADDR1:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; CGSCC-NEXT: [[CALL:%.*]] = call [[S:%.*]] @t4a(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
+; CGSCC-NEXT: [[TMP0:%.*]] = extractvalue [[S]] [[CALL]], 0
+; CGSCC-NEXT: ret double 0.000000e+00
;
entry:
%this.addr1 = alloca ptr, i32 0, align 8
}
define internal %S @t4a(ptr %this) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t4a
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__TUNIT____-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT: call void @t4b(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret [[S]] undef
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t4a
-; IS__CGSCC_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_NPM-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_NPM-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC_NPM-NEXT: call void @t4b(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_NPM-NEXT: ret [[S]] [[TMP0]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@t4a
+; TUNIT-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
+; TUNIT-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; TUNIT-NEXT: call void @t4b(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]]) #[[ATTR5]]
+; TUNIT-NEXT: ret [[S]] undef
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@t4a
+; CGSCC-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
+; CGSCC-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: store ptr [[THIS]], ptr [[THIS]], align 8
+; CGSCC-NEXT: call void @t4b(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR6]]
+; CGSCC-NEXT: [[TMP0:%.*]] = load [[S]], ptr [[RETVAL]], align 8
+; CGSCC-NEXT: ret [[S]] [[TMP0]]
;
entry:
%retval = alloca %S, i32 0, align 8
}
define internal void @t4b(ptr %this, ptr %data) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t4b
-; IS__TUNIT____-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: call void @t4c(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t4b
-; IS__CGSCC_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_NPM-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_NPM-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC_NPM-NEXT: call void @t4c(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[DATA]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@t4b
+; TUNIT-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: call void @t4c(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR5]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@t4b
+; CGSCC-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR0]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
+; CGSCC-NEXT: call void @t4c(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[DATA]]) #[[ATTR6]]
+; CGSCC-NEXT: ret void
;
entry:
%this.addr = alloca ptr, i32 0, align 8
}
define internal void @t4c(ptr %this, ptr %data) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t4c
-; IS__TUNIT____-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t4c
-; IS__CGSCC____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree writeonly [[DATA:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@t4c
+; TUNIT-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@t4c
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree writeonly [[DATA:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
+; CGSCC-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
+; CGSCC-NEXT: store ptr [[DATA]], ptr [[THIS]], align 8
+; CGSCC-NEXT: ret void
;
entry:
%this.addr = alloca ptr, i32 0, align 8
!6 = !{i32 7, !"Dwarf Version", i32 2}
!7 = !{i32 2, !"Debug Info Version", i32 3}
;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree norecurse noreturn nosync nounwind readnone }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR2:[0-9]+]] = { nofree norecurse noreturn nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR5:[0-9]+]] = { nofree norecurse noreturn nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR6]] = { nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR7]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR8]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR5:[0-9]+]] = { nofree norecurse noreturn nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR6]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR7]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR8]] = { nounwind willreturn }
;.
; CHECK: [[META0:![0-9]+]] = !{i32 2, !"SDK Version", [2 x i32] [i32 11, i32 5]}
; CHECK: [[META1:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=22 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=22 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
%struct.S = type { i32, i32, i32, float, float, float }
; return r;
; }
define void @local_alloca_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
-; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR15:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__TUNIT_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__TUNIT_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR16:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__TUNIT_NPM-NEXT: store float 0x40119999A0000000, float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__TUNIT_NPM-NEXT: store float 0x40119999A0000000, float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 4, i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: store i32 4, i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
-; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR18:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__CGSCC_NPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__CGSCC_NPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR19:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: [[I4:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: store float [[I4]], float* [[F12]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__CGSCC_NPM-NEXT: [[I5:%.*]] = load float, float* [[F23]], align 4, !tbaa [[TBAA10]]
-; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = fmul float [[I5]], 2.000000e+00
-; IS__CGSCC_NPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__CGSCC_NPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
-; IS__CGSCC_NPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__CGSCC_NPM-NEXT: [[I6:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC_NPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: [[I7:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = fadd float [[I6]], [[I7]]
-; IS__CGSCC_NPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__CGSCC_NPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[I8:%.*]] = load i32, i32* [[I18]], align 4, !tbaa [[TBAA12:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: store i32 [[I8]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
-; IS__CGSCC_NPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[I9:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I9]], 1
-; IS__CGSCC_NPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
-; IS__CGSCC_NPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: [[I10:%.*]] = load i32, i32* [[I313]], align 4, !tbaa [[TBAA14:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[I11:%.*]] = load i32, i32* [[I114]], align 4, !tbaa [[TBAA12]]
-; IS__CGSCC_NPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I10]], [[I11]]
-; IS__CGSCC_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
-; IS__CGSCC_NPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
+; TUNIT-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4
+; TUNIT-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR15:[0-9]+]]
+; TUNIT-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; TUNIT-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; TUNIT-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; TUNIT-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR16:[0-9]+]]
+; TUNIT-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR16]]
+; TUNIT-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR16]]
+; TUNIT-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; TUNIT-NEXT: store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]]
+; TUNIT-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; TUNIT-NEXT: store float 0x40119999A0000000, float* [[F24]], align 4, !tbaa [[TBAA10:![0-9]+]]
+; TUNIT-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; TUNIT-NEXT: store float 0x40119999A0000000, float* [[F37]], align 4, !tbaa [[TBAA11:![0-9]+]]
+; TUNIT-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; TUNIT-NEXT: store i32 1, i32* [[I19]], align 4, !tbaa [[TBAA12:![0-9]+]]
+; TUNIT-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; TUNIT-NEXT: store i32 4, i32* [[I212]], align 4, !tbaa [[TBAA13:![0-9]+]]
+; TUNIT-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; TUNIT-NEXT: store i32 4, i32* [[I316]], align 4, !tbaa [[TBAA14:![0-9]+]]
+; TUNIT-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR15]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
+; CGSCC-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4
+; CGSCC-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR18:[0-9]+]]
+; CGSCC-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; CGSCC-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7:![0-9]+]]
+; CGSCC-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; CGSCC-NEXT: store float 0x40019999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10:![0-9]+]]
+; CGSCC-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; CGSCC-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11:![0-9]+]]
+; CGSCC-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR19:[0-9]+]]
+; CGSCC-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR19]]
+; CGSCC-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR19]]
+; CGSCC-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; CGSCC-NEXT: [[I4:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; CGSCC-NEXT: store float [[I4]], float* [[F12]], align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; CGSCC-NEXT: [[I5:%.*]] = load float, float* [[F23]], align 4, !tbaa [[TBAA10]]
+; CGSCC-NEXT: [[MUL:%.*]] = fmul float [[I5]], 2.000000e+00
+; CGSCC-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; CGSCC-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
+; CGSCC-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; CGSCC-NEXT: [[I6:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
+; CGSCC-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; CGSCC-NEXT: [[I7:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[ADD:%.*]] = fadd float [[I6]], [[I7]]
+; CGSCC-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; CGSCC-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
+; CGSCC-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; CGSCC-NEXT: [[I8:%.*]] = load i32, i32* [[I18]], align 4, !tbaa [[TBAA12:![0-9]+]]
+; CGSCC-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; CGSCC-NEXT: store i32 [[I8]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
+; CGSCC-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; CGSCC-NEXT: [[I9:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13:![0-9]+]]
+; CGSCC-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I9]], 1
+; CGSCC-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; CGSCC-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
+; CGSCC-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; CGSCC-NEXT: [[I10:%.*]] = load i32, i32* [[I313]], align 4, !tbaa [[TBAA14:![0-9]+]]
+; CGSCC-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; CGSCC-NEXT: [[I11:%.*]] = load i32, i32* [[I114]], align 4, !tbaa [[TBAA12]]
+; CGSCC-NEXT: [[ADD15:%.*]] = add nsw i32 [[I10]], [[I11]]
+; CGSCC-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; CGSCC-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
+; CGSCC-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR18]]
+; CGSCC-NEXT: ret void
;
entry:
%s = alloca %struct.S, align 4
; }
;
define void @local_alloca_simplifiable_2() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2
-; IS__TUNIT_NPM-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__TUNIT_NPM: for.cond:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND]], 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: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC]]
-; IS__TUNIT_NPM: for.inc:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP15:![0-9]+]]
-; IS__TUNIT_NPM: for.end:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2:%.*]]
-; IS__TUNIT_NPM: for.cond2:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup4:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END11:%.*]]
-; IS__TUNIT_NPM: for.body5:
-; IS__TUNIT_NPM-NEXT: [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
-; IS__TUNIT_NPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
-; IS__TUNIT_NPM-NEXT: [[I18:%.*]] = or i64 [[I17]], 1
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC9]]
-; IS__TUNIT_NPM: for.inc9:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP17:![0-9]+]]
-; IS__TUNIT_NPM: for.end11:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13:%.*]]
-; IS__TUNIT_NPM: for.cond13:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup15:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END24:%.*]]
-; IS__TUNIT_NPM: for.body16:
-; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
-; IS__TUNIT_NPM-NEXT: [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
-; IS__TUNIT_NPM-NEXT: [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC22]]
-; IS__TUNIT_NPM: for.inc22:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP18:![0-9]+]]
-; IS__TUNIT_NPM: for.end24:
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
-; IS__TUNIT_NPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND28:%.*]]
-; IS__TUNIT_NPM: for.cond28:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup30:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END38:%.*]]
-; IS__TUNIT_NPM: for.body31:
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA19:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC36]]
-; IS__TUNIT_NPM: for.inc36:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]]
-; IS__TUNIT_NPM: for.end38:
-; IS__TUNIT_NPM-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2
-; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__CGSCC_NPM: for.cond:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND]], 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: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
-; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC]]
-; IS__CGSCC_NPM: for.inc:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
-; IS__CGSCC_NPM: for.end:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2:%.*]]
-; IS__CGSCC_NPM: for.cond2:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup4:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END11:%.*]]
-; IS__CGSCC_NPM: for.body5:
-; IS__CGSCC_NPM-NEXT: [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
-; IS__CGSCC_NPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
-; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = or i64 [[I17]], 1
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
-; IS__CGSCC_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC9]]
-; IS__CGSCC_NPM: for.inc9:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]]
-; IS__CGSCC_NPM: for.end11:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13:%.*]]
-; IS__CGSCC_NPM: for.cond13:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup15:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END24:%.*]]
-; IS__CGSCC_NPM: for.body16:
-; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
-; IS__CGSCC_NPM-NEXT: [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
-; IS__CGSCC_NPM-NEXT: [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
-; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC22]]
-; IS__CGSCC_NPM: for.inc22:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]]
-; IS__CGSCC_NPM: for.end24:
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
-; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
-; IS__CGSCC_NPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND28:%.*]]
-; IS__CGSCC_NPM: for.cond28:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup30:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END38:%.*]]
-; IS__CGSCC_NPM: for.body31:
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]]
-; IS__CGSCC_NPM-NEXT: [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__CGSCC_NPM-NEXT: store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC36]]
-; IS__CGSCC_NPM: for.inc36:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]]
-; IS__CGSCC_NPM: for.end38:
-; IS__CGSCC_NPM-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2
+; TUNIT-SAME: () #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16
+; TUNIT-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR15]]
+; TUNIT-NEXT: br label [[FOR_COND:%.*]]
+; TUNIT: for.cond:
+; TUNIT-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; TUNIT-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; TUNIT-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; TUNIT: for.cond.cleanup:
+; TUNIT-NEXT: br label [[FOR_END:%.*]]
+; TUNIT: for.body:
+; TUNIT-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; TUNIT-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
+; TUNIT-NEXT: br label [[FOR_INC]]
+; TUNIT: for.inc:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; TUNIT-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP15:![0-9]+]]
+; TUNIT: for.end:
+; TUNIT-NEXT: br label [[FOR_COND2:%.*]]
+; TUNIT: for.cond2:
+; TUNIT-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; TUNIT-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; TUNIT-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; TUNIT: for.cond.cleanup4:
+; TUNIT-NEXT: br label [[FOR_END11:%.*]]
+; TUNIT: for.body5:
+; TUNIT-NEXT: [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
+; TUNIT-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; TUNIT-NEXT: [[I18:%.*]] = or i64 [[I17]], 1
+; TUNIT-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
+; TUNIT-NEXT: br label [[FOR_INC9]]
+; TUNIT: for.inc9:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; TUNIT-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP17:![0-9]+]]
+; TUNIT: for.end11:
+; TUNIT-NEXT: br label [[FOR_COND13:%.*]]
+; TUNIT: for.cond13:
+; TUNIT-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
+; TUNIT-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; TUNIT-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; TUNIT: for.cond.cleanup15:
+; TUNIT-NEXT: br label [[FOR_END24:%.*]]
+; TUNIT: for.body16:
+; TUNIT-NEXT: [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
+; TUNIT-NEXT: [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; TUNIT-NEXT: [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
+; TUNIT-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
+; TUNIT-NEXT: br label [[FOR_INC22]]
+; TUNIT: for.inc22:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; TUNIT-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP18:![0-9]+]]
+; TUNIT: for.end24:
+; TUNIT-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
+; TUNIT-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
+; TUNIT-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR16]]
+; TUNIT-NEXT: br label [[FOR_COND28:%.*]]
+; TUNIT: for.cond28:
+; TUNIT-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
+; TUNIT-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; TUNIT-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
+; TUNIT: for.cond.cleanup30:
+; TUNIT-NEXT: br label [[FOR_END38:%.*]]
+; TUNIT: for.body31:
+; TUNIT-NEXT: [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; TUNIT-NEXT: store i8 0, i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA19:![0-9]+]]
+; TUNIT-NEXT: br label [[FOR_INC36]]
+; TUNIT: for.inc36:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; TUNIT-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]]
+; TUNIT: for.end38:
+; TUNIT-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR15]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16
+; CGSCC-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR18]]
+; CGSCC-NEXT: br label [[FOR_COND:%.*]]
+; CGSCC: for.cond:
+; CGSCC-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; CGSCC-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; CGSCC-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; CGSCC: for.cond.cleanup:
+; CGSCC-NEXT: br label [[FOR_END:%.*]]
+; CGSCC: for.body:
+; CGSCC-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; CGSCC-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
+; CGSCC-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
+; CGSCC-NEXT: br label [[FOR_INC]]
+; CGSCC: for.inc:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; CGSCC-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
+; CGSCC: for.end:
+; CGSCC-NEXT: br label [[FOR_COND2:%.*]]
+; CGSCC: for.cond2:
+; CGSCC-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; CGSCC-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; CGSCC-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; CGSCC: for.cond.cleanup4:
+; CGSCC-NEXT: br label [[FOR_END11:%.*]]
+; CGSCC: for.body5:
+; CGSCC-NEXT: [[I16:%.*]] = bitcast [1024 x i8]* [[BYTES]] to float*
+; CGSCC-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; CGSCC-NEXT: [[I18:%.*]] = or i64 [[I17]], 1
+; CGSCC-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
+; CGSCC-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
+; CGSCC-NEXT: br label [[FOR_INC9]]
+; CGSCC: for.inc9:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; CGSCC-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]]
+; CGSCC: for.end11:
+; CGSCC-NEXT: br label [[FOR_COND13:%.*]]
+; CGSCC: for.cond13:
+; CGSCC-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC22:%.*]] ], [ 0, [[FOR_END11]] ]
+; CGSCC-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; CGSCC-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; CGSCC: for.cond.cleanup15:
+; CGSCC-NEXT: br label [[FOR_END24:%.*]]
+; CGSCC: for.body16:
+; CGSCC-NEXT: [[I19:%.*]] = bitcast [1024 x i8]* [[BYTES]] to i64*
+; CGSCC-NEXT: [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; CGSCC-NEXT: [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
+; CGSCC-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
+; CGSCC-NEXT: store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]]
+; CGSCC-NEXT: br label [[FOR_INC22]]
+; CGSCC: for.inc22:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; CGSCC-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]]
+; CGSCC: for.end24:
+; CGSCC-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
+; CGSCC-NEXT: store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
+; CGSCC-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR19]]
+; CGSCC-NEXT: br label [[FOR_COND28:%.*]]
+; CGSCC: for.cond28:
+; CGSCC-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
+; CGSCC-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; CGSCC-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY31:%.*]], label [[FOR_COND_CLEANUP30:%.*]]
+; CGSCC: for.cond.cleanup30:
+; CGSCC-NEXT: br label [[FOR_END38:%.*]]
+; CGSCC: for.body31:
+; CGSCC-NEXT: [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]]
+; CGSCC-NEXT: [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; CGSCC-NEXT: store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: br label [[FOR_INC36]]
+; CGSCC: for.inc36:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; CGSCC-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]]
+; CGSCC: for.end38:
+; CGSCC-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR18]]
+; CGSCC-NEXT: ret void
;
entry:
%Bytes = alloca [1024 x i8], align 16
; return *p;
; }
define i32 @multi_obj_simplifiable_1(i32 %cnd) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
-; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
-; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
-; IS__TUNIT_NPM: cond.true:
-; IS__TUNIT_NPM-NEXT: br label [[COND_END:%.*]]
-; IS__TUNIT_NPM: cond.false:
-; IS__TUNIT_NPM-NEXT: br label [[COND_END]]
-; IS__TUNIT_NPM: cond.end:
-; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: ret i32 5
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
-; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
-; IS__CGSCC_NPM: cond.true:
-; IS__CGSCC_NPM-NEXT: br label [[COND_END:%.*]]
-; IS__CGSCC_NPM: cond.false:
-; IS__CGSCC_NPM-NEXT: br label [[COND_END]]
-; IS__CGSCC_NPM: cond.end:
-; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: ret i32 5
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
+; TUNIT-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[L:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
+; TUNIT-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
+; TUNIT: cond.true:
+; TUNIT-NEXT: br label [[COND_END:%.*]]
+; TUNIT: cond.false:
+; TUNIT-NEXT: br label [[COND_END]]
+; TUNIT: cond.end:
+; TUNIT-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR15]]
+; TUNIT-NEXT: ret i32 5
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
+; CGSCC-SAME: (i32 [[CND:%.*]]) #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[L:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR18]]
+; CGSCC-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
+; CGSCC: cond.true:
+; CGSCC-NEXT: br label [[COND_END:%.*]]
+; CGSCC: cond.false:
+; CGSCC-NEXT: br label [[COND_END]]
+; CGSCC: cond.end:
+; CGSCC-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR18]]
+; CGSCC-NEXT: ret i32 5
;
entry:
%L = alloca i32, align 4
; }
;
define i32 @multi_obj_simplifiable_2(i32 %cnd) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
-; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
-; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
-; IS__TUNIT_NPM: cond.true:
-; IS__TUNIT_NPM-NEXT: br label [[COND_END:%.*]]
-; IS__TUNIT_NPM: cond.false:
-; IS__TUNIT_NPM-NEXT: br label [[COND_END]]
-; IS__TUNIT_NPM: cond.end:
-; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: ret i32 5
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
-; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
-; IS__CGSCC_NPM: cond.true:
-; IS__CGSCC_NPM-NEXT: br label [[COND_END:%.*]]
-; IS__CGSCC_NPM: cond.false:
-; IS__CGSCC_NPM-NEXT: br label [[COND_END]]
-; IS__CGSCC_NPM: cond.end:
-; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: ret i32 5
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
+; TUNIT-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[L:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
+; TUNIT-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
+; TUNIT: cond.true:
+; TUNIT-NEXT: br label [[COND_END:%.*]]
+; TUNIT: cond.false:
+; TUNIT-NEXT: br label [[COND_END]]
+; TUNIT: cond.end:
+; TUNIT-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR15]]
+; TUNIT-NEXT: ret i32 5
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
+; CGSCC-SAME: (i32 [[CND:%.*]]) #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[L:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR18]]
+; CGSCC-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
+; CGSCC: cond.true:
+; CGSCC-NEXT: br label [[COND_END:%.*]]
+; CGSCC: cond.false:
+; CGSCC-NEXT: br label [[COND_END]]
+; CGSCC: cond.end:
+; CGSCC-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR18]]
+; CGSCC-NEXT: ret i32 5
;
entry:
%L = alloca i32, align 4
; }
;
define void @static_global_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
-; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
-; IS__TUNIT_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__TUNIT_NPM-NEXT: store float 0x40119999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10]]
-; IS__TUNIT_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__TUNIT_NPM-NEXT: store float 0x40119999A0000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
-; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
-; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 4, i32* [[I2]], align 4, !tbaa [[TBAA13]]
-; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: store i32 4, i32* [[I3]], align 4, !tbaa [[TBAA14]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
-; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: store float 0x40019999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
-; IS__CGSCC_NPM-NEXT: store float 0x400A666660000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: store float [[I]], float* [[F1]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[I4:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
-; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
-; IS__CGSCC_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__CGSCC_NPM-NEXT: store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
-; IS__CGSCC_NPM-NEXT: [[I5:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
-; IS__CGSCC_NPM-NEXT: [[I6:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]]
-; IS__CGSCC_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__CGSCC_NPM-NEXT: store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC_NPM-NEXT: [[I7:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), align 4, !tbaa [[TBAA12]]
-; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: store i32 [[I7]], i32* [[I1]], align 4, !tbaa [[TBAA12]]
-; IS__CGSCC_NPM-NEXT: [[I8:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa [[TBAA13]]
-; IS__CGSCC_NPM-NEXT: [[MUL1:%.*]] = shl nsw i32 [[I8]], 1
-; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
-; IS__CGSCC_NPM-NEXT: [[I9:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa [[TBAA14]]
-; IS__CGSCC_NPM-NEXT: [[I10:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), align 4, !tbaa [[TBAA12]]
-; IS__CGSCC_NPM-NEXT: [[ADD2:%.*]] = add nsw i32 [[I9]], [[I10]]
-; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@static_global_simplifiable_1
+; TUNIT-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR16]]
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR16]]
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR16]]
+; TUNIT-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; TUNIT-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
+; TUNIT-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; TUNIT-NEXT: store float 0x40119999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10]]
+; TUNIT-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; TUNIT-NEXT: store float 0x40119999A0000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
+; TUNIT-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; TUNIT-NEXT: store i32 1, i32* [[I1]], align 4, !tbaa [[TBAA12]]
+; TUNIT-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; TUNIT-NEXT: store i32 4, i32* [[I2]], align 4, !tbaa [[TBAA13]]
+; TUNIT-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; TUNIT-NEXT: store i32 4, i32* [[I3]], align 4, !tbaa [[TBAA14]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@static_global_simplifiable_1
+; CGSCC-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store float 0x3FF19999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: store float 0x40019999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
+; CGSCC-NEXT: store float 0x400A666660000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR19]]
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR19]]
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR19]]
+; CGSCC-NEXT: [[I:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; CGSCC-NEXT: store float [[I]], float* [[F1]], align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[I4:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
+; CGSCC-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
+; CGSCC-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; CGSCC-NEXT: store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
+; CGSCC-NEXT: [[I5:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
+; CGSCC-NEXT: [[I6:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]]
+; CGSCC-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; CGSCC-NEXT: store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
+; CGSCC-NEXT: [[I7:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), align 4, !tbaa [[TBAA12]]
+; CGSCC-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; CGSCC-NEXT: store i32 [[I7]], i32* [[I1]], align 4, !tbaa [[TBAA12]]
+; CGSCC-NEXT: [[I8:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa [[TBAA13]]
+; CGSCC-NEXT: [[MUL1:%.*]] = shl nsw i32 [[I8]], 1
+; CGSCC-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; CGSCC-NEXT: store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
+; CGSCC-NEXT: [[I9:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa [[TBAA14]]
+; CGSCC-NEXT: [[I10:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), align 4, !tbaa [[TBAA12]]
+; CGSCC-NEXT: [[ADD2:%.*]] = add nsw i32 [[I9]], [[I10]]
+; CGSCC-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; CGSCC-NEXT: store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
+; CGSCC-NEXT: ret void
;
entry:
store float 0x3FF19999A0000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7
; }
;
define void @static_global_simplifiable_2() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__TUNIT_NPM: for.cond:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND]], 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: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC]]
-; IS__TUNIT_NPM: for.inc:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP21:![0-9]+]]
-; IS__TUNIT_NPM: for.end:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2:%.*]]
-; IS__TUNIT_NPM: for.cond2:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup4:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END11:%.*]]
-; IS__TUNIT_NPM: for.body5:
-; IS__TUNIT_NPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
-; IS__TUNIT_NPM-NEXT: [[I16:%.*]] = or i64 [[I15]], 1
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC9]]
-; IS__TUNIT_NPM: for.inc9:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP22:![0-9]+]]
-; IS__TUNIT_NPM: for.end11:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13:%.*]]
-; IS__TUNIT_NPM: for.cond13:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup15:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END23:%.*]]
-; IS__TUNIT_NPM: for.body16:
-; IS__TUNIT_NPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
-; IS__TUNIT_NPM-NEXT: [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC21]]
-; IS__TUNIT_NPM: for.inc21:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP23:![0-9]+]]
-; IS__TUNIT_NPM: for.end23:
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND25:%.*]]
-; IS__TUNIT_NPM: for.cond25:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup27:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END35:%.*]]
-; IS__TUNIT_NPM: for.body28:
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC33]]
-; IS__TUNIT_NPM: for.inc33:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND25]], !llvm.loop [[LOOP24:![0-9]+]]
-; IS__TUNIT_NPM: for.end35:
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2
-; IS__CGSCC_NPM-SAME: () #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__CGSCC_NPM: for.cond:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND]], 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: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
-; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC]]
-; IS__CGSCC_NPM: for.inc:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
-; IS__CGSCC_NPM: for.end:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2:%.*]]
-; IS__CGSCC_NPM: for.cond2:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup4:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END11:%.*]]
-; IS__CGSCC_NPM: for.body5:
-; IS__CGSCC_NPM-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
-; IS__CGSCC_NPM-NEXT: [[I16:%.*]] = or i64 [[I15]], 1
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
-; IS__CGSCC_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC9]]
-; IS__CGSCC_NPM: for.inc9:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
-; IS__CGSCC_NPM: for.end11:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13:%.*]]
-; IS__CGSCC_NPM: for.cond13:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup15:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END23:%.*]]
-; IS__CGSCC_NPM: for.body16:
-; IS__CGSCC_NPM-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
-; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
-; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC21]]
-; IS__CGSCC_NPM: for.inc21:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
-; IS__CGSCC_NPM: for.end23:
-; IS__CGSCC_NPM-NEXT: store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND25:%.*]]
-; IS__CGSCC_NPM: for.cond25:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup27:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END35:%.*]]
-; IS__CGSCC_NPM: for.body28:
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__CGSCC_NPM-NEXT: store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC33]]
-; IS__CGSCC_NPM: for.inc33:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
-; IS__CGSCC_NPM: for.end35:
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@static_global_simplifiable_2
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[FOR_COND:%.*]]
+; TUNIT: for.cond:
+; TUNIT-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; TUNIT-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; TUNIT-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; TUNIT: for.cond.cleanup:
+; TUNIT-NEXT: br label [[FOR_END:%.*]]
+; TUNIT: for.body:
+; TUNIT-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; TUNIT-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
+; TUNIT-NEXT: br label [[FOR_INC]]
+; TUNIT: for.inc:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; TUNIT-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP21:![0-9]+]]
+; TUNIT: for.end:
+; TUNIT-NEXT: br label [[FOR_COND2:%.*]]
+; TUNIT: for.cond2:
+; TUNIT-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; TUNIT-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; TUNIT-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; TUNIT: for.cond.cleanup4:
+; TUNIT-NEXT: br label [[FOR_END11:%.*]]
+; TUNIT: for.body5:
+; TUNIT-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; TUNIT-NEXT: [[I16:%.*]] = or i64 [[I15]], 1
+; TUNIT-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
+; TUNIT-NEXT: br label [[FOR_INC9]]
+; TUNIT: for.inc9:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; TUNIT-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP22:![0-9]+]]
+; TUNIT: for.end11:
+; TUNIT-NEXT: br label [[FOR_COND13:%.*]]
+; TUNIT: for.cond13:
+; TUNIT-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
+; TUNIT-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; TUNIT-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; TUNIT: for.cond.cleanup15:
+; TUNIT-NEXT: br label [[FOR_END23:%.*]]
+; TUNIT: for.body16:
+; TUNIT-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; TUNIT-NEXT: [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
+; TUNIT-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
+; TUNIT-NEXT: br label [[FOR_INC21]]
+; TUNIT: for.inc21:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; TUNIT-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP23:![0-9]+]]
+; TUNIT: for.end23:
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR16]]
+; TUNIT-NEXT: br label [[FOR_COND25:%.*]]
+; TUNIT: for.cond25:
+; TUNIT-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
+; TUNIT-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; TUNIT-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
+; TUNIT: for.cond.cleanup27:
+; TUNIT-NEXT: br label [[FOR_END35:%.*]]
+; TUNIT: for.body28:
+; TUNIT-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; TUNIT-NEXT: store i8 0, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
+; TUNIT-NEXT: br label [[FOR_INC33]]
+; TUNIT: for.inc33:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; TUNIT-NEXT: br label [[FOR_COND25]], !llvm.loop [[LOOP24:![0-9]+]]
+; TUNIT: for.end35:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@static_global_simplifiable_2
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[FOR_COND:%.*]]
+; CGSCC: for.cond:
+; CGSCC-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; CGSCC-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; CGSCC-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; CGSCC: for.cond.cleanup:
+; CGSCC-NEXT: br label [[FOR_END:%.*]]
+; CGSCC: for.body:
+; CGSCC-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; CGSCC-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
+; CGSCC-NEXT: store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]]
+; CGSCC-NEXT: br label [[FOR_INC]]
+; CGSCC: for.inc:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; CGSCC-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
+; CGSCC: for.end:
+; CGSCC-NEXT: br label [[FOR_COND2:%.*]]
+; CGSCC: for.cond2:
+; CGSCC-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; CGSCC-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; CGSCC-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; CGSCC: for.cond.cleanup4:
+; CGSCC-NEXT: br label [[FOR_END11:%.*]]
+; CGSCC: for.body5:
+; CGSCC-NEXT: [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; CGSCC-NEXT: [[I16:%.*]] = or i64 [[I15]], 1
+; CGSCC-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
+; CGSCC-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
+; CGSCC-NEXT: br label [[FOR_INC9]]
+; CGSCC: for.inc9:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; CGSCC-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
+; CGSCC: for.end11:
+; CGSCC-NEXT: br label [[FOR_COND13:%.*]]
+; CGSCC: for.cond13:
+; CGSCC-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
+; CGSCC-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; CGSCC-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; CGSCC: for.cond.cleanup15:
+; CGSCC-NEXT: br label [[FOR_END23:%.*]]
+; CGSCC: for.body16:
+; CGSCC-NEXT: [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; CGSCC-NEXT: [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
+; CGSCC-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
+; CGSCC-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]]
+; CGSCC-NEXT: br label [[FOR_INC21]]
+; CGSCC: for.inc21:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; CGSCC-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
+; CGSCC: for.end23:
+; CGSCC-NEXT: store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR19]]
+; CGSCC-NEXT: br label [[FOR_COND25:%.*]]
+; CGSCC: for.cond25:
+; CGSCC-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
+; CGSCC-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; CGSCC-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
+; CGSCC: for.cond.cleanup27:
+; CGSCC-NEXT: br label [[FOR_END35:%.*]]
+; CGSCC: for.body28:
+; CGSCC-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
+; CGSCC-NEXT: [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; CGSCC-NEXT: store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: br label [[FOR_INC33]]
+; CGSCC: for.inc33:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; CGSCC-NEXT: br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
+; CGSCC: for.end35:
+; CGSCC-NEXT: ret void
;
entry:
br label %for.cond
; return Flag3;
; }
define i32 @static_global_simplifiable_3() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: ret i32 1
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3
-; IS__CGSCC_NPM-SAME: () #[[ATTR6:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: ret i32 1
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@static_global_simplifiable_3
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: ret i32 1
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@static_global_simplifiable_3
+; CGSCC-SAME: () #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: ret i32 1
;
store i32 1, i32* @Flag3, align 4, !tbaa !3
%i = load i32, i32* @Flag3, align 4, !tbaa !3
; }
;
define void @noalias_arg_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result, %struct.S* byval(%struct.S) align 8 %s) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
-; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
-; IS__TUNIT_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__TUNIT_NPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
-; IS__TUNIT_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__TUNIT_NPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
-; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
-; IS__TUNIT_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__TUNIT_NPM-NEXT: store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
-; IS__TUNIT_NPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__TUNIT_NPM-NEXT: [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
-; IS__TUNIT_NPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
-; IS__TUNIT_NPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__TUNIT_NPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
-; IS__TUNIT_NPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__TUNIT_NPM-NEXT: [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
-; IS__TUNIT_NPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__TUNIT_NPM-NEXT: [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
-; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]]
-; IS__TUNIT_NPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__TUNIT_NPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
-; IS__TUNIT_NPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
-; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT: store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
-; IS__TUNIT_NPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
-; IS__TUNIT_NPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
-; IS__TUNIT_NPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
-; IS__TUNIT_NPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
-; IS__TUNIT_NPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
-; IS__TUNIT_NPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
-; IS__TUNIT_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
-; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__CGSCC_NPM-NEXT: store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
-; IS__CGSCC_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__CGSCC_NPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__CGSCC_NPM-NEXT: [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
-; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
-; IS__CGSCC_NPM-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__CGSCC_NPM-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
-; IS__CGSCC_NPM-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__CGSCC_NPM-NEXT: [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC_NPM-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC_NPM-NEXT: [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]]
-; IS__CGSCC_NPM-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__CGSCC_NPM-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
-; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
-; IS__CGSCC_NPM-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
-; IS__CGSCC_NPM-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
-; IS__CGSCC_NPM-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
-; IS__CGSCC_NPM-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
-; IS__CGSCC_NPM-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
-; IS__CGSCC_NPM-NEXT: [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
-; IS__CGSCC_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
+; TUNIT-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; TUNIT-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
+; TUNIT-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; TUNIT-NEXT: store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
+; TUNIT-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; TUNIT-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
+; TUNIT-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR16]]
+; TUNIT-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR16]]
+; TUNIT-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR16]]
+; TUNIT-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; TUNIT-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
+; TUNIT-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; TUNIT-NEXT: store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
+; TUNIT-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; TUNIT-NEXT: [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
+; TUNIT-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
+; TUNIT-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; TUNIT-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
+; TUNIT-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; TUNIT-NEXT: [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
+; TUNIT-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; TUNIT-NEXT: [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
+; TUNIT-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]]
+; TUNIT-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; TUNIT-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
+; TUNIT-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; TUNIT-NEXT: [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
+; TUNIT-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; TUNIT-NEXT: store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
+; TUNIT-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; TUNIT-NEXT: [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
+; TUNIT-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
+; TUNIT-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; TUNIT-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
+; TUNIT-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; TUNIT-NEXT: [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
+; TUNIT-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; TUNIT-NEXT: [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
+; TUNIT-NEXT: [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
+; TUNIT-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; TUNIT-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
+; CGSCC-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; CGSCC-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; CGSCC-NEXT: store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
+; CGSCC-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; CGSCC-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
+; CGSCC-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR19]]
+; CGSCC-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR19]]
+; CGSCC-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR19]]
+; CGSCC-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; CGSCC-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; CGSCC-NEXT: store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; CGSCC-NEXT: [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
+; CGSCC-NEXT: [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
+; CGSCC-NEXT: [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; CGSCC-NEXT: store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
+; CGSCC-NEXT: [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; CGSCC-NEXT: [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
+; CGSCC-NEXT: [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; CGSCC-NEXT: [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
+; CGSCC-NEXT: [[ADD:%.*]] = fadd float [[I5]], [[I6]]
+; CGSCC-NEXT: [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; CGSCC-NEXT: store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
+; CGSCC-NEXT: [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; CGSCC-NEXT: [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
+; CGSCC-NEXT: [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; CGSCC-NEXT: store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
+; CGSCC-NEXT: [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; CGSCC-NEXT: [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
+; CGSCC-NEXT: [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
+; CGSCC-NEXT: [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; CGSCC-NEXT: store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
+; CGSCC-NEXT: [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; CGSCC-NEXT: [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
+; CGSCC-NEXT: [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; CGSCC-NEXT: [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
+; CGSCC-NEXT: [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
+; CGSCC-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; CGSCC-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
+; CGSCC-NEXT: ret void
;
entry:
%f1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
; }
;
define void @noalias_arg_simplifiable_2(i8* %Bytes) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
-; IS__TUNIT_NPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__TUNIT_NPM: for.cond:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND]], 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: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
-; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA19]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC]]
-; IS__TUNIT_NPM: for.inc:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP25:![0-9]+]]
-; IS__TUNIT_NPM: for.end:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2:%.*]]
-; IS__TUNIT_NPM: for.cond2:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup4:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END11:%.*]]
-; IS__TUNIT_NPM: for.body5:
-; IS__TUNIT_NPM-NEXT: [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
-; IS__TUNIT_NPM-NEXT: [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
-; IS__TUNIT_NPM-NEXT: [[I17:%.*]] = or i64 [[I16]], 1
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
-; IS__TUNIT_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA26:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC9]]
-; IS__TUNIT_NPM: for.inc9:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP27:![0-9]+]]
-; IS__TUNIT_NPM: for.end11:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13:%.*]]
-; IS__TUNIT_NPM: for.cond13:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup15:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END23:%.*]]
-; IS__TUNIT_NPM: for.body16:
-; IS__TUNIT_NPM-NEXT: [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
-; IS__TUNIT_NPM-NEXT: [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
-; IS__TUNIT_NPM-NEXT: [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
-; IS__TUNIT_NPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA28:![0-9]+]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC21]]
-; IS__TUNIT_NPM: for.inc21:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
-; IS__TUNIT_NPM: for.end23:
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
-; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]]
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
-; IS__TUNIT_NPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
-; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR16]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND27:%.*]]
-; IS__TUNIT_NPM: for.cond27:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
-; IS__TUNIT_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
-; IS__TUNIT_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup29:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_END37:%.*]]
-; IS__TUNIT_NPM: for.body30:
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
-; IS__TUNIT_NPM-NEXT: [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_NPM-NEXT: store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA19]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_INC35]]
-; IS__TUNIT_NPM: for.inc35:
-; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
-; IS__TUNIT_NPM: for.end37:
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
-; IS__CGSCC_NPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__CGSCC_NPM: for.cond:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND]], 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: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
-; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC]]
-; IS__CGSCC_NPM: for.inc:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
-; IS__CGSCC_NPM: for.end:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2:%.*]]
-; IS__CGSCC_NPM: for.cond2:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup4:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END11:%.*]]
-; IS__CGSCC_NPM: for.body5:
-; IS__CGSCC_NPM-NEXT: [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
-; IS__CGSCC_NPM-NEXT: [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
-; IS__CGSCC_NPM-NEXT: [[I17:%.*]] = or i64 [[I16]], 1
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
-; IS__CGSCC_NPM-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC9]]
-; IS__CGSCC_NPM: for.inc9:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
-; IS__CGSCC_NPM: for.end11:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13:%.*]]
-; IS__CGSCC_NPM: for.cond13:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup15:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END23:%.*]]
-; IS__CGSCC_NPM: for.body16:
-; IS__CGSCC_NPM-NEXT: [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
-; IS__CGSCC_NPM-NEXT: [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
-; IS__CGSCC_NPM-NEXT: [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
-; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC21]]
-; IS__CGSCC_NPM: for.inc21:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
-; IS__CGSCC_NPM: for.end23:
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
-; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
-; IS__CGSCC_NPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
-; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND27:%.*]]
-; IS__CGSCC_NPM: for.cond27:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup29:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_END37:%.*]]
-; IS__CGSCC_NPM: for.body30:
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
-; IS__CGSCC_NPM-NEXT: [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__CGSCC_NPM-NEXT: store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_INC35]]
-; IS__CGSCC_NPM: for.inc35:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
-; IS__CGSCC_NPM: for.end37:
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
+; TUNIT-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[FOR_COND:%.*]]
+; TUNIT: for.cond:
+; TUNIT-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; TUNIT-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; TUNIT-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; TUNIT: for.cond.cleanup:
+; TUNIT-NEXT: br label [[FOR_END:%.*]]
+; TUNIT: for.body:
+; TUNIT-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; TUNIT-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
+; TUNIT-NEXT: store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA19]]
+; TUNIT-NEXT: br label [[FOR_INC]]
+; TUNIT: for.inc:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; TUNIT-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP25:![0-9]+]]
+; TUNIT: for.end:
+; TUNIT-NEXT: br label [[FOR_COND2:%.*]]
+; TUNIT: for.cond2:
+; TUNIT-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; TUNIT-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; TUNIT-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; TUNIT: for.cond.cleanup4:
+; TUNIT-NEXT: br label [[FOR_END11:%.*]]
+; TUNIT: for.body5:
+; TUNIT-NEXT: [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
+; TUNIT-NEXT: [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; TUNIT-NEXT: [[I17:%.*]] = or i64 [[I16]], 1
+; TUNIT-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
+; TUNIT-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA26:![0-9]+]]
+; TUNIT-NEXT: br label [[FOR_INC9]]
+; TUNIT: for.inc9:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; TUNIT-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP27:![0-9]+]]
+; TUNIT: for.end11:
+; TUNIT-NEXT: br label [[FOR_COND13:%.*]]
+; TUNIT: for.cond13:
+; TUNIT-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
+; TUNIT-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; TUNIT-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; TUNIT: for.cond.cleanup15:
+; TUNIT-NEXT: br label [[FOR_END23:%.*]]
+; TUNIT: for.body16:
+; TUNIT-NEXT: [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
+; TUNIT-NEXT: [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; TUNIT-NEXT: [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
+; TUNIT-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
+; TUNIT-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA28:![0-9]+]]
+; TUNIT-NEXT: br label [[FOR_INC21]]
+; TUNIT: for.inc21:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; TUNIT-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
+; TUNIT: for.end23:
+; TUNIT-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
+; TUNIT-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]]
+; TUNIT-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
+; TUNIT-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
+; TUNIT-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR16]]
+; TUNIT-NEXT: br label [[FOR_COND27:%.*]]
+; TUNIT: for.cond27:
+; TUNIT-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
+; TUNIT-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; TUNIT-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
+; TUNIT: for.cond.cleanup29:
+; TUNIT-NEXT: br label [[FOR_END37:%.*]]
+; TUNIT: for.body30:
+; TUNIT-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
+; TUNIT-NEXT: [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
+; TUNIT-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; TUNIT-NEXT: store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA19]]
+; TUNIT-NEXT: br label [[FOR_INC35]]
+; TUNIT: for.inc35:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; TUNIT-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
+; TUNIT: for.end37:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
+; CGSCC-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[FOR_COND:%.*]]
+; CGSCC: for.cond:
+; CGSCC-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; CGSCC-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; CGSCC-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; CGSCC: for.cond.cleanup:
+; CGSCC-NEXT: br label [[FOR_END:%.*]]
+; CGSCC: for.body:
+; CGSCC-NEXT: [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; CGSCC-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
+; CGSCC-NEXT: store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: br label [[FOR_INC]]
+; CGSCC: for.inc:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; CGSCC-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
+; CGSCC: for.end:
+; CGSCC-NEXT: br label [[FOR_COND2:%.*]]
+; CGSCC: for.cond2:
+; CGSCC-NEXT: [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; CGSCC-NEXT: [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; CGSCC-NEXT: br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; CGSCC: for.cond.cleanup4:
+; CGSCC-NEXT: br label [[FOR_END11:%.*]]
+; CGSCC: for.body5:
+; CGSCC-NEXT: [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
+; CGSCC-NEXT: [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; CGSCC-NEXT: [[I17:%.*]] = or i64 [[I16]], 1
+; CGSCC-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
+; CGSCC-NEXT: store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
+; CGSCC-NEXT: br label [[FOR_INC9]]
+; CGSCC: for.inc9:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; CGSCC-NEXT: br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
+; CGSCC: for.end11:
+; CGSCC-NEXT: br label [[FOR_COND13:%.*]]
+; CGSCC: for.cond13:
+; CGSCC-NEXT: [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
+; CGSCC-NEXT: [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; CGSCC-NEXT: br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; CGSCC: for.cond.cleanup15:
+; CGSCC-NEXT: br label [[FOR_END23:%.*]]
+; CGSCC: for.body16:
+; CGSCC-NEXT: [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
+; CGSCC-NEXT: [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; CGSCC-NEXT: [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
+; CGSCC-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
+; CGSCC-NEXT: store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
+; CGSCC-NEXT: br label [[FOR_INC21]]
+; CGSCC: for.inc21:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; CGSCC-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
+; CGSCC: for.end23:
+; CGSCC-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
+; CGSCC-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
+; CGSCC-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
+; CGSCC-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR19]]
+; CGSCC-NEXT: br label [[FOR_COND27:%.*]]
+; CGSCC: for.cond27:
+; CGSCC-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
+; CGSCC-NEXT: [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; CGSCC-NEXT: br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
+; CGSCC: for.cond.cleanup29:
+; CGSCC-NEXT: br label [[FOR_END37:%.*]]
+; CGSCC: for.body30:
+; CGSCC-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
+; CGSCC-NEXT: [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; CGSCC-NEXT: store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
+; CGSCC-NEXT: br label [[FOR_INC35]]
+; CGSCC: for.inc35:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; CGSCC-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
+; CGSCC: for.end37:
+; CGSCC-NEXT: ret void
;
entry:
br label %for.cond
; }
;
define i32 @local_alloca_not_simplifiable_1() {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[X:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[Y:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
-; IS__TUNIT_NPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
-; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
-; IS__TUNIT_NPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
-; IS__TUNIT_NPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
-; IS__TUNIT_NPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
-; IS__TUNIT_NPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
-; IS__TUNIT_NPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
-; IS__TUNIT_NPM-NEXT: ret i32 [[ADD1]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[X:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[Y:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
-; IS__CGSCC_NPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
-; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
-; IS__CGSCC_NPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
-; IS__CGSCC_NPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
-; IS__CGSCC_NPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
-; IS__CGSCC_NPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
-; IS__CGSCC_NPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
-; IS__CGSCC_NPM-NEXT: ret i32 [[ADD1]]
+; TUNIT-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[X:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[Y:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
+; TUNIT-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR15]]
+; TUNIT-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8*
+; TUNIT-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
+; TUNIT-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
+; TUNIT-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
+; TUNIT-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
+; TUNIT-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
+; TUNIT-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
+; TUNIT-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
+; TUNIT-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
+; TUNIT-NEXT: ret i32 [[ADD1]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[X:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[Y:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR18]]
+; CGSCC-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR18]]
+; CGSCC-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8*
+; CGSCC-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
+; CGSCC-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
+; CGSCC-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
+; CGSCC-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
+; CGSCC-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
+; CGSCC-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
+; CGSCC-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
+; CGSCC-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
+; CGSCC-NEXT: ret i32 [[ADD1]]
;
entry:
%X = alloca i32, align 4
; }
;
define i32 @global_not_simplifiable_1(i32 %cnd) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1
-; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR6:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[I]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@global_not_simplifiable_1
-; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
-; IS__CGSCC____-NEXT: ret i32 [[I]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@global_not_simplifiable_1
+; TUNIT-SAME: (i32 [[CND:%.*]]) #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: ret i32 [[I]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@global_not_simplifiable_1
+; CGSCC-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: ret i32 [[I]]
;
entry:
%i = load i32, i32* @Flag0, align 4, !tbaa !3
; return v;
; }
define i32 @static_global_simplifiable_4(i32 %cnd) {
-; IS________NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_4
-; IS________NPM-SAME: (i32 [[CND:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: call void @sync()
-; IS________NPM-NEXT: ret i32 1
+; CHECK-LABEL: define {{[^@]+}}@static_global_simplifiable_4
+; CHECK-SAME: (i32 [[CND:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: call void @sync()
+; CHECK-NEXT: ret i32 1
;
entry:
store i32 1, i32* @Flag2, align 4, !tbaa !3
; return v;
; }
define i32 @static_global_not_simplifiable_2(i32 %cnd) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2
-; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* @Flag4, align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: call void @sync() #[[ATTR17:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load i32, i32* @Flag4, align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: store i32 2, i32* @Flag4, align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[I]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2
-; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: store i32 1, i32* @Flag4, align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: call void @sync() #[[ATTR20:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = load i32, i32* @Flag4, align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: store i32 2, i32* @Flag4, align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[I]]
+; TUNIT-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2
+; TUNIT-SAME: (i32 [[CND:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store i32 1, i32* @Flag4, align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: call void @sync() #[[ATTR17:[0-9]+]]
+; TUNIT-NEXT: [[I:%.*]] = load i32, i32* @Flag4, align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: store i32 2, i32* @Flag4, align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: ret i32 [[I]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2
+; CGSCC-SAME: (i32 [[CND:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store i32 1, i32* @Flag4, align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: call void @sync() #[[ATTR20:[0-9]+]]
+; CGSCC-NEXT: [[I:%.*]] = load i32, i32* @Flag4, align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: store i32 2, i32* @Flag4, align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: ret i32 [[I]]
;
entry:
store i32 1, i32* @Flag4, align 4, !tbaa !3
ret i32 %i
}
define void @static_global_not_simplifiable_2_helper() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2_helper
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
-; IS__TUNIT_NPM-NEXT: store i32 2, i32* @Flag4, align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2_helper
-; IS__CGSCC_NPM-SAME: () #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: store i32 2, i32* @Flag4, align 4, !tbaa [[TBAA3]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2_helper
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: store i32 2, i32* @Flag4, align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@static_global_not_simplifiable_2_helper
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: store i32 2, i32* @Flag4, align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: ret void
;
store i32 2, i32* @Flag4, align 4, !tbaa !3
ret void
; Similiar to static_global_simplifiable_3 but with a may-store.
define i32 @static_global_not_simplifiable_3(i1 %c, i32* %p) {
-; NOT_TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; NOT_TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_not_simplifiable_3
-; NOT_TUNIT_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR5:[0-9]+]] {
-; NOT_TUNIT_NPM-NEXT: [[SEL:%.*]] = select i1 [[C]], i32* @Flag3, i32* [[P]]
-; NOT_TUNIT_NPM-NEXT: store i32 1, i32* [[SEL]], align 4, !tbaa [[TBAA3]]
-; NOT_TUNIT_NPM-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
-; NOT_TUNIT_NPM-NEXT: ret i32 [[I]]
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_not_simplifiable_3
-; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: [[SEL:%.*]] = select i1 [[C]], i32* @Flag3, i32* [[P]]
-; IS__TUNIT_NPM-NEXT: store i32 1, i32* [[SEL]], align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[I]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@static_global_not_simplifiable_3
+; CGSCC-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: [[SEL:%.*]] = select i1 [[C]], i32* @Flag3, i32* [[P]]
+; CGSCC-NEXT: store i32 1, i32* [[SEL]], align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
+; CGSCC-NEXT: ret i32 [[I]]
+;
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@static_global_not_simplifiable_3
+; TUNIT-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[SEL:%.*]] = select i1 [[C]], i32* @Flag3, i32* [[P]]
+; TUNIT-NEXT: store i32 1, i32* [[SEL]], align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
+; TUNIT-NEXT: ret i32 [[I]]
;
%sel = select i1 %c, i32* @Flag3, i32* %p
store i32 1, i32* %sel, align 4, !tbaa !3
;
; FIXME: We could replace these loads.
define i32 @write_read_global() {
-; NOT_TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; NOT_TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_global
-; NOT_TUNIT_NPM-SAME: () #[[ATTR5]] {
-; NOT_TUNIT_NPM-NEXT: store i32 7, i32* @Gint1, align 4
-; NOT_TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4
-; NOT_TUNIT_NPM-NEXT: ret i32 [[L]]
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_global
-; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gint1, align 4
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4
-; IS__TUNIT_NPM-NEXT: ret i32 [[L]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@write_read_global
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: store i32 7, i32* @Gint1, align 4
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4
+; CGSCC-NEXT: ret i32 [[L]]
+;
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@write_read_global
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: store i32 7, i32* @Gint1, align 4
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4
+; TUNIT-NEXT: ret i32 [[L]]
;
store i32 7, i32* @Gint1
%l = load i32, i32* @Gint1
ret i32 %l
}
define void @write_global() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_global
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
-; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gint2, align 4
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@write_global
-; IS__CGSCC_NPM-SAME: () #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: store i32 7, i32* @Gint2, align 4
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@write_global
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: store i32 7, i32* @Gint2, align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@write_global
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: store i32 7, i32* @Gint2, align 4
+; CGSCC-NEXT: ret void
;
store i32 7, i32* @Gint2
ret void
}
define i32 @read_global() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@read_global
-; IS__TUNIT_NPM-SAME: () #[[ATTR6]] {
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4
-; IS__TUNIT_NPM-NEXT: ret i32 [[L]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@read_global
-; IS__CGSCC____-SAME: () #[[ATTR7]] {
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4
-; IS__CGSCC____-NEXT: ret i32 [[L]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@read_global
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4
+; TUNIT-NEXT: ret i32 [[L]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@read_global
+; CGSCC-SAME: () #[[ATTR7]] {
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4
+; CGSCC-NEXT: ret i32 [[L]]
;
%l = load i32, i32* @Gint2
ret i32 %l
}
define i32 @write_read_static_global() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_global
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
-; IS__TUNIT_NPM-NEXT: ret i32 7
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@write_read_static_global
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: ret i32 7
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@write_read_static_global
-; IS__CGSCC_NPM-SAME: () #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: ret i32 7
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@write_read_static_global
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: ret i32 7
;
store i32 7, i32* @Gstatic_int1
%l = load i32, i32* @Gstatic_int1
ret i32 %l
}
define void @write_static_global() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_static_global
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
-; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gstatic_int2, align 4
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@write_static_global
-; IS__CGSCC_NPM-SAME: () #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: store i32 7, i32* @Gstatic_int2, align 4
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@write_static_global
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: store i32 7, i32* @Gstatic_int2, align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@write_static_global
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: store i32 7, i32* @Gstatic_int2, align 4
+; CGSCC-NEXT: ret void
;
store i32 7, i32* @Gstatic_int2
ret void
}
define i32 @read_static_global() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@read_static_global
-; IS__TUNIT_NPM-SAME: () #[[ATTR6]] {
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
-; IS__TUNIT_NPM-NEXT: ret i32 [[L]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@read_static_global
-; IS__CGSCC____-SAME: () #[[ATTR7]] {
-; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
-; IS__CGSCC____-NEXT: ret i32 [[L]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@read_static_global
+; TUNIT-SAME: () #[[ATTR6]] {
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
+; TUNIT-NEXT: ret i32 [[L]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@read_static_global
+; CGSCC-SAME: () #[[ATTR7]] {
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
+; CGSCC-NEXT: ret i32 [[L]]
;
%l = load i32, i32* @Gstatic_int2
ret i32 %l
}
define i32 @write_read_static_undef_global() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_undef_global
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
-; IS__TUNIT_NPM-NEXT: ret i32 7
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@write_read_static_undef_global
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: ret i32 7
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@write_read_static_undef_global
-; IS__CGSCC_NPM-SAME: () #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: ret i32 7
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@write_read_static_undef_global
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: ret i32 7
;
store i32 7, i32* @Gstatic_undef_int1
%l = load i32, i32* @Gstatic_undef_int1
ret i32 %l
}
define void @write_static_undef_global() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_static_undef_global
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@write_static_undef_global
+; TUNIT-SAME: () #[[ATTR5]] {
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@write_static_undef_global
-; IS__CGSCC_NPM-SAME: () #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: store i32 7, i32* @Gstatic_undef_int2, align 4
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@write_static_undef_global
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: store i32 7, i32* @Gstatic_undef_int2, align 4
+; CGSCC-NEXT: ret void
;
store i32 7, i32* @Gstatic_undef_int2
ret void
}
define i8 @phi_store() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_store
-; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i16, align 2
-; IS__TUNIT_NPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8*
-; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__TUNIT_NPM: loop:
-; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT: store i8 1, i8* [[P]], align 1
-; IS__TUNIT_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
-; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
-; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__TUNIT_NPM: end:
-; IS__TUNIT_NPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
-; IS__TUNIT_NPM-NEXT: ret i8 [[L]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_store
-; IS__CGSCC_NPM-SAME: () #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i16, align 2
-; IS__CGSCC_NPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8*
-; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__CGSCC_NPM: loop:
-; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT: store i8 1, i8* [[P]], align 1
-; IS__CGSCC_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
-; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__CGSCC_NPM: end:
-; IS__CGSCC_NPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
-; IS__CGSCC_NPM-NEXT: ret i8 [[L]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@phi_store
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[A:%.*]] = alloca i16, align 2
+; TUNIT-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8*
+; TUNIT-NEXT: br label [[LOOP:%.*]]
+; TUNIT: loop:
+; TUNIT-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; TUNIT-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; TUNIT-NEXT: store i8 1, i8* [[P]], align 1
+; TUNIT-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
+; TUNIT-NEXT: [[O]] = add nsw i8 [[I]], 1
+; TUNIT-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
+; TUNIT-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; TUNIT: end:
+; TUNIT-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
+; TUNIT-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
+; TUNIT-NEXT: ret i8 [[L]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@phi_store
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[A:%.*]] = alloca i16, align 2
+; CGSCC-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8*
+; CGSCC-NEXT: br label [[LOOP:%.*]]
+; CGSCC: loop:
+; CGSCC-NEXT: [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; CGSCC-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; CGSCC-NEXT: store i8 1, i8* [[P]], align 1
+; CGSCC-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
+; CGSCC-NEXT: [[O]] = add nsw i8 [[I]], 1
+; CGSCC-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
+; CGSCC-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; CGSCC: end:
+; CGSCC-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
+; CGSCC-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
+; CGSCC-NEXT: ret i8 [[L]]
;
entry:
%a = alloca i16
; FIXME: This function returns 1.
define i8 @phi_no_store_1() {
;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_1
-; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__TUNIT_NPM: loop:
-; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT: store i8 1, i8* [[P]], align 1
-; IS__TUNIT_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
-; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3
-; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__TUNIT_NPM: end:
-; IS__TUNIT_NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
-; IS__TUNIT_NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
-; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]]
-; IS__TUNIT_NPM-NEXT: ret i8 [[ADD]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_1
-; IS__CGSCC_NPM-SAME: () #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__CGSCC_NPM: loop:
-; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT: store i8 1, i8* [[P]], align 1
-; IS__CGSCC_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
-; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__CGSCC_NPM: end:
-; IS__CGSCC_NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
-; IS__CGSCC_NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[ADD]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@phi_no_store_1
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[LOOP:%.*]]
+; TUNIT: loop:
+; TUNIT-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; TUNIT-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; TUNIT-NEXT: store i8 1, i8* [[P]], align 1
+; TUNIT-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
+; TUNIT-NEXT: [[O]] = add nsw i8 [[I]], 1
+; TUNIT-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3
+; TUNIT-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; TUNIT: end:
+; TUNIT-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
+; TUNIT-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
+; TUNIT-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]]
+; TUNIT-NEXT: ret i8 [[ADD]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@phi_no_store_1
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[LOOP:%.*]]
+; CGSCC: loop:
+; CGSCC-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; CGSCC-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; CGSCC-NEXT: store i8 1, i8* [[P]], align 1
+; CGSCC-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1
+; CGSCC-NEXT: [[O]] = add nsw i8 [[I]], 1
+; CGSCC-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3
+; CGSCC-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; CGSCC: end:
+; CGSCC-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
+; CGSCC-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
+; CGSCC-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]]
+; CGSCC-NEXT: ret i8 [[ADD]]
;
entry:
%b = bitcast i32* @a1 to i8*
; FIXME: This function returns 1.
define i8 @phi_no_store_2() {
;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_2
-; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__TUNIT_NPM: loop:
-; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT: [[G]] = getelementptr i8, i8* bitcast (i32* @a2 to i8*), i64 2
-; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7
-; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__TUNIT_NPM: end:
-; IS__TUNIT_NPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2
-; IS__TUNIT_NPM-NEXT: [[L22:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 3), align 1
-; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], [[L22]]
-; IS__TUNIT_NPM-NEXT: ret i8 [[ADD]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_2
-; IS__CGSCC_NPM-SAME: () #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__CGSCC_NPM: loop:
-; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT: [[G]] = getelementptr i8, i8* bitcast (i32* @a2 to i8*), i64 2
-; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__CGSCC_NPM: end:
-; IS__CGSCC_NPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2
-; IS__CGSCC_NPM-NEXT: [[L22:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 3), align 1
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], [[L22]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[ADD]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@phi_no_store_2
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[LOOP:%.*]]
+; TUNIT: loop:
+; TUNIT-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; TUNIT-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; TUNIT-NEXT: [[G]] = getelementptr i8, i8* bitcast (i32* @a2 to i8*), i64 2
+; TUNIT-NEXT: [[O]] = add nsw i8 [[I]], 1
+; TUNIT-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7
+; TUNIT-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; TUNIT: end:
+; TUNIT-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2
+; TUNIT-NEXT: [[L22:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 3), align 1
+; TUNIT-NEXT: [[ADD:%.*]] = add i8 [[L21]], [[L22]]
+; TUNIT-NEXT: ret i8 [[ADD]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@phi_no_store_2
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[LOOP:%.*]]
+; CGSCC: loop:
+; CGSCC-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; CGSCC-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; CGSCC-NEXT: [[G]] = getelementptr i8, i8* bitcast (i32* @a2 to i8*), i64 2
+; CGSCC-NEXT: [[O]] = add nsw i8 [[I]], 1
+; CGSCC-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7
+; CGSCC-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; CGSCC: end:
+; CGSCC-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2
+; CGSCC-NEXT: [[L22:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 3), align 1
+; CGSCC-NEXT: [[ADD:%.*]] = add i8 [[L21]], [[L22]]
+; CGSCC-NEXT: ret i8 [[ADD]]
;
entry:
%b = bitcast i32* @a2 to i8*
}
define i8 @phi_no_store_3() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_3
-; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: store i8 0, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 3), align 1
-; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__TUNIT_NPM: loop:
-; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT: [[G]] = getelementptr i8, i8* bitcast (i32* @a3 to i8*), i64 2
-; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7
-; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__TUNIT_NPM: end:
-; IS__TUNIT_NPM-NEXT: [[L31:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), align 2
-; IS__TUNIT_NPM-NEXT: [[L32:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 3), align 1
-; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i8 [[L31]], [[L32]]
-; IS__TUNIT_NPM-NEXT: [[L34:%.*]] = load i8, i8* bitcast (i32* getelementptr inbounds (i32, i32* @a3, i64 1) to i8*), align 4
-; IS__TUNIT_NPM-NEXT: [[ADD2:%.*]] = add i8 [[ADD]], [[L34]]
-; IS__TUNIT_NPM-NEXT: ret i8 [[ADD2]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_3
-; IS__CGSCC_NPM-SAME: () #[[ATTR5]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: store i8 0, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 3), align 1
-; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]]
-; IS__CGSCC_NPM: loop:
-; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT: [[G]] = getelementptr i8, i8* bitcast (i32* @a3 to i8*), i64 2
-; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__CGSCC_NPM: end:
-; IS__CGSCC_NPM-NEXT: [[L31:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), align 2
-; IS__CGSCC_NPM-NEXT: [[L32:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 3), align 1
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i8 [[L31]], [[L32]]
-; IS__CGSCC_NPM-NEXT: [[L34:%.*]] = load i8, i8* bitcast (i32* getelementptr inbounds (i32, i32* @a3, i64 1) to i8*), align 4
-; IS__CGSCC_NPM-NEXT: [[ADD2:%.*]] = add i8 [[ADD]], [[L34]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[ADD2]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@phi_no_store_3
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store i8 0, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 3), align 1
+; TUNIT-NEXT: br label [[LOOP:%.*]]
+; TUNIT: loop:
+; TUNIT-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; TUNIT-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; TUNIT-NEXT: [[G]] = getelementptr i8, i8* bitcast (i32* @a3 to i8*), i64 2
+; TUNIT-NEXT: [[O]] = add nsw i8 [[I]], 1
+; TUNIT-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7
+; TUNIT-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; TUNIT: end:
+; TUNIT-NEXT: [[L31:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), align 2
+; TUNIT-NEXT: [[L32:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 3), align 1
+; TUNIT-NEXT: [[ADD:%.*]] = add i8 [[L31]], [[L32]]
+; TUNIT-NEXT: [[L34:%.*]] = load i8, i8* bitcast (i32* getelementptr inbounds (i32, i32* @a3, i64 1) to i8*), align 4
+; TUNIT-NEXT: [[ADD2:%.*]] = add i8 [[ADD]], [[L34]]
+; TUNIT-NEXT: ret i8 [[ADD2]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@phi_no_store_3
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store i8 0, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 3), align 1
+; CGSCC-NEXT: br label [[LOOP:%.*]]
+; CGSCC: loop:
+; CGSCC-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; CGSCC-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; CGSCC-NEXT: [[G]] = getelementptr i8, i8* bitcast (i32* @a3 to i8*), i64 2
+; CGSCC-NEXT: [[O]] = add nsw i8 [[I]], 1
+; CGSCC-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7
+; CGSCC-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; CGSCC: end:
+; CGSCC-NEXT: [[L31:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), align 2
+; CGSCC-NEXT: [[L32:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 3), align 1
+; CGSCC-NEXT: [[ADD:%.*]] = add i8 [[L31]], [[L32]]
+; CGSCC-NEXT: [[L34:%.*]] = load i8, i8* bitcast (i32* getelementptr inbounds (i32, i32* @a3, i64 1) to i8*), align 4
+; CGSCC-NEXT: [[ADD2:%.*]] = add i8 [[ADD]], [[L34]]
+; CGSCC-NEXT: ret i8 [[ADD2]]
;
entry:
%b = bitcast i32* @a3 to i8*
}
define i8 @cast_and_load_1() {
-; NOT_TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; NOT_TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_1
-; NOT_TUNIT_NPM-SAME: () #[[ATTR5]] {
-; NOT_TUNIT_NPM-NEXT: store i32 42, i32* @bytes1, align 4
-; NOT_TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4
-; NOT_TUNIT_NPM-NEXT: ret i8 [[L]]
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_1
-; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: store i32 42, i32* @bytes1, align 4
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4
-; IS__TUNIT_NPM-NEXT: ret i8 [[L]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cast_and_load_1
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: store i32 42, i32* @bytes1, align 4
+; CGSCC-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4
+; CGSCC-NEXT: ret i8 [[L]]
+;
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@cast_and_load_1
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: store i32 42, i32* @bytes1, align 4
+; TUNIT-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4
+; TUNIT-NEXT: ret i8 [[L]]
;
store i32 42, i32* @bytes1
%bc = bitcast i32* @bytes1 to i8*
}
define i64 @cast_and_load_2() {
-; NOT_TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; NOT_TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_2
-; NOT_TUNIT_NPM-SAME: () #[[ATTR5]] {
-; NOT_TUNIT_NPM-NEXT: store i32 42, i32* @bytes2, align 4
-; NOT_TUNIT_NPM-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4
-; NOT_TUNIT_NPM-NEXT: ret i64 [[L]]
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_2
-; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: store i32 42, i32* @bytes2, align 4
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4
-; IS__TUNIT_NPM-NEXT: ret i64 [[L]]
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cast_and_load_2
+; CGSCC-SAME: () #[[ATTR5]] {
+; CGSCC-NEXT: store i32 42, i32* @bytes2, align 4
+; CGSCC-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4
+; CGSCC-NEXT: ret i64 [[L]]
+;
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@cast_and_load_2
+; TUNIT-SAME: () #[[ATTR3]] {
+; TUNIT-NEXT: store i32 42, i32* @bytes2, align 4
+; TUNIT-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4
+; TUNIT-NEXT: ret i64 [[L]]
;
store i32 42, i32* @bytes2
%bc = bitcast i32* @bytes2 to i64*
define void @recursive_load_store(i64 %N, i32 %v) {
;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_load_store
-; IS__TUNIT____-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: br label [[FOR_COND:%.*]]
-; IS__TUNIT____: for.cond:
-; IS__TUNIT____-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__TUNIT____-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
-; IS__TUNIT____-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
-; IS__TUNIT____: for.body:
-; IS__TUNIT____-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT____-NEXT: br label [[FOR_COND]]
-; IS__TUNIT____: for.end:
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@recursive_load_store
-; IS__CGSCC_NPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__CGSCC_NPM: for.cond:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__CGSCC_NPM-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
-; IS__CGSCC_NPM-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
-; IS__CGSCC_NPM: for.body:
-; IS__CGSCC_NPM-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]]
-; IS__CGSCC_NPM: for.end:
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind writeonly
+; TUNIT-LABEL: define {{[^@]+}}@recursive_load_store
+; TUNIT-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[FOR_COND:%.*]]
+; TUNIT: for.cond:
+; TUNIT-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; TUNIT-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
+; TUNIT-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
+; TUNIT: for.body:
+; TUNIT-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; TUNIT-NEXT: br label [[FOR_COND]]
+; TUNIT: for.end:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind writeonly
+; CGSCC-LABEL: define {{[^@]+}}@recursive_load_store
+; CGSCC-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR8:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[FOR_COND:%.*]]
+; CGSCC: for.cond:
+; CGSCC-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; CGSCC-NEXT: [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
+; CGSCC-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
+; CGSCC: for.body:
+; CGSCC-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; CGSCC-NEXT: br label [[FOR_COND]]
+; CGSCC: for.end:
+; CGSCC-NEXT: ret void
;
entry:
store i32 %v, i32* @rec_storage
}
define dso_local i32 @round_trip_malloc(i32 %x) {
-; IS________NPM-LABEL: define {{[^@]+}}@round_trip_malloc
-; IS________NPM-SAME: (i32 returned [[X:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL_H2S]] to i32*
-; IS________NPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4
-; IS________NPM-NEXT: ret i32 [[X]]
+; CHECK-LABEL: define {{[^@]+}}@round_trip_malloc
+; CHECK-SAME: (i32 returned [[X:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL_H2S]] to i32*
+; CHECK-NEXT: store i32 [[X]], i32* [[TMP0]], align 4
+; CHECK-NEXT: ret i32 [[X]]
;
entry:
%call = call noalias i8* @malloc(i64 4) norecurse
}
define dso_local i32 @round_trip_malloc_constant() {
-; IS________NPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: ret i32 7
+; CHECK-LABEL: define {{[^@]+}}@round_trip_malloc_constant() {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret i32 7
;
entry:
%call = call noalias i8* @malloc(i64 4) norecurse
}
define dso_local i32 @round_trip_calloc(i32 %x) {
-; IS________NPM-LABEL: define {{[^@]+}}@round_trip_calloc
-; IS________NPM-SAME: (i32 returned [[X:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALL_H2S]], i8 0, i64 4, i1 false)
-; IS________NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL_H2S]] to i32*
-; IS________NPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4
-; IS________NPM-NEXT: ret i32 [[X]]
+; CHECK-LABEL: define {{[^@]+}}@round_trip_calloc
+; CHECK-SAME: (i32 returned [[X:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALL_H2S]], i8 0, i64 4, i1 false)
+; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL_H2S]] to i32*
+; CHECK-NEXT: store i32 [[X]], i32* [[TMP0]], align 4
+; CHECK-NEXT: ret i32 [[X]]
;
entry:
%call = call noalias i8* @calloc(i64 4, i64 1) norecurse
}
define dso_local i32 @round_trip_calloc_constant() {
-; IS________NPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALL_H2S]], i8 0, i64 4, i1 false)
-; IS________NPM-NEXT: ret i32 11
+; CHECK-LABEL: define {{[^@]+}}@round_trip_calloc_constant() {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALL_H2S]], i8 0, i64 4, i1 false)
+; CHECK-NEXT: ret i32 11
;
entry:
%call = call noalias i8* @calloc(i64 4, i64 1) norecurse
declare noalias i8* @calloc(i64, i64) allockind("alloc,zeroed") allocsize(0, 1) "alloc-family"="malloc"
define dso_local i32 @conditional_calloc(i32 %x) {
-; IS________NPM-LABEL: define {{[^@]+}}@conditional_calloc
-; IS________NPM-SAME: (i32 [[X:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALL_H2S]], i8 0, i64 4, i1 false)
-; IS________NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL_H2S]] to i32*
-; IS________NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
-; IS________NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS________NPM: if.then:
-; IS________NPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4
-; IS________NPM-NEXT: br label [[IF_END]]
-; IS________NPM: if.end:
-; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
-; IS________NPM-NEXT: ret i32 [[TMP1]]
+; CHECK-LABEL: define {{[^@]+}}@conditional_calloc
+; CHECK-SAME: (i32 [[X:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALL_H2S]], i8 0, i64 4, i1 false)
+; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL_H2S]] to i32*
+; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; CHECK-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: store i32 [[X]], i32* [[TMP0]], align 4
+; CHECK-NEXT: br label [[IF_END]]
+; CHECK: if.end:
+; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; CHECK-NEXT: ret i32 [[TMP1]]
;
entry:
%call = call noalias i8* @calloc(i64 1, i64 4) norecurse
}
define dso_local i32 @conditional_calloc_zero(i1 %c) {
-; IS________NPM-LABEL: define {{[^@]+}}@conditional_calloc_zero
-; IS________NPM-SAME: (i1 [[C:%.*]]) {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
-; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALL_H2S]], i8 0, i64 4, i1 false)
-; IS________NPM-NEXT: br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS________NPM: if.then:
-; IS________NPM-NEXT: br label [[IF_END]]
-; IS________NPM: if.end:
-; IS________NPM-NEXT: ret i32 0
+; CHECK-LABEL: define {{[^@]+}}@conditional_calloc_zero
+; CHECK-SAME: (i1 [[C:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 4, align 1
+; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* [[CALL_H2S]], i8 0, i64 4, i1 false)
+; CHECK-NEXT: br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: br label [[IF_END]]
+; CHECK: if.end:
+; CHECK-NEXT: ret i32 0
;
entry:
%call = call noalias i8* @calloc(i64 1, i64 4) norecurse
}
define dso_local i32* @malloc_like(i32 %s) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@malloc_like
-; IS__TUNIT_NPM-SAME: (i32 [[S:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR18:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS__TUNIT_NPM-NEXT: ret i32* [[TMP0]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@malloc_like
-; IS__CGSCC_NPM-SAME: (i32 [[S:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR21:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS__CGSCC_NPM-NEXT: ret i32* [[TMP0]]
+; TUNIT-LABEL: define {{[^@]+}}@malloc_like
+; TUNIT-SAME: (i32 [[S:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64
+; TUNIT-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR18:[0-9]+]]
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; TUNIT-NEXT: ret i32* [[TMP0]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@malloc_like
+; CGSCC-SAME: (i32 [[S:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64
+; CGSCC-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR21:[0-9]+]]
+; CGSCC-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; CGSCC-NEXT: ret i32* [[TMP0]]
;
entry:
%conv = sext i32 %s to i64
}
define dso_local i32 @round_trip_malloc_like(i32 %x) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@round_trip_malloc_like
-; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR18]]
-; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR18]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@round_trip_malloc_like
-; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR21]]
-; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR21]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]]
+; TUNIT-LABEL: define {{[^@]+}}@round_trip_malloc_like
+; TUNIT-SAME: (i32 [[X:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR18]]
+; TUNIT-NEXT: store i32 [[X]], i32* [[CALL]], align 4
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; TUNIT-NEXT: call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR18]]
+; TUNIT-NEXT: ret i32 [[TMP0]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@round_trip_malloc_like
+; CGSCC-SAME: (i32 [[X:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR21]]
+; CGSCC-NEXT: store i32 [[X]], i32* [[CALL]], align 4
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; CGSCC-NEXT: call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR21]]
+; CGSCC-NEXT: ret i32 [[TMP0]]
;
entry:
%call = call i32* @malloc_like(i32 4) norecurse
}
define dso_local i32 @round_trip_unknown_alloc(i32 %x) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
-; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR18]]
-; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR18]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
-; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR21]]
-; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR21]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]]
+; TUNIT-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
+; TUNIT-SAME: (i32 [[X:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR18]]
+; TUNIT-NEXT: store i32 [[X]], i32* [[CALL]], align 4
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; TUNIT-NEXT: call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR18]]
+; TUNIT-NEXT: ret i32 [[TMP0]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
+; CGSCC-SAME: (i32 [[X:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR21]]
+; CGSCC-NEXT: store i32 [[X]], i32* [[CALL]], align 4
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; CGSCC-NEXT: call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR21]]
+; CGSCC-NEXT: ret i32 [[TMP0]]
;
entry:
%call = call i32* @unknown_alloc(i32 4) norecurse
declare noalias i32* @unknown_alloc(i32)
define dso_local i32 @conditional_unknown_alloc(i32 %x) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc
-; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR18]]
-; IS__TUNIT_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
-; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS__TUNIT_NPM: if.then:
-; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4
-; IS__TUNIT_NPM-NEXT: br label [[IF_END]]
-; IS__TUNIT_NPM: if.end:
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @free(i8* nonnull [[TMP1]]) #[[ATTR18]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc
-; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR21]]
-; IS__CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
-; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS__CGSCC_NPM: if.then:
-; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4
-; IS__CGSCC_NPM-NEXT: br label [[IF_END]]
-; IS__CGSCC_NPM: if.end:
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @free(i8* nonnull [[TMP1]]) #[[ATTR21]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]]
+; TUNIT-LABEL: define {{[^@]+}}@conditional_unknown_alloc
+; TUNIT-SAME: (i32 [[X:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR18]]
+; TUNIT-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; TUNIT-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: store i32 [[X]], i32* [[CALL]], align 4
+; TUNIT-NEXT: br label [[IF_END]]
+; TUNIT: if.end:
+; TUNIT-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; TUNIT-NEXT: call void @free(i8* nonnull [[TMP1]]) #[[ATTR18]]
+; TUNIT-NEXT: ret i32 [[TMP0]]
+;
+; CGSCC-LABEL: define {{[^@]+}}@conditional_unknown_alloc
+; CGSCC-SAME: (i32 [[X:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR21]]
+; CGSCC-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; CGSCC-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: store i32 [[X]], i32* [[CALL]], align 4
+; CGSCC-NEXT: br label [[IF_END]]
+; CGSCC: if.end:
+; CGSCC-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; CGSCC-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; CGSCC-NEXT: call void @free(i8* nonnull [[TMP1]]) #[[ATTR21]]
+; CGSCC-NEXT: ret i32 [[TMP0]]
;
entry:
%call = call noalias i32* @unknown_alloc(i32 4) norecurse
; We mark %dst as writeonly and %src as readonly, that is (for now) all we can expect.
define dso_local void @test_nested_memory(float* %dst, double* %src) {
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_nested_memory
-; IS__TUNIT_NPM-SAME: (float* nocapture nofree writeonly [[DST:%.*]], double* nocapture nofree readonly [[SRC:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 24, align 1
-; IS__TUNIT_NPM-NEXT: [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: store %struct.STy* @global, %struct.STy** [[INNER]], align 8
-; IS__TUNIT_NPM-NEXT: [[DST1:%.*]] = bitcast i8* [[CALL_H2S]] to float**
-; IS__TUNIT_NPM-NEXT: store float* [[DST]], float** [[DST1]], align 8
-; IS__TUNIT_NPM-NEXT: [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[CALL_H2S]], i64 8
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[SRC2]] to double**
-; IS__TUNIT_NPM-NEXT: store double* [[SRC]], double** [[TMP0]], align 8
-; IS__TUNIT_NPM-NEXT: store i8* [[CALL_H2S]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
-; IS__TUNIT_NPM-NEXT: [[LOCAL_CAST:%.*]] = bitcast %struct.STy* [[LOCAL]] to float**
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load float*, float** [[LOCAL_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[LOCAL_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load double*, double** [[LOCAL_0_1]], align 8
-; IS__TUNIT_NPM-NEXT: [[LOCAL_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load %struct.STy*, %struct.STy** [[LOCAL_0_2]], align 8
-; IS__TUNIT_NPM-NEXT: call fastcc void @nested_memory_callee(float* [[TMP1]], double* [[TMP2]], %struct.STy* [[TMP3]]) #[[ATTR19:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_nested_memory
-; IS__CGSCC_NPM-SAME: (float* nofree [[DST:%.*]], double* nofree [[SRC:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast %struct.STy* [[LOCAL]] to i8*
-; IS__CGSCC_NPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias dereferenceable_or_null(24) i8* @malloc(i64 noundef 24)
-; IS__CGSCC_NPM-NEXT: [[DST1:%.*]] = bitcast i8* [[CALL]] to float**
-; IS__CGSCC_NPM-NEXT: store float* [[DST]], float** [[DST1]], align 8
-; IS__CGSCC_NPM-NEXT: [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 8
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double**
-; IS__CGSCC_NPM-NEXT: store double* [[SRC]], double** [[TMP1]], align 8
-; IS__CGSCC_NPM-NEXT: store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
-; IS__CGSCC_NPM-NEXT: call fastcc void @nested_memory_callee(float* nofree nonnull align 4294967296 undef, double* nofree nonnull align 4294967296 undef, %struct.STy* nofree noundef nonnull align 8 dereferenceable(24) @global) #[[ATTR22:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@test_nested_memory
+; TUNIT-SAME: (float* nocapture nofree writeonly [[DST:%.*]], double* nocapture nofree readonly [[SRC:%.*]]) {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL_H2S:%.*]] = alloca i8, i64 24, align 1
+; TUNIT-NEXT: [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
+; TUNIT-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
+; TUNIT-NEXT: store %struct.STy* @global, %struct.STy** [[INNER]], align 8
+; TUNIT-NEXT: [[DST1:%.*]] = bitcast i8* [[CALL_H2S]] to float**
+; TUNIT-NEXT: store float* [[DST]], float** [[DST1]], align 8
+; TUNIT-NEXT: [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[CALL_H2S]], i64 8
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast i8* [[SRC2]] to double**
+; TUNIT-NEXT: store double* [[SRC]], double** [[TMP0]], align 8
+; TUNIT-NEXT: store i8* [[CALL_H2S]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
+; TUNIT-NEXT: [[LOCAL_CAST:%.*]] = bitcast %struct.STy* [[LOCAL]] to float**
+; TUNIT-NEXT: [[TMP1:%.*]] = load float*, float** [[LOCAL_CAST]], align 8
+; TUNIT-NEXT: [[LOCAL_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 1
+; TUNIT-NEXT: [[TMP2:%.*]] = load double*, double** [[LOCAL_0_1]], align 8
+; TUNIT-NEXT: [[LOCAL_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
+; TUNIT-NEXT: [[TMP3:%.*]] = load %struct.STy*, %struct.STy** [[LOCAL_0_2]], align 8
+; TUNIT-NEXT: call fastcc void @nested_memory_callee(float* [[TMP1]], double* [[TMP2]], %struct.STy* [[TMP3]]) #[[ATTR19:[0-9]+]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@test_nested_memory
+; CGSCC-SAME: (float* nofree [[DST:%.*]], double* nofree [[SRC:%.*]]) {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
+; CGSCC-NEXT: [[TMP0:%.*]] = bitcast %struct.STy* [[LOCAL]] to i8*
+; CGSCC-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
+; CGSCC-NEXT: [[CALL:%.*]] = call noalias dereferenceable_or_null(24) i8* @malloc(i64 noundef 24)
+; CGSCC-NEXT: [[DST1:%.*]] = bitcast i8* [[CALL]] to float**
+; CGSCC-NEXT: store float* [[DST]], float** [[DST1]], align 8
+; CGSCC-NEXT: [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 8
+; CGSCC-NEXT: [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double**
+; CGSCC-NEXT: store double* [[SRC]], double** [[TMP1]], align 8
+; CGSCC-NEXT: store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
+; CGSCC-NEXT: call fastcc void @nested_memory_callee(float* nofree nonnull align 4294967296 undef, double* nofree nonnull align 4294967296 undef, %struct.STy* nofree noundef nonnull align 8 dereferenceable(24) @global) #[[ATTR22:[0-9]+]]
+; CGSCC-NEXT: ret void
;
entry:
%local = alloca %struct.STy, align 8
}
define internal fastcc void @nested_memory_callee(%struct.STy* nocapture readonly %S) nofree norecurse nounwind uwtable {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@nested_memory_callee
-; IS__TUNIT_NPM-SAME: (float* [[TMP0:%.*]], double* [[TMP1:%.*]], %struct.STy* [[TMP2:%.*]]) #[[ATTR11:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[S_PRIV:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[S_PRIV_CAST:%.*]] = bitcast %struct.STy* [[S_PRIV]] to float**
-; IS__TUNIT_NPM-NEXT: store float* [[TMP0]], float** [[S_PRIV_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[S_PRIV_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store double* [[TMP1]], double** [[S_PRIV_0_1]], align 8
-; IS__TUNIT_NPM-NEXT: [[S_PRIV_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: store %struct.STy* [[TMP2]], %struct.STy** [[S_PRIV_0_2]], align 8
-; IS__TUNIT_NPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8
-; IS__TUNIT_NPM-NEXT: [[INNER1:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP3]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = load %struct.STy*, %struct.STy** [[INNER1]], align 8
-; IS__TUNIT_NPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = load double*, double** [[SRC]], align 8
-; IS__TUNIT_NPM-NEXT: [[TMP6:%.*]] = load double, double* [[TMP5]], align 8
-; IS__TUNIT_NPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP6]] to float
-; IS__TUNIT_NPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = load float*, float** [[DST]], align 8
-; IS__TUNIT_NPM-NEXT: store float [[CONV]], float* [[TMP7]], align 4
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@nested_memory_callee
-; IS__CGSCC_NPM-SAME: (float* [[TMP0:%.*]], double* [[TMP1:%.*]], %struct.STy* [[TMP2:%.*]]) #[[ATTR12:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[S_PRIV:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[S_PRIV_CAST:%.*]] = bitcast %struct.STy* [[S_PRIV]] to float**
-; IS__CGSCC_NPM-NEXT: store float* [[TMP0]], float** [[S_PRIV_CAST]], align 8
-; IS__CGSCC_NPM-NEXT: [[S_PRIV_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: store double* [[TMP1]], double** [[S_PRIV_0_1]], align 8
-; IS__CGSCC_NPM-NEXT: [[S_PRIV_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: store %struct.STy* [[TMP2]], %struct.STy** [[S_PRIV_0_2]], align 8
-; IS__CGSCC_NPM-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8
-; IS__CGSCC_NPM-NEXT: [[INNER1:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP3]], i64 0, i32 2
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = load %struct.STy*, %struct.STy** [[INNER1]], align 8
-; IS__CGSCC_NPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = load double*, double** [[SRC]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = load double, double* [[TMP5]], align 8
-; IS__CGSCC_NPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP6]] to float
-; IS__CGSCC_NPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = load float*, float** [[DST]], align 8
-; IS__CGSCC_NPM-NEXT: store float [[CONV]], float* [[TMP7]], align 4
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable
+; TUNIT-LABEL: define {{[^@]+}}@nested_memory_callee
+; TUNIT-SAME: (float* [[TMP0:%.*]], double* [[TMP1:%.*]], %struct.STy* [[TMP2:%.*]]) #[[ATTR11:[0-9]+]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[S_PRIV:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
+; TUNIT-NEXT: [[S_PRIV_CAST:%.*]] = bitcast %struct.STy* [[S_PRIV]] to float**
+; TUNIT-NEXT: store float* [[TMP0]], float** [[S_PRIV_CAST]], align 8
+; TUNIT-NEXT: [[S_PRIV_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 1
+; TUNIT-NEXT: store double* [[TMP1]], double** [[S_PRIV_0_1]], align 8
+; TUNIT-NEXT: [[S_PRIV_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
+; TUNIT-NEXT: store %struct.STy* [[TMP2]], %struct.STy** [[S_PRIV_0_2]], align 8
+; TUNIT-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
+; TUNIT-NEXT: [[TMP3:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8
+; TUNIT-NEXT: [[INNER1:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP3]], i64 0, i32 2
+; TUNIT-NEXT: [[TMP4:%.*]] = load %struct.STy*, %struct.STy** [[INNER1]], align 8
+; TUNIT-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 1
+; TUNIT-NEXT: [[TMP5:%.*]] = load double*, double** [[SRC]], align 8
+; TUNIT-NEXT: [[TMP6:%.*]] = load double, double* [[TMP5]], align 8
+; TUNIT-NEXT: [[CONV:%.*]] = fptrunc double [[TMP6]] to float
+; TUNIT-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 0
+; TUNIT-NEXT: [[TMP7:%.*]] = load float*, float** [[DST]], align 8
+; TUNIT-NEXT: store float [[CONV]], float* [[TMP7]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable
+; CGSCC-LABEL: define {{[^@]+}}@nested_memory_callee
+; CGSCC-SAME: (float* [[TMP0:%.*]], double* [[TMP1:%.*]], %struct.STy* [[TMP2:%.*]]) #[[ATTR12:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[S_PRIV:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
+; CGSCC-NEXT: [[S_PRIV_CAST:%.*]] = bitcast %struct.STy* [[S_PRIV]] to float**
+; CGSCC-NEXT: store float* [[TMP0]], float** [[S_PRIV_CAST]], align 8
+; CGSCC-NEXT: [[S_PRIV_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 1
+; CGSCC-NEXT: store double* [[TMP1]], double** [[S_PRIV_0_1]], align 8
+; CGSCC-NEXT: [[S_PRIV_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
+; CGSCC-NEXT: store %struct.STy* [[TMP2]], %struct.STy** [[S_PRIV_0_2]], align 8
+; CGSCC-NEXT: [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
+; CGSCC-NEXT: [[TMP3:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8
+; CGSCC-NEXT: [[INNER1:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP3]], i64 0, i32 2
+; CGSCC-NEXT: [[TMP4:%.*]] = load %struct.STy*, %struct.STy** [[INNER1]], align 8
+; CGSCC-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 1
+; CGSCC-NEXT: [[TMP5:%.*]] = load double*, double** [[SRC]], align 8
+; CGSCC-NEXT: [[TMP6:%.*]] = load double, double* [[TMP5]], align 8
+; CGSCC-NEXT: [[CONV:%.*]] = fptrunc double [[TMP6]] to float
+; CGSCC-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 0
+; CGSCC-NEXT: [[TMP7:%.*]] = load float*, float** [[DST]], align 8
+; CGSCC-NEXT: store float [[CONV]], float* [[TMP7]], align 4
+; CGSCC-NEXT: ret void
;
entry:
%inner = getelementptr inbounds %struct.STy, %struct.STy* %S, i64 0, i32 2
; Make sure the access %1 is not forwarded to the loads %2 and %3 as the indices are
; varying and the accesses thus not "exact". This used to simplify %cmp12 to true.
define hidden void @no_propagation_of_unknown_index_access(i32* %in, i32* %out, i32 %idx) #0 {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8*
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__TUNIT_NPM: for.cond:
-; IS__TUNIT_NPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ]
-; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128
-; 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_COND4:%.*]]
-; IS__TUNIT_NPM: for.body:
-; IS__TUNIT_NPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]]
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]]
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4
-; IS__TUNIT_NPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]]
-; IS__TUNIT_NPM: for.cond4:
-; IS__TUNIT_NPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ]
-; IS__TUNIT_NPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128
-; IS__TUNIT_NPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]]
-; IS__TUNIT_NPM: for.cond.cleanup6:
-; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR15]]
-; IS__TUNIT_NPM-NEXT: ret void
-; IS__TUNIT_NPM: for.body7:
-; IS__TUNIT_NPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]]
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4
-; IS__TUNIT_NPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]]
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4
-; IS__TUNIT_NPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]]
-; IS__TUNIT_NPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32
-; IS__TUNIT_NPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]]
-; IS__TUNIT_NPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4
-; IS__TUNIT_NPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR13:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16
-; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8*
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__CGSCC_NPM: for.cond:
-; IS__CGSCC_NPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ]
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128
-; 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_COND4:%.*]]
-; IS__CGSCC_NPM: for.body:
-; IS__CGSCC_NPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]]
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]]
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4
-; IS__CGSCC_NPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]]
-; IS__CGSCC_NPM: for.cond4:
-; IS__CGSCC_NPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ]
-; IS__CGSCC_NPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]]
-; IS__CGSCC_NPM: for.cond.cleanup6:
-; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR18]]
-; IS__CGSCC_NPM-NEXT: ret void
-; IS__CGSCC_NPM: for.body7:
-; IS__CGSCC_NPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]]
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4
-; IS__CGSCC_NPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]]
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4
-; IS__CGSCC_NPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]]
-; IS__CGSCC_NPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32
-; IS__CGSCC_NPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]]
-; IS__CGSCC_NPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4
-; IS__CGSCC_NPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access
+; TUNIT-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16
+; TUNIT-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8*
+; TUNIT-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR15]]
+; TUNIT-NEXT: br label [[FOR_COND:%.*]]
+; TUNIT: for.cond:
+; TUNIT-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ]
+; TUNIT-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128
+; TUNIT-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]]
+; TUNIT: for.cond.cleanup:
+; TUNIT-NEXT: br label [[FOR_COND4:%.*]]
+; TUNIT: for.body:
+; TUNIT-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64
+; TUNIT-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]]
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
+; TUNIT-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]]
+; TUNIT-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4
+; TUNIT-NEXT: [[INC]] = add nsw i32 [[I_0]], 1
+; TUNIT-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]]
+; TUNIT: for.cond4:
+; TUNIT-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ]
+; TUNIT-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128
+; TUNIT-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]]
+; TUNIT: for.cond.cleanup6:
+; TUNIT-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR15]]
+; TUNIT-NEXT: ret void
+; TUNIT: for.body7:
+; TUNIT-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64
+; TUNIT-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]]
+; TUNIT-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4
+; TUNIT-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64
+; TUNIT-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]]
+; TUNIT-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4
+; TUNIT-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]]
+; TUNIT-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32
+; TUNIT-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]]
+; TUNIT-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4
+; TUNIT-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1
+; TUNIT-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access
+; CGSCC-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR13:[0-9]+]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16
+; CGSCC-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8*
+; CGSCC-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR18]]
+; CGSCC-NEXT: br label [[FOR_COND:%.*]]
+; CGSCC: for.cond:
+; CGSCC-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ]
+; CGSCC-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128
+; CGSCC-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]]
+; CGSCC: for.cond.cleanup:
+; CGSCC-NEXT: br label [[FOR_COND4:%.*]]
+; CGSCC: for.body:
+; CGSCC-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64
+; CGSCC-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]]
+; CGSCC-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
+; CGSCC-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]]
+; CGSCC-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4
+; CGSCC-NEXT: [[INC]] = add nsw i32 [[I_0]], 1
+; CGSCC-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]]
+; CGSCC: for.cond4:
+; CGSCC-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ]
+; CGSCC-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128
+; CGSCC-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]]
+; CGSCC: for.cond.cleanup6:
+; CGSCC-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR18]]
+; CGSCC-NEXT: ret void
+; CGSCC: for.body7:
+; CGSCC-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64
+; CGSCC-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]]
+; CGSCC-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4
+; CGSCC-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64
+; CGSCC-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]]
+; CGSCC-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4
+; CGSCC-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]]
+; CGSCC-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32
+; CGSCC-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]]
+; CGSCC-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4
+; CGSCC-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1
+; CGSCC-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]]
;
entry:
%buf = alloca [128 x i32], align 16
; Ensure we do not return true.
define internal i1 @alloca_non_unique(i32* %p, i32 %in, i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@alloca_non_unique
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR12:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[IN]], i32* [[A]], align 4
-; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT_NPM: t:
-; IS__TUNIT_NPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR20:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[R]]
-; IS__TUNIT_NPM: f:
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 4
-; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[IN]], [[L]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[CMP]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@alloca_non_unique
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR14:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: store i32 [[IN]], i32* [[A]], align 4
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC_NPM: t:
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR23:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[R]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 4
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[IN]], [[L]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[CMP]]
+; TUNIT: Function Attrs: argmemonly nofree nosync nounwind
+; TUNIT-LABEL: define {{[^@]+}}@alloca_non_unique
+; TUNIT-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR12:[0-9]+]] {
+; TUNIT-NEXT: [[A:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 [[IN]], i32* [[A]], align 4
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR20:[0-9]+]]
+; TUNIT-NEXT: ret i1 [[R]]
+; TUNIT: f:
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 4
+; TUNIT-NEXT: [[CMP:%.*]] = icmp eq i32 [[IN]], [[L]]
+; TUNIT-NEXT: ret i1 [[CMP]]
+;
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind
+; CGSCC-LABEL: define {{[^@]+}}@alloca_non_unique
+; CGSCC-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR14:[0-9]+]] {
+; CGSCC-NEXT: [[A:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[IN]], i32* [[A]], align 4
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR23:[0-9]+]]
+; CGSCC-NEXT: ret i1 [[R]]
+; CGSCC: f:
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 4
+; CGSCC-NEXT: [[CMP:%.*]] = icmp eq i32 [[IN]], [[L]]
+; CGSCC-NEXT: ret i1 [[CMP]]
;
%a = alloca i32
store i32 %in, i32* %a
; Ensure we do not return true.
define i1 @alloca_non_unique_caller(i32 %in, i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller
-; IS__TUNIT_NPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR13:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR20]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[R]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller
-; IS__CGSCC_NPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR15:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR22]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@alloca_non_unique_caller
+; TUNIT-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR13:[0-9]+]] {
+; TUNIT-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR20]]
+; TUNIT-NEXT: ret i1 [[R]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@alloca_non_unique_caller
+; CGSCC-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR15:[0-9]+]] {
+; CGSCC-NEXT: [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR22]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%r = call i1 @alloca_non_unique(i32* undef, i32 %in, i1 %c)
ret i1 %r
; Ensure we do not return %bad or %l, but %sel
define i32 @scope_value_traversal(i32 %bad, i1 %c, i1 %c2) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@scope_value_traversal
-; IS__TUNIT_NPM-SAME: (i32 [[BAD:%.*]], i1 [[C:%.*]], i1 [[C2:%.*]]) #[[ATTR4]] {
-; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[BAD]], i32* [[A]], align 4
-; IS__TUNIT_NPM-NEXT: call void @scope_value_traversal_helper(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A]], i1 [[C2]]) #[[ATTR21:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4
-; IS__TUNIT_NPM-NEXT: [[SEL:%.*]] = select i1 [[C]], i32 [[BAD]], i32 [[L]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[SEL]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scope_value_traversal
-; IS__CGSCC_NPM-SAME: (i32 [[BAD:%.*]], i1 [[C:%.*]], i1 [[C2:%.*]]) #[[ATTR16:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: store i32 [[BAD]], i32* [[A]], align 4
-; IS__CGSCC_NPM-NEXT: call void @scope_value_traversal_helper(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A]], i1 [[C2]]) #[[ATTR24:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4
-; IS__CGSCC_NPM-NEXT: [[SEL:%.*]] = select i1 [[C]], i32 [[BAD]], i32 [[L]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[SEL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@scope_value_traversal
+; TUNIT-SAME: (i32 [[BAD:%.*]], i1 [[C:%.*]], i1 [[C2:%.*]]) #[[ATTR4]] {
+; TUNIT-NEXT: [[A:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 [[BAD]], i32* [[A]], align 4
+; TUNIT-NEXT: call void @scope_value_traversal_helper(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A]], i1 [[C2]]) #[[ATTR21:[0-9]+]]
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4
+; TUNIT-NEXT: [[SEL:%.*]] = select i1 [[C]], i32 [[BAD]], i32 [[L]]
+; TUNIT-NEXT: ret i32 [[SEL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@scope_value_traversal
+; CGSCC-SAME: (i32 [[BAD:%.*]], i1 [[C:%.*]], i1 [[C2:%.*]]) #[[ATTR16:[0-9]+]] {
+; CGSCC-NEXT: [[A:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[BAD]], i32* [[A]], align 4
+; CGSCC-NEXT: call void @scope_value_traversal_helper(i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A]], i1 [[C2]]) #[[ATTR24:[0-9]+]]
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4
+; CGSCC-NEXT: [[SEL:%.*]] = select i1 [[C]], i32 [[BAD]], i32 [[L]]
+; CGSCC-NEXT: ret i32 [[SEL]]
;
%a = alloca i32
store i32 %bad, i32* %a
}
define void @scope_value_traversal_helper(i32* %a, i1 %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@scope_value_traversal_helper
-; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A:%.*]], i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4
-; IS__TUNIT____-NEXT: [[SEL:%.*]] = select i1 [[C]], i32 [[L]], i32 42
-; IS__TUNIT____-NEXT: store i32 [[SEL]], i32* [[A]], align 4
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scope_value_traversal_helper
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A:%.*]], i1 [[C:%.*]]) #[[ATTR13]] {
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4
-; IS__CGSCC_NPM-NEXT: [[SEL:%.*]] = select i1 [[C]], i32 [[L]], i32 42
-; IS__CGSCC_NPM-NEXT: store i32 [[SEL]], i32* [[A]], align 4
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@scope_value_traversal_helper
+; TUNIT-SAME: (i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A:%.*]], i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4
+; TUNIT-NEXT: [[SEL:%.*]] = select i1 [[C]], i32 [[L]], i32 42
+; TUNIT-NEXT: store i32 [[SEL]], i32* [[A]], align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@scope_value_traversal_helper
+; CGSCC-SAME: (i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[A:%.*]], i1 [[C:%.*]]) #[[ATTR13]] {
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* [[A]], align 4
+; CGSCC-NEXT: [[SEL:%.*]] = select i1 [[C]], i32 [[L]], i32 42
+; CGSCC-NEXT: store i32 [[SEL]], i32* [[A]], align 4
+; CGSCC-NEXT: ret void
;
%l = load i32, i32* %a
%sel = select i1 %c, i32 %l, i32 42
!30 = distinct !{!30, !17}
!31 = distinct !{!31, !17}
;.
-; IS__TUNIT_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR8:[0-9]+]] = { allockind("alloc,uninitialized") allocsize(0) "alloc-family"="malloc" }
-; IS__TUNIT_NPM: attributes #[[ATTR9:[0-9]+]] = { allockind("free") "alloc-family"="malloc" }
-; IS__TUNIT_NPM: attributes #[[ATTR10:[0-9]+]] = { allockind("alloc,zeroed") allocsize(0,1) "alloc-family"="malloc" }
-; IS__TUNIT_NPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind willreturn uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR12]] = { argmemonly nofree nosync nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR13]] = { nofree norecurse nosync nounwind readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR14:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR15]] = { willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR16]] = { nofree nosync nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR17]] = { nocallback }
-; IS__TUNIT_NPM: attributes #[[ATTR18]] = { norecurse }
-; IS__TUNIT_NPM: attributes #[[ATTR19]] = { nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR20]] = { nofree nosync nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR21]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind writeonly }
+; TUNIT: attributes #[[ATTR8:[0-9]+]] = { allockind("alloc,uninitialized") allocsize(0) "alloc-family"="malloc" }
+; TUNIT: attributes #[[ATTR9:[0-9]+]] = { allockind("free") "alloc-family"="malloc" }
+; TUNIT: attributes #[[ATTR10:[0-9]+]] = { allockind("alloc,zeroed") allocsize(0,1) "alloc-family"="malloc" }
+; TUNIT: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind willreturn uwtable }
+; TUNIT: attributes #[[ATTR12]] = { argmemonly nofree nosync nounwind }
+; TUNIT: attributes #[[ATTR13]] = { nofree norecurse nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR14:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR15]] = { willreturn }
+; TUNIT: attributes #[[ATTR16]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR17]] = { nocallback }
+; TUNIT: attributes #[[ATTR18]] = { norecurse }
+; TUNIT: attributes #[[ATTR19]] = { nounwind }
+; TUNIT: attributes #[[ATTR20]] = { nofree nosync nounwind }
+; TUNIT: attributes #[[ATTR21]] = { nofree nosync nounwind willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR9:[0-9]+]] = { allockind("alloc,uninitialized") allocsize(0) "alloc-family"="malloc" }
-; IS__CGSCC_NPM: attributes #[[ATTR10:[0-9]+]] = { allockind("free") "alloc-family"="malloc" }
-; IS__CGSCC_NPM: attributes #[[ATTR11:[0-9]+]] = { allockind("alloc,zeroed") allocsize(0,1) "alloc-family"="malloc" }
-; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nofree norecurse nosync nounwind willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR13]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR14]] = { argmemonly nofree nosync nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR15]] = { nofree nosync nounwind readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR16]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR17:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR18]] = { willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR19]] = { nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR20]] = { nocallback }
-; IS__CGSCC_NPM: attributes #[[ATTR21]] = { norecurse }
-; IS__CGSCC_NPM: attributes #[[ATTR22]] = { nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR23]] = { nofree nosync nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR24]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind writeonly }
+; CGSCC: attributes #[[ATTR9:[0-9]+]] = { allockind("alloc,uninitialized") allocsize(0) "alloc-family"="malloc" }
+; CGSCC: attributes #[[ATTR10:[0-9]+]] = { allockind("free") "alloc-family"="malloc" }
+; CGSCC: attributes #[[ATTR11:[0-9]+]] = { allockind("alloc,zeroed") allocsize(0,1) "alloc-family"="malloc" }
+; CGSCC: attributes #[[ATTR12]] = { nofree norecurse nosync nounwind willreturn uwtable }
+; CGSCC: attributes #[[ATTR13]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR14]] = { argmemonly nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR15]] = { nofree nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR16]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR17:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR18]] = { willreturn }
+; CGSCC: attributes #[[ATTR19]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR20]] = { nocallback }
+; CGSCC: attributes #[[ATTR21]] = { norecurse }
+; CGSCC: attributes #[[ATTR22]] = { nounwind }
+; CGSCC: attributes #[[ATTR23]] = { nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR24]] = { nounwind willreturn }
;.
-; IS__TUNIT____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
-; IS__TUNIT____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
-; IS__TUNIT____: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
-; IS__TUNIT____: [[TBAA3]] = !{!4, !4, i64 0}
-; IS__TUNIT____: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
-; IS__TUNIT____: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
-; IS__TUNIT____: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
-; IS__TUNIT____: [[META7:![0-9]+]] = !{!8, !9, i64 12}
-; IS__TUNIT____: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
-; IS__TUNIT____: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
-; IS__TUNIT____: [[META10:![0-9]+]] = !{!8, !9, i64 16}
-; IS__TUNIT____: [[META11:![0-9]+]] = !{!8, !9, i64 20}
-; IS__TUNIT____: [[META12:![0-9]+]] = !{!8, !4, i64 0}
-; IS__TUNIT____: [[META13:![0-9]+]] = !{!8, !4, i64 4}
-; IS__TUNIT____: [[META14:![0-9]+]] = !{!8, !4, i64 8}
-; IS__TUNIT____: [[META15:![0-9]+]] = distinct !{!15, !16}
-; IS__TUNIT____: [[META16:![0-9]+]] = !{!"llvm.loop.mustprogress"}
-; IS__TUNIT____: [[META17:![0-9]+]] = distinct !{!17, !16}
-; IS__TUNIT____: [[META18:![0-9]+]] = distinct !{!18, !16}
-; IS__TUNIT____: [[META19:![0-9]+]] = !{!5, !5, i64 0}
-; IS__TUNIT____: [[META20:![0-9]+]] = distinct !{!20, !16}
-; IS__TUNIT____: [[META21:![0-9]+]] = distinct !{!21, !16}
-; IS__TUNIT____: [[META22:![0-9]+]] = distinct !{!22, !16}
-; IS__TUNIT____: [[META23:![0-9]+]] = distinct !{!23, !16}
-; IS__TUNIT____: [[META24:![0-9]+]] = distinct !{!24, !16}
-; IS__TUNIT____: [[META25:![0-9]+]] = distinct !{!25, !16}
-; IS__TUNIT____: [[META26:![0-9]+]] = !{!9, !9, i64 0}
-; IS__TUNIT____: [[META27:![0-9]+]] = distinct !{!27, !16}
-; IS__TUNIT____: [[META28:![0-9]+]] = !{!29, !29, i64 0}
-; IS__TUNIT____: [[META29:![0-9]+]] = !{!"long long", !5, i64 0}
-; IS__TUNIT____: [[META30:![0-9]+]] = distinct !{!30, !16}
-; IS__TUNIT____: [[META31:![0-9]+]] = distinct !{!31, !16}
+; TUNIT: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; TUNIT: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
+; TUNIT: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
+; TUNIT: [[TBAA3]] = !{!4, !4, i64 0}
+; TUNIT: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
+; TUNIT: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
+; TUNIT: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
+; TUNIT: [[META7:![0-9]+]] = !{!8, !9, i64 12}
+; TUNIT: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
+; TUNIT: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
+; TUNIT: [[META10:![0-9]+]] = !{!8, !9, i64 16}
+; TUNIT: [[META11:![0-9]+]] = !{!8, !9, i64 20}
+; TUNIT: [[META12:![0-9]+]] = !{!8, !4, i64 0}
+; TUNIT: [[META13:![0-9]+]] = !{!8, !4, i64 4}
+; TUNIT: [[META14:![0-9]+]] = !{!8, !4, i64 8}
+; TUNIT: [[META15:![0-9]+]] = distinct !{!15, !16}
+; TUNIT: [[META16:![0-9]+]] = !{!"llvm.loop.mustprogress"}
+; TUNIT: [[META17:![0-9]+]] = distinct !{!17, !16}
+; TUNIT: [[META18:![0-9]+]] = distinct !{!18, !16}
+; TUNIT: [[META19:![0-9]+]] = !{!5, !5, i64 0}
+; TUNIT: [[META20:![0-9]+]] = distinct !{!20, !16}
+; TUNIT: [[META21:![0-9]+]] = distinct !{!21, !16}
+; TUNIT: [[META22:![0-9]+]] = distinct !{!22, !16}
+; TUNIT: [[META23:![0-9]+]] = distinct !{!23, !16}
+; TUNIT: [[META24:![0-9]+]] = distinct !{!24, !16}
+; TUNIT: [[META25:![0-9]+]] = distinct !{!25, !16}
+; TUNIT: [[META26:![0-9]+]] = !{!9, !9, i64 0}
+; TUNIT: [[META27:![0-9]+]] = distinct !{!27, !16}
+; TUNIT: [[META28:![0-9]+]] = !{!29, !29, i64 0}
+; TUNIT: [[META29:![0-9]+]] = !{!"long long", !5, i64 0}
+; TUNIT: [[META30:![0-9]+]] = distinct !{!30, !16}
+; TUNIT: [[META31:![0-9]+]] = distinct !{!31, !16}
;.
-; IS__CGSCC____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
-; IS__CGSCC____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
-; IS__CGSCC____: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
-; IS__CGSCC____: [[TBAA3]] = !{!4, !4, i64 0}
-; IS__CGSCC____: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
-; IS__CGSCC____: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
-; IS__CGSCC____: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
-; IS__CGSCC____: [[META7:![0-9]+]] = !{!8, !9, i64 12}
-; IS__CGSCC____: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
-; IS__CGSCC____: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
-; IS__CGSCC____: [[META10:![0-9]+]] = !{!8, !9, i64 16}
-; IS__CGSCC____: [[META11:![0-9]+]] = !{!8, !9, i64 20}
-; IS__CGSCC____: [[META12:![0-9]+]] = !{!8, !4, i64 0}
-; IS__CGSCC____: [[META13:![0-9]+]] = !{!8, !4, i64 4}
-; IS__CGSCC____: [[META14:![0-9]+]] = !{!8, !4, i64 8}
-; IS__CGSCC____: [[META15:![0-9]+]] = !{!5, !5, i64 0}
-; IS__CGSCC____: [[META16:![0-9]+]] = distinct !{!16, !17}
-; IS__CGSCC____: [[META17:![0-9]+]] = !{!"llvm.loop.mustprogress"}
-; IS__CGSCC____: [[META18:![0-9]+]] = !{!9, !9, i64 0}
-; IS__CGSCC____: [[META19:![0-9]+]] = distinct !{!19, !17}
-; IS__CGSCC____: [[META20:![0-9]+]] = !{!21, !21, i64 0}
-; IS__CGSCC____: [[META21:![0-9]+]] = !{!"long long", !5, i64 0}
-; IS__CGSCC____: [[META22:![0-9]+]] = distinct !{!22, !17}
-; IS__CGSCC____: [[META23:![0-9]+]] = distinct !{!23, !17}
-; IS__CGSCC____: [[META24:![0-9]+]] = distinct !{!24, !17}
-; IS__CGSCC____: [[META25:![0-9]+]] = distinct !{!25, !17}
-; IS__CGSCC____: [[META26:![0-9]+]] = distinct !{!26, !17}
-; IS__CGSCC____: [[META27:![0-9]+]] = distinct !{!27, !17}
-; IS__CGSCC____: [[META28:![0-9]+]] = distinct !{!28, !17}
-; IS__CGSCC____: [[META29:![0-9]+]] = distinct !{!29, !17}
-; IS__CGSCC____: [[META30:![0-9]+]] = distinct !{!30, !17}
-; IS__CGSCC____: [[META31:![0-9]+]] = distinct !{!31, !17}
+; CGSCC: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CGSCC: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
+; CGSCC: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
+; CGSCC: [[TBAA3]] = !{!4, !4, i64 0}
+; CGSCC: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
+; CGSCC: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
+; CGSCC: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
+; CGSCC: [[META7:![0-9]+]] = !{!8, !9, i64 12}
+; CGSCC: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
+; CGSCC: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
+; CGSCC: [[META10:![0-9]+]] = !{!8, !9, i64 16}
+; CGSCC: [[META11:![0-9]+]] = !{!8, !9, i64 20}
+; CGSCC: [[META12:![0-9]+]] = !{!8, !4, i64 0}
+; CGSCC: [[META13:![0-9]+]] = !{!8, !4, i64 4}
+; CGSCC: [[META14:![0-9]+]] = !{!8, !4, i64 8}
+; CGSCC: [[META15:![0-9]+]] = !{!5, !5, i64 0}
+; CGSCC: [[META16:![0-9]+]] = distinct !{!16, !17}
+; CGSCC: [[META17:![0-9]+]] = !{!"llvm.loop.mustprogress"}
+; CGSCC: [[META18:![0-9]+]] = !{!9, !9, i64 0}
+; CGSCC: [[META19:![0-9]+]] = distinct !{!19, !17}
+; CGSCC: [[META20:![0-9]+]] = !{!21, !21, i64 0}
+; CGSCC: [[META21:![0-9]+]] = !{!"long long", !5, i64 0}
+; CGSCC: [[META22:![0-9]+]] = distinct !{!22, !17}
+; CGSCC: [[META23:![0-9]+]] = distinct !{!23, !17}
+; CGSCC: [[META24:![0-9]+]] = distinct !{!24, !17}
+; CGSCC: [[META25:![0-9]+]] = distinct !{!25, !17}
+; CGSCC: [[META26:![0-9]+]] = distinct !{!26, !17}
+; CGSCC: [[META27:![0-9]+]] = distinct !{!27, !17}
+; CGSCC: [[META28:![0-9]+]] = distinct !{!28, !17}
+; CGSCC: [[META29:![0-9]+]] = distinct !{!29, !17}
+; CGSCC: [[META30:![0-9]+]] = distinct !{!30, !17}
+; CGSCC: [[META31:![0-9]+]] = distinct !{!31, !17}
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
declare void @f(i32)
; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = internal constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (void (i8***)* @f1 to i8*), i8* bitcast (void (i1 (i8*)*)* @f2 to i8*)] }
;.
define internal i32 addrspace(3)* @const_ptr_return_as3() {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@const_ptr_return_as3
-; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i32 addrspace(3)* @ConstAS3Ptr
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@const_ptr_return_as3
+; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: ret i32 addrspace(3)* @ConstAS3Ptr
;
ret i32 addrspace(3)* @ConstAS3Ptr
}
define internal i32* @const_ptr_return() {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@const_ptr_return
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*)
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@const_ptr_return
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: ret i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*)
;
ret i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*)
}
}
define i32 @test2_1(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_1
-; 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
-; IS__TUNIT____-NEXT: br label [[END:%.*]]
-; IS__TUNIT____: if.false:
-; IS__TUNIT____-NEXT: br label [[END]]
-; IS__TUNIT____: end:
-; IS__TUNIT____-NEXT: [[RET:%.*]] = phi i32 [ [[RET0]], [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ]
-; IS__TUNIT____-NEXT: ret i32 1
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test2_1
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
-; IS__CGSCC_NPM: if.true:
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = tail call i32 @return0() #[[ATTR12:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[RET0:%.*]] = add i32 [[CALL]], 1
-; IS__CGSCC_NPM-NEXT: br label [[END:%.*]]
-; IS__CGSCC_NPM: if.false:
-; IS__CGSCC_NPM-NEXT: [[RET1:%.*]] = tail call i32 @return1() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: br label [[END]]
-; IS__CGSCC_NPM: end:
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = phi i32 [ [[RET0]], [[IF_TRUE]] ], [ [[RET1]], [[IF_FALSE]] ]
-; IS__CGSCC_NPM-NEXT: ret i32 1
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test2_1
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
+; TUNIT: if.true:
+; TUNIT-NEXT: [[RET0:%.*]] = add i32 0, 1
+; TUNIT-NEXT: br label [[END:%.*]]
+; TUNIT: if.false:
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: [[RET:%.*]] = phi i32 [ [[RET0]], [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ]
+; TUNIT-NEXT: ret i32 1
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test2_1
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
+; CGSCC: if.true:
+; CGSCC-NEXT: [[CALL:%.*]] = tail call i32 @return0() #[[ATTR12:[0-9]+]]
+; CGSCC-NEXT: [[RET0:%.*]] = add i32 [[CALL]], 1
+; CGSCC-NEXT: br label [[END:%.*]]
+; CGSCC: if.false:
+; CGSCC-NEXT: [[RET1:%.*]] = tail call i32 @return1() #[[ATTR12]]
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: [[RET:%.*]] = phi i32 [ [[RET0]], [[IF_TRUE]] ], [ [[RET1]], [[IF_FALSE]] ]
+; CGSCC-NEXT: ret i32 1
;
br i1 %c, label %if.true, label %if.false
if.true:
define i32 @test2_2(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_2
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i32 1
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test2_2
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: ret i32 1
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test2_2
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = tail call noundef i32 @test2_1(i1 [[C]]) #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[RET]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test2_2
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[RET:%.*]] = tail call noundef i32 @test2_1(i1 [[C]]) #[[ATTR12]]
+; CGSCC-NEXT: ret i32 [[RET]]
;
%ret = tail call i32 @test2_1(i1 %c)
ret i32 %ret
declare void @use(i32)
define void @test3(i1 %c) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test3
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) {
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
-; IS__TUNIT____: if.true:
-; IS__TUNIT____-NEXT: br label [[END:%.*]]
-; IS__TUNIT____: if.false:
-; IS__TUNIT____-NEXT: br label [[END]]
-; IS__TUNIT____: end:
-; IS__TUNIT____-NEXT: [[R:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ]
-; IS__TUNIT____-NEXT: tail call void @use(i32 noundef 1)
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test3
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) {
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
-; IS__CGSCC_NPM: if.true:
-; IS__CGSCC_NPM-NEXT: br label [[END:%.*]]
-; IS__CGSCC_NPM: if.false:
-; IS__CGSCC_NPM-NEXT: [[RET1:%.*]] = tail call i32 @return1() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: br label [[END]]
-; IS__CGSCC_NPM: end:
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ [[RET1]], [[IF_FALSE]] ]
-; IS__CGSCC_NPM-NEXT: tail call void @use(i32 noundef [[R]])
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@test3
+; TUNIT-SAME: (i1 [[C:%.*]]) {
+; TUNIT-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
+; TUNIT: if.true:
+; TUNIT-NEXT: br label [[END:%.*]]
+; TUNIT: if.false:
+; TUNIT-NEXT: br label [[END]]
+; TUNIT: end:
+; TUNIT-NEXT: [[R:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ]
+; TUNIT-NEXT: tail call void @use(i32 noundef 1)
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@test3
+; CGSCC-SAME: (i1 [[C:%.*]]) {
+; CGSCC-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
+; CGSCC: if.true:
+; CGSCC-NEXT: br label [[END:%.*]]
+; CGSCC: if.false:
+; CGSCC-NEXT: [[RET1:%.*]] = tail call i32 @return1() #[[ATTR12]]
+; CGSCC-NEXT: br label [[END]]
+; CGSCC: end:
+; CGSCC-NEXT: [[R:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ [[RET1]], [[IF_FALSE]] ]
+; CGSCC-NEXT: tail call void @use(i32 noundef [[R]])
+; CGSCC-NEXT: ret void
;
br i1 %c, label %if.true, label %if.false
if.true:
}
define internal i1 @ipccp2i(i1 %a) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2i
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: br label [[T:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i1 true
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp2i
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: br label [[T:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: ret i1 true
+; CGSCC: f:
+; CGSCC-NEXT: unreachable
;
br i1 %a, label %t, label %f
t:
}
define i1 @ipccp2() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp2
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i1 true
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ipccp2
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i1 true
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ipccp2
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call noundef i1 @ipccp2i() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[R]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp2
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[R:%.*]] = call noundef i1 @ipccp2i() #[[ATTR12]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%r = call i1 @ipccp2i(i1 true)
ret i1 %r
}
define internal i1 @ipccp2ib(i1 %a) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2ib
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: br label [[T:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i1 true
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp2ib
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: br label [[T:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: ret i1 true
+; CGSCC: f:
+; CGSCC-NEXT: unreachable
;
br i1 %a, label %t, label %f
t:
}
define i1 @ipccp2b() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp2b
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i1 true
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ipccp2b
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i1 true
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ipccp2b
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call noundef i1 @ipccp2ib() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[R]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp2b
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[R:%.*]] = call noundef i1 @ipccp2ib() #[[ATTR12]]
+; CGSCC-NEXT: ret i1 [[R]]
;
%r = call i1 @ipccp2ib(i1 true)
ret i1 %r
}
define internal i32 @ipccp3i(i32 %a) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp3i
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: br label [[T:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i32 7
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp3i
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: br label [[T:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: ret i32 7
+; CGSCC: f:
+; CGSCC-NEXT: unreachable
;
%c = icmp eq i32 %a, 7
br i1 %c, label %t, label %f
}
define i32 @ipccp3() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp3
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i32 7
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ipccp3
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i32 7
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ipccp3
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call noundef i32 @ipccp3i() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[R]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp3
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[R:%.*]] = call noundef i32 @ipccp3i() #[[ATTR12]]
+; CGSCC-NEXT: ret i32 [[R]]
;
%r = call i32 @ipccp3i(i32 7)
ret i32 %r
}
define internal i32 @ipccp4ia(i1 %c) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp4ia
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i32 0
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: ret i32 1
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp4ia
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: ret i32 0
+; CGSCC: f:
+; CGSCC-NEXT: ret i32 1
;
br i1 %c, label %t, label %f
t:
ret i32 1
}
define internal i32 @ipccp4ib(i32 %a) {
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ipccp4ib
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: br label [[T:%.*]]
-; IS__CGSCC_NPM: t:
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call noundef i32 @ipccp4ia(i1 noundef true) #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[R]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: unreachable
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp4ib
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: br label [[T:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: [[R:%.*]] = call noundef i32 @ipccp4ia(i1 noundef true) #[[ATTR12]]
+; CGSCC-NEXT: ret i32 [[R]]
+; CGSCC: f:
+; CGSCC-NEXT: unreachable
;
%c = icmp eq i32 %a, 7
br i1 %c, label %t, label %f
}
define i32 @ipccp4(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp4
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: br label [[F]]
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: ret i32 0
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ipccp4
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC_NPM: t:
-; IS__CGSCC_NPM-NEXT: br label [[F]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call noundef i32 @ipccp4ib() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ipccp4
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: br label [[F]]
+; TUNIT: f:
+; TUNIT-NEXT: ret i32 0
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ipccp4
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: br label [[F]]
+; CGSCC: f:
+; CGSCC-NEXT: [[R:%.*]] = call noundef i32 @ipccp4ib() #[[ATTR12]]
+; CGSCC-NEXT: ret i32 [[R]]
;
br i1 %c, label %t, label %f
t:
ret i32* %a
}
define i32* @complicated_args_inalloca(i32* %arg) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_inalloca
-; IS__TUNIT_NPM-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree writeonly inalloca(i32) "no-capture-maybe-returned" [[ARG]]) #[[ATTR9:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret i32* [[CALL]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_inalloca
-; IS__CGSCC_NPM-SAME: (i32* nofree noundef nonnull readnone dereferenceable(4) [[ARG:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly inalloca(i32) dereferenceable(4) [[ARG]]) #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i32* [[CALL]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@complicated_args_inalloca
+; TUNIT-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: [[CALL:%.*]] = call nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree writeonly inalloca(i32) "no-capture-maybe-returned" [[ARG]]) #[[ATTR9:[0-9]+]]
+; TUNIT-NEXT: ret i32* [[CALL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@complicated_args_inalloca
+; CGSCC-SAME: (i32* nofree noundef nonnull readnone dereferenceable(4) [[ARG:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call noalias nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly inalloca(i32) dereferenceable(4) [[ARG]]) #[[ATTR12]]
+; CGSCC-NEXT: ret i32* [[CALL]]
;
%call = call i32* @test_inalloca(i32* inalloca(i32) %arg)
ret i32* %call
ret i32* %a
}
define i32* @complicated_args_preallocated() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated
-; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR10:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR9]] [ "preallocated"(token [[C]]) ]
-; IS__TUNIT_NPM-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: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR13:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32* null
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@complicated_args_preallocated
+; TUNIT-SAME: () #[[ATTR2:[0-9]+]] {
+; TUNIT-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR10:[0-9]+]]
+; TUNIT-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR9]] [ "preallocated"(token [[C]]) ]
+; TUNIT-NEXT: ret i32* [[CALL]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@complicated_args_preallocated
+; CGSCC-SAME: () #[[ATTR3:[0-9]+]] {
+; CGSCC-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR13:[0-9]+]]
+; CGSCC-NEXT: ret i32* null
;
%c = call token @llvm.call.preallocated.setup(i32 1)
%call = call i32* @test_preallocated(i32* preallocated(i32) null) ["preallocated"(token %c)]
define internal void @test_sret(%struct.X* sret(%struct.X) %a, %struct.X** %b) {
;
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_sret
-; IS__TUNIT____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 4294967296 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__TUNIT____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8
-; IS__TUNIT____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test_sret
+; TUNIT-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 4294967296 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR3:[0-9]+]] {
+; TUNIT-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8
+; 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 4294967296 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8
-; IS__CGSCC____-NEXT: ret void
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test_sret
+; CGSCC-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 4294967296 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR4:[0-9]+]] {
+; CGSCC-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8
+; CGSCC-NEXT: ret void
;
store %struct.X* %a, %struct.X** %b
ret void
define void @complicated_args_sret(%struct.X** %b) {
;
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_sret
-; IS__TUNIT_NPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly sret([[STRUCT_X:%.*]]) align 4294967296 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR11:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@complicated_args_sret
+; TUNIT-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly sret([[STRUCT_X:%.*]]) align 4294967296 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR11:[0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC____: Function Attrs: argmemonly nofree 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:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__CGSCC____-NEXT: unreachable
+; CGSCC: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@complicated_args_sret
+; CGSCC-SAME: (%struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR5:[0-9]+]] {
+; CGSCC-NEXT: unreachable
;
call void @test_sret(%struct.X* sret(%struct.X) null, %struct.X** %b)
ret void
}
define internal %struct.X* @test_nest(%struct.X* nest %a) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_nest
-; IS__CGSCC____-SAME: (%struct.X* nest noalias nocapture nofree readnone align 4294967296 [[A:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret %struct.X* null
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_nest
+; CGSCC-SAME: (%struct.X* nest noalias nocapture nofree readnone align 4294967296 [[A:%.*]]) #[[ATTR1]] {
+; CGSCC-NEXT: ret %struct.X* null
;
ret %struct.X* %a
}
define %struct.X* @complicated_args_nest() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_nest
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret %struct.X* null
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@complicated_args_nest
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret %struct.X* null
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_nest
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias noundef align 4294967296 %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 4294967296 null) #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret %struct.X* [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@complicated_args_nest
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call noalias noundef align 4294967296 %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 4294967296 null) #[[ATTR12]]
+; CGSCC-NEXT: ret %struct.X* [[CALL]]
;
%call = call %struct.X* @test_nest(%struct.X* null)
ret %struct.X* %call
@S = external global %struct.X
define internal void @test_byval(%struct.X* byval(%struct.X) %a) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_byval
-; IS__TUNIT_NPM-SAME: (i8* [[TMP0:%.*]]) #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
-; IS__TUNIT_NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: store i8* null, i8** [[G0]], align 8
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_byval
-; IS__CGSCC_NPM-SAME: (i8* [[TMP0:%.*]]) #[[ATTR4]] {
-; 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
-; IS__CGSCC_NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: store i8* null, i8** [[G0]], align 8
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@test_byval
+; TUNIT-SAME: (i8* [[TMP0:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
+; TUNIT-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
+; TUNIT-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
+; TUNIT-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
+; TUNIT-NEXT: store i8* null, i8** [[G0]], align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@test_byval
+; CGSCC-SAME: (i8* [[TMP0:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
+; CGSCC-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
+; CGSCC-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
+; CGSCC-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
+; CGSCC-NEXT: store i8* null, i8** [[G0]], align 8
+; CGSCC-NEXT: ret void
;
%g0 = getelementptr %struct.X, %struct.X* %a, i32 0, i32 0
store i8* null, i8** %g0
ret void
}
define void @complicated_args_byval() {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_byval
-; IS__TUNIT_NPM-SAME: () #[[ATTR4:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: [[S_CAST:%.*]] = bitcast %struct.X* @S to i8**
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i8*, i8** [[S_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: call void @test_byval(i8* [[TMP1]]) #[[ATTR11]]
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_byval
-; IS__CGSCC_NPM-SAME: () #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i8*, i8** getelementptr inbounds ([[STRUCT_X:%.*]], %struct.X* @S, i32 0, i32 0), align 8
-; IS__CGSCC_NPM-NEXT: call void @test_byval(i8* nofree writeonly [[TMP1]]) #[[ATTR14:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@complicated_args_byval
+; TUNIT-SAME: () #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: [[S_CAST:%.*]] = bitcast %struct.X* @S to i8**
+; TUNIT-NEXT: [[TMP1:%.*]] = load i8*, i8** [[S_CAST]], align 8
+; TUNIT-NEXT: call void @test_byval(i8* [[TMP1]]) #[[ATTR11]]
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@complicated_args_byval
+; CGSCC-SAME: () #[[ATTR3]] {
+; CGSCC-NEXT: [[TMP1:%.*]] = load i8*, i8** getelementptr inbounds ([[STRUCT_X:%.*]], %struct.X* @S, i32 0, i32 0), align 8
+; CGSCC-NEXT: call void @test_byval(i8* nofree writeonly [[TMP1]]) #[[ATTR14:[0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @test_byval(%struct.X* byval(%struct.X) @S)
ret void
declare void @sync()
; Make sure we *do not* load @S here!
define internal i8*@test_byval2(%struct.X* byval(%struct.X) %a) {
-; IS________NPM-LABEL: define {{[^@]+}}@test_byval2
-; IS________NPM-SAME: (i8* [[TMP0:%.*]]) {
-; IS________NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
-; IS________NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
-; IS________NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
-; IS________NPM-NEXT: call void @sync()
-; IS________NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8
-; IS________NPM-NEXT: ret i8* [[L]]
+; CHECK-LABEL: define {{[^@]+}}@test_byval2
+; CHECK-SAME: (i8* [[TMP0:%.*]]) {
+; CHECK-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
+; CHECK-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
+; CHECK-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
+; CHECK-NEXT: call void @sync()
+; CHECK-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
+; CHECK-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8
+; CHECK-NEXT: ret i8* [[L]]
;
call void @sync()
%g0 = getelementptr %struct.X, %struct.X* %a, i32 0, i32 0
}
define i8* @complicated_args_byval2() {
;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_byval2() {
-; IS__TUNIT_NPM-NEXT: [[S_CAST:%.*]] = bitcast %struct.X* @S to i8**
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i8*, i8** [[S_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call i8* @test_byval2(i8* [[TMP1]])
-; IS__TUNIT_NPM-NEXT: ret i8* [[C]]
+; TUNIT-LABEL: define {{[^@]+}}@complicated_args_byval2() {
+; TUNIT-NEXT: [[S_CAST:%.*]] = bitcast %struct.X* @S to i8**
+; TUNIT-NEXT: [[TMP1:%.*]] = load i8*, i8** [[S_CAST]], align 8
+; TUNIT-NEXT: [[C:%.*]] = call i8* @test_byval2(i8* [[TMP1]])
+; TUNIT-NEXT: ret i8* [[C]]
;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_byval2() {
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i8*, i8** getelementptr inbounds ([[STRUCT_X:%.*]], %struct.X* @S, i32 0, i32 0), align 8
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i8* @test_byval2(i8* [[TMP1]])
-; IS__CGSCC_NPM-NEXT: ret i8* [[C]]
+; CGSCC-LABEL: define {{[^@]+}}@complicated_args_byval2() {
+; CGSCC-NEXT: [[TMP1:%.*]] = load i8*, i8** getelementptr inbounds ([[STRUCT_X:%.*]], %struct.X* @S, i32 0, i32 0), align 8
+; CGSCC-NEXT: [[C:%.*]] = call i8* @test_byval2(i8* [[TMP1]])
+; CGSCC-NEXT: ret i8* [[C]]
;
%c = call i8* @test_byval2(%struct.X* byval(%struct.X) @S)
ret i8* %c
}
define void @fixpoint_changed(i32* %p) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@fixpoint_changed
-; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR3]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__TUNIT_NPM: for.cond:
-; IS__TUNIT_NPM-NEXT: [[J_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[SW_EPILOG:%.*]] ]
-; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[J_0]], 30
-; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
-; IS__TUNIT_NPM: for.body:
-; IS__TUNIT_NPM-NEXT: switch i32 [[J_0]], label [[SW_EPILOG]] [
-; IS__TUNIT_NPM-NEXT: i32 1, label [[SW_BB:%.*]]
-; IS__TUNIT_NPM-NEXT: ]
-; IS__TUNIT_NPM: sw.bb:
-; IS__TUNIT_NPM-NEXT: br label [[SW_EPILOG]]
-; IS__TUNIT_NPM: sw.epilog:
-; IS__TUNIT_NPM-NEXT: [[X_0:%.*]] = phi i32 [ 255, [[FOR_BODY]] ], [ 253, [[SW_BB]] ]
-; IS__TUNIT_NPM-NEXT: store i32 [[X_0]], i32* [[P]], align 4
-; IS__TUNIT_NPM-NEXT: [[INC]] = add nsw i32 [[J_0]], 1
-; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]]
-; IS__TUNIT_NPM: for.end:
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; 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:%.*]]) #[[ATTR4]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS__CGSCC_NPM: for.cond:
-; IS__CGSCC_NPM-NEXT: [[J_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[SW_EPILOG:%.*]] ]
-; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[J_0]], 30
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
-; IS__CGSCC_NPM: for.body:
-; IS__CGSCC_NPM-NEXT: switch i32 [[J_0]], label [[SW_EPILOG]] [
-; IS__CGSCC_NPM-NEXT: i32 1, label [[SW_BB:%.*]]
-; IS__CGSCC_NPM-NEXT: ]
-; IS__CGSCC_NPM: sw.bb:
-; IS__CGSCC_NPM-NEXT: br label [[SW_EPILOG]]
-; IS__CGSCC_NPM: sw.epilog:
-; IS__CGSCC_NPM-NEXT: [[X_0:%.*]] = phi i32 [ 255, [[FOR_BODY]] ], [ 253, [[SW_BB]] ]
-; IS__CGSCC_NPM-NEXT: store i32 [[X_0]], i32* [[P]], align 4
-; IS__CGSCC_NPM-NEXT: [[INC]] = add nsw i32 [[J_0]], 1
-; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]]
-; IS__CGSCC_NPM: for.end:
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@fixpoint_changed
+; TUNIT-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br label [[FOR_COND:%.*]]
+; TUNIT: for.cond:
+; TUNIT-NEXT: [[J_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[SW_EPILOG:%.*]] ]
+; TUNIT-NEXT: [[CMP:%.*]] = icmp slt i32 [[J_0]], 30
+; TUNIT-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
+; TUNIT: for.body:
+; TUNIT-NEXT: switch i32 [[J_0]], label [[SW_EPILOG]] [
+; TUNIT-NEXT: i32 1, label [[SW_BB:%.*]]
+; TUNIT-NEXT: ]
+; TUNIT: sw.bb:
+; TUNIT-NEXT: br label [[SW_EPILOG]]
+; TUNIT: sw.epilog:
+; TUNIT-NEXT: [[X_0:%.*]] = phi i32 [ 255, [[FOR_BODY]] ], [ 253, [[SW_BB]] ]
+; TUNIT-NEXT: store i32 [[X_0]], i32* [[P]], align 4
+; TUNIT-NEXT: [[INC]] = add nsw i32 [[J_0]], 1
+; TUNIT-NEXT: br label [[FOR_COND]]
+; TUNIT: for.end:
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@fixpoint_changed
+; CGSCC-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br label [[FOR_COND:%.*]]
+; CGSCC: for.cond:
+; CGSCC-NEXT: [[J_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[SW_EPILOG:%.*]] ]
+; CGSCC-NEXT: [[CMP:%.*]] = icmp slt i32 [[J_0]], 30
+; CGSCC-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
+; CGSCC: for.body:
+; CGSCC-NEXT: switch i32 [[J_0]], label [[SW_EPILOG]] [
+; CGSCC-NEXT: i32 1, label [[SW_BB:%.*]]
+; CGSCC-NEXT: ]
+; CGSCC: sw.bb:
+; CGSCC-NEXT: br label [[SW_EPILOG]]
+; CGSCC: sw.epilog:
+; CGSCC-NEXT: [[X_0:%.*]] = phi i32 [ 255, [[FOR_BODY]] ], [ 253, [[SW_BB]] ]
+; CGSCC-NEXT: store i32 [[X_0]], i32* [[P]], align 4
+; CGSCC-NEXT: [[INC]] = add nsw i32 [[J_0]], 1
+; CGSCC-NEXT: br label [[FOR_COND]]
+; CGSCC: for.end:
+; CGSCC-NEXT: ret void
;
entry:
br label %for.cond
; Check we merge undef and a constant properly.
define i8 @caller0() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller0
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i8 49
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller0
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 49
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller0
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[C]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller0
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
+; CGSCC-NEXT: ret i8 [[C]]
;
%c = call i8 @callee(i8 undef)
ret i8 %c
}
define i8 @caller1() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller1
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i8 49
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller1
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 49
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller1
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[C]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller1
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
+; CGSCC-NEXT: ret i8 [[C]]
;
%c = call i8 @callee(i8 undef)
ret i8 %c
}
define i8 @caller2() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i8 49
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller2
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 49
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller2
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[C]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller2
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
+; CGSCC-NEXT: ret i8 [[C]]
;
%c = call i8 @callee(i8 undef)
ret i8 %c
}
define i8 @caller_middle() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller_middle
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i8 49
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller_middle
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 49
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller_middle
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[C]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller_middle
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
+; CGSCC-NEXT: ret i8 [[C]]
;
%c = call i8 @callee(i8 42)
ret i8 %c
}
define i8 @caller3() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller3
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i8 49
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller3
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 49
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller3
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[C]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller3
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
+; CGSCC-NEXT: ret i8 [[C]]
;
%c = call i8 @callee(i8 undef)
ret i8 %c
}
define i8 @caller4() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller4
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i8 49
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@caller4
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i8 49
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller4
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[C]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@caller4
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef i8 @callee() #[[ATTR12]]
+; CGSCC-NEXT: ret i8 [[C]]
;
%c = call i8 @callee(i8 undef)
ret i8 %c
}
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____-NEXT: ret i8 49
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@callee
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: ret i8 49
;
%c = add i8 %a, 7
ret i8 %c
}
define void @user_as3() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@user_as3
-; IS__TUNIT____-SAME: () #[[ATTR4:[0-9]+]] {
-; IS__TUNIT____-NEXT: store i32 0, i32 addrspace(3)* @ConstAS3Ptr, align 4
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@user_as3
-; IS__CGSCC_NPM-SAME: () #[[ATTR6:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call fastcc align 4 i32 addrspace(3)* @const_ptr_return_as3() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: store i32 0, i32 addrspace(3)* [[CALL]], align 4
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@user_as3
+; TUNIT-SAME: () #[[ATTR4:[0-9]+]] {
+; TUNIT-NEXT: store i32 0, i32 addrspace(3)* @ConstAS3Ptr, align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@user_as3
+; CGSCC-SAME: () #[[ATTR6:[0-9]+]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call fastcc align 4 i32 addrspace(3)* @const_ptr_return_as3() #[[ATTR12]]
+; CGSCC-NEXT: store i32 0, i32 addrspace(3)* [[CALL]], align 4
+; CGSCC-NEXT: ret void
;
%call = call fastcc i32 addrspace(3)* @const_ptr_return_as3()
store i32 0, i32 addrspace(3)* %call
ret void
}
define void @user() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@user
-; IS__TUNIT____-SAME: () #[[ATTR4]] {
-; IS__TUNIT____-NEXT: store i32 0, i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*), align 4
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@user
-; IS__CGSCC_NPM-SAME: () #[[ATTR6]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call fastcc align 4 i32* @const_ptr_return() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[CALL]], align 4
-; IS__CGSCC_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@user
+; TUNIT-SAME: () #[[ATTR4]] {
+; TUNIT-NEXT: store i32 0, i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*), align 4
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@user
+; CGSCC-SAME: () #[[ATTR6]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call fastcc align 4 i32* @const_ptr_return() #[[ATTR12]]
+; CGSCC-NEXT: store i32 0, i32* [[CALL]], align 4
+; CGSCC-NEXT: ret void
;
%call = call fastcc i32* @const_ptr_return()
store i32 0, i32* %call
define i1 @test_merge_with_undef_values_ptr(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_merge_with_undef_values_ptr
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i1 false
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_merge_with_undef_values_ptr
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: ret i1 false
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_merge_with_undef_values_ptr
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call noundef i1 @undef_then_null(i1 [[C]]) #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[R1]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_merge_with_undef_values_ptr
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[R1:%.*]] = call noundef i1 @undef_then_null(i1 [[C]]) #[[ATTR12]]
+; CGSCC-NEXT: ret i1 [[R1]]
;
%r1 = call i1 @undef_then_null(i1 %c, i32* undef, i32* undef)
ret i1 %r1
}
define internal i1 @undef_then_null(i1 %c, i32* %i32Aptr, i32* %i32Bptr) {
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@undef_then_null
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
-; IS__CGSCC____: a:
-; IS__CGSCC____-NEXT: ret i1 false
-; IS__CGSCC____: b:
-; IS__CGSCC____-NEXT: ret i1 false
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@undef_then_null
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
+; CGSCC: a:
+; CGSCC-NEXT: ret i1 false
+; CGSCC: b:
+; CGSCC-NEXT: ret i1 false
;
%cmp1 = icmp eq i32* %i32Aptr, %i32Bptr
%cmp2 = icmp eq i1 %cmp1, false
}
define i1 @test_merge_with_undef_values(i1 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_merge_with_undef_values
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i1 false
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_merge_with_undef_values
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: ret i1 false
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_merge_with_undef_values
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call noundef i1 @undef_then_1(i1 [[C]]) #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[R1]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_merge_with_undef_values
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[R1:%.*]] = call noundef i1 @undef_then_1(i1 [[C]]) #[[ATTR12]]
+; CGSCC-NEXT: ret i1 [[R1]]
;
%r1 = call i1 @undef_then_1(i1 %c, i32 undef, i32 undef)
ret i1 %r1
}
define internal i1 @undef_then_1(i1 %c, i32 %i32A, i32 %i32B) {
;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@undef_then_1
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
-; IS__CGSCC____: a:
-; IS__CGSCC____-NEXT: ret i1 false
-; IS__CGSCC____: b:
-; IS__CGSCC____-NEXT: ret i1 false
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@undef_then_1
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
+; CGSCC: a:
+; CGSCC-NEXT: ret i1 false
+; CGSCC: b:
+; CGSCC-NEXT: ret i1 false
;
%cmp1 = icmp eq i32 %i32A, %i32B
%cmp2 = icmp eq i1 %cmp1, false
}
define i32 @test_select(i32 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_select
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i32 42
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_select
+; TUNIT-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: ret i32 42
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_select
-; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noundef i32 @select() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[CALL]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_select
+; CGSCC-SAME: (i32 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: [[CALL:%.*]] = call noundef i32 @select() #[[ATTR12]]
+; CGSCC-NEXT: ret i32 [[CALL]]
;
%call = call i32 @select(i1 1, i32 42, i32 %c)
ret i32 %call
}
define internal i32 @select(i1 %a, i32 %b, i32 %c) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@select
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i32 42
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@select
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: ret i32 42
;
%s = select i1 %a, i32 %b, i32 %c
ret i32 %s
}
define void @test_callee_is_undef(void (i32)* %fn) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_callee_is_undef
-; IS__TUNIT____-SAME: (void (i32)* nocapture nofree [[FN:%.*]]) {
-; IS__TUNIT____-NEXT: call void @callee_is_undef()
-; IS__TUNIT____-NEXT: call void @unknown_calle_arg_is_undef(void (i32)* nocapture nofree [[FN]])
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_callee_is_undef
-; IS__CGSCC____-SAME: (void (i32)* nocapture nofree [[FN:%.*]]) {
-; IS__CGSCC____-NEXT: call void @callee_is_undef()
-; IS__CGSCC____-NEXT: call void @unknown_calle_arg_is_undef(void (i32)* nocapture nofree noundef nonnull [[FN]])
-; IS__CGSCC____-NEXT: ret void
+; TUNIT-LABEL: define {{[^@]+}}@test_callee_is_undef
+; TUNIT-SAME: (void (i32)* nocapture nofree [[FN:%.*]]) {
+; TUNIT-NEXT: call void @callee_is_undef()
+; TUNIT-NEXT: call void @unknown_calle_arg_is_undef(void (i32)* nocapture nofree [[FN]])
+; TUNIT-NEXT: ret void
+;
+; CGSCC-LABEL: define {{[^@]+}}@test_callee_is_undef
+; CGSCC-SAME: (void (i32)* nocapture nofree [[FN:%.*]]) {
+; CGSCC-NEXT: call void @callee_is_undef()
+; CGSCC-NEXT: call void @unknown_calle_arg_is_undef(void (i32)* nocapture nofree noundef nonnull [[FN]])
+; CGSCC-NEXT: ret void
;
call void @callee_is_undef(void ()* undef)
call void @unknown_calle_arg_is_undef(void (i32)* %fn, i32 undef)
@g = internal constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (void (i8***)* @f1 to i8*), i8* bitcast (void (i1 (i8*)*)* @f2 to i8*)] }
define internal void @f1(i8*** %a) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@f1
-; IS__TUNIT____-SAME: (i8*** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: store i8** getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @g, i32 0, i32 0, i32 0), i8*** [[A]], align 8
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
-; IS__CGSCC____-SAME: (i8*** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: store i8** getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @g, i32 0, i32 0, i32 0), i8*** [[A]], align 8
-; IS__CGSCC____-NEXT: ret void
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; TUNIT-LABEL: define {{[^@]+}}@f1
+; TUNIT-SAME: (i8*** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR3]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: store i8** getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @g, i32 0, i32 0, i32 0), i8*** [[A]], align 8
+; TUNIT-NEXT: ret void
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CGSCC-LABEL: define {{[^@]+}}@f1
+; CGSCC-SAME: (i8*** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: store i8** getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @g, i32 0, i32 0, i32 0), i8*** [[A]], align 8
+; CGSCC-NEXT: ret void
;
entry:
%x = getelementptr { [2 x i8*] }, { [2 x i8*] }* @g, i32 0, i32 0, i32 0
define i1 @test_cmp_null_after_cast() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_cmp_null_after_cast
-; IS__TUNIT____-SAME: () #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i1 true
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_cmp_null_after_cast
+; TUNIT-SAME: () #[[ATTR1]] {
+; TUNIT-NEXT: ret i1 true
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_cmp_null_after_cast
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call noundef i1 @cmp_null_after_cast() #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[C]]
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_cmp_null_after_cast
+; CGSCC-SAME: () #[[ATTR2]] {
+; CGSCC-NEXT: [[C:%.*]] = call noundef i1 @cmp_null_after_cast() #[[ATTR12]]
+; CGSCC-NEXT: ret i1 [[C]]
;
%c = call i1 @cmp_null_after_cast(i32 0, i8 0)
ret i1 %c
}
define internal i1 @cmp_null_after_cast(i32 %a, i8 %b) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@cmp_null_after_cast
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i1 true
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@cmp_null_after_cast
+; CGSCC-SAME: () #[[ATTR1]] {
+; CGSCC-NEXT: ret i1 true
;
%t = trunc i32 %a to i8
%c = icmp eq i8 %t, %b
}
define i1 @test_liveness(i1 %c) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_liveness
-; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT_NPM: t:
-; IS__TUNIT_NPM-NEXT: br label [[F]]
-; IS__TUNIT_NPM: f:
-; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i1 [ true, [[ENTRY:%.*]] ], [ false, [[T]] ]
-; IS__TUNIT_NPM-NEXT: [[RC1:%.*]] = call i1 @ret(i1 noundef [[P]]) #[[ATTR9]]
-; IS__TUNIT_NPM-NEXT: ret i1 [[RC1]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_liveness
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC_NPM: t:
-; IS__CGSCC_NPM-NEXT: br label [[F]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i1 [ true, [[ENTRY:%.*]] ], [ false, [[T]] ]
-; IS__CGSCC_NPM-NEXT: [[RC1:%.*]] = call noundef i1 @ret(i1 noundef [[P]]) #[[ATTR12]]
-; IS__CGSCC_NPM-NEXT: ret i1 [[RC1]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@test_liveness
+; TUNIT-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; TUNIT: t:
+; TUNIT-NEXT: br label [[F]]
+; TUNIT: f:
+; TUNIT-NEXT: [[P:%.*]] = phi i1 [ true, [[ENTRY:%.*]] ], [ false, [[T]] ]
+; TUNIT-NEXT: [[RC1:%.*]] = call i1 @ret(i1 noundef [[P]]) #[[ATTR9]]
+; TUNIT-NEXT: ret i1 [[RC1]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@test_liveness
+; CGSCC-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CGSCC: t:
+; CGSCC-NEXT: br label [[F]]
+; CGSCC: f:
+; CGSCC-NEXT: [[P:%.*]] = phi i1 [ true, [[ENTRY:%.*]] ], [ false, [[T]] ]
+; CGSCC-NEXT: [[RC1:%.*]] = call noundef i1 @ret(i1 noundef [[P]]) #[[ATTR12]]
+; CGSCC-NEXT: ret i1 [[RC1]]
;
entry:
br i1 %c, label %t, label %f
declare void @llvm.memcpy(i8* %dest, i8* %src, i32 %len, i1 %isvolatile)
define internal i8 @memcpy_uses_store(i8 %arg) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@memcpy_uses_store
-; IS__TUNIT_NPM-SAME: (i8 [[ARG:%.*]]) #[[ATTR2]] {
-; IS__TUNIT_NPM-NEXT: [[SRC:%.*]] = alloca i8, align 1
-; IS__TUNIT_NPM-NEXT: [[DST:%.*]] = alloca i8, align 1
-; IS__TUNIT_NPM-NEXT: store i8 [[ARG]], i8* [[SRC]], align 1
-; IS__TUNIT_NPM-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[DST]], i8* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[SRC]], i32 noundef 1, i1 noundef false) #[[ATTR10]]
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* [[DST]], align 1
-; IS__TUNIT_NPM-NEXT: ret i8 [[L]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@memcpy_uses_store
-; IS__CGSCC_NPM-SAME: (i8 [[ARG:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[SRC:%.*]] = alloca i8, align 1
-; IS__CGSCC_NPM-NEXT: [[DST:%.*]] = alloca i8, align 1
-; IS__CGSCC_NPM-NEXT: store i8 [[ARG]], i8* [[SRC]], align 1
-; IS__CGSCC_NPM-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[DST]], i8* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[SRC]], i32 noundef 1, i1 noundef false) #[[ATTR13]]
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i8, i8* [[DST]], align 1
-; IS__CGSCC_NPM-NEXT: ret i8 [[L]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@memcpy_uses_store
+; TUNIT-SAME: (i8 [[ARG:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: [[SRC:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: [[DST:%.*]] = alloca i8, align 1
+; TUNIT-NEXT: store i8 [[ARG]], i8* [[SRC]], align 1
+; TUNIT-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[DST]], i8* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[SRC]], i32 noundef 1, i1 noundef false) #[[ATTR10]]
+; TUNIT-NEXT: [[L:%.*]] = load i8, i8* [[DST]], align 1
+; TUNIT-NEXT: ret i8 [[L]]
+;
+; CGSCC: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@memcpy_uses_store
+; CGSCC-SAME: (i8 [[ARG:%.*]]) #[[ATTR7:[0-9]+]] {
+; CGSCC-NEXT: [[SRC:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: [[DST:%.*]] = alloca i8, align 1
+; CGSCC-NEXT: store i8 [[ARG]], i8* [[SRC]], align 1
+; CGSCC-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[DST]], i8* noalias nocapture nofree noundef nonnull readonly dereferenceable(1) [[SRC]], i32 noundef 1, i1 noundef false) #[[ATTR13]]
+; CGSCC-NEXT: [[L:%.*]] = load i8, i8* [[DST]], align 1
+; CGSCC-NEXT: ret i8 [[L]]
;
%src = alloca i8
%dst = alloca i8
}
define i8 @memcpy_uses_store_caller(i8 %arg) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@memcpy_uses_store_caller
-; IS__TUNIT_NPM-SAME: (i8 [[ARG:%.*]]) #[[ATTR2]] {
-; IS__TUNIT_NPM-NEXT: [[R:%.*]] = call i8 @memcpy_uses_store(i8 [[ARG]]) #[[ATTR12:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret i8 [[R]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@memcpy_uses_store_caller
-; IS__CGSCC_NPM-SAME: (i8 [[ARG:%.*]]) #[[ATTR3]] {
-; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call i8 @memcpy_uses_store(i8 [[ARG]]) #[[ATTR15:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i8 [[R]]
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn
+; TUNIT-LABEL: define {{[^@]+}}@memcpy_uses_store_caller
+; TUNIT-SAME: (i8 [[ARG:%.*]]) #[[ATTR2]] {
+; TUNIT-NEXT: [[R:%.*]] = call i8 @memcpy_uses_store(i8 [[ARG]]) #[[ATTR12:[0-9]+]]
+; TUNIT-NEXT: ret i8 [[R]]
+;
+; CGSCC: Function Attrs: nofree nosync nounwind willreturn
+; CGSCC-LABEL: define {{[^@]+}}@memcpy_uses_store_caller
+; CGSCC-SAME: (i8 [[ARG:%.*]]) #[[ATTR3]] {
+; CGSCC-NEXT: [[R:%.*]] = call i8 @memcpy_uses_store(i8 [[ARG]]) #[[ATTR15:[0-9]+]]
+; CGSCC-NEXT: ret i8 [[R]]
;
%r = call i8 @memcpy_uses_store(i8 %arg)
ret i8 %r
declare i32 @speculatable() speculatable readnone
define i32 @test_speculatable_expr() norecurse {
-; IS__TUNIT_NPM: Function Attrs: norecurse nosync readnone
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_speculatable_expr
-; IS__TUNIT_NPM-SAME: () #[[ATTR6:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: [[STACK:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: [[SPEC_RESULT:%.*]] = call i32 @speculatable()
-; IS__TUNIT_NPM-NEXT: [[PLUS1:%.*]] = add i32 [[SPEC_RESULT]], 1
-; IS__TUNIT_NPM-NEXT: store i32 [[PLUS1]], i32* [[STACK]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[STACK]], align 4
-; IS__TUNIT_NPM-NEXT: [[RSPEC:%.*]] = call i32 @ret_speculatable_expr(i32 [[TMP1]]) #[[ATTR13:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[RSPEC]]
-;
-; IS__CGSCC_NPM: Function Attrs: norecurse nosync readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_speculatable_expr
-; IS__CGSCC_NPM-SAME: () #[[ATTR9:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[STACK:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[SPEC_RESULT:%.*]] = call i32 @speculatable()
-; IS__CGSCC_NPM-NEXT: [[PLUS1:%.*]] = add i32 [[SPEC_RESULT]], 1
-; IS__CGSCC_NPM-NEXT: store i32 [[PLUS1]], i32* [[STACK]], align 4
-; IS__CGSCC_NPM-NEXT: [[RSPEC:%.*]] = call i32 @ret_speculatable_expr(i32 [[PLUS1]])
-; IS__CGSCC_NPM-NEXT: ret i32 [[RSPEC]]
+; TUNIT: Function Attrs: norecurse nosync readnone
+; TUNIT-LABEL: define {{[^@]+}}@test_speculatable_expr
+; TUNIT-SAME: () #[[ATTR6:[0-9]+]] {
+; TUNIT-NEXT: [[STACK:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: [[SPEC_RESULT:%.*]] = call i32 @speculatable()
+; TUNIT-NEXT: [[PLUS1:%.*]] = add i32 [[SPEC_RESULT]], 1
+; TUNIT-NEXT: store i32 [[PLUS1]], i32* [[STACK]], align 4
+; TUNIT-NEXT: [[TMP1:%.*]] = load i32, i32* [[STACK]], align 4
+; TUNIT-NEXT: [[RSPEC:%.*]] = call i32 @ret_speculatable_expr(i32 [[TMP1]]) #[[ATTR13:[0-9]+]]
+; TUNIT-NEXT: ret i32 [[RSPEC]]
+;
+; CGSCC: Function Attrs: norecurse nosync readnone
+; CGSCC-LABEL: define {{[^@]+}}@test_speculatable_expr
+; CGSCC-SAME: () #[[ATTR9:[0-9]+]] {
+; CGSCC-NEXT: [[STACK:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: [[SPEC_RESULT:%.*]] = call i32 @speculatable()
+; CGSCC-NEXT: [[PLUS1:%.*]] = add i32 [[SPEC_RESULT]], 1
+; CGSCC-NEXT: store i32 [[PLUS1]], i32* [[STACK]], align 4
+; CGSCC-NEXT: [[RSPEC:%.*]] = call i32 @ret_speculatable_expr(i32 [[PLUS1]])
+; CGSCC-NEXT: ret i32 [[RSPEC]]
;
%stack = alloca i32
%spec_result = call i32 @speculatable()
}
define internal i32 @ret_speculatable_expr(i32* %mem, i32 %a2) {
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret_speculatable_expr
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: [[MEM_PRIV:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[MEM_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* [[MEM_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: [[MUL:%.*]] = mul i32 [[L]], 13
-; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i32 [[MUL]], 7
-; IS__TUNIT_NPM-NEXT: ret i32 [[ADD]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ret_speculatable_expr
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[MEM_PRIV:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[MEM_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[MEM_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = mul i32 [[L]], 13
-; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i32 [[MUL]], 7
-; IS__CGSCC_NPM-NEXT: ret i32 [[ADD]]
+; TUNIT: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@ret_speculatable_expr
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
+; TUNIT-NEXT: [[MEM_PRIV:%.*]] = alloca i32, align 4
+; TUNIT-NEXT: store i32 [[TMP0]], i32* [[MEM_PRIV]], align 4
+; TUNIT-NEXT: [[L:%.*]] = load i32, i32* [[MEM_PRIV]], align 4
+; TUNIT-NEXT: [[MUL:%.*]] = mul i32 [[L]], 13
+; TUNIT-NEXT: [[ADD:%.*]] = add i32 [[MUL]], 7
+; TUNIT-NEXT: ret i32 [[ADD]]
+;
+; CGSCC: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@ret_speculatable_expr
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] {
+; CGSCC-NEXT: [[MEM_PRIV:%.*]] = alloca i32, align 4
+; CGSCC-NEXT: store i32 [[TMP0]], i32* [[MEM_PRIV]], align 4
+; CGSCC-NEXT: [[L:%.*]] = load i32, i32* [[MEM_PRIV]], align 4
+; CGSCC-NEXT: [[MUL:%.*]] = mul i32 [[L]], 13
+; CGSCC-NEXT: [[ADD:%.*]] = add i32 [[MUL]], 7
+; CGSCC-NEXT: ret i32 [[ADD]]
;
%l = load i32, i32* %mem
%mul = mul i32 %l, %a2
;.
-; IS__TUNIT_NPM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR5:[0-9]+]] = { readnone speculatable }
-; IS__TUNIT_NPM: attributes #[[ATTR6]] = { norecurse nosync readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR8:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR10]] = { willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn writeonly }
-; IS__TUNIT_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR13]] = { nosync nounwind readonly }
+; TUNIT: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR5:[0-9]+]] = { readnone speculatable }
+; TUNIT: attributes #[[ATTR6]] = { norecurse nosync readnone }
+; TUNIT: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; TUNIT: attributes #[[ATTR8:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn }
+; TUNIT: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR10]] = { willreturn }
+; TUNIT: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn writeonly }
+; TUNIT: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR13]] = { nosync nounwind readonly }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR8:[0-9]+]] = { readnone speculatable }
-; IS__CGSCC_NPM: attributes #[[ATTR9]] = { norecurse nosync readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR11:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR12]] = { readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR13]] = { willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR14]] = { nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR15]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR8:[0-9]+]] = { readnone speculatable }
+; CGSCC: attributes #[[ATTR9]] = { norecurse nosync readnone }
+; CGSCC: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; CGSCC: attributes #[[ATTR11:[0-9]+]] = { argmemonly nocallback nofree nounwind willreturn }
+; CGSCC: attributes #[[ATTR12]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR13]] = { willreturn }
+; CGSCC: attributes #[[ATTR14]] = { nounwind willreturn writeonly }
+; CGSCC: attributes #[[ATTR15]] = { nounwind willreturn }
;.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -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 -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
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-i54:64-f80:128-n8:16:32:64-S128"
; FIXME: missing willreturn
define i32 @fib(i32 %0) local_unnamed_addr #0 {
-; 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:[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]]) #[[ATTR26:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2
-; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR26]]
-; IS__TUNIT_NPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP8]]
-; IS__TUNIT_NPM: 9:
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]]
+; TUNIT: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; TUNIT-LABEL: define {{[^@]+}}@fib
+; TUNIT-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
+; TUNIT-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 2
+; TUNIT-NEXT: br i1 [[TMP2]], label [[TMP9:%.*]], label [[TMP3:%.*]]
+; TUNIT: 3:
+; TUNIT-NEXT: [[TMP4:%.*]] = add nsw i32 [[TMP0]], -1
+; TUNIT-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR26:[0-9]+]]
+; TUNIT-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2
+; TUNIT-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR26]]
+; TUNIT-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]]
+; TUNIT-NEXT: ret i32 [[TMP8]]
+; TUNIT: 9:
+; TUNIT-NEXT: ret i32 [[TMP0]]
;
-; 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:[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]]) #[[ATTR19:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR19]]
-; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP8]]
-; IS__CGSCC_NPM: 9:
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]]
+; CGSCC: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CGSCC-LABEL: define {{[^@]+}}@fib
+; CGSCC-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
+; CGSCC-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 2
+; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP9:%.*]], label [[TMP3:%.*]]
+; CGSCC: 3:
+; CGSCC-NEXT: [[TMP4:%.*]] = add nsw i32 [[TMP0]], -1
+; CGSCC-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR19:[0-9]+]]
+; CGSCC-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2
+; CGSCC-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR19]]
+; CGSCC-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]]
+; CGSCC-NEXT: ret i32 [[TMP8]]
+; CGSCC: 9:
+; CGSCC-NEXT: ret i32 [[TMP0]]
;
%2 = icmp slt i32 %0, 2
br i1 %2, label %9, label %3
; }
define i32 @fact_loop(i32 %0) local_unnamed_addr #0 {
-; IS________NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@fact_loop
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
-; IS________NPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1
-; IS________NPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
-; IS________NPM: 3:
-; IS________NPM-NEXT: [[TMP4:%.*]] = phi i32 [ 1, [[TMP1:%.*]] ], [ [[TMP8:%.*]], [[TMP5]] ]
-; IS________NPM-NEXT: ret i32 [[TMP4]]
-; IS________NPM: 5:
-; IS________NPM-NEXT: [[TMP6:%.*]] = phi i32 [ [[TMP9:%.*]], [[TMP5]] ], [ 1, [[TMP1]] ]
-; IS________NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8]], [[TMP5]] ], [ 1, [[TMP1]] ]
-; IS________NPM-NEXT: [[TMP8]] = mul nsw i32 [[TMP6]], [[TMP7]]
-; IS________NPM-NEXT: [[TMP9]] = add nuw nsw i32 [[TMP6]], 1
-; IS________NPM-NEXT: [[TMP10:%.*]] = icmp eq i32 [[TMP6]], [[TMP0]]
-; IS________NPM-NEXT: br i1 [[TMP10]], label [[TMP3]], label [[TMP5]]
+; CHECK: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@fact_loop
+; CHECK-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
+; CHECK-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1
+; CHECK-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
+; CHECK: 3:
+; CHECK-NEXT: [[TMP4:%.*]] = phi i32 [ 1, [[TMP1:%.*]] ], [ [[TMP8:%.*]], [[TMP5]] ]
+; CHECK-NEXT: ret i32 [[TMP4]]
+; CHECK: 5:
+; CHECK-NEXT: [[TMP6:%.*]] = phi i32 [ [[TMP9:%.*]], [[TMP5]] ], [ 1, [[TMP1]] ]
+; CHECK-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8]], [[TMP5]] ], [ 1, [[TMP1]] ]
+; CHECK-NEXT: [[TMP8]] = mul nsw i32 [[TMP6]], [[TMP7]]
+; CHECK-NEXT: [[TMP9]] = add nuw nsw i32 [[TMP6]], 1
+; CHECK-NEXT: [[TMP10:%.*]] = icmp eq i32 [[TMP6]], [[TMP0]]
+; CHECK-NEXT: br i1 [[TMP10]], label [[TMP3]], label [[TMP5]]
;
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
declare void @sink() nounwind willreturn nosync nofree
define void @mutual_recursion1(i1 %c) #0 {
-; IS________NPM: Function Attrs: nofree noinline nosync nounwind uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@mutual_recursion1
-; IS________NPM-SAME: (i1 [[C:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS________NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]]
-; IS________NPM: rec:
-; IS________NPM-NEXT: call void @sink() #[[ATTR12:[0-9]+]]
-; IS________NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR27:[0-9]+]]
-; IS________NPM-NEXT: br label [[END]]
-; IS________NPM: end:
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: nofree noinline nosync nounwind uwtable
+; CHECK-LABEL: define {{[^@]+}}@mutual_recursion1
+; CHECK-SAME: (i1 [[C:%.*]]) #[[ATTR4:[0-9]+]] {
+; CHECK-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]]
+; CHECK: rec:
+; CHECK-NEXT: call void @sink() #[[ATTR12:[0-9]+]]
+; CHECK-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR27:[0-9]+]]
+; CHECK-NEXT: br label [[END]]
+; CHECK: end:
+; CHECK-NEXT: ret void
;
br i1 %c, label %rec, label %end
rec:
define void @mutual_recursion2(i1 %c) #0 {
-; IS________NPM: Function Attrs: nofree noinline nosync nounwind uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@mutual_recursion2
-; IS________NPM-SAME: (i1 [[C:%.*]]) #[[ATTR4]] {
-; IS________NPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR27]]
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: nofree noinline nosync nounwind uwtable
+; CHECK-LABEL: define {{[^@]+}}@mutual_recursion2
+; CHECK-SAME: (i1 [[C:%.*]]) #[[ATTR4]] {
+; CHECK-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR27]]
+; CHECK-NEXT: ret void
;
call void @mutual_recursion1(i1 %c)
ret void
}
define float @call_floor2(float %a) #0 {
-; IS________NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@call_floor2
-; IS________NPM-SAME: (float [[A:%.*]]) #[[ATTR0]] {
-; IS________NPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR28:[0-9]+]]
-; IS________NPM-NEXT: ret float [[C]]
+; CHECK: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@call_floor2
+; CHECK-SAME: (float [[A:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR28:[0-9]+]]
+; CHECK-NEXT: ret float [[C]]
;
%c = tail call float @llvm.floor.f32(float %a)
ret float %c
declare void @maybe_noreturn() #0
define void @call_maybe_noreturn() #0 {
-; IS________NPM: Function Attrs: noinline nounwind uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@call_maybe_noreturn
-; IS________NPM-SAME: () #[[ATTR7]] {
-; IS________NPM-NEXT: tail call void @maybe_noreturn() #[[ATTR29:[0-9]+]]
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: noinline nounwind uwtable
+; CHECK-LABEL: define {{[^@]+}}@call_maybe_noreturn
+; CHECK-SAME: () #[[ATTR7]] {
+; CHECK-NEXT: tail call void @maybe_noreturn() #[[ATTR29:[0-9]+]]
+; CHECK-NEXT: ret void
;
tail call void @maybe_noreturn()
ret void
declare void @will_return() willreturn norecurse
define void @f1() #0 {
-; IS________NPM: Function Attrs: noinline nounwind willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@f1
-; IS________NPM-SAME: () #[[ATTR10:[0-9]+]] {
-; IS________NPM-NEXT: tail call void @will_return() #[[ATTR30:[0-9]+]]
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: noinline nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@f1
+; CHECK-SAME: () #[[ATTR10:[0-9]+]] {
+; CHECK-NEXT: tail call void @will_return() #[[ATTR30:[0-9]+]]
+; CHECK-NEXT: ret void
;
tail call void @will_return()
ret void
declare i1 @maybe_raise_exception() #1 willreturn
define void @invoke_test() personality i32 (...)* @__gxx_personality_v0 {
-; IS________NPM: Function Attrs: nounwind willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@invoke_test
-; IS________NPM-SAME: () #[[ATTR12]] personality i32 (...)* @__gxx_personality_v0 {
-; IS________NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR30]]
-; IS________NPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]]
-; IS________NPM: N:
-; IS________NPM-NEXT: ret void
-; IS________NPM: F:
-; IS________NPM-NEXT: [[VAL:%.*]] = landingpad { i8*, i32 }
-; IS________NPM-NEXT: catch i8* null
-; IS________NPM-NEXT: ret void
+; CHECK: Function Attrs: nounwind willreturn
+; CHECK-LABEL: define {{[^@]+}}@invoke_test
+; CHECK-SAME: () #[[ATTR12]] personality i32 (...)* @__gxx_personality_v0 {
+; CHECK-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR30]]
+; CHECK-NEXT: to label [[N:%.*]] unwind label [[F:%.*]]
+; CHECK: N:
+; CHECK-NEXT: ret void
+; CHECK: F:
+; CHECK-NEXT: [[VAL:%.*]] = landingpad { i8*, i32 }
+; CHECK-NEXT: catch i8* null
+; CHECK-NEXT: ret void
;
invoke i1 @maybe_raise_exception()
to label %N unwind label %F
; }
define i32 @loop_constant_trip_count(i32* nocapture readonly %0) #0 {
-; IS________NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@loop_constant_trip_count
-; IS________NPM-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[TMP0:%.*]]) #[[ATTR13:[0-9]+]] {
-; IS________NPM-NEXT: br label [[TMP3:%.*]]
-; IS________NPM: 2:
-; IS________NPM-NEXT: ret i32 [[TMP8:%.*]]
-; IS________NPM: 3:
-; IS________NPM-NEXT: [[TMP4:%.*]] = phi i64 [ 0, [[TMP1:%.*]] ], [ [[TMP9:%.*]], [[TMP3]] ]
-; IS________NPM-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP1]] ], [ [[TMP8]], [[TMP3]] ]
-; IS________NPM-NEXT: [[TMP6:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 [[TMP4]]
-; IS________NPM-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4
-; IS________NPM-NEXT: [[TMP8]] = add nsw i32 [[TMP7]], [[TMP5]]
-; IS________NPM-NEXT: [[TMP9]] = add nuw nsw i64 [[TMP4]], 1
-; IS________NPM-NEXT: [[TMP10:%.*]] = icmp eq i64 [[TMP9]], 10
-; IS________NPM-NEXT: br i1 [[TMP10]], label [[TMP2:%.*]], label [[TMP3]]
+; CHECK: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@loop_constant_trip_count
+; CHECK-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[TMP0:%.*]]) #[[ATTR13:[0-9]+]] {
+; CHECK-NEXT: br label [[TMP3:%.*]]
+; CHECK: 2:
+; CHECK-NEXT: ret i32 [[TMP8:%.*]]
+; CHECK: 3:
+; CHECK-NEXT: [[TMP4:%.*]] = phi i64 [ 0, [[TMP1:%.*]] ], [ [[TMP9:%.*]], [[TMP3]] ]
+; CHECK-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP1]] ], [ [[TMP8]], [[TMP3]] ]
+; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 [[TMP4]]
+; CHECK-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4
+; CHECK-NEXT: [[TMP8]] = add nsw i32 [[TMP7]], [[TMP5]]
+; CHECK-NEXT: [[TMP9]] = add nuw nsw i64 [[TMP4]], 1
+; CHECK-NEXT: [[TMP10:%.*]] = icmp eq i64 [[TMP9]], 10
+; CHECK-NEXT: br i1 [[TMP10]], label [[TMP2:%.*]], label [[TMP3]]
;
br label %3
; return ans;
; }
define i32 @loop_trip_count_unbound(i32 %0, i32 %1, i32* nocapture readonly %2, i32 %3) local_unnamed_addr #0 {
-; IS________NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@loop_trip_count_unbound
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR14:[0-9]+]] {
-; IS________NPM-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
-; IS________NPM-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]]
-; IS________NPM: 6:
-; IS________NPM-NEXT: [[TMP7:%.*]] = phi i32 [ 0, [[TMP4:%.*]] ], [ [[TMP14:%.*]], [[TMP8]] ]
-; IS________NPM-NEXT: ret i32 [[TMP7]]
-; IS________NPM: 8:
-; IS________NPM-NEXT: [[TMP9:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP8]] ], [ [[TMP0]], [[TMP4]] ]
-; IS________NPM-NEXT: [[TMP10:%.*]] = phi i32 [ [[TMP14]], [[TMP8]] ], [ 0, [[TMP4]] ]
-; IS________NPM-NEXT: [[TMP11:%.*]] = zext i32 [[TMP9]] to i64
-; IS________NPM-NEXT: [[TMP12:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[TMP11]]
-; IS________NPM-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4
-; IS________NPM-NEXT: [[TMP14]] = add nsw i32 [[TMP13]], [[TMP10]]
-; IS________NPM-NEXT: [[TMP15]] = add i32 [[TMP9]], [[TMP3]]
-; IS________NPM-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP15]], [[TMP1]]
-; IS________NPM-NEXT: br i1 [[TMP16]], label [[TMP6]], label [[TMP8]]
+; CHECK: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable
+; CHECK-LABEL: define {{[^@]+}}@loop_trip_count_unbound
+; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR14:[0-9]+]] {
+; CHECK-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
+; CHECK-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]]
+; CHECK: 6:
+; CHECK-NEXT: [[TMP7:%.*]] = phi i32 [ 0, [[TMP4:%.*]] ], [ [[TMP14:%.*]], [[TMP8]] ]
+; CHECK-NEXT: ret i32 [[TMP7]]
+; CHECK: 8:
+; CHECK-NEXT: [[TMP9:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP8]] ], [ [[TMP0]], [[TMP4]] ]
+; CHECK-NEXT: [[TMP10:%.*]] = phi i32 [ [[TMP14]], [[TMP8]] ], [ 0, [[TMP4]] ]
+; CHECK-NEXT: [[TMP11:%.*]] = zext i32 [[TMP9]] to i64
+; CHECK-NEXT: [[TMP12:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[TMP11]]
+; CHECK-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4
+; CHECK-NEXT: [[TMP14]] = add nsw i32 [[TMP13]], [[TMP10]]
+; CHECK-NEXT: [[TMP15]] = add i32 [[TMP9]], [[TMP3]]
+; CHECK-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP15]], [[TMP1]]
+; CHECK-NEXT: br i1 [[TMP16]], label [[TMP6]], label [[TMP8]]
;
%5 = icmp eq i32 %0, %1
br i1 %5, label %6, label %8
define i32 @loop_trip_dec(i32 %0, i32* nocapture readonly %1) local_unnamed_addr #0 {
-; IS________NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@loop_trip_dec
-; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR13]] {
-; IS________NPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], -1
-; IS________NPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP14:%.*]]
-; IS________NPM: 4:
-; IS________NPM-NEXT: [[TMP5:%.*]] = sext i32 [[TMP0]] to i64
-; IS________NPM-NEXT: br label [[TMP6:%.*]]
-; IS________NPM: 6:
-; IS________NPM-NEXT: [[TMP7:%.*]] = phi i64 [ [[TMP5]], [[TMP4]] ], [ [[TMP12:%.*]], [[TMP6]] ]
-; IS________NPM-NEXT: [[TMP8:%.*]] = phi i32 [ 0, [[TMP4]] ], [ [[TMP11:%.*]], [[TMP6]] ]
-; IS________NPM-NEXT: [[TMP9:%.*]] = getelementptr inbounds i32, i32* [[TMP1]], i64 [[TMP7]]
-; IS________NPM-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP9]], align 4
-; IS________NPM-NEXT: [[TMP11]] = add nsw i32 [[TMP10]], [[TMP8]]
-; IS________NPM-NEXT: [[TMP12]] = add nsw i64 [[TMP7]], -1
-; IS________NPM-NEXT: [[TMP13:%.*]] = icmp sgt i64 [[TMP7]], 0
-; IS________NPM-NEXT: br i1 [[TMP13]], label [[TMP6]], label [[TMP14]]
-; IS________NPM: 14:
-; IS________NPM-NEXT: [[TMP15:%.*]] = phi i32 [ 0, [[TMP2:%.*]] ], [ [[TMP11]], [[TMP6]] ]
-; IS________NPM-NEXT: ret i32 [[TMP15]]
+; CHECK: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@loop_trip_dec
+; CHECK-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR13]] {
+; CHECK-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], -1
+; CHECK-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP14:%.*]]
+; CHECK: 4:
+; CHECK-NEXT: [[TMP5:%.*]] = sext i32 [[TMP0]] to i64
+; CHECK-NEXT: br label [[TMP6:%.*]]
+; CHECK: 6:
+; CHECK-NEXT: [[TMP7:%.*]] = phi i64 [ [[TMP5]], [[TMP4]] ], [ [[TMP12:%.*]], [[TMP6]] ]
+; CHECK-NEXT: [[TMP8:%.*]] = phi i32 [ 0, [[TMP4]] ], [ [[TMP11:%.*]], [[TMP6]] ]
+; CHECK-NEXT: [[TMP9:%.*]] = getelementptr inbounds i32, i32* [[TMP1]], i64 [[TMP7]]
+; CHECK-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP9]], align 4
+; CHECK-NEXT: [[TMP11]] = add nsw i32 [[TMP10]], [[TMP8]]
+; CHECK-NEXT: [[TMP12]] = add nsw i64 [[TMP7]], -1
+; CHECK-NEXT: [[TMP13:%.*]] = icmp sgt i64 [[TMP7]], 0
+; CHECK-NEXT: br i1 [[TMP13]], label [[TMP6]], label [[TMP14]]
+; CHECK: 14:
+; CHECK-NEXT: [[TMP15:%.*]] = phi i32 [ 0, [[TMP2:%.*]] ], [ [[TMP11]], [[TMP6]] ]
+; CHECK-NEXT: ret i32 [[TMP15]]
;
%3 = icmp sgt i32 %0, -1
br i1 %3, label %4, label %14
; 15.1 (positive case)
define void @unreachable_exit_positive1() #0 {
-; IS________NPM: Function Attrs: noinline nounwind willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@unreachable_exit_positive1
-; IS________NPM-SAME: () #[[ATTR10]] {
-; IS________NPM-NEXT: tail call void @will_return() #[[ATTR30]]
-; IS________NPM-NEXT: ret void
-; IS________NPM: unreachable_label:
-; IS________NPM-NEXT: unreachable
+; CHECK: Function Attrs: noinline nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@unreachable_exit_positive1
+; CHECK-SAME: () #[[ATTR10]] {
+; CHECK-NEXT: tail call void @will_return() #[[ATTR30]]
+; CHECK-NEXT: ret void
+; CHECK: unreachable_label:
+; CHECK-NEXT: unreachable
;
tail call void @will_return()
ret void
}
define i32 @unreachable_exit_positive2(i32) local_unnamed_addr #0 {
-; IS________NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@unreachable_exit_positive2
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
-; IS________NPM-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1
-; IS________NPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
-; IS________NPM: 3:
-; IS________NPM-NEXT: [[TMP4:%.*]] = phi i32 [ 1, [[TMP1:%.*]] ], [ [[TMP8:%.*]], [[TMP5]] ]
-; IS________NPM-NEXT: ret i32 [[TMP4]]
-; IS________NPM: 5:
-; IS________NPM-NEXT: [[TMP6:%.*]] = phi i32 [ [[TMP9:%.*]], [[TMP5]] ], [ 1, [[TMP1]] ]
-; IS________NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8]], [[TMP5]] ], [ 1, [[TMP1]] ]
-; IS________NPM-NEXT: [[TMP8]] = mul nsw i32 [[TMP6]], [[TMP7]]
-; IS________NPM-NEXT: [[TMP9]] = add nuw nsw i32 [[TMP6]], 1
-; IS________NPM-NEXT: [[TMP10:%.*]] = icmp eq i32 [[TMP6]], [[TMP0]]
-; IS________NPM-NEXT: br i1 [[TMP10]], label [[TMP3]], label [[TMP5]]
-; IS________NPM: unreachable_label:
-; IS________NPM-NEXT: unreachable
+; CHECK: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@unreachable_exit_positive2
+; CHECK-SAME: (i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
+; CHECK-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP0]], 1
+; CHECK-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
+; CHECK: 3:
+; CHECK-NEXT: [[TMP4:%.*]] = phi i32 [ 1, [[TMP1:%.*]] ], [ [[TMP8:%.*]], [[TMP5]] ]
+; CHECK-NEXT: ret i32 [[TMP4]]
+; CHECK: 5:
+; CHECK-NEXT: [[TMP6:%.*]] = phi i32 [ [[TMP9:%.*]], [[TMP5]] ], [ 1, [[TMP1]] ]
+; CHECK-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8]], [[TMP5]] ], [ 1, [[TMP1]] ]
+; CHECK-NEXT: [[TMP8]] = mul nsw i32 [[TMP6]], [[TMP7]]
+; CHECK-NEXT: [[TMP9]] = add nuw nsw i32 [[TMP6]], 1
+; CHECK-NEXT: [[TMP10:%.*]] = icmp eq i32 [[TMP6]], [[TMP0]]
+; CHECK-NEXT: br i1 [[TMP10]], label [[TMP3]], label [[TMP5]]
+; CHECK: unreachable_label:
+; CHECK-NEXT: unreachable
;
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
}
define void @unreachable_exit_negative2() #0 {
-; IS________NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable
-; IS________NPM-LABEL: define {{[^@]+}}@unreachable_exit_negative2
-; IS________NPM-SAME: () #[[ATTR15:[0-9]+]] {
-; IS________NPM-NEXT: br label [[L1:%.*]]
-; IS________NPM: L1:
-; IS________NPM-NEXT: br label [[L2:%.*]]
-; IS________NPM: L2:
-; IS________NPM-NEXT: br label [[L1]]
-; IS________NPM: unreachable_label:
-; IS________NPM-NEXT: unreachable
+; CHECK: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@unreachable_exit_negative2
+; CHECK-SAME: () #[[ATTR15:[0-9]+]] {
+; CHECK-NEXT: br label [[L1:%.*]]
+; CHECK: L1:
+; CHECK-NEXT: br label [[L2:%.*]]
+; CHECK: L2:
+; CHECK-NEXT: br label [[L1]]
+; CHECK: unreachable_label:
+; CHECK-NEXT: unreachable
;
br label %L1
L1:
; }
define i32 @infinite_loop_inside_bounded_loop(i32 %n) {
-; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS________NPM-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop
-; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS________NPM: for.cond:
-; IS________NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[N]], 0
-; IS________NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
-; IS________NPM: for.cond.cleanup:
-; IS________NPM-NEXT: br label [[FOR_END:%.*]]
-; IS________NPM: for.body:
-; IS________NPM-NEXT: br label [[WHILE_COND:%.*]]
-; IS________NPM: while.cond:
-; IS________NPM-NEXT: br label [[WHILE_BODY:%.*]]
-; IS________NPM: while.body:
-; IS________NPM-NEXT: br label [[WHILE_COND]]
-; IS________NPM: for.inc:
-; IS________NPM-NEXT: unreachable
-; IS________NPM: for.end:
-; IS________NPM-NEXT: ret i32 0
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone
+; CHECK-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop
+; CHECK-SAME: (i32 [[N:%.*]]) #[[ATTR17:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[FOR_COND:%.*]]
+; CHECK: for.cond:
+; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[N]], 0
+; CHECK-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; CHECK: for.cond.cleanup:
+; CHECK-NEXT: br label [[FOR_END:%.*]]
+; CHECK: for.body:
+; CHECK-NEXT: br label [[WHILE_COND:%.*]]
+; CHECK: while.cond:
+; CHECK-NEXT: br label [[WHILE_BODY:%.*]]
+; CHECK: while.body:
+; CHECK-NEXT: br label [[WHILE_COND]]
+; CHECK: for.inc:
+; CHECK-NEXT: unreachable
+; CHECK: for.end:
+; CHECK-NEXT: ret i32 0
;
entry:
br label %for.cond
; }
define i32 @bounded_nested_loops(i32 %n) {
-; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS________NPM-LABEL: define {{[^@]+}}@bounded_nested_loops
-; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR18:[0-9]+]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS________NPM: for.cond:
-; IS________NPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC1:%.*]], [[FOR_INC:%.*]] ]
-; IS________NPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY]] ], [ [[TMP:%.*]], [[FOR_INC]] ]
-; IS________NPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[FOR_INC]] ]
-; IS________NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], [[N_ADDR_0]]
-; IS________NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
-; IS________NPM: for.cond.cleanup:
-; IS________NPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[FOR_COND]] ]
-; IS________NPM-NEXT: br label [[FOR_END:%.*]]
-; IS________NPM: for.body:
-; IS________NPM-NEXT: br label [[WHILE_COND:%.*]]
-; IS________NPM: while.cond:
-; IS________NPM-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]]
-; IS________NPM: while.body:
-; IS________NPM-NEXT: unreachable
-; IS________NPM: while.end:
-; IS________NPM-NEXT: [[TMP]] = add i32 [[N_ADDR_0]], [[ANS_0]]
-; IS________NPM-NEXT: br label [[FOR_INC]]
-; IS________NPM: for.inc:
-; IS________NPM-NEXT: [[INC1]] = add nuw nsw i32 [[I_0]], 1
-; IS________NPM-NEXT: br label [[FOR_COND]]
-; IS________NPM: for.end:
-; IS________NPM-NEXT: ret i32 [[ANS_0_LCSSA]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@bounded_nested_loops
+; CHECK-SAME: (i32 [[N:%.*]]) #[[ATTR18:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[FOR_COND:%.*]]
+; CHECK: for.cond:
+; CHECK-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC1:%.*]], [[FOR_INC:%.*]] ]
+; CHECK-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY]] ], [ [[TMP:%.*]], [[FOR_INC]] ]
+; CHECK-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[FOR_INC]] ]
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], [[N_ADDR_0]]
+; CHECK-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; CHECK: for.cond.cleanup:
+; CHECK-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[FOR_COND]] ]
+; CHECK-NEXT: br label [[FOR_END:%.*]]
+; CHECK: for.body:
+; CHECK-NEXT: br label [[WHILE_COND:%.*]]
+; CHECK: while.cond:
+; CHECK-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]]
+; CHECK: while.body:
+; CHECK-NEXT: unreachable
+; CHECK: while.end:
+; CHECK-NEXT: [[TMP]] = add i32 [[N_ADDR_0]], [[ANS_0]]
+; CHECK-NEXT: br label [[FOR_INC]]
+; CHECK: for.inc:
+; CHECK-NEXT: [[INC1]] = add nuw nsw i32 [[I_0]], 1
+; CHECK-NEXT: br label [[FOR_COND]]
+; CHECK: for.end:
+; CHECK-NEXT: ret i32 [[ANS_0_LCSSA]]
;
entry:
br label %for.cond
; }
define i32 @bounded_loop_inside_unbounded_loop(i32 %n) {
-; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS________NPM-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop
-; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: br label [[WHILE_COND:%.*]]
-; IS________NPM: while.cond:
-; IS________NPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP2:%.*]], [[FOR_END:%.*]] ]
-; IS________NPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[INC:%.*]], [[FOR_END]] ]
-; IS________NPM-NEXT: [[TMP:%.*]] = icmp sgt i32 [[N_ADDR_0]], -1
-; IS________NPM-NEXT: [[SMAX:%.*]] = select i1 [[TMP]], i32 [[N_ADDR_0]], i32 -1
-; IS________NPM-NEXT: [[INC]] = add nsw i32 [[N_ADDR_0]], 1
-; IS________NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0
-; IS________NPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]]
-; IS________NPM: while.body:
-; IS________NPM-NEXT: [[TMP1:%.*]] = add i32 [[ANS_0]], 1
-; IS________NPM-NEXT: br label [[FOR_COND:%.*]]
-; IS________NPM: for.cond:
-; IS________NPM-NEXT: br i1 true, label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]]
-; IS________NPM: for.cond.cleanup:
-; IS________NPM-NEXT: [[TMP2]] = add i32 [[TMP1]], [[SMAX]]
-; IS________NPM-NEXT: br label [[FOR_END]]
-; IS________NPM: for.body:
-; IS________NPM-NEXT: unreachable
-; IS________NPM: for.inc:
-; IS________NPM-NEXT: unreachable
-; IS________NPM: for.end:
-; IS________NPM-NEXT: br label [[WHILE_COND]]
-; IS________NPM: while.end:
-; IS________NPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ]
-; IS________NPM-NEXT: ret i32 [[ANS_0_LCSSA]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone
+; CHECK-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop
+; CHECK-SAME: (i32 [[N:%.*]]) #[[ATTR17]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[WHILE_COND:%.*]]
+; CHECK: while.cond:
+; CHECK-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP2:%.*]], [[FOR_END:%.*]] ]
+; CHECK-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ [[INC:%.*]], [[FOR_END]] ]
+; CHECK-NEXT: [[TMP:%.*]] = icmp sgt i32 [[N_ADDR_0]], -1
+; CHECK-NEXT: [[SMAX:%.*]] = select i1 [[TMP]], i32 [[N_ADDR_0]], i32 -1
+; CHECK-NEXT: [[INC]] = add nsw i32 [[N_ADDR_0]], 1
+; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0
+; CHECK-NEXT: br i1 [[TOBOOL]], label [[WHILE_END:%.*]], label [[WHILE_BODY:%.*]]
+; CHECK: while.body:
+; CHECK-NEXT: [[TMP1:%.*]] = add i32 [[ANS_0]], 1
+; CHECK-NEXT: br label [[FOR_COND:%.*]]
+; CHECK: for.cond:
+; CHECK-NEXT: br i1 true, label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]]
+; CHECK: for.cond.cleanup:
+; CHECK-NEXT: [[TMP2]] = add i32 [[TMP1]], [[SMAX]]
+; CHECK-NEXT: br label [[FOR_END]]
+; CHECK: for.body:
+; CHECK-NEXT: unreachable
+; CHECK: for.inc:
+; CHECK-NEXT: unreachable
+; CHECK: for.end:
+; CHECK-NEXT: br label [[WHILE_COND]]
+; CHECK: while.end:
+; CHECK-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ]
+; CHECK-NEXT: ret i32 [[ANS_0_LCSSA]]
;
entry:
br label %while.cond
; }
define i32 @nested_unbounded_loops(i32 %n) {
-; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS________NPM-LABEL: define {{[^@]+}}@nested_unbounded_loops
-; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] {
-; IS________NPM-NEXT: entry:
-; IS________NPM-NEXT: br label [[WHILE_COND:%.*]]
-; IS________NPM: while.cond:
-; IS________NPM-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1:%.*]], [[WHILE_END10:%.*]] ]
-; IS________NPM-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[WHILE_END10]] ]
-; IS________NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0
-; IS________NPM-NEXT: br i1 [[TOBOOL]], label [[WHILE_END11:%.*]], label [[WHILE_BODY:%.*]]
-; IS________NPM: while.body:
-; IS________NPM-NEXT: br label [[WHILE_COND1:%.*]]
-; IS________NPM: while.cond1:
-; IS________NPM-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY4:%.*]]
-; IS________NPM: while.body4:
-; IS________NPM-NEXT: unreachable
-; IS________NPM: while.end:
-; IS________NPM-NEXT: [[TMP:%.*]] = add i32 [[N_ADDR_0]], -2
-; IS________NPM-NEXT: br label [[WHILE_COND5:%.*]]
-; IS________NPM: while.cond5:
-; IS________NPM-NEXT: br i1 true, label [[WHILE_END10]], label [[WHILE_BODY8:%.*]]
-; IS________NPM: while.body8:
-; IS________NPM-NEXT: unreachable
-; IS________NPM: while.end10:
-; IS________NPM-NEXT: [[TMP1]] = add i32 [[TMP]], [[ANS_0]]
-; IS________NPM-NEXT: br label [[WHILE_COND]]
-; IS________NPM: while.end11:
-; IS________NPM-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ]
-; IS________NPM-NEXT: ret i32 [[ANS_0_LCSSA]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone
+; CHECK-LABEL: define {{[^@]+}}@nested_unbounded_loops
+; CHECK-SAME: (i32 [[N:%.*]]) #[[ATTR17]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[WHILE_COND:%.*]]
+; CHECK: while.cond:
+; CHECK-NEXT: [[ANS_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1:%.*]], [[WHILE_END10:%.*]] ]
+; CHECK-NEXT: [[N_ADDR_0:%.*]] = phi i32 [ [[N]], [[ENTRY]] ], [ -1, [[WHILE_END10]] ]
+; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[N_ADDR_0]], 0
+; CHECK-NEXT: br i1 [[TOBOOL]], label [[WHILE_END11:%.*]], label [[WHILE_BODY:%.*]]
+; CHECK: while.body:
+; CHECK-NEXT: br label [[WHILE_COND1:%.*]]
+; CHECK: while.cond1:
+; CHECK-NEXT: br i1 true, label [[WHILE_END:%.*]], label [[WHILE_BODY4:%.*]]
+; CHECK: while.body4:
+; CHECK-NEXT: unreachable
+; CHECK: while.end:
+; CHECK-NEXT: [[TMP:%.*]] = add i32 [[N_ADDR_0]], -2
+; CHECK-NEXT: br label [[WHILE_COND5:%.*]]
+; CHECK: while.cond5:
+; CHECK-NEXT: br i1 true, label [[WHILE_END10]], label [[WHILE_BODY8:%.*]]
+; CHECK: while.body8:
+; CHECK-NEXT: unreachable
+; CHECK: while.end10:
+; CHECK-NEXT: [[TMP1]] = add i32 [[TMP]], [[ANS_0]]
+; CHECK-NEXT: br label [[WHILE_COND]]
+; CHECK: while.end11:
+; CHECK-NEXT: [[ANS_0_LCSSA:%.*]] = phi i32 [ [[ANS_0]], [[WHILE_COND]] ]
+; CHECK-NEXT: ret i32 [[ANS_0_LCSSA]]
;
entry:
br label %while.cond
; }
define void @non_loop_cycle(i32 %n) {
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_loop_cycle
-; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR26]]
-; 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:
-; IS__TUNIT_NPM-NEXT: br label [[ENTRY1:%.*]]
-; 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]]) #[[ATTR26]]
-; 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:
-; IS__TUNIT_NPM-NEXT: br label [[EXIT:%.*]]
-; 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]]) #[[ATTR26]]
-; 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:
-; IS__TUNIT_NPM-NEXT: br label [[EXIT]]
-; IS__TUNIT_NPM: if.else8:
-; IS__TUNIT_NPM-NEXT: br label [[ENTRY1]]
-; IS__TUNIT_NPM: exit:
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: nofree norecurse nosync nounwind readnone
+; TUNIT-LABEL: define {{[^@]+}}@non_loop_cycle
+; TUNIT-SAME: (i32 [[N:%.*]]) #[[ATTR17]] {
+; TUNIT-NEXT: entry:
+; TUNIT-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR26]]
+; TUNIT-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5
+; TUNIT-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; TUNIT: if.then:
+; TUNIT-NEXT: br label [[ENTRY1:%.*]]
+; TUNIT: if.else:
+; TUNIT-NEXT: br label [[ENTRY2:%.*]]
+; TUNIT: entry1:
+; TUNIT-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR26]]
+; TUNIT-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5
+; TUNIT-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]]
+; TUNIT: if.then3:
+; TUNIT-NEXT: br label [[EXIT:%.*]]
+; TUNIT: if.else4:
+; TUNIT-NEXT: br label [[ENTRY2]]
+; TUNIT: entry2:
+; TUNIT-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR26]]
+; TUNIT-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5
+; TUNIT-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]]
+; TUNIT: if.then7:
+; TUNIT-NEXT: br label [[EXIT]]
+; TUNIT: if.else8:
+; TUNIT-NEXT: br label [[ENTRY1]]
+; TUNIT: exit:
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@non_loop_cycle
-; 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
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
-; IS__CGSCC_NPM: if.then:
-; IS__CGSCC_NPM-NEXT: br label [[ENTRY1:%.*]]
-; IS__CGSCC_NPM: if.else:
-; IS__CGSCC_NPM-NEXT: br label [[ENTRY2:%.*]]
-; IS__CGSCC_NPM: entry1:
-; IS__CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]])
-; IS__CGSCC_NPM-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]]
-; IS__CGSCC_NPM: if.then3:
-; IS__CGSCC_NPM-NEXT: br label [[EXIT:%.*]]
-; IS__CGSCC_NPM: if.else4:
-; IS__CGSCC_NPM-NEXT: br label [[ENTRY2]]
-; IS__CGSCC_NPM: entry2:
-; IS__CGSCC_NPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]])
-; IS__CGSCC_NPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5
-; IS__CGSCC_NPM-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]]
-; IS__CGSCC_NPM: if.then7:
-; IS__CGSCC_NPM-NEXT: br label [[EXIT]]
-; IS__CGSCC_NPM: if.else8:
-; IS__CGSCC_NPM-NEXT: br label [[ENTRY1]]
-; IS__CGSCC_NPM: exit:
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: nofree nosync nounwind readnone
+; CGSCC-LABEL: define {{[^@]+}}@non_loop_cycle
+; CGSCC-SAME: (i32 [[N:%.*]]) #[[ATTR19]] {
+; CGSCC-NEXT: entry:
+; CGSCC-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]])
+; CGSCC-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5
+; CGSCC-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
+; CGSCC: if.then:
+; CGSCC-NEXT: br label [[ENTRY1:%.*]]
+; CGSCC: if.else:
+; CGSCC-NEXT: br label [[ENTRY2:%.*]]
+; CGSCC: entry1:
+; CGSCC-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]])
+; CGSCC-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5
+; CGSCC-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]]
+; CGSCC: if.then3:
+; CGSCC-NEXT: br label [[EXIT:%.*]]
+; CGSCC: if.else4:
+; CGSCC-NEXT: br label [[ENTRY2]]
+; CGSCC: entry2:
+; CGSCC-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]])
+; CGSCC-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5
+; CGSCC-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]]
+; CGSCC: if.then7:
+; CGSCC-NEXT: br label [[EXIT]]
+; CGSCC: if.else8:
+; CGSCC-NEXT: br label [[ENTRY1]]
+; CGSCC: exit:
+; CGSCC-NEXT: ret void
;
entry:
%call = call i32 @fact_loop(i32 %n)
declare void @readonly_mustprogress() readonly mustprogress
define void @willreturn_mustprogress_caller_1() mustprogress {
-; IS__TUNIT_NPM: Function Attrs: mustprogress
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_1
-; IS__TUNIT_NPM-SAME: () #[[ATTR21:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: call void @unknown()
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: mustprogress
+; TUNIT-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_1
+; TUNIT-SAME: () #[[ATTR21:[0-9]+]] {
+; TUNIT-NEXT: call void @unknown()
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: mustprogress
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_1
-; IS__CGSCC_NPM-SAME: () #[[ATTR22:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: call void @unknown()
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: mustprogress
+; CGSCC-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_1
+; CGSCC-SAME: () #[[ATTR22:[0-9]+]] {
+; CGSCC-NEXT: call void @unknown()
+; CGSCC-NEXT: ret void
;
call void @unknown()
ret void
}
define void @willreturn_mustprogress_caller_2() mustprogress {
-; IS__TUNIT_NPM: Function Attrs: mustprogress readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2
-; IS__TUNIT_NPM-SAME: () #[[ATTR23:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: call void @readonly() #[[ATTR19:[0-9]+]]
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: mustprogress readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2
+; TUNIT-SAME: () #[[ATTR23:[0-9]+]] {
+; TUNIT-NEXT: call void @readonly() #[[ATTR19:[0-9]+]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: mustprogress readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2
-; IS__CGSCC_NPM-SAME: () #[[ATTR24:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: call void @readonly() #[[ATTR20:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: mustprogress readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2
+; CGSCC-SAME: () #[[ATTR24:[0-9]+]] {
+; CGSCC-NEXT: call void @readonly() #[[ATTR20:[0-9]+]]
+; CGSCC-NEXT: ret void
;
call void @readonly()
ret void
}
define void @willreturn_mustprogress_caller_3() mustprogress {
-; IS__TUNIT_NPM: Function Attrs: mustprogress nosync readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3
-; IS__TUNIT_NPM-SAME: () #[[ATTR24:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: call void @readnone()
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: mustprogress nosync readnone willreturn
+; TUNIT-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3
+; TUNIT-SAME: () #[[ATTR24:[0-9]+]] {
+; TUNIT-NEXT: call void @readnone()
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: mustprogress nosync readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3
-; IS__CGSCC_NPM-SAME: () #[[ATTR25:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: call void @readnone()
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: mustprogress nosync readnone willreturn
+; CGSCC-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3
+; CGSCC-SAME: () #[[ATTR25:[0-9]+]] {
+; CGSCC-NEXT: call void @readnone()
+; CGSCC-NEXT: ret void
;
call void @readnone()
ret void
ret void
}
define void @willreturn_mustprogress_callee_2() {
-; IS__TUNIT_NPM: Function Attrs: readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_2
-; IS__TUNIT_NPM-SAME: () #[[ATTR25:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: call void @readonly_mustprogress() #[[ATTR25]]
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_2
+; TUNIT-SAME: () #[[ATTR25:[0-9]+]] {
+; TUNIT-NEXT: call void @readonly_mustprogress() #[[ATTR25]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_2
-; IS__CGSCC_NPM-SAME: () #[[ATTR26:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: call void @readonly_mustprogress() #[[ATTR26]]
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_2
+; CGSCC-SAME: () #[[ATTR26:[0-9]+]] {
+; CGSCC-NEXT: call void @readonly_mustprogress() #[[ATTR26]]
+; CGSCC-NEXT: ret void
;
call void @readonly_mustprogress()
ret void
ret void
}
define void @willreturn_mustprogress_callee_4() {
-; IS__TUNIT_NPM: Function Attrs: readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_4
-; IS__TUNIT_NPM-SAME: () #[[ATTR25]] {
-; IS__TUNIT_NPM-NEXT: call void @willreturn_mustprogress_callee_2() #[[ATTR25]]
-; IS__TUNIT_NPM-NEXT: ret void
+; TUNIT: Function Attrs: readonly willreturn
+; TUNIT-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_4
+; TUNIT-SAME: () #[[ATTR25]] {
+; TUNIT-NEXT: call void @willreturn_mustprogress_callee_2() #[[ATTR25]]
+; TUNIT-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_4
-; IS__CGSCC_NPM-SAME: () #[[ATTR26]] {
-; IS__CGSCC_NPM-NEXT: call void @willreturn_mustprogress_callee_2() #[[ATTR26]]
-; IS__CGSCC_NPM-NEXT: ret void
+; CGSCC: Function Attrs: readonly willreturn
+; CGSCC-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_4
+; CGSCC-SAME: () #[[ATTR26]] {
+; CGSCC-NEXT: call void @willreturn_mustprogress_callee_2() #[[ATTR26]]
+; CGSCC-NEXT: ret void
;
call void @willreturn_mustprogress_callee_2()
ret void
attributes #0 = { nounwind uwtable noinline }
attributes #1 = { uwtable noinline }
;.
-; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree noinline nosync nounwind uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR5]] = { noreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR6]] = { noinline noreturn nounwind uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR7]] = { noinline nounwind uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR8:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR9:[0-9]+]] = { norecurse willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR10]] = { noinline nounwind willreturn uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR11:[0-9]+]] = { noinline willreturn uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR12]] = { nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR13]] = { argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR14]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR15]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR16:[0-9]+]] = { noreturn nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR17]] = { nofree norecurse nosync nounwind readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR18]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR19]] = { readonly }
-; IS__TUNIT_NPM: attributes #[[ATTR20:[0-9]+]] = { readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR21]] = { mustprogress }
-; IS__TUNIT_NPM: attributes #[[ATTR22:[0-9]+]] = { mustprogress readonly }
-; IS__TUNIT_NPM: attributes #[[ATTR23]] = { mustprogress readonly willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR24]] = { mustprogress nosync readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR25]] = { readonly willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR26]] = { nofree nosync nounwind readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR27]] = { nofree nosync nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR28]] = { readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR29]] = { nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR30]] = { willreturn }
+; TUNIT: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; TUNIT: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable }
+; TUNIT: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable }
+; TUNIT: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR4]] = { nofree noinline nosync nounwind uwtable }
+; TUNIT: attributes #[[ATTR5]] = { noreturn }
+; TUNIT: attributes #[[ATTR6]] = { noinline noreturn nounwind uwtable }
+; TUNIT: attributes #[[ATTR7]] = { noinline nounwind uwtable }
+; TUNIT: attributes #[[ATTR8:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; TUNIT: attributes #[[ATTR9:[0-9]+]] = { norecurse willreturn }
+; TUNIT: attributes #[[ATTR10]] = { noinline nounwind willreturn uwtable }
+; TUNIT: attributes #[[ATTR11:[0-9]+]] = { noinline willreturn uwtable }
+; TUNIT: attributes #[[ATTR12]] = { nounwind willreturn }
+; TUNIT: attributes #[[ATTR13]] = { argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable }
+; TUNIT: attributes #[[ATTR14]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable }
+; TUNIT: attributes #[[ATTR15]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable }
+; TUNIT: attributes #[[ATTR16:[0-9]+]] = { noreturn nounwind }
+; TUNIT: attributes #[[ATTR17]] = { nofree norecurse nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR18]] = { nofree norecurse nosync nounwind readnone willreturn }
+; TUNIT: attributes #[[ATTR19]] = { readonly }
+; TUNIT: attributes #[[ATTR20:[0-9]+]] = { readnone }
+; TUNIT: attributes #[[ATTR21]] = { mustprogress }
+; TUNIT: attributes #[[ATTR22:[0-9]+]] = { mustprogress readonly }
+; TUNIT: attributes #[[ATTR23]] = { mustprogress readonly willreturn }
+; TUNIT: attributes #[[ATTR24]] = { mustprogress nosync readnone willreturn }
+; TUNIT: attributes #[[ATTR25]] = { readonly willreturn }
+; TUNIT: attributes #[[ATTR26]] = { nofree nosync nounwind readnone }
+; TUNIT: attributes #[[ATTR27]] = { nofree nosync nounwind }
+; TUNIT: attributes #[[ATTR28]] = { readnone willreturn }
+; TUNIT: attributes #[[ATTR29]] = { nounwind }
+; TUNIT: attributes #[[ATTR30]] = { willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; 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]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR9:[0-9]+]] = { norecurse willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR10]] = { noinline nounwind willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR11:[0-9]+]] = { noinline willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR13]] = { argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR14]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR15]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR16:[0-9]+]] = { noreturn nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR17]] = { nofree norecurse nosync nounwind readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR18]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR19]] = { nofree nosync nounwind readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR20]] = { readonly }
-; IS__CGSCC_NPM: attributes #[[ATTR21:[0-9]+]] = { readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR22]] = { mustprogress }
-; IS__CGSCC_NPM: attributes #[[ATTR23:[0-9]+]] = { mustprogress readonly }
-; IS__CGSCC_NPM: attributes #[[ATTR24]] = { mustprogress readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR25]] = { mustprogress nosync readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR26]] = { readonly willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR27]] = { nofree nosync nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR28]] = { readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR29]] = { nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR30]] = { willreturn }
+; CGSCC: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
+; CGSCC: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable }
+; CGSCC: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable }
+; CGSCC: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind willreturn }
+; CGSCC: attributes #[[ATTR4]] = { nofree noinline nosync nounwind uwtable }
+; CGSCC: attributes #[[ATTR5]] = { noreturn }
+; CGSCC: attributes #[[ATTR6]] = { noinline noreturn nounwind uwtable }
+; CGSCC: attributes #[[ATTR7]] = { noinline nounwind uwtable }
+; CGSCC: attributes #[[ATTR8:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; CGSCC: attributes #[[ATTR9:[0-9]+]] = { norecurse willreturn }
+; CGSCC: attributes #[[ATTR10]] = { noinline nounwind willreturn uwtable }
+; CGSCC: attributes #[[ATTR11:[0-9]+]] = { noinline willreturn uwtable }
+; CGSCC: attributes #[[ATTR12]] = { nounwind willreturn }
+; CGSCC: attributes #[[ATTR13]] = { argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable }
+; CGSCC: attributes #[[ATTR14]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable }
+; CGSCC: attributes #[[ATTR15]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable }
+; CGSCC: attributes #[[ATTR16:[0-9]+]] = { noreturn nounwind }
+; CGSCC: attributes #[[ATTR17]] = { nofree norecurse nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR18]] = { nofree norecurse nosync nounwind readnone willreturn }
+; CGSCC: attributes #[[ATTR19]] = { nofree nosync nounwind readnone }
+; CGSCC: attributes #[[ATTR20]] = { readonly }
+; CGSCC: attributes #[[ATTR21:[0-9]+]] = { readnone }
+; CGSCC: attributes #[[ATTR22]] = { mustprogress }
+; CGSCC: attributes #[[ATTR23:[0-9]+]] = { mustprogress readonly }
+; CGSCC: attributes #[[ATTR24]] = { mustprogress readonly willreturn }
+; CGSCC: attributes #[[ATTR25]] = { mustprogress nosync readnone willreturn }
+; CGSCC: attributes #[[ATTR26]] = { readonly willreturn }
+; CGSCC: attributes #[[ATTR27]] = { nofree nosync nounwind }
+; CGSCC: attributes #[[ATTR28]] = { readnone willreturn }
+; CGSCC: attributes #[[ATTR29]] = { nounwind }
+; CGSCC: attributes #[[ATTR30]] = { willreturn }
;.