1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=loop-unroll -unroll-threshold=300 -S < %s | FileCheck %s
4 ; This test caused a compile-time explosion in ValueTracking
5 ; because we cloned the assume value and call greatly and
6 ; then spent far too long analyzing those.
8 define void @PR49171(i32 %arg) {
9 ; CHECK-LABEL: @PR49171(
11 ; CHECK-NEXT: br label [[LOOP:%.*]]
13 ; CHECK-NEXT: [[ASSUME:%.*]] = icmp eq i32 0, [[ARG:%.*]]
14 ; CHECK-NEXT: call void @llvm.assume(i1 [[ASSUME]])
15 ; CHECK-NEXT: ret void
21 %iv = phi i32 [ 0, %entry ], [ %iv.inc, %loop ]
22 %iv2 = phi i32 [ 0, %entry ], [ %arg, %loop ]
23 %assume = icmp eq i32 %iv2, %arg
24 call void @llvm.assume(i1 %assume)
25 %iv.inc = add nuw nsw i32 %iv, 1
26 %exitcond = icmp eq i32 %iv.inc, 50 ; Increase me!
27 br i1 %exitcond, label %exit, label %loop
33 declare void @llvm.assume(i1)