2 ; RUN: opt < %s -passes=indvars -disable-output -stats -info-output-file - | FileCheck %s
3 ; Check that IndVarSimplify is not creating unnecessary canonical IVs
4 ; that will never be used.
7 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"
9 @ue = external global i64
11 define i32 @foo() nounwind {
16 %t0 = load i64, ptr @ue, align 8
17 %t1 = sub i64 %t0, %i.0.i35
19 br i1 undef, label %bb15.i28, label %bb19.i31
25 %y.0.i = phi i64 [ %t2, %bb15.i28 ], [ %t2, %bb14.i27 ]
29 br i1 undef, label %bb37.i, label %bb14.i27
32 %t3 = add i64 %i.0.i35, 1
36 %i.0.i35 = phi i64 [ 1, %entry ], [ %t3, %bb37.i ]