1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 ; Test that the compiler does not generate an invalid packet with three
4 ; instructions that each requires slot 2 or 3. The specification for
5 ; PS_call_nr was incorrect, which allowed that instrution to go in any slot.
12 %s.0 = type <{ ptr, ptr, i16, i8, i8, i8 }>
14 @g0 = external constant %s.0, section ".rodata.trace", align 1
16 define void @f0() local_unnamed_addr {
18 %v0 = load i32, ptr undef, align 4
19 %v1 = trunc i32 %v0 to i2
20 switch i2 %v1, label %b4 [
30 b2: ; preds = %b0, %b0
31 %v2 = load i32, ptr undef, align 4
32 %v3 = lshr i32 %v2, 14
33 %v4 = and i32 %v3, 2047
35 %v6 = and i32 %v5, 2047
36 tail call void @f1(ptr nonnull @g0, i32 %v6, i32 %v4, i32 0, i32 0)
46 declare void @f1(ptr, i32, i32, i32, i32) local_unnamed_addr