File: float-gen-cmpop.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 (72 lines) | stat: -rw-r--r-- 2,158 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
66
67
68
69
70
71
72
; RUN: llc -march=hexagon -O3 < %s | FileCheck %s

target triple = "hexagon"

; CHECK-LABEL: f0:
; CHECK: p{{[0-9]+}} = sfcmp.ge(r{{[0-9]+}},r{{[0-9]+}})
; CHECK: p{{[0-9]+}} = sfcmp.gt(r{{[0-9]+}},r{{[0-9]+}})
define i32 @f0(ptr nocapture %a0) #0 {
b0:
  %v0 = load float, ptr %a0, align 4, !tbaa !0
  %v1 = fcmp olt float %v0, 6.000000e+01
  br i1 %v1, label %b1, label %b2

b1:                                               ; preds = %b0
  %v2 = getelementptr inbounds float, ptr %a0, i32 1
  %v3 = load float, ptr %v2, align 4, !tbaa !0
  %v4 = fcmp ogt float %v3, 0x3FECCCCCC0000000
  br label %b2

b2:                                               ; preds = %b1, %b0
  %v5 = phi i1 [ false, %b0 ], [ %v4, %b1 ]
  %v6 = zext i1 %v5 to i32
  ret i32 %v6
}

; CHECK-LABEL: f1:
; CHECK: p{{[0-9]+}} = sfcmp.eq(r{{[0-9]+}},r{{[0-9]+}})
define i32 @f1(ptr nocapture %a0) #0 {
b0:
  %v0 = load float, ptr %a0, align 4, !tbaa !0
  %v1 = fcmp oeq float %v0, 6.000000e+01
  %v2 = zext i1 %v1 to i32
  ret i32 %v2
}

; CHECK-LABEL: f2:
; CHECK: p{{[0-9]+}} = dfcmp.ge(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}})
; CHECK: p{{[0-9]+}} = dfcmp.gt(r{{[0-9]+}}:{{[0-9]+}},r{{[0-9]+}}:{{[0-9]+}})
define i32 @f2(ptr nocapture %a0) #0 {
b0:
  %v0 = load double, ptr %a0, align 8, !tbaa !4
  %v1 = fcmp olt double %v0, 6.000000e+01
  br i1 %v1, label %b1, label %b2

b1:                                               ; preds = %b0
  %v2 = getelementptr inbounds double, ptr %a0, i32 1
  %v3 = load double, ptr %v2, align 8, !tbaa !4
  %v4 = fcmp ogt double %v3, 0x3FECCCCCC0000000
  br label %b2

b2:                                               ; preds = %b1, %b0
  %v5 = phi i1 [ false, %b0 ], [ %v4, %b1 ]
  %v6 = zext i1 %v5 to i32
  ret i32 %v6
}

define i32 @f3(ptr nocapture %a0) #0 {
b0:
  %v0 = load double, ptr %a0, align 8, !tbaa !4
  %v1 = fcmp oeq double %v0, 6.000000e+01
  %v2 = zext i1 %v1 to i32
  ret i32 %v2
}

attributes #0 = { nounwind readonly "target-cpu"="hexagonv55" "no-nans-fp-math"="true" }

!0 = !{!1, !1, i64 0}
!1 = !{!"float", !2}
!2 = !{!"omnipotent char", !3}
!3 = !{!"Simple C/C++ TBAA"}
!4 = !{!5, !5, i64 0}
!5 = !{!"double", !2}