1 extern double g;
2
fcmp_eq(double a)3 int fcmp_eq(double a) { return (g == a); }
fcmp_ne(double a)4 int fcmp_ne(double a) { return (g != a); }
5
fcmp_gt(double a)6 int fcmp_gt(double a) { return (g > a); }
fcmp_ge(double a)7 int fcmp_ge(double a) { return (g >= a); }
fcmp_le(double a)8 int fcmp_le(double a) { return (g <= a); }
fcmp_lt(double a)9 int fcmp_lt(double a) { return (g < a); }
10
nfcmp_ne(double a)11 int nfcmp_ne(double a) { return !(g == a); }
nfcmp_eq(double a)12 int nfcmp_eq(double a) { return !(g != a); }
13
nfcmp_le(double a)14 int nfcmp_le(double a) { return !(g > a); }
nfcmp_lt(double a)15 int nfcmp_lt(double a) { return !(g >= a); }
nfcmp_gt(double a)16 int nfcmp_gt(double a) { return !(g <= a); }
nfcmp_ge(double a)17 int nfcmp_ge(double a) { return !(g < a); }
18
19 /*
20 * check-name: canonical-cmp
21 * check-command: test-linearize -Wno-decl $file
22 *
23 * check-output-excludes: \\$123,
24 *
25 * check-output-start
26 fcmp_eq:
27 .L0:
28 <entry-point>
29 load.64 %r1 <- 0[g]
30 fcmpoeq.32 %r3 <- %r1, %arg1
31 ret.32 %r3
32
33
34 fcmp_ne:
35 .L2:
36 <entry-point>
37 load.64 %r5 <- 0[g]
38 fcmpune.32 %r7 <- %r5, %arg1
39 ret.32 %r7
40
41
42 fcmp_gt:
43 .L4:
44 <entry-point>
45 load.64 %r9 <- 0[g]
46 fcmpogt.32 %r11 <- %r9, %arg1
47 ret.32 %r11
48
49
50 fcmp_ge:
51 .L6:
52 <entry-point>
53 load.64 %r13 <- 0[g]
54 fcmpoge.32 %r15 <- %r13, %arg1
55 ret.32 %r15
56
57
58 fcmp_le:
59 .L8:
60 <entry-point>
61 load.64 %r17 <- 0[g]
62 fcmpole.32 %r19 <- %r17, %arg1
63 ret.32 %r19
64
65
66 fcmp_lt:
67 .L10:
68 <entry-point>
69 load.64 %r21 <- 0[g]
70 fcmpolt.32 %r23 <- %r21, %arg1
71 ret.32 %r23
72
73
74 nfcmp_ne:
75 .L12:
76 <entry-point>
77 load.64 %r25 <- 0[g]
78 fcmpune.32 %r28 <- %r25, %arg1
79 ret.32 %r28
80
81
82 nfcmp_eq:
83 .L14:
84 <entry-point>
85 load.64 %r30 <- 0[g]
86 fcmpoeq.32 %r33 <- %r30, %arg1
87 ret.32 %r33
88
89
90 nfcmp_le:
91 .L16:
92 <entry-point>
93 load.64 %r35 <- 0[g]
94 fcmpule.32 %r38 <- %r35, %arg1
95 ret.32 %r38
96
97
98 nfcmp_lt:
99 .L18:
100 <entry-point>
101 load.64 %r40 <- 0[g]
102 fcmpult.32 %r43 <- %r40, %arg1
103 ret.32 %r43
104
105
106 nfcmp_gt:
107 .L20:
108 <entry-point>
109 load.64 %r45 <- 0[g]
110 fcmpugt.32 %r48 <- %r45, %arg1
111 ret.32 %r48
112
113
114 nfcmp_ge:
115 .L22:
116 <entry-point>
117 load.64 %r50 <- 0[g]
118 fcmpuge.32 %r53 <- %r50, %arg1
119 ret.32 %r53
120
121
122 * check-output-end
123 */
124