40 lines · plain
1; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck %s2 3; CHECK: %tmp9 = shl i64 %tmp8, 334; CHECK-NEXT: --> {{.*}} Exits: (-8589934592 + (8589934592 * (zext i32 %arg2 to i64)))5; CHECK-NEXT: %tmp10 = ashr exact i64 %tmp9, 06; CHECK-NEXT: --> {{.*}} Exits: (-8589934592 + (8589934592 * (zext i32 %arg2 to i64)))7 8define void @foo(ptr nocapture %arg, i32 %arg1, i32 %arg2) {9bb:10 %tmp = icmp sgt i32 %arg2, 011 br i1 %tmp, label %bb3, label %bb612 13bb3: ; preds = %bb14 %tmp4 = zext i32 %arg2 to i6415 br label %bb716 17bb5: ; preds = %bb718 br label %bb619 20bb6: ; preds = %bb5, %bb21 ret void22 23bb7: ; preds = %bb7, %bb324 %tmp8 = phi i64 [ %tmp18, %bb7 ], [ 0, %bb3 ]25 %tmp9 = shl i64 %tmp8, 3326 %tmp10 = ashr exact i64 %tmp9, 027 %tmp11 = getelementptr inbounds i32, ptr %arg, i64 %tmp1028 %tmp12 = load i32, ptr %tmp11, align 429 %tmp13 = sub nsw i32 %tmp12, %arg130 store i32 %tmp13, ptr %tmp11, align 431 %tmp14 = or i64 %tmp10, 132 %tmp15 = getelementptr inbounds i32, ptr %arg, i64 %tmp1433 %tmp16 = load i32, ptr %tmp15, align 434 %tmp17 = mul nsw i32 %tmp16, %arg135 store i32 %tmp17, ptr %tmp15, align 436 %tmp18 = add nuw nsw i64 %tmp8, 137 %tmp19 = icmp eq i64 %tmp18, %tmp438 br i1 %tmp19, label %bb5, label %bb739}40