1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 ; Test that the first packet contains 4 instructions, which includes
4 ; a call. The compiler marked the call as constant extended incorrectly,
5 ; which meant it couldn't fit in the first packet. But, calls are not
6 ; constant extended by the compiler.
12 ; CHECK-NEXT: allocframe
16 @g0 = external global i32
18 ; Function Attrs: noinline nounwind
19 define i32 @f0(i32 %a0, i32* nocapture %a1) #0 {
21 %v0 = tail call i32 @f1(i32 %a0)
22 %v1 = icmp eq i32 %v0, 0
23 %v2 = select i1 %v1, i32 3, i32 %a0
24 store i32 %v2, i32* %a1, align 4
25 switch i32 %a0, label %b5 [
33 store i32 0, i32* %a1, align 4
37 %v3 = load i32, i32* @g0, align 4
38 %v4 = icmp sgt i32 %v3, 100
39 %v5 = select i1 %v4, i32 0, i32 3
40 store i32 %v5, i32* %a1, align 4
44 store i32 1, i32* %a1, align 4
48 store i32 2, i32* %a1, align 4
51 b5: ; preds = %b4, %b3, %b2, %b1, %b0
55 ; Function Attrs: noinline nounwind readnone
56 declare i32 @f1(i32) #1
58 attributes #0 = { noinline nounwind "target-cpu"="hexagonv60" }
59 attributes #1 = { noinline nounwind readnone "target-cpu"="hexagonv60" }