From d9408bca268d08926046b0088c75c1db01c7d297 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Tue, 28 Jul 2015 03:50:09 +0000 Subject: [PATCH] FileCheck'ify some wc/grep based tests; NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243378 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../2007-10-19-InlineAsmDirectives.ll | 5 ++++- .../IndVarSimplify/tripcount_infinite.ll | 15 +++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll b/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll index d4b94fe62c7..56a99d191b3 100644 --- a/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll +++ b/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll @@ -1,7 +1,10 @@ -; RUN: opt < %s -O3 -o - | llc -no-integrated-as -o - | grep bork_directive | wc -l | grep 2 +; RUN: opt < %s -O3 | llc -no-integrated-as | FileCheck %s ;; We don't want branch folding to fold asm directives. +; CHECK: bork_directive +; CHECK: bork_directive + define void @bork(i32 %param) { entry: %tmp = icmp eq i32 %param, 0 diff --git a/test/Transforms/IndVarSimplify/tripcount_infinite.ll b/test/Transforms/IndVarSimplify/tripcount_infinite.ll index 0495b50c3e4..658598d3b7e 100644 --- a/test/Transforms/IndVarSimplify/tripcount_infinite.ll +++ b/test/Transforms/IndVarSimplify/tripcount_infinite.ll @@ -1,38 +1,45 @@ ; These tests have an infinite trip count. We obviously shouldn't remove the ; loops! :) ; -; RUN: opt < %s -indvars -adce -simplifycfg -S | grep icmp | wc -l > %t2 -; RUN: llvm-as < %s | llvm-dis | grep icmp | wc -l > %t1 -; RUN: diff %t1 %t2 +; RUN: opt < %s -indvars -adce -simplifycfg -S | FileCheck %s ;; test for (i = 1; i != 100; i += 2) define i32 @infinite_linear() { +; CHECK-LABEL: @infinite_linear( entry: br label %loop loop: ; preds = %loop, %entry +; CHECK-LABEL: loop: %i = phi i32 [ 1, %entry ], [ %i.next, %loop ] ; [#uses=3] %i.next = add i32 %i, 2 ; [#uses=1] %c = icmp ne i32 %i, 100 ; [#uses=1] +; CHECK: icmp +; CHECK: br br i1 %c, label %loop, label %loopexit loopexit: ; preds = %loop +; CHECK-LABEL: loopexit: ret i32 %i } ;; test for (i = 1; i*i != 63; ++i) define i32 @infinite_quadratic() { +; CHECK-LABEL: @infinite_quadratic( entry: br label %loop loop: ; preds = %loop, %entry +; CHECK-LABEL: loop: %i = phi i32 [ 1, %entry ], [ %i.next, %loop ] ; [#uses=4] %isquare = mul i32 %i, %i ; [#uses=1] %i.next = add i32 %i, 1 ; [#uses=1] %c = icmp ne i32 %isquare, 63 ; [#uses=1] +; CHECK: icmp +; CHECK: br br i1 %c, label %loop, label %loopexit loopexit: ; preds = %loop +; CHECK-LABEL: loopexit: ret i32 %i } - -- 2.34.1