diff --git a/llvm/test/Analysis/GlobalsModRef/indirect-global.ll b/llvm/test/Analysis/GlobalsModRef/indirect-global.ll --- a/llvm/test/Analysis/GlobalsModRef/indirect-global.ll +++ b/llvm/test/Analysis/GlobalsModRef/indirect-global.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -basic-aa -globals-aa -gvn -instcombine -S -enable-unsafe-globalsmodref-alias-results | FileCheck %s -; RUN: opt < %s -aa-pipeline=basic-aa,globals-aa -passes="require,function(gvn,instcombine)" -S -enable-unsafe-globalsmodref-alias-results | FileCheck %s +; RUN: opt < %s -inferattrs -basic-aa -globals-aa -gvn -instcombine -S -enable-unsafe-globalsmodref-alias-results | FileCheck %s +; RUN: opt < %s -aa-pipeline=basic-aa,globals-aa -passes="inferattrs,require,function(gvn,instcombine)" -S -enable-unsafe-globalsmodref-alias-results | FileCheck %s ; ; Note that this test relies on an unsafe feature of GlobalsModRef. While this ; test is correct and safe, GMR's technique for handling this isn't generally. diff --git a/llvm/test/Instrumentation/BoundsChecking/simple.ll b/llvm/test/Instrumentation/BoundsChecking/simple.ll --- a/llvm/test/Instrumentation/BoundsChecking/simple.ll +++ b/llvm/test/Instrumentation/BoundsChecking/simple.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -passes=bounds-checking -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,bounds-checking -S | FileCheck %s target datalayout = "e-p:64:64:64-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" @.str = private constant [8 x i8] c"abcdefg\00" ; <[8 x i8]*> diff --git a/llvm/test/Transforms/Attributor/lowerheap.ll b/llvm/test/Transforms/Attributor/lowerheap.ll --- a/llvm/test/Transforms/Attributor/lowerheap.ll +++ b/llvm/test/Transforms/Attributor/lowerheap.ll @@ -1,8 +1,8 @@ ; 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 -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM -; RUN: opt -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=inferattrs,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 -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM -; RUN: opt -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=inferattrs,attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM declare i64 @subfn(i8*) #0 @@ -19,11 +19,12 @@ ; IS________OPM-NEXT: call void @free(i8* [[MEM]]) ; IS________OPM-NEXT: ret i64 [[RES]] ; +; IS________NPM: Function Attrs: nounwind willreturn ; IS________NPM-LABEL: define {{[^@]+}}@f -; IS________NPM-SAME: (i64 [[LEN:%.*]]) { +; IS________NPM-SAME: (i64 noundef [[LEN:%.*]]) #[[ATTR4:[0-9]+]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: [[TMP0:%.*]] = alloca i8, i64 [[LEN]], align 1 -; IS________NPM-NEXT: [[RES:%.*]] = call i64 @subfn(i8* [[TMP0]]) #[[ATTR2:[0-9]+]] +; IS________NPM-NEXT: [[RES:%.*]] = call i64 @subfn(i8* noundef [[TMP0]]) #[[ATTR4]] ; IS________NPM-NEXT: ret i64 [[RES]] ; entry: @@ -43,13 +44,14 @@ ; IS________OPM-NEXT: call void @free(i8* [[MEM]]) ; IS________OPM-NEXT: ret i64 [[RES]] ; +; IS________NPM: Function Attrs: nounwind willreturn ; IS________NPM-LABEL: define {{[^@]+}}@g -; IS________NPM-SAME: (i64 [[LEN:%.*]]) { +; IS________NPM-SAME: (i64 noundef [[LEN:%.*]]) #[[ATTR4]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: [[TMP0:%.*]] = mul i64 [[LEN]], 8 ; IS________NPM-NEXT: [[TMP1:%.*]] = alloca i8, i64 [[TMP0]], align 1 ; IS________NPM-NEXT: call void @llvm.memset.p0i8.i64(i8* [[TMP1]], i8 0, i64 [[TMP0]], i1 false) -; IS________NPM-NEXT: [[RES:%.*]] = call i64 @subfn(i8* [[TMP1]]) #[[ATTR2]] +; IS________NPM-NEXT: [[RES:%.*]] = call i64 @subfn(i8* noundef [[TMP1]]) #[[ATTR4]] ; IS________NPM-NEXT: ret i64 [[RES]] ; entry: @@ -64,7 +66,10 @@ ; IS________OPM: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn } ; IS________OPM: attributes #[[ATTR1]] = { nounwind } ;. -; IS________NPM: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn } -; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } -; IS________NPM: attributes #[[ATTR2]] = { nounwind } +; IS________NPM: attributes #[[ATTR0:[0-9]+]] = { mustprogress nounwind willreturn } +; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { inaccessiblememonly mustprogress nofree nounwind willreturn allocsize(0) "alloc-family"="malloc" } +; IS________NPM: attributes #[[ATTR2:[0-9]+]] = { inaccessiblememonly mustprogress nofree nounwind willreturn allocsize(0,1) "alloc-family"="malloc" } +; IS________NPM: attributes #[[ATTR3:[0-9]+]] = { inaccessiblemem_or_argmemonly mustprogress nounwind willreturn "alloc-family"="malloc" } +; IS________NPM: attributes #[[ATTR4]] = { nounwind willreturn } +; IS________NPM: attributes #[[ATTR5:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } ;. diff --git a/llvm/test/Transforms/Coroutines/coro-split-00.ll b/llvm/test/Transforms/Coroutines/coro-split-00.ll --- a/llvm/test/Transforms/Coroutines/coro-split-00.ll +++ b/llvm/test/Transforms/Coroutines/coro-split-00.ll @@ -1,5 +1,5 @@ ; Tests that coro-split pass splits the coroutine into f, f.resume and f.destroy -; RUN: opt < %s -passes='cgscc(coro-split),simplifycfg,early-cse' -S | FileCheck %s +; RUN: opt < %s -passes='inferattrs,cgscc(coro-split),simplifycfg,early-cse' -S | FileCheck %s define i8* @f() "coroutine.presplit"="1" { entry: diff --git a/llvm/test/Transforms/Coroutines/coro-split-hidden.ll b/llvm/test/Transforms/Coroutines/coro-split-hidden.ll --- a/llvm/test/Transforms/Coroutines/coro-split-hidden.ll +++ b/llvm/test/Transforms/Coroutines/coro-split-hidden.ll @@ -1,7 +1,7 @@ ; Tests that coro-split can convert functions with hidden visibility. ; These may be generated by a frontend such as Clang, when inlining with ; '-fvisibility-inlines-hidden'. -; RUN: opt < %s -passes='cgscc(coro-split),simplifycfg,early-cse' -S | FileCheck %s +; RUN: opt < %s -passes='inferattrs,cgscc(coro-split),simplifycfg,early-cse' -S | FileCheck %s define hidden i8* @f() "coroutine.presplit"="1" { entry: diff --git a/llvm/test/Transforms/Coroutines/no-suspend.ll b/llvm/test/Transforms/Coroutines/no-suspend.ll --- a/llvm/test/Transforms/Coroutines/no-suspend.ll +++ b/llvm/test/Transforms/Coroutines/no-suspend.ll @@ -1,5 +1,5 @@ ; Test no suspend coroutines -; RUN: opt < %s -passes='cgscc(coro-split),simplifycfg,early-cse,simplifycfg' -S | FileCheck %s +; RUN: opt < %s -passes='inferattrs,cgscc(coro-split),simplifycfg,early-cse,simplifycfg' -S | FileCheck %s ; Coroutine with no-suspends will turn into: ; diff --git a/llvm/test/Transforms/DeadStoreElimination/2016-07-17-UseAfterFree.ll b/llvm/test/Transforms/DeadStoreElimination/2016-07-17-UseAfterFree.ll --- a/llvm/test/Transforms/DeadStoreElimination/2016-07-17-UseAfterFree.ll +++ b/llvm/test/Transforms/DeadStoreElimination/2016-07-17-UseAfterFree.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basic-aa -dse -S -enable-dse-partial-overwrite-tracking | FileCheck %s +; RUN: opt -inferattrs < %s -basic-aa -dse -S -enable-dse-partial-overwrite-tracking | FileCheck %s ; PR28588 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/DeadStoreElimination/calloc-store.ll b/llvm/test/Transforms/DeadStoreElimination/calloc-store.ll --- a/llvm/test/Transforms/DeadStoreElimination/calloc-store.ll +++ b/llvm/test/Transforms/DeadStoreElimination/calloc-store.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basic-aa -dse -S | FileCheck %s +; RUN: opt < %s -inferattrs -basic-aa -dse -S | FileCheck %s declare noalias i8* @calloc(i64, i64) inaccessiblememonly diff --git a/llvm/test/Transforms/DeadStoreElimination/free.ll b/llvm/test/Transforms/DeadStoreElimination/free.ll --- a/llvm/test/Transforms/DeadStoreElimination/free.ll +++ b/llvm/test/Transforms/DeadStoreElimination/free.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -basic-aa -dse -S | FileCheck %s +; RUN: opt < %s -inferattrs -basic-aa -dse -S | FileCheck %s target datalayout = "e-p:64:64:64" diff --git a/llvm/test/Transforms/DeadStoreElimination/multiblock-malloc-free.ll b/llvm/test/Transforms/DeadStoreElimination/multiblock-malloc-free.ll --- a/llvm/test/Transforms/DeadStoreElimination/multiblock-malloc-free.ll +++ b/llvm/test/Transforms/DeadStoreElimination/multiblock-malloc-free.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -basic-aa -dse -S | FileCheck %s +; RUN: opt < %s -inferattrs -basic-aa -dse -S | FileCheck %s target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" declare void @unknown_func() diff --git a/llvm/test/Transforms/DeadStoreElimination/operand-bundles.ll b/llvm/test/Transforms/DeadStoreElimination/operand-bundles.ll --- a/llvm/test/Transforms/DeadStoreElimination/operand-bundles.ll +++ b/llvm/test/Transforms/DeadStoreElimination/operand-bundles.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basic-aa -dse -S | FileCheck %s +; RUN: opt < %s -inferattrs -basic-aa -dse -S | FileCheck %s declare noalias i8* @malloc(i64) "malloc-like" diff --git a/llvm/test/Transforms/DeadStoreElimination/simple.ll b/llvm/test/Transforms/DeadStoreElimination/simple.ll --- a/llvm/test/Transforms/DeadStoreElimination/simple.ll +++ b/llvm/test/Transforms/DeadStoreElimination/simple.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -basic-aa -dse -S | FileCheck %s -; RUN: opt < %s -aa-pipeline=basic-aa -passes=dse -S | FileCheck %s +; RUN: opt < %s -inferattrs -basic-aa -dse -S | FileCheck %s +; RUN: opt < %s -aa-pipeline=basic-aa -passes=inferattrs,dse -S | FileCheck %s 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" declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) nounwind diff --git a/llvm/test/Transforms/GVN/calloc-load-removal.ll b/llvm/test/Transforms/GVN/calloc-load-removal.ll --- a/llvm/test/Transforms/GVN/calloc-load-removal.ll +++ b/llvm/test/Transforms/GVN/calloc-load-removal.ll @@ -1,5 +1,5 @@ -; RUN: opt -S -basic-aa -gvn < %s | FileCheck %s -; RUN: opt -S -basic-aa -gvn -disable-simplify-libcalls < %s | FileCheck %s -check-prefix=CHECK_NO_LIBCALLS +; RUN: opt -S -inferattrs -basic-aa -gvn < %s | FileCheck %s +; RUN: opt -S -inferattrs -basic-aa -gvn -disable-simplify-libcalls < %s | FileCheck %s -check-prefix=CHECK_NO_LIBCALLS ; Check that loads from calloc are recognized as being zero. target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/GVN/malloc-load-removal.ll b/llvm/test/Transforms/GVN/malloc-load-removal.ll --- a/llvm/test/Transforms/GVN/malloc-load-removal.ll +++ b/llvm/test/Transforms/GVN/malloc-load-removal.ll @@ -1,5 +1,5 @@ -; RUN: opt -S -basic-aa -gvn < %s | FileCheck %s -; RUN: opt -S -basic-aa -gvn -disable-simplify-libcalls < %s | FileCheck %s -check-prefix=CHECK_NO_LIBCALLS +; RUN: opt -S -inferattrs -basic-aa -gvn < %s | FileCheck %s +; RUN: opt -S -inferattrs -basic-aa -gvn -disable-simplify-libcalls < %s | FileCheck %s -check-prefix=CHECK_NO_LIBCALLS ; PR13694 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/GVN/nonescaping-malloc.ll b/llvm/test/Transforms/GVN/nonescaping-malloc.ll --- a/llvm/test/Transforms/GVN/nonescaping-malloc.ll +++ b/llvm/test/Transforms/GVN/nonescaping-malloc.ll @@ -1,5 +1,5 @@ ; REQUIRES: asserts -; RUN: opt < %s -basic-aa -gvn -stats -disable-output 2>&1 | FileCheck %s +; RUN: opt < %s -inferattrs -basic-aa -gvn -stats -disable-output 2>&1 | FileCheck %s ; rdar://7363102 ; CHECK: Number of loads deleted diff --git a/llvm/test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll b/llvm/test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll --- a/llvm/test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll +++ b/llvm/test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -passes=globalopt -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,globalopt -S | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" target triple = "x86_64-apple-darwin10.0" diff --git a/llvm/test/Transforms/GlobalOpt/2021-08-03-StoreOnceLoadMultiCasts.ll b/llvm/test/Transforms/GlobalOpt/2021-08-03-StoreOnceLoadMultiCasts.ll --- a/llvm/test/Transforms/GlobalOpt/2021-08-03-StoreOnceLoadMultiCasts.ll +++ b/llvm/test/Transforms/GlobalOpt/2021-08-03-StoreOnceLoadMultiCasts.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -passes=globalopt -S < %s | FileCheck %s -; RUN: opt -passes=globalopt -S < %s | FileCheck %s +; RUN: opt -passes=inferattrs,globalopt -S < %s | FileCheck %s +; RUN: opt -passes=inferattrs,globalopt -S < %s | FileCheck %s @g = internal global i32* null, align 8 diff --git a/llvm/test/Transforms/GlobalOpt/calloc-promote.ll b/llvm/test/Transforms/GlobalOpt/calloc-promote.ll --- a/llvm/test/Transforms/GlobalOpt/calloc-promote.ll +++ b/llvm/test/Transforms/GlobalOpt/calloc-promote.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -passes=globalopt -S < %s | FileCheck %s +; RUN: opt -passes=inferattrs,globalopt -S < %s | FileCheck %s @g = internal global i32* null, align 8 diff --git a/llvm/test/Transforms/GlobalOpt/malloc-promote-1.ll b/llvm/test/Transforms/GlobalOpt/malloc-promote-1.ll --- a/llvm/test/Transforms/GlobalOpt/malloc-promote-1.ll +++ b/llvm/test/Transforms/GlobalOpt/malloc-promote-1.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -passes=globalopt -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,globalopt -S | FileCheck %s 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" @G = internal global i32* null ; [#uses=4] diff --git a/llvm/test/Transforms/GlobalOpt/malloc-promote-2.ll b/llvm/test/Transforms/GlobalOpt/malloc-promote-2.ll --- a/llvm/test/Transforms/GlobalOpt/malloc-promote-2.ll +++ b/llvm/test/Transforms/GlobalOpt/malloc-promote-2.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -passes=globalopt -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,globalopt -S | FileCheck %s 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" @G = internal global i32* null diff --git a/llvm/test/Transforms/GlobalOpt/malloc-promote-4.ll b/llvm/test/Transforms/GlobalOpt/malloc-promote-4.ll --- a/llvm/test/Transforms/GlobalOpt/malloc-promote-4.ll +++ b/llvm/test/Transforms/GlobalOpt/malloc-promote-4.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -passes=globalopt -o - < %s | FileCheck %s +; RUN: opt -S -passes=inferattrs,globalopt -o - < %s | FileCheck %s ; CHECK: [[G_INIT:@.*]] = internal unnamed_addr global i1 false @g = internal global i32* null, align 8 diff --git a/llvm/test/Transforms/GlobalOpt/malloc-promote-5.ll b/llvm/test/Transforms/GlobalOpt/malloc-promote-5.ll --- a/llvm/test/Transforms/GlobalOpt/malloc-promote-5.ll +++ b/llvm/test/Transforms/GlobalOpt/malloc-promote-5.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -passes=globalopt -S < %s | FileCheck %s -; RUN: opt -passes=globalopt -S < %s | FileCheck %s +; RUN: opt -passes=inferattrs,globalopt -S < %s | FileCheck %s +; RUN: opt -passes=inferattrs,globalopt -S < %s | FileCheck %s @g = internal global i32* null, align 8 diff --git a/llvm/test/Transforms/GlobalOpt/malloc-promote-opaque-ptr.ll b/llvm/test/Transforms/GlobalOpt/malloc-promote-opaque-ptr.ll --- a/llvm/test/Transforms/GlobalOpt/malloc-promote-opaque-ptr.ll +++ b/llvm/test/Transforms/GlobalOpt/malloc-promote-opaque-ptr.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals -; RUN: opt -S -globalopt -opaque-pointers < %s | FileCheck %s +; RUN: opt -S -inferattrs -globalopt -opaque-pointers < %s | FileCheck %s @g1 = internal global ptr null @g2 = internal global ptr null diff --git a/llvm/test/Transforms/GlobalOpt/null-check-is-use-pr35760.ll b/llvm/test/Transforms/GlobalOpt/null-check-is-use-pr35760.ll --- a/llvm/test/Transforms/GlobalOpt/null-check-is-use-pr35760.ll +++ b/llvm/test/Transforms/GlobalOpt/null-check-is-use-pr35760.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -passes=globalopt -o - < %s | FileCheck %s +; RUN: opt -S -passes=inferattrs,globalopt -o - < %s | FileCheck %s target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Transforms/InstCombine/alloc-realloc-free.ll b/llvm/test/Transforms/InstCombine/alloc-realloc-free.ll --- a/llvm/test/Transforms/InstCombine/alloc-realloc-free.ll +++ b/llvm/test/Transforms/InstCombine/alloc-realloc-free.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --scrub-attributes -; RUN: opt -S -passes=instcombine < %s | FileCheck %s +; RUN: opt -S -passes=inferattrs,instcombine < %s | FileCheck %s define dso_local void @test() local_unnamed_addr #0 { ; CHECK-LABEL: @test( diff --git a/llvm/test/Transforms/InstCombine/badmalloc.ll b/llvm/test/Transforms/InstCombine/badmalloc.ll --- a/llvm/test/Transforms/InstCombine/badmalloc.ll +++ b/llvm/test/Transforms/InstCombine/badmalloc.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -passes=instcombine -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,instcombine -S | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" target triple = "x86_64-apple-darwin10.0" diff --git a/llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll b/llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll --- a/llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll +++ b/llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes=instcombine -S < %s | FileCheck %s +; RUN: opt -passes=inferattrs,instcombine -S < %s | FileCheck %s target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128-p7:32:32" target triple = "x86_64-apple-macosx10.14.0" diff --git a/llvm/test/Transforms/InstCombine/compare-unescaped.ll b/llvm/test/Transforms/InstCombine/compare-unescaped.ll --- a/llvm/test/Transforms/InstCombine/compare-unescaped.ll +++ b/llvm/test/Transforms/InstCombine/compare-unescaped.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -passes=instcombine -S < %s | FileCheck %s +; RUN: opt -passes=inferattrs,instcombine -S < %s | FileCheck %s @gp = global i32* null, align 8 diff --git a/llvm/test/Transforms/InstCombine/deref-alloc-fns.ll b/llvm/test/Transforms/InstCombine/deref-alloc-fns.ll --- a/llvm/test/Transforms/InstCombine/deref-alloc-fns.ll +++ b/llvm/test/Transforms/InstCombine/deref-alloc-fns.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -passes=instcombine -S < %s | FileCheck %s -; RUN: opt -mtriple=x86_64-unknown-linux-gnu < %s -passes=instcombine -S | FileCheck %s --check-prefixes=CHECK,GNU +; RUN: opt -passes=inferattrs,instcombine -S < %s | FileCheck %s +; RUN: opt -mtriple=x86_64-unknown-linux-gnu < %s -passes=inferattrs,instcombine -S | FileCheck %s --check-prefixes=CHECK,GNU declare noalias i8* @malloc(i64) diff --git a/llvm/test/Transforms/InstCombine/getelementptr.ll b/llvm/test/Transforms/InstCombine/getelementptr.ll --- a/llvm/test/Transforms/InstCombine/getelementptr.ll +++ b/llvm/test/Transforms/InstCombine/getelementptr.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -passes=instcombine -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,instcombine -S | FileCheck %s target datalayout = "e-p:64:64-p1:16:16-p2:32:32:32-p3:64:64:64" @@ -552,7 +552,7 @@ ; CHECK-NEXT: [[T349:%.*]] = getelementptr [[STRUCT_SIGINFO_T:%.*]], %struct.siginfo_t* [[T344]], i64 0, i32 3, i32 0, i32 3, i32 0 ; CHECK-NEXT: [[T349350:%.*]] = bitcast i8** [[T349]] to i32* ; CHECK-NEXT: [[T351:%.*]] = load i32, i32* [[T349350]], align 8 -; CHECK-NEXT: [[T360:%.*]] = call i32 asm sideeffect "...", "=r,ir,*m,i,0,~{dirflag},~{fpsr},~{flags}"(i32 [[T351]], %struct.__large_struct* elementtype(%struct.__large_struct) null, i32 -14, i32 0) #[[ATTR0:[0-9]+]] +; CHECK-NEXT: [[T360:%.*]] = call i32 asm sideeffect "...", "=r,ir,*m,i,0,~{dirflag},~{fpsr},~{flags}"(i32 [[T351]], %struct.__large_struct* elementtype([[STRUCT___LARGE_STRUCT:%.*]]) null, i32 -14, i32 0) #[[ATTR0:[0-9]+]] ; CHECK-NEXT: unreachable ; entry: @@ -579,14 +579,14 @@ ; CHECK-LABEL: @test28( ; CHECK-NEXT: entry: ; CHECK-NEXT: [[ORIENTATIONS:%.*]] = alloca [1 x [1 x %struct.x]], align 8 -; CHECK-NEXT: [[T3:%.*]] = call i32 @puts(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)) #[[ATTR0]] +; CHECK-NEXT: [[T3:%.*]] = call i32 @puts(i8* nonnull dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)) #[[ATTR0]] ; CHECK-NEXT: br label [[BB10:%.*]] ; CHECK: bb10: ; CHECK-NEXT: [[INDVAR:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INDVAR_NEXT:%.*]], [[BB10]] ] ; CHECK-NEXT: [[T12_REC:%.*]] = xor i32 [[INDVAR]], -1 ; CHECK-NEXT: [[TMP0:%.*]] = sext i32 [[T12_REC]] to i64 ; CHECK-NEXT: [[T12:%.*]] = getelementptr inbounds [1 x [1 x %struct.x]], [1 x [1 x %struct.x]]* [[ORIENTATIONS]], i64 1, i64 0, i64 [[TMP0]] -; CHECK-NEXT: [[T16:%.*]] = call i32 (i8*, ...) @printf(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str1, i64 0, i64 0), %struct.x* nonnull [[T12]]) #[[ATTR0]] +; CHECK-NEXT: [[T16:%.*]] = call i32 (i8*, ...) @printf(i8* nonnull dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str1, i64 0, i64 0), %struct.x* nonnull [[T12]]) #[[ATTR0]] ; CHECK-NEXT: [[T84:%.*]] = icmp eq i32 [[INDVAR]], 0 ; CHECK-NEXT: [[INDVAR_NEXT]] = add i32 [[INDVAR]], 1 ; CHECK-NEXT: br i1 [[T84]], label [[BB17:%.*]], label [[BB10]] @@ -796,7 +796,7 @@ define i32 @test35() nounwind { ; CHECK-LABEL: @test35( -; CHECK-NEXT: [[TMP1:%.*]] = call i32 (i8*, ...) @printf(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @"\01LC8", i64 0, i64 0), i8* getelementptr inbounds ([[T0:%.*]], %t0* @s, i64 0, i32 1, i64 0)) #[[ATTR0]] +; CHECK-NEXT: [[TMP1:%.*]] = call i32 (i8*, ...) @printf(i8* nonnull dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @"\01LC8", i64 0, i64 0), i8* getelementptr inbounds ([[T0:%.*]], %t0* @s, i64 0, i32 1, i64 0)) #[[ATTR0]] ; CHECK-NEXT: ret i32 0 ; call i32 (i8*, ...) @printf(i8* getelementptr ([17 x i8], [17 x i8]* @"\01LC8", i32 0, i32 0), diff --git a/llvm/test/Transforms/InstCombine/malloc-free-mismatched.ll b/llvm/test/Transforms/InstCombine/malloc-free-mismatched.ll --- a/llvm/test/Transforms/InstCombine/malloc-free-mismatched.ll +++ b/llvm/test/Transforms/InstCombine/malloc-free-mismatched.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -instcombine -S | FileCheck %s +; RUN: opt < %s -inferattrs -instcombine -S | FileCheck %s define dso_local i32 @_Z6answeri(i32 %0) { ; CHECK-LABEL: @_Z6answeri( diff --git a/llvm/test/Transforms/InstCombine/malloc-free.ll b/llvm/test/Transforms/InstCombine/malloc-free.ll --- a/llvm/test/Transforms/InstCombine/malloc-free.ll +++ b/llvm/test/Transforms/InstCombine/malloc-free.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -passes=instcombine -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,instcombine -S | FileCheck %s ; PR1201 target datalayout = "p:32:32:32" diff --git a/llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll b/llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll --- a/llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll +++ b/llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -passes=instcombine -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,instcombine -S | FileCheck %s target triple = "nvptx64" diff --git a/llvm/test/Transforms/InstCombine/objsize-64.ll b/llvm/test/Transforms/InstCombine/objsize-64.ll --- a/llvm/test/Transforms/InstCombine/objsize-64.ll +++ b/llvm/test/Transforms/InstCombine/objsize-64.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -passes=instcombine -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,instcombine -S | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" declare noalias i8* @malloc(i64) nounwind diff --git a/llvm/test/Transforms/InstCombine/objsize.ll b/llvm/test/Transforms/InstCombine/objsize.ll --- a/llvm/test/Transforms/InstCombine/objsize.ll +++ b/llvm/test/Transforms/InstCombine/objsize.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; Test a pile of objectsize bounds checking. -; RUN: opt < %s -passes=instcombine -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,instcombine -S | FileCheck %s ; We need target data to get the sizes of the arrays and structures. target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" diff --git a/llvm/test/Transforms/InstCombine/realloc-free.ll b/llvm/test/Transforms/InstCombine/realloc-free.ll --- a/llvm/test/Transforms/InstCombine/realloc-free.ll +++ b/llvm/test/Transforms/InstCombine/realloc-free.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --scrub-attributes -; RUN: opt -S -passes=instcombine < %s | FileCheck %s +; RUN: opt -S -passes=inferattrs,instcombine < %s | FileCheck %s define dso_local void @_Z3fooPv(i8* nocapture %0) local_unnamed_addr #0 { ; CHECK-LABEL: @_Z3fooPv( diff --git a/llvm/test/Transforms/InstCombine/realloc.ll b/llvm/test/Transforms/InstCombine/realloc.ll --- a/llvm/test/Transforms/InstCombine/realloc.ll +++ b/llvm/test/Transforms/InstCombine/realloc.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -passes=instcombine -S | FileCheck %s +; RUN: opt < %s -passes=inferattrs,instcombine -S | FileCheck %s declare i8* @realloc(i8*, i64) #1 declare noalias i8* @malloc(i64) #1 diff --git a/llvm/test/Transforms/LowerConstantIntrinsics/builtin-object-size-phi.ll b/llvm/test/Transforms/LowerConstantIntrinsics/builtin-object-size-phi.ll --- a/llvm/test/Transforms/LowerConstantIntrinsics/builtin-object-size-phi.ll +++ b/llvm/test/Transforms/LowerConstantIntrinsics/builtin-object-size-phi.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -lower-constant-intrinsics -S < %s | FileCheck %s +; RUN: opt -inferattrs -lower-constant-intrinsics -S < %s | FileCheck %s target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll b/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll --- a/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll +++ b/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -lower-constant-intrinsics -S < %s | FileCheck %s +; RUN: opt -inferattrs -lower-constant-intrinsics -S < %s | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-darwin10.0.0" diff --git a/llvm/test/Transforms/MemCpyOpt/memcpy.ll b/llvm/test/Transforms/MemCpyOpt/memcpy.ll --- a/llvm/test/Transforms/MemCpyOpt/memcpy.ll +++ b/llvm/test/Transforms/MemCpyOpt/memcpy.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -basic-aa -memcpyopt -dse -S -verify-memoryssa | FileCheck %s +; RUN: opt < %s -inferattrs -basic-aa -memcpyopt -dse -S -verify-memoryssa | FileCheck %s target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i686-apple-darwin9" diff --git a/llvm/test/Transforms/OpenMP/remove_globalization.ll b/llvm/test/Transforms/OpenMP/remove_globalization.ll --- a/llvm/test/Transforms/OpenMP/remove_globalization.ll +++ b/llvm/test/Transforms/OpenMP/remove_globalization.ll @@ -1,8 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals -; RUN: opt -S -passes=openmp-opt < %s | FileCheck %s -; RUN: opt -passes=openmp-opt -pass-remarks=openmp-opt -pass-remarks-missed=openmp-opt -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK-REMARKS -; RUN: opt -passes=openmp-opt -pass-remarks-missed=openmp-opt -openmp-opt-max-iterations=1 -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK-FIXPOINT -; RUN: opt -openmp-opt-disable-deglobalization -S -passes=openmp-opt < %s | FileCheck %s --check-prefix=CHECK-DISABLED +; RUN: opt -S -passes=inferattrs,openmp-opt < %s | FileCheck %s +; RUN: opt -passes=inferattrs,openmp-opt -pass-remarks=openmp-opt -pass-remarks-missed=openmp-opt -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK-REMARKS +; RUN: opt -passes=inferattrs,openmp-opt -pass-remarks-missed=openmp-opt -openmp-opt-max-iterations=1 -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK-FIXPOINT +; RUN: opt -openmp-opt-disable-deglobalization -S -passes=inferattrs,openmp-opt < %s | FileCheck %s --check-prefix=CHECK-DISABLED target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64" target triple = "nvptx64" @@ -184,7 +184,7 @@ ; CHECK: attributes #[[ATTR1]] = { nosync nounwind } ; CHECK: attributes #[[ATTR2]] = { nounwind readnone } ; CHECK: attributes #[[ATTR3]] = { nofree nosync nounwind writeonly } -; CHECK: attributes #[[ATTR4:[0-9]+]] = { nosync nounwind allocsize(0) } +; CHECK: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind allocsize(0) } ; CHECK: attributes #[[ATTR5:[0-9]+]] = { "llvm.assume"="omp_no_openmp" } ; CHECK: attributes #[[ATTR6]] = { nosync nounwind writeonly } ;. @@ -192,7 +192,7 @@ ; CHECK-DISABLED: attributes #[[ATTR1]] = { nosync nounwind } ; CHECK-DISABLED: attributes #[[ATTR2]] = { nounwind readnone } ; CHECK-DISABLED: attributes #[[ATTR3]] = { nofree nosync nounwind writeonly } -; CHECK-DISABLED: attributes #[[ATTR4:[0-9]+]] = { nosync nounwind allocsize(0) } +; CHECK-DISABLED: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind allocsize(0) } ; CHECK-DISABLED: attributes #[[ATTR5:[0-9]+]] = { "llvm.assume"="omp_no_openmp" } ; CHECK-DISABLED: attributes #[[ATTR6]] = { nosync nounwind writeonly } ;. diff --git a/llvm/test/Transforms/OpenMP/replace_globalization.ll b/llvm/test/Transforms/OpenMP/replace_globalization.ll --- a/llvm/test/Transforms/OpenMP/replace_globalization.ll +++ b/llvm/test/Transforms/OpenMP/replace_globalization.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs -; RUN: opt -S -passes='openmp-opt' < %s | FileCheck %s -; RUN: opt -passes=openmp-opt -pass-remarks=openmp-opt -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK-REMARKS -; RUN: opt -passes=openmp-opt -pass-remarks=openmp-opt -pass-remarks-missed=openmp-opt -disable-output -openmp-opt-shared-limit=4 < %s 2>&1 | FileCheck %s -check-prefix=CHECK-LIMIT +; RUN: opt -S -passes='inferattrs,openmp-opt' < %s | FileCheck %s +; RUN: opt -passes=inferattrs,openmp-opt -pass-remarks=openmp-opt -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK-REMARKS +; RUN: opt -passes=inferattrs,openmp-opt -pass-remarks=openmp-opt -pass-remarks-missed=openmp-opt -disable-output -openmp-opt-shared-limit=4 < %s 2>&1 | FileCheck %s -check-prefix=CHECK-LIMIT target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64" target triple = "nvptx64" @@ -223,8 +223,8 @@ ; CHECK: attributes #[[ATTR1]] = { nofree nounwind writeonly } ; CHECK: attributes #[[ATTR2]] = { nosync nounwind readonly allocsize(0) } ; CHECK: attributes #[[ATTR3:[0-9]+]] = { nosync nounwind } -; CHECK: attributes #[[ATTR4:[0-9]+]] = { nounwind readnone speculatable } -; CHECK: attributes #[[ATTR5:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; CHECK: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind readnone speculatable } +; CHECK: attributes #[[ATTR5:[0-9]+]] = { mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn } ; CHECK: attributes #[[ATTR6:[0-9]+]] = { "llvm.assume"="omp_no_openmp" } ; CHECK: attributes #[[ATTR7]] = { nounwind readonly } ; CHECK: attributes #[[ATTR8]] = { nounwind writeonly }