38 lines · plain
1; RUN: opt -passes="verify<scalar-evolution>,lcssa,verify<scalar-evolution>" -verify-scev-strict -S %s2 3; The first SCEV verification is required because it queries SCEV and populates4; SCEV caches. Second SCEV verification checks if the caches are in valid state.5 6; Check that the second SCEV verification doesn't fail.7define void @foo(ptr %arg, ptr %arg1, i1 %arg2) {8bb:9 br label %bb310 11bb3: ; preds = %bb13, %bb12 %tmp = load i32, ptr %arg13 %tmp4 = load i32, ptr %arg114 %tmp5 = add i32 %tmp4, %tmp15 %tmp6 = icmp sgt i32 %tmp5, %tmp16 br i1 %tmp6, label %bb7, label %bb1117 18bb7: ; preds = %bb319 br i1 %arg2, label %bb10, label %bb820 21bb8: ; preds = %bb722 %tmp9 = add nsw i32 %tmp, 123 ret void24 25bb10: ; preds = %bb726 br label %bb1127 28bb11: ; preds = %bb10, %bb329 %tmp12 = phi i32 [ 0, %bb3 ], [ %tmp4, %bb10 ]30 br label %bb1331 32bb13: ; preds = %bb13, %bb1133 %tmp14 = phi i32 [ %tmp15, %bb13 ], [ 0, %bb11 ]34 %tmp15 = add nuw nsw i32 %tmp14, 135 %tmp16 = icmp slt i32 %tmp15, %tmp1236 br i1 %tmp16, label %bb13, label %bb337}38