File: ps_call_nr.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (46 lines) | stat: -rw-r--r-- 1,250 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
; RUN: llc -march=hexagon < %s | FileCheck %s

; Test that the compiler does not generate an invalid packet with three
; instructions that each requires slot 2 or 3. The specification for
; PS_call_nr was incorrect, which allowed that instrution to go in any slot.

; CHECK: extractu
; CHECK: extractu
; CHECK: {
; CHECK: call

%s.0 = type <{ ptr, ptr, i16, i8, i8, i8 }>

@g0 = external constant %s.0, section ".rodata.trace", align 1

define void @f0() local_unnamed_addr {
b0:
  %v0 = load i32, ptr undef, align 4
  %v1 = trunc i32 %v0 to i2
  switch i2 %v1, label %b4 [
    i2 1, label %b1
    i2 -1, label %b2
    i2 -2, label %b2
    i2 0, label %b3
  ]

b1:                                               ; preds = %b0
  unreachable

b2:                                               ; preds = %b0, %b0
  %v2 = load i32, ptr undef, align 4
  %v3 = lshr i32 %v2, 14
  %v4 = and i32 %v3, 2047
  %v5 = lshr i32 %v2, 3
  %v6 = and i32 %v5, 2047
  tail call void @f1(ptr nonnull @g0, i32 %v6, i32 %v4, i32 0, i32 0)
  unreachable

b3:                                               ; preds = %b0
  ret void

b4:                                               ; preds = %b0
  unreachable
}

declare void @f1(ptr, i32, i32, i32, i32) local_unnamed_addr