36 lines · plain
1; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s2 3; CHECK: Loop %bb1: backedge-taken count is ((2 * %a.promoted) /u 2)4 5target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"6target triple = "x86_64-apple-macosx10.10.0"7 8@a = global i8 -127, align 19@b = common global i32 0, align 410 11declare void @use(i32)12 13define i32 @main() {14bb:15 %a.promoted = load i8, ptr @a16 br label %bb117 18bb1: ; preds = %bb1, %bb19 %tmp = phi i8 [ %tmp2, %bb1 ], [ %a.promoted, %bb ]20 %tmp2 = add i8 %tmp, -121 %tmp3 = sext i8 %tmp to i3222 %tmp4 = xor i32 %tmp3, -123 %tmp5 = sext i8 %tmp2 to i3224 %tmpf = sub nsw i32 %tmp4, %tmp525 %tmp6 = trunc i32 %tmpf to i826 %tmp7 = icmp eq i8 %tmp6, 027 br i1 %tmp7, label %bb8, label %bb128 29bb8: ; preds = %bb130 store i8 %tmp2, ptr @a31 store i32 %tmp4, ptr @b32 %tmp9 = sext i8 %tmp2 to i3233 call void @use(i32 %tmp9)34 ret i32 035}36