[llvm-commits] [llvm] r133998 - /llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll

Andrew Trick atrick at apple.com
Mon Jun 27 23:34:10 PDT 2011


Author: atrick
Date: Tue Jun 28 01:34:10 2011
New Revision: 133998

URL: http://llvm.org/viewvc/llvm-project?rev=133998&view=rev
Log:
FileCheckify and prepare for -disable-iv-rewrite.

Modified:
    llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll

Modified: llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll?rev=133998&r1=133997&r2=133998&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll (original)
+++ llvm/trunk/test/Transforms/IndVarSimplify/ada-loops.ll Tue Jun 28 01:34:10 2011
@@ -1,14 +1,18 @@
-; RUN: opt < %s -indvars -S > %t
-; RUN: grep phi %t | count 4
-; RUN: grep {= phi i32} %t | count 4
-; RUN: not grep {sext i} %t
-; RUN: not grep {zext i} %t
-; RUN: not grep {trunc i} %t
-; RUN: not grep {add i8} %t
+; RUN: opt < %s -indvars -S | FileCheck %s
+; RUN: opt < %s -indvars -disable-iv-rewrite -S | FileCheck %s
+;
 ; PR1301
 
 ; Do a bunch of analysis and prove that the loops can use an i32 trip
 ; count without casting.
+;
+; Note that all four functions should actually be converted to
+; memset. However, this test case validates indvars behavior.  We
+; don't check that phis are "folded together" because that is a job
+; for loop strength reduction. But indvars must remove sext, zext,
+; trunc, and add i8.
+;
+; CHECK-NOT: {{sext|zext|trunc|add i8}}
 
 ; ModuleID = 'ada.bc'
 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-n:8:16:32"





More information about the llvm-commits mailing list