48 lines · plain
1; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:1"4 5; Check that we don't have unreasonably huge SCEVs and in particular only a6; reasonable amount of AddRecs in the notation of %tmp19. If we "simplify" SCEVs7; too aggressively, we may end up with huge nested expressions.8define void @test(i32 %x, i64 %y, i1 %cond) {9 10; CHECK: %tmp19 = mul i32 %tmp17, %tmp1811; CHECK: ((((((12; CHECK-NOT: (((((13; CHECK: %tmp20 = add i32 %tmp19, %x14 15bb:16 br label %bb117 18bb1: ; preds = %bb3, %bb19 %tmp = phi i64 [ %y, %bb ], [ %tmp22, %bb3 ]20 %tmp2 = phi i32 [ %x, %bb ], [ %tmp4, %bb3 ]21 br label %bb522 23bb3: ; preds = %bb524 %tmp4 = add i32 %tmp2, %x25 br label %bb126 27bb5: ; preds = %bb5, %bb128 %tmp6 = phi i32 [ %tmp23, %bb5 ], [ %tmp2, %bb1 ]29 %tmp7 = sub i32 -119, %tmp630 %tmp8 = mul i32 %tmp7, %x31 %tmp9 = sub i32 -120, %tmp632 %tmp10 = mul i32 %tmp8, %tmp933 %tmp11 = mul i32 %x, %tmp1034 %tmp12 = sub i32 -121, %tmp635 %tmp13 = mul i32 %tmp10, %tmp1236 %tmp14 = mul i32 %tmp11, %tmp1337 %tmp15 = sub i32 -122, %tmp638 %tmp16 = mul i32 %tmp13, %tmp1539 %tmp17 = mul i32 %tmp14, %tmp1640 %tmp18 = mul i32 %tmp16, %x41 %tmp19 = mul i32 %tmp17, %tmp1842 %tmp20 = add i32 %tmp19, %x43 %tmp21 = sext i32 %tmp20 to i6444 %tmp22 = add i64 %y, %tmp2145 %tmp23 = add i32 %tmp6, 746 br i1 %cond, label %bb5, label %bb347}48