Home | History | Annotate | Download | only in IndVarSimplify
      1 ; RUN: opt < %s -indvars -disable-output -stats -info-output-file - | FileCheck %s
      2 ; Check that IndVarSimplify is not creating unnecessary canonical IVs
      3 ; that will never be used.
      4 ; CHECK-NOT: indvars
      5 
      6 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
      7 
      8 @ue = external global i64
      9 
     10 define i32 @foo() nounwind {
     11 entry:
     12 	br label %bb38.i
     13 
     14 bb14.i27:
     15 	%t0 = load i64* @ue, align 8
     16 	%t1 = sub i64 %t0, %i.0.i35
     17 	%t2 = add i64 %t1, 1
     18 	br i1 undef, label %bb15.i28, label %bb19.i31
     19 
     20 bb15.i28:
     21 	br label %bb19.i31
     22 
     23 bb19.i31:
     24 	%y.0.i = phi i64 [ %t2, %bb15.i28 ], [ %t2, %bb14.i27 ]
     25 	br label %bb35.i
     26 
     27 bb35.i:
     28 	br i1 undef, label %bb37.i, label %bb14.i27
     29 
     30 bb37.i:
     31 	%t3 = add i64 %i.0.i35, 1
     32 	br label %bb38.i
     33 
     34 bb38.i:
     35 	%i.0.i35 = phi i64 [ 1, %entry ], [ %t3, %bb37.i ]
     36 	br label %bb35.i
     37 }
     38