[llvm] 4992220 - [Test] Regenerate test checks with autogen script

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 02:56:23 PDT 2021


Author: Max Kazantsev
Date: 2021-09-27T16:55:59+07:00
New Revision: 4992220ea704ab7f6ce19d6ec02d0e821f776515

URL: https://github.com/llvm/llvm-project/commit/4992220ea704ab7f6ce19d6ec02d0e821f776515
DIFF: https://github.com/llvm/llvm-project/commit/4992220ea704ab7f6ce19d6ec02d0e821f776515.diff

LOG: [Test] Regenerate test checks with autogen script

Added: 
    

Modified: 
    llvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll
    llvm/test/Analysis/ScalarEvolution/unknown_phis.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll b/llvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll
index fce25e8aae8d..490ba57a92df 100644
--- a/llvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll
+++ b/llvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll
@@ -1,27 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
 ; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
 
-; CHECK-LABEL: Printing analysis 'Scalar Evolution Analysis' for function 'f0':
-; CHECK-NEXT: Classifying expressions for: @f0
-; CHECK-NEXT:   %v0 = phi i16 [ 2, %b0 ], [ %v2, %b1 ]
-; CHECK-NEXT:   -->  {2,+,1}<nuw><nsw><%b1> U: [2,4) S: [2,4)         Exits: 3                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v1 = phi i16 [ 1, %b0 ], [ %v3, %b1 ]
-; CHECK-NEXT:   -->  {1,+,2,+,1}<%b1> U: full-set S: full-set         Exits: 3                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v2 = add nsw i16 %v0, 1
-; CHECK-NEXT:   -->  {3,+,1}<nuw><nsw><%b1> U: [3,5) S: [3,5)         Exits: 4                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v3 = add nsw i16 %v1, %v0
-; CHECK-NEXT:   -->  {3,+,3,+,1}<%b1> U: full-set S: full-set         Exits: 6                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v4 = and i16 %v3, 1
-; CHECK-NEXT:   -->  (zext i1 {true,+,true,+,true}<%b1> to i16) U: [0,2) S: [0,2)             Exits: 0                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT: Determining loop execution counts for: @f0
-; CHECK-NEXT: Loop %b1: backedge-taken count is 1
-; CHECK-NEXT: Loop %b1: max backedge-taken count is 1
-; CHECK-NEXT: Loop %b1: Predicated backedge-taken count is 1
-; CHECK-NEXT:  Predicates:
-; CHECK-EMPTY:
-; CHECK-NEXT: Loop %b1: Trip multiple is 2
 define void @f0() {
+; CHECK-LABEL: 'f0'
+; CHECK-NEXT:  Classifying expressions for: @f0
+; CHECK-NEXT:    %v0 = phi i16 [ 2, %b0 ], [ %v2, %b1 ]
+; CHECK-NEXT:    --> {2,+,1}<nuw><nsw><%b1> U: [2,4) S: [2,4) Exits: 3 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v1 = phi i16 [ 1, %b0 ], [ %v3, %b1 ]
+; CHECK-NEXT:    --> {1,+,2,+,1}<%b1> U: full-set S: full-set Exits: 3 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v2 = add nsw i16 %v0, 1
+; CHECK-NEXT:    --> {3,+,1}<nuw><nsw><%b1> U: [3,5) S: [3,5) Exits: 4 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v3 = add nsw i16 %v1, %v0
+; CHECK-NEXT:    --> {3,+,3,+,1}<%b1> U: full-set S: full-set Exits: 6 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v4 = and i16 %v3, 1
+; CHECK-NEXT:    --> (zext i1 {true,+,true,+,true}<%b1> to i16) U: [0,2) S: [0,2) Exits: 0 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:  Determining loop execution counts for: @f0
+; CHECK-NEXT:  Loop %b1: backedge-taken count is 1
+; CHECK-NEXT:  Loop %b1: max backedge-taken count is 1
+; CHECK-NEXT:  Loop %b1: Predicated backedge-taken count is 1
+; CHECK-NEXT:   Predicates:
+; CHECK:       Loop %b1: Trip multiple is 2
+;
 b0:
   br label %b1
 
@@ -42,35 +43,35 @@ b2:                                               ; preds = %b1
 @g1 = common dso_local global i32 0, align 4
 @g2 = common dso_local global i32* null, align 8
 
-; CHECK-LABEL: Printing analysis 'Scalar Evolution Analysis' for function 'f1':
-; CHECK-NEXT: Classifying expressions for: @f1
-; CHECK-NEXT:   %v0 = phi i16 [ 0, %b0 ], [ %v3, %b1 ]
-; CHECK-NEXT:   -->  {0,+,3,+,1}<%b1> U: full-set S: full-set         Exits: 7                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v1 = phi i32 [ 3, %b0 ], [ %v6, %b1 ]
-; CHECK-NEXT:   -->  {3,+,1}<nuw><nsw><%b1> U: [3,6) S: [3,6)         Exits: 5                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v2 = trunc i32 %v1 to i16
-; CHECK-NEXT:   -->  {3,+,1}<%b1> U: [3,6) S: [3,6)           Exits: 5                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v3 = add i16 %v0, %v2
-; CHECK-NEXT:   -->  {3,+,4,+,1}<%b1> U: full-set S: full-set         Exits: 12               LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v4 = and i16 %v3, 1
-; CHECK-NEXT:   -->  (zext i1 {true,+,false,+,true}<%b1> to i16) U: [0,2) S: [0,2)            Exits: 0                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v6 = add nuw nsw i32 %v1, 1
-; CHECK-NEXT:   -->  {4,+,1}<nuw><nsw><%b1> U: [4,7) S: [4,7)         Exits: 6                LoopDispositions: { %b1: Computable }
-; CHECK-NEXT:   %v7 = phi i32 [ %v1, %b1 ]
-; CHECK-NEXT:   -->  %v7 U: [3,6) S: [3,6)
-; CHECK-NEXT:   %v8 = phi i16 [ %v3, %b1 ]
-; CHECK-NEXT:   -->  %v8 U: full-set S: full-set
-; CHECK-NEXT: Determining loop execution counts for: @f1
-; CHECK-NEXT: Loop %b3: <multiple exits> Unpredictable backedge-taken count.
-; CHECK-NEXT: Loop %b3: Unpredictable max backedge-taken count.
-; CHECK-NEXT: Loop %b3: Unpredictable predicated backedge-taken count.
-; CHECK-NEXT: Loop %b1: backedge-taken count is 2
-; CHECK-NEXT: Loop %b1: max backedge-taken count is 2
-; CHECK-NEXT: Loop %b1: Predicated backedge-taken count is 2
-; CHECK-NEXT:  Predicates:
-; CHECK-EMPTY:
-; CHECK-NEXT: Loop %b1: Trip multiple is 3
 define void @f1() #0 {
+; CHECK-LABEL: 'f1'
+; CHECK-NEXT:  Classifying expressions for: @f1
+; CHECK-NEXT:    %v0 = phi i16 [ 0, %b0 ], [ %v3, %b1 ]
+; CHECK-NEXT:    --> {0,+,3,+,1}<%b1> U: full-set S: full-set Exits: 7 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v1 = phi i32 [ 3, %b0 ], [ %v6, %b1 ]
+; CHECK-NEXT:    --> {3,+,1}<nuw><nsw><%b1> U: [3,6) S: [3,6) Exits: 5 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v2 = trunc i32 %v1 to i16
+; CHECK-NEXT:    --> {3,+,1}<%b1> U: [3,6) S: [3,6) Exits: 5 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v3 = add i16 %v0, %v2
+; CHECK-NEXT:    --> {3,+,4,+,1}<%b1> U: full-set S: full-set Exits: 12 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v4 = and i16 %v3, 1
+; CHECK-NEXT:    --> (zext i1 {true,+,false,+,true}<%b1> to i16) U: [0,2) S: [0,2) Exits: 0 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v6 = add nuw nsw i32 %v1, 1
+; CHECK-NEXT:    --> {4,+,1}<nuw><nsw><%b1> U: [4,7) S: [4,7) Exits: 6 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    %v7 = phi i32 [ %v1, %b1 ]
+; CHECK-NEXT:    --> %v7 U: [3,6) S: [3,6) --> 5 U: [5,6) S: [5,6)
+; CHECK-NEXT:    %v8 = phi i16 [ %v3, %b1 ]
+; CHECK-NEXT:    --> %v8 U: full-set S: full-set --> 12 U: [12,13) S: [12,13)
+; CHECK-NEXT:  Determining loop execution counts for: @f1
+; CHECK-NEXT:  Loop %b3: <multiple exits> Unpredictable backedge-taken count.
+; CHECK-NEXT:  Loop %b3: Unpredictable max backedge-taken count.
+; CHECK-NEXT:  Loop %b3: Unpredictable predicated backedge-taken count.
+; CHECK-NEXT:  Loop %b1: backedge-taken count is 2
+; CHECK-NEXT:  Loop %b1: max backedge-taken count is 2
+; CHECK-NEXT:  Loop %b1: Predicated backedge-taken count is 2
+; CHECK-NEXT:   Predicates:
+; CHECK:       Loop %b1: Trip multiple is 3
+;
 b0:
   store i16 0, i16* @g0, align 2
   store i32* @g1, i32** @g2, align 8

diff  --git a/llvm/test/Analysis/ScalarEvolution/unknown_phis.ll b/llvm/test/Analysis/ScalarEvolution/unknown_phis.ll
index 24875c2cbe00..3d2c774507db 100644
--- a/llvm/test/Analysis/ScalarEvolution/unknown_phis.ll
+++ b/llvm/test/Analysis/ScalarEvolution/unknown_phis.ll
@@ -1,12 +1,19 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
 ; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck %s
 
 define void @merge_values_with_ranges(i32 *%a_len_ptr, i32 *%b_len_ptr, i1 %unknown_cond) {
+; CHECK-LABEL: 'merge_values_with_ranges'
+; CHECK-NEXT:  Classifying expressions for: @merge_values_with_ranges
+; CHECK-NEXT:    %len_a = load i32, i32* %a_len_ptr, align 4, !range !0
+; CHECK-NEXT:    --> %len_a U: [0,2147483647) S: [0,2147483647)
+; CHECK-NEXT:    %len_b = load i32, i32* %b_len_ptr, align 4, !range !0
+; CHECK-NEXT:    --> %len_b U: [0,2147483647) S: [0,2147483647)
+; CHECK-NEXT:    %len = phi i32 [ %len_a, %if.true ], [ %len_b, %if.false ]
+; CHECK-NEXT:    --> %len U: [0,2147483647) S: [0,2147483647)
+; CHECK-NEXT:  Determining loop execution counts for: @merge_values_with_ranges
+;
 
-; CHECK-LABEL: Classifying expressions for: @merge_values_with_ranges
-; CHECK:       %len = phi i32 [ %len_a, %if.true ], [ %len_b, %if.false ]
-; CHECK-NEXT:  -->  %len U: [0,2147483647) S: [0,2147483647)
-
- entry:
+  entry:
   br i1 %unknown_cond, label %if.true, label %if.false
 
 if.true:
@@ -23,17 +30,31 @@ merge:
 }
 
 define void @merge_values_with_ranges_looped(i32 *%a_len_ptr, i32 *%b_len_ptr) {
-
 ; TODO: We could be much smarter here. So far we just make sure that we do not
 ;       go into infinite loop analyzing these Phis.
+; CHECK-LABEL: 'merge_values_with_ranges_looped'
+; CHECK-NEXT:  Classifying expressions for: @merge_values_with_ranges_looped
+; CHECK-NEXT:    %len_a = load i32, i32* %a_len_ptr, align 4, !range !0
+; CHECK-NEXT:    --> %len_a U: [0,2147483647) S: [0,2147483647)
+; CHECK-NEXT:    %len_b = load i32, i32* %b_len_ptr, align 4, !range !0
+; CHECK-NEXT:    --> %len_b U: [0,2147483647) S: [0,2147483647)
+; CHECK-NEXT:    %p1 = phi i32 [ %len_a, %entry ], [ %p2, %loop ]
+; CHECK-NEXT:    --> %p1 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %loop: Variant }
+; CHECK-NEXT:    %p2 = phi i32 [ %len_b, %entry ], [ %p1, %loop ]
+; CHECK-NEXT:    --> %p2 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %loop: Variant }
+; CHECK-NEXT:    %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
+; CHECK-NEXT:    --> {0,+,1}<%loop> U: [0,100) S: [0,100) Exits: 99 LoopDispositions: { %loop: Computable }
+; CHECK-NEXT:    %iv.next = add i32 %iv, 1
+; CHECK-NEXT:    --> {1,+,1}<%loop> U: [1,101) S: [1,101) Exits: 100 LoopDispositions: { %loop: Computable }
+; CHECK-NEXT:  Determining loop execution counts for: @merge_values_with_ranges_looped
+; CHECK-NEXT:  Loop %loop: backedge-taken count is 99
+; CHECK-NEXT:  Loop %loop: max backedge-taken count is 99
+; CHECK-NEXT:  Loop %loop: Predicated backedge-taken count is 99
+; CHECK-NEXT:   Predicates:
+; CHECK:       Loop %loop: Trip multiple is 100
+;
 
-; CHECK-LABEL: Classifying expressions for: @merge_values_with_ranges_looped
-; CHECK:       %p1 = phi i32 [ %len_a, %entry ], [ %p2, %loop ]
-; CHECK-NEXT:  -->  %p1 U: full-set S: full-set
-; CHECK:         %p2 = phi i32 [ %len_b, %entry ], [ %p1, %loop ]
-; CHECK-NEXT:  -->  %p2 U: full-set S: full-set
-
- entry:
+  entry:
   %len_a = load i32, i32* %a_len_ptr, !range !0
   %len_b = load i32, i32* %b_len_ptr, !range !0
   br label %loop


        


More information about the llvm-commits mailing list