[llvm] f2419ad - [InstCombine] Regenerate test checks; NFC

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 7 08:59:37 PST 2020


Author: Nikita Popov
Date: 2020-03-07T17:58:33+01:00
New Revision: f2419adc48cb59a0314833785976aece63061772

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

LOG: [InstCombine] Regenerate test checks; NFC

Added: 
    

Modified: 
    llvm/test/Transforms/InstCombine/align-attr.ll
    llvm/test/Transforms/InstCombine/unused-nonnull.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstCombine/align-attr.ll b/llvm/test/Transforms/InstCombine/align-attr.ll
index 75a3766b7d1f..16782dba2eff 100644
--- a/llvm/test/Transforms/InstCombine/align-attr.ll
+++ b/llvm/test/Transforms/InstCombine/align-attr.ll
@@ -1,27 +1,33 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -instcombine -S | FileCheck %s
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; Function Attrs: nounwind uwtable
 define i32 @foo1(i32* align 32 %a) #0 {
+; CHECK-LABEL: @foo1(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[A:%.*]], align 32
+; CHECK-NEXT:    ret i32 [[TMP0]]
+;
 entry:
   %0 = load i32, i32* %a, align 4
   ret i32 %0
 
-; CHECK-LABEL: @foo1
-; CHECK-DAG: load i32, i32* %a, align 32
-; CHECK: ret i32
 }
 
 define i32 @foo2(i32* align 32 %a) #0 {
+; CHECK-LABEL: @foo2(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[V:%.*]] = call i32* @func1(i32* [[A:%.*]])
+; CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[V]], align 32
+; CHECK-NEXT:    ret i32 [[TMP0]]
+;
 entry:
   %v = call i32* @func1(i32* %a)
   %0 = load i32, i32* %v, align 4
   ret i32 %0
 
-; CHECK-LABEL: @foo2
-; CHECK-DAG: load i32, i32* %v, align 32
-; CHECK: ret i32
 }
 
 declare i32* @func1(i32* returned) nounwind

diff  --git a/llvm/test/Transforms/InstCombine/unused-nonnull.ll b/llvm/test/Transforms/InstCombine/unused-nonnull.ll
index 518cd268ea1c..0a1520ea73c2 100644
--- a/llvm/test/Transforms/InstCombine/unused-nonnull.ll
+++ b/llvm/test/Transforms/InstCombine/unused-nonnull.ll
@@ -1,20 +1,25 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
+; RUN: opt -S -O3 -o - %s | FileCheck %s
+
 ; PR44154: LLVM c3b06d0c393e caused the body of @main to be replaced with
 ; unreachable. Check that we perform the expected calls and optimizations.
-;
-; RUN: opt -S -O3 -o - %s | FileCheck %s
-; CHECK-LABEL: @main
-; CHECK:       %0 = icmp slt i32 %argc, 2
-; CHECK-NEXT:  br i1 %0, label %done, label %do_work
-; CHECK-LABEL: do_work:
-; CHECK:       %1 = tail call i32 @compute(
-; CHECK-LABEL: done:
-; CHECK:       %retval = phi i32 [ 0, %entry ], [ %1, %do_work ]
-; CHECK-NEXT:  ret i32 %retval
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define i32 @main(i32 %argc, i8** %argv) #0 {
+; CHECK-LABEL: define {{[^@]+}}@main
+; CHECK-SAME: (i32 [[ARGC:%.*]], i8** nocapture readnone [[ARGV:%.*]]) local_unnamed_addr #0
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[TMP0:%.*]] = icmp slt i32 [[ARGC]], 2
+; CHECK-NEXT:    br i1 [[TMP0]], label [[DONE:%.*]], label [[DO_WORK:%.*]]
+; CHECK:       do_work:
+; CHECK-NEXT:    [[TMP1:%.*]] = tail call i32 @compute(i8* undef, i32 [[ARGC]])
+; CHECK-NEXT:    br label [[DONE]]
+; CHECK:       done:
+; CHECK-NEXT:    [[RETVAL:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[TMP1]], [[DO_WORK]] ]
+; CHECK-NEXT:    ret i32 [[RETVAL]]
+;
 entry:
   %0 = getelementptr inbounds i8*, i8** %argv, i32 0
   %ptr = load i8*, i8** %0
@@ -36,6 +41,10 @@ done:
 }
 
 define i32 @compute(i8* nonnull %ptr, i32 %x) #1 {
+; CHECK-LABEL: define {{[^@]+}}@compute
+; CHECK-SAME: (i8* nocapture nonnull readnone [[PTR:%.*]], i32 returned [[X:%.*]]) local_unnamed_addr #1
+; CHECK-NEXT:    ret i32 [[X]]
+;
   ret i32 %x
 }
 


        


More information about the llvm-commits mailing list