1; The code in this test is very similar to vector-bonus.ll except for 2; the fact that the call to bar is cold thereby preventing the application of 3; the vector bonus. 4; RUN: opt < %s -passes=inline -inline-threshold=35 -S | FileCheck %s 5; RUN: opt < %s -passes='cgscc(inline)' -inline-threshold=35 -S | FileCheck %s 6 7define i32 @bar(<4 x i32> %v, i32 %i) #0 { 8entry: 9 %cmp = icmp sgt i32 %i, 4 10 br i1 %cmp, label %if.then, label %if.else 11 12if.then: ; preds = %entry 13 %mul1 = mul nsw i32 %i, %i 14 br label %return 15 16if.else: ; preds = %entry 17 %add1 = add nsw i32 %i, %i 18 %add2 = add nsw i32 %i, %i 19 %add3 = add nsw i32 %i, %i 20 %add4 = add nsw i32 %i, %i 21 %add5 = add nsw i32 %i, %i 22 %add6 = add nsw i32 %i, %i 23 %vecext = extractelement <4 x i32> %v, i32 0 24 %vecext7 = extractelement <4 x i32> %v, i32 1 25 %add7 = add nsw i32 %vecext, %vecext7 26 br label %return 27 28return: ; preds = %if.else, %if.then 29 %retval.0 = phi i32 [ %mul1, %if.then ], [ %add7, %if.else ] 30 ret i32 %retval.0 31} 32 33define i32 @foo(<4 x i32> %v, i32 %a) #1 { 34; CHECK-LABEL: @foo( 35; CHECK-NOT: call i32 @bar 36; CHECK: ret 37entry: 38 %cmp = icmp eq i32 %a, 0 39 br i1 %cmp, label %callbb, label %ret 40callbb: 41 %call = call i32 @bar(<4 x i32> %v, i32 %a) 42 br label %ret 43ret: 44 %call1 = phi i32 [%call, %callbb], [0, %entry] 45 ret i32 %call1 46} 47 48