From 92dcf12b2f2011b0ecc1610281209e554a5047a8 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 6 Aug 2020 05:09:44 -0700 Subject: [PATCH] [StackSafety,NFC] Use CHECK-EMPTY in tests --- llvm/lib/Analysis/StackSafetyAnalysis.cpp | 1 + .../Analysis/StackSafetyAnalysis/ipa-alias.ll | 10 +-- llvm/test/Analysis/StackSafetyAnalysis/ipa.ll | 72 +++++++++---------- .../Analysis/StackSafetyAnalysis/local.ll | 70 +++++++++--------- .../Analysis/StackSafetyAnalysis/memintrin.ll | 28 ++++---- 5 files changed, 91 insertions(+), 90 deletions(-) diff --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp index 00650fca0594..7043a403a427 100644 --- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp +++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp @@ -174,6 +174,7 @@ template struct FunctionInfo { } else { assert(Allocas.empty()); } + O << "\n"; } }; diff --git a/llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll b/llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll index 17dcada36014..e7303d838215 100644 --- a/llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll +++ b/llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll @@ -78,7 +78,7 @@ define void @PreemptableAliasCall() #0 { ; GLOBAL-NEXT: x1[1]: full-set, @PreemptableAliasWrite1(arg0, [0,1)){{$}} ; LOCAL-NEXT: x2[1]: empty-set, @AliasToPreemptableAliasWrite1(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x2[1]: [0,1), @AliasToPreemptableAliasWrite1(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x1 = alloca i8 call void @PreemptableAliasWrite1(i8* %x1) @@ -97,7 +97,7 @@ define void @InterposableAliasCall() #0 { ; LOCAL-NEXT: x[1]: empty-set, @InterposableAliasWrite1(arg0, [0,1)){{$}} ; NOLTO-NEXT: x[1]: full-set, @InterposableAliasWrite1(arg0, [0,1)){{$}} ; LTO-NEXT: x[1]: [0,1), @InterposableAliasWrite1(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i8 ; ThinLTO can resolve the prevailing implementation for interposable definitions. @@ -112,7 +112,7 @@ define void @AliasCall() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[1]: empty-set, @AliasWrite1(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[1]: [0,1), @AliasWrite1(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i8 call void @AliasWrite1(i8* %x) @@ -128,7 +128,7 @@ define void @BitcastAliasCall() #0 { ; GLOBAL-NEXT: x1[4]: [0,1), @BitcastAliasWrite1(arg0, [0,1)){{$}} ; LOCAL-NEXT: x2[1]: empty-set, @AliasToBitcastAliasWrite1(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x2[1]: [0,1), @AliasToBitcastAliasWrite1(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x1 = alloca i32 call void @BitcastAliasWrite1(i32* %x1) @@ -143,4 +143,4 @@ entry: ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [0,1){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: diff --git a/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll b/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll index f78bc7cf3b3e..0e92f06f5b6d 100644 --- a/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll +++ b/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll @@ -140,7 +140,7 @@ define void @f1() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[4]: empty-set, @Write8(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[4]: [0,8), @Write8(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -155,7 +155,7 @@ define void @f2() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[4]: empty-set, @Write1(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[4]: [0,1), @Write1(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -170,7 +170,7 @@ define void @f3() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[4]: empty-set, @Write4(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[4]: [0,4), @Write4(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -185,7 +185,7 @@ define void @f4() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[4]: empty-set, @Write1(arg0, [1,2)){{$}} ; GLOBAL-NEXT: x[4]: [1,2), @Write1(arg0, [1,2)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -201,7 +201,7 @@ define void @f5() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: empty-set, @Write4(arg0, [1,2)){{$}} ; GLOBAL-NEXT: [1,5), @Write4(arg0, [1,2)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -217,7 +217,7 @@ define void @f6() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[4]: empty-set, @ExternalCall(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[4]: full-set, @ExternalCall(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -232,7 +232,7 @@ define void @PreemptableCall() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[4]: empty-set, @PreemptableWrite1(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[4]: full-set, @PreemptableWrite1(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -248,7 +248,7 @@ define void @InterposableCall() #0 { ; LOCAL-NEXT: x[4]: empty-set, @InterposableWrite1(arg0, [0,1)){{$}} ; NOLTO-NEXT: x[4]: full-set, @InterposableWrite1(arg0, [0,1)){{$}} ; LTO-NEXT: x[4]: [0,1), @InterposableWrite1(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -263,7 +263,7 @@ define void @PrivateCall() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[4]: empty-set, @PrivateWrite1(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[4]: [0,1), @PrivateWrite1(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -276,7 +276,7 @@ define private void @PrivateWrite1(i8* %p) #0 { ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [0,1){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: store i8 0, i8* %p, align 1 ret void @@ -290,7 +290,7 @@ define void @f7() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[4]: empty-set, @ReturnDependent(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[4]: full-set, @ReturnDependent(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -304,7 +304,7 @@ define void @f8left() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Rec2(arg0, [2,3)){{$}} ; GLOBAL-NEXT: x[8]: [0,4), @Rec2(arg0, [2,3)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -320,7 +320,7 @@ define void @f8right() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Rec2(arg0, [6,7)){{$}} ; GLOBAL-NEXT: x[8]: [4,8), @Rec2(arg0, [6,7)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -336,7 +336,7 @@ define void @f8oobleft() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Rec2(arg0, [1,2)){{$}} ; GLOBAL-NEXT: x[8]: [-1,3), @Rec2(arg0, [1,2)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -352,7 +352,7 @@ define void @f8oobright() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Rec2(arg0, [7,8)){{$}} ; GLOBAL-NEXT: x[8]: [5,9), @Rec2(arg0, [7,8)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -368,7 +368,7 @@ define void @TwoArguments() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Write4_2(arg1, [0,1)), @Write4_2(arg0, [4,5)){{$}} ; GLOBAL-NEXT: x[8]: [0,8), @Write4_2(arg1, [0,1)), @Write4_2(arg0, [4,5)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -383,7 +383,7 @@ define void @TwoArgumentsOOBOne() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Write4_2(arg1, [0,1)), @Write4_2(arg0, [5,6)){{$}} ; GLOBAL-NEXT: x[8]: [0,9), @Write4_2(arg1, [0,1)), @Write4_2(arg0, [5,6)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -398,7 +398,7 @@ define void @TwoArgumentsOOBOther() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Write4_2(arg1, [-1,0)), @Write4_2(arg0, [4,5)){{$}} ; GLOBAL-NEXT: x[8]: [-1,8), @Write4_2(arg1, [-1,0)), @Write4_2(arg0, [4,5)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x0 = bitcast i64* %x to i8* @@ -414,7 +414,7 @@ define void @TwoArgumentsOOBBoth() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Write4_2(arg1, [-1,0)), @Write4_2(arg0, [5,6)){{$}} ; GLOBAL-NEXT: x[8]: [-1,9), @Write4_2(arg1, [-1,0)), @Write4_2(arg0, [5,6)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x0 = bitcast i64* %x to i8* @@ -431,7 +431,7 @@ define i32 @TestRecursiveNoOffset(i32* %p, i32 %size) #0 { ; GLOBAL-NEXT: p[]: full-set, @RecursiveNoOffset(arg0, [0,1)){{$}} ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: sum[4]: [0,4), @RecursiveNoOffset(arg2, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %sum = alloca i32, align 4 %0 = bitcast i32* %sum to i8* @@ -447,7 +447,7 @@ define void @TestRecursiveWithOffset(i32 %size) #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: sum[64]: empty-set, @RecursiveWithOffset(arg1, [0,1)){{$}} ; GLOBAL-NEXT: sum[64]: full-set, @RecursiveWithOffset(arg1, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %sum = alloca i32, i64 16, align 4 call void @RecursiveWithOffset(i32 %size, i32* %sum) @@ -461,7 +461,7 @@ define void @TestUpdateArg() #0 { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[16]: empty-set, @WriteAndReturn8(arg0, [0,1)){{$}} ; GLOBAL-NEXT: x[16]: full-set, @WriteAndReturn8(arg0, [0,1)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i8, i64 16, align 4 %0 = call i8* @WriteAndReturn8(i8* %x) @@ -474,71 +474,71 @@ entry: ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [0,1){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @Write4{{$}} ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [0,4){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @Write4_2{{$}} ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [0,4){{$}} ; CHECK-NEXT: q[]: [0,4){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @Write8{{$}} ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [0,8){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @WriteAndReturn8{{$}} ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: full-set{{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @PreemptableWrite1 dso_preemptable{{$}} ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [0,1){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @InterposableWrite1 interposable{{$}} ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [0,1){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @ReturnDependent{{$}} ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: full-set{{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @Rec0{{$}} ; CHECK-NEXT: args uses: ; LOCAL-NEXT: p[]: empty-set, @Write4(arg0, [2,3)){{$}} ; GLOBAL-NEXT: p[]: [2,6) ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @Rec1{{$}} ; CHECK-NEXT: args uses: ; LOCAL-NEXT: p[]: empty-set, @Rec0(arg0, [1,2)){{$}} ; GLOBAL-NEXT: p[]: [3,7) ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @Rec2{{$}} ; CHECK-NEXT: args uses: ; LOCAL-NEXT: p[]: empty-set, @Rec1(arg0, [-5,-4)){{$}} ; GLOBAL-NEXT: p[]: [-2,2) ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @RecursiveNoOffset{{$}} ; CHECK-NEXT: args uses: @@ -546,17 +546,17 @@ entry: ; GLOBAL-NEXT: p[]: full-set, @RecursiveNoOffset(arg0, [4,5)){{$}} ; CHECK-NEXT: acc[]: [0,4), @RecursiveNoOffset(arg2, [0,1)){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @RecursiveWithOffset{{$}} ; CHECK-NEXT: args uses: ; LOCAL-NEXT: acc[]: [0,4), @RecursiveWithOffset(arg1, [4,5)){{$}} ; GLOBAL-NEXT: acc[]: full-set, @RecursiveWithOffset(arg1, [4,5)){{$}} ; CHECK-NEXT: allocas uses: -; CHECK-NOT: ]: +; CHECK-EMPTY: ; CHECK-LABEL: @ReturnAlloca ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[8]: full-set -; CHECK-NOT: ]: +; CHECK-EMPTY: diff --git a/llvm/test/Analysis/StackSafetyAnalysis/local.ll b/llvm/test/Analysis/StackSafetyAnalysis/local.ll index 890d4dced335..89542a8d72bb 100644 --- a/llvm/test/Analysis/StackSafetyAnalysis/local.ll +++ b/llvm/test/Analysis/StackSafetyAnalysis/local.ll @@ -18,7 +18,7 @@ define void @LeakAddress() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: full-set{{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -31,7 +31,7 @@ define void @StoreInBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,1){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -44,7 +44,7 @@ define void @StoreInBounds2() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,4){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 store i32 0, i32* %x, align 4 @@ -56,7 +56,7 @@ define void @StoreInBounds3() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [2,3){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -71,7 +71,7 @@ define void @StoreInBounds4() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [-9223372036854775808,9223372036854775807){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = ptrtoint i32* %x to i64 @@ -86,7 +86,7 @@ define void @StoreOutOfBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [2,6){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -102,7 +102,7 @@ define void @LoadInBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,1){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -115,7 +115,7 @@ define void @LoadOutOfBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [2,6){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -131,7 +131,7 @@ define i8* @Ret() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: full-set{{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -147,7 +147,7 @@ define void @DirectCall() { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[8]: empty-set, @Foo(arg0, [2,3)){{$}} ; GLOBAL-NEXT: x[8]: full-set, @Foo(arg0, [2,3)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i16* @@ -164,7 +164,7 @@ define void @IndirectCall(void (i8*)* %p) { ; CHECK-NEXT: p[]: full-set{{$}} ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: full-set{{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -178,7 +178,7 @@ define void @NonConstantOffset(i1 zeroext %z) { ; CHECK-NEXT: allocas uses: ; FIXME: SCEV can't look through selects. ; CHECK-NEXT: x[4]: [-4,4){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -193,7 +193,7 @@ define void @NegativeOffset() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[40]: [-1600000000000,-1599999999996){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, i32 10, align 4 %x2 = getelementptr i32, i32* %x, i64 -400000000000 @@ -206,7 +206,7 @@ define void @PossiblyNegativeOffset(i16 %z) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[40]: [-131072,131072){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, i32 10, align 4 %x2 = getelementptr i32, i32* %x, i16 %z @@ -219,7 +219,7 @@ define void @NonConstantOffsetOOB(i1 zeroext %z) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [-8,8){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -234,7 +234,7 @@ define void @ArrayAlloca() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[40]: [36,40){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, i32 10, align 4 %x1 = bitcast i32* %x to i8* @@ -249,7 +249,7 @@ define void @ArrayAllocaOOB() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[40]: [37,41){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, i32 10, align 4 %x1 = bitcast i32* %x to i8* @@ -264,7 +264,7 @@ define void @DynamicAllocaUnused(i64 %size) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[0]: empty-set{{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, i64 %size, align 16 ret void @@ -276,7 +276,7 @@ define void @DynamicAlloca(i64 %size) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[0]: [0,4){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, i64 %size, align 16 store i32 0, i32* %x, align 1 @@ -290,7 +290,7 @@ define void @DynamicAllocaFiniteSizeRange(i1 zeroext %z) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[0]: [0,4){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %size = select i1 %z, i64 3, i64 5 %x = alloca i32, i64 %size, align 16 @@ -303,7 +303,7 @@ define signext i8 @SimpleLoop() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[10]: [0,10){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca [10 x i8], align 1 %0 = getelementptr inbounds [10 x i8], [10 x i8]* %x, i64 0, i64 0 @@ -329,7 +329,7 @@ define signext i8 @SimpleLoopOOB() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[10]: [0,11){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca [10 x i8], align 1 %0 = getelementptr inbounds [10 x i8], [10 x i8]* %x, i64 0, i64 0 @@ -355,7 +355,7 @@ define dso_local void @SizeCheck(i32 %sz) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x1[128]: [0,4294967295){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x1 = alloca [128 x i8], align 16 %x1.sub = getelementptr inbounds [128 x i8], [128 x i8]* %x1, i64 0, i64 0 @@ -379,7 +379,7 @@ define void @Scalable(* %p, * %unused, , align 4 %x1 = bitcast * %x to i8* @@ -396,7 +396,7 @@ define void @ZeroSize(%zerosize_type *%p) { ; CHECK-NEXT: p[]: empty-set ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[0]: empty-set -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca %zerosize_type, align 4 store %zerosize_type undef, %zerosize_type* %x, align 4 @@ -410,7 +410,7 @@ define void @OperandBundle() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: a[4]: full-set -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %a = alloca i32, align 4 call void @LeakAddress() ["unknown"(i32* %a)] @@ -421,7 +421,7 @@ define void @ByVal(i16* byval %p) { ; CHECK-LABEL: @ByVal dso_preemptable{{$}} ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: - ; CHECK-NOT: ]: + ; CHECK-EMPTY: entry: ret void } @@ -432,7 +432,7 @@ define void @TestByVal() { ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[2]: [0,2) ; CHECK-NEXT: y[8]: [0,2) -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i16, align 4 call void @ByVal(i16* byval %x) @@ -451,7 +451,7 @@ define void @TestByValArray() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: z[800000]: [500000,1300000) -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %z = alloca [100000 x i64], align 4 %z1 = bitcast [100000 x i64]* %z to i8* @@ -466,7 +466,7 @@ define dso_local i8 @LoadMinInt64(i8* %p) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: p[]: [-9223372036854775808,-9223372036854775807){{$}} ; CHECK-NEXT: allocas uses: - ; CHECK-NOT: ]: + ; CHECK-EMPTY: %p2 = getelementptr i8, i8* %p, i64 -9223372036854775808 %v = load i8, i8* %p2, align 1 ret i8 %v @@ -478,7 +478,7 @@ define void @Overflow() { ; CHECK-NEXT: allocas uses: ; LOCAL-NEXT: x[1]: empty-set, @LoadMinInt64(arg0, [-9223372036854775808,-9223372036854775807)){{$}} ; GLOBAL-NEXT: x[1]: full-set, @LoadMinInt64(arg0, [-9223372036854775808,-9223372036854775807)){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i8, align 4 %x2 = getelementptr i8, i8* %x, i64 -9223372036854775808 @@ -492,7 +492,7 @@ define void @DeadBlock(i64* %p) { ; CHECK-NEXT: p[]: empty-set{{$}} ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[1]: empty-set{{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i8, align 4 br label %end @@ -513,7 +513,7 @@ define void @LifeNotStarted() { ; CHECK: x[1]: full-set{{$}} ; CHECK: y[1]: full-set{{$}} ; CHECK: z[1]: full-set{{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i8, align 4 %y = alloca i8, align 4 @@ -537,7 +537,7 @@ define void @LifeOK() { ; CHECK: x[1]: [0,1){{$}} ; CHECK: y[1]: [0,1){{$}} ; CHECK: z[1]: [0,1){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i8, align 4 %y = alloca i8, align 4 @@ -561,7 +561,7 @@ define void @LifeEnded() { ; CHECK: x[1]: full-set{{$}} ; CHECK: y[1]: full-set{{$}} ; CHECK: z[1]: full-set{{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i8, align 4 %y = alloca i8, align 4 diff --git a/llvm/test/Analysis/StackSafetyAnalysis/memintrin.ll b/llvm/test/Analysis/StackSafetyAnalysis/memintrin.ll index 70135a3a1875..66322511d056 100644 --- a/llvm/test/Analysis/StackSafetyAnalysis/memintrin.ll +++ b/llvm/test/Analysis/StackSafetyAnalysis/memintrin.ll @@ -16,7 +16,7 @@ define void @MemsetInBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,4){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -30,7 +30,7 @@ define void @VolatileMemsetInBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,4){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -43,7 +43,7 @@ define void @MemsetOutOfBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,5){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -56,7 +56,7 @@ define void @MemsetNonConst(i32 %size) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,4294967295){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -71,7 +71,7 @@ define void @MemsetNonConstInBounds(i1 zeroext %z) { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,4294967295){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %x1 = bitcast i32* %x to i8* @@ -86,7 +86,7 @@ define void @MemsetNonConstSize() { ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,4294967295){{$}} ; CHECK-NEXT: y[4]: empty-set{{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %y = alloca i32, align 4 @@ -104,7 +104,7 @@ define void @MemcpyInBounds() { ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,4){{$}} ; CHECK-NEXT: y[4]: [0,4){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %y = alloca i32, align 4 @@ -120,7 +120,7 @@ define void @MemcpySrcOutOfBounds() { ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[8]: [0,5){{$}} ; CHECK-NEXT: y[4]: [0,5){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %y = alloca i32, align 4 @@ -136,7 +136,7 @@ define void @MemcpyDstOutOfBounds() { ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,5){{$}} ; CHECK-NEXT: y[8]: [0,5){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %y = alloca i64, align 4 @@ -152,7 +152,7 @@ define void @MemcpyBothOutOfBounds() { ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[4]: [0,9){{$}} ; CHECK-NEXT: y[8]: [0,9){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i32, align 4 %y = alloca i64, align 4 @@ -167,7 +167,7 @@ define void @MemcpySelfInBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[8]: [0,8){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -181,7 +181,7 @@ define void @MemcpySelfSrcOutOfBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[8]: [0,9){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -195,7 +195,7 @@ define void @MemcpySelfDstOutOfBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[8]: [0,9){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8* @@ -209,7 +209,7 @@ define void @MemmoveSelfBothOutOfBounds() { ; CHECK-NEXT: args uses: ; CHECK-NEXT: allocas uses: ; CHECK-NEXT: x[8]: [0,14){{$}} -; CHECK-NOT: ]: +; CHECK-EMPTY: entry: %x = alloca i64, align 4 %x1 = bitcast i64* %x to i8*