File: swp-stages3.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (65 lines) | stat: -rw-r--r-- 2,233 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
; RUN: llc -march=hexagon -enable-pipeliner -pipeliner-max-stages=2 < %s
; REQUIRES: asserts

; Test that the compiler doesn't seg fault due to incorrect names in epilog.

; Function Attrs: nounwind
define void @f0(ptr nocapture %a0, ptr nocapture %a1, i16 signext %a2) #0 {
b0:
  %v0 = icmp sgt i16 %a2, 0
  br i1 %v0, label %b1, label %b3

b1:                                               ; preds = %b0
  %v1 = sext i16 %a2 to i32
  br label %b2

b2:                                               ; preds = %b2, %b1
  %v2 = phi i16 [ %v16, %b2 ], [ undef, %b1 ]
  %v3 = phi i32 [ %v17, %b2 ], [ 0, %b1 ]
  %v4 = phi ptr [ undef, %b2 ], [ %a0, %b1 ]
  %v5 = phi ptr [ %v6, %b2 ], [ %a1, %b1 ]
  %v6 = getelementptr inbounds i16, ptr %v5, i32 1
  %v7 = load i16, ptr %v5, align 2, !tbaa !0
  %v8 = sext i16 %v7 to i32
  %v9 = tail call i32 @llvm.hexagon.A2.aslh(i32 %v8)
  %v10 = tail call i32 @llvm.hexagon.S2.asr.r.r.sat(i32 %v9, i32 undef)
  %v11 = sext i16 %v2 to i32
  %v12 = tail call i32 @llvm.hexagon.M2.mpy.nac.sat.ll.s1(i32 %v10, i32 %v11, i32 undef)
  %v13 = tail call i32 @llvm.hexagon.S2.asl.r.r.sat(i32 %v12, i32 undef)
  %v14 = tail call i32 @llvm.hexagon.A2.addsat(i32 %v13, i32 32768)
  %v15 = tail call i32 @llvm.hexagon.A2.asrh(i32 %v14)
  %v16 = trunc i32 %v15 to i16
  store i16 %v16, ptr %v4, align 2, !tbaa !0
  %v17 = add i32 %v3, 1
  %v18 = icmp eq i32 %v17, %v1
  br i1 %v18, label %b3, label %b2

b3:                                               ; preds = %b2, %b0
  ret void
}

; Function Attrs: nounwind readnone
declare i32 @llvm.hexagon.A2.aslh(i32) #1

; Function Attrs: nounwind readnone
declare i32 @llvm.hexagon.S2.asr.r.r.sat(i32, i32) #1

; Function Attrs: nounwind readnone
declare i32 @llvm.hexagon.M2.mpy.nac.sat.ll.s1(i32, i32, i32) #1

; Function Attrs: nounwind readnone
declare i32 @llvm.hexagon.S2.asl.r.r.sat(i32, i32) #1

; Function Attrs: nounwind readnone
declare i32 @llvm.hexagon.A2.asrh(i32) #1

; Function Attrs: nounwind readnone
declare i32 @llvm.hexagon.A2.addsat(i32, i32) #1

attributes #0 = { nounwind "target-cpu"="hexagonv55" }
attributes #1 = { nounwind readnone }

!0 = !{!1, !1, i64 0}
!1 = !{!"short", !2}
!2 = !{!"omnipotent char", !3}
!3 = !{!"Simple C/C++ TBAA"}