1; RUN: opt -passes="verify<scalar-evolution>,lcssa,verify<scalar-evolution>" -verify-scev-strict -S %s 2 3; The first SCEV verification is required because it queries SCEV and populates 4; 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 %bb3 10 11bb3: ; preds = %bb13, %bb 12 %tmp = load i32, ptr %arg 13 %tmp4 = load i32, ptr %arg1 14 %tmp5 = add i32 %tmp4, %tmp 15 %tmp6 = icmp sgt i32 %tmp5, %tmp 16 br i1 %tmp6, label %bb7, label %bb11 17 18bb7: ; preds = %bb3 19 br i1 %arg2, label %bb10, label %bb8 20 21bb8: ; preds = %bb7 22 %tmp9 = add nsw i32 %tmp, 1 23 ret void 24 25bb10: ; preds = %bb7 26 br label %bb11 27 28bb11: ; preds = %bb10, %bb3 29 %tmp12 = phi i32 [ 0, %bb3 ], [ %tmp4, %bb10 ] 30 br label %bb13 31 32bb13: ; preds = %bb13, %bb11 33 %tmp14 = phi i32 [ %tmp15, %bb13 ], [ 0, %bb11 ] 34 %tmp15 = add nuw nsw i32 %tmp14, 1 35 %tmp16 = icmp slt i32 %tmp15, %tmp12 36 br i1 %tmp16, label %bb13, label %bb3 37} 38