|
5 | 5 |
|
6 | 6 | void test_signbit_float(float val) {
|
7 | 7 | // CIR-LABEL: test_signbit_float
|
8 |
| - // CIR: %{{.+}} = cir.signbit %{{.+}} : !cir.float -> !s32i |
| 8 | + // CIR: %{{.+}} = cir.signbit %{{.+}} : !cir.float -> !cir.bool |
9 | 9 | // LLVM-LABEL: test_signbit_float
|
10 | 10 | // LLVM: [[TMP1:%.*]] = bitcast float %{{.+}} to i32
|
11 | 11 | // LLVM: [[TMP2:%.*]] = icmp slt i32 [[TMP1]], 0
|
12 | 12 | // LLVM: %{{.+}} = zext i1 [[TMP2]] to i32
|
13 |
| - __builtin_signbit(val); |
| 13 | + if (__builtin_signbit(val)) {}; |
14 | 14 | }
|
15 | 15 |
|
16 | 16 | void test_signbit_double(double val) {
|
17 | 17 | // CIR-LABEL: test_signbit_double
|
18 |
| - // CIR: %{{.+}} = cir.signbit %{{.+}} : !cir.float -> !s32i |
| 18 | + // CIR: %{{.+}} = cir.signbit %{{.+}} : !cir.float -> !cir.bool |
19 | 19 | // LLVM-LABEL: test_signbit_double
|
20 | 20 | // LLVM: [[CONV:%.*]] = fptrunc double %{{.+}} to float
|
21 | 21 | // LLVM: [[TMP1:%.*]] = bitcast float [[CONV]] to i32
|
22 | 22 | // LLVM: [[TMP2:%.*]] = icmp slt i32 [[TMP1]], 0
|
23 | 23 | // LLVM: %{{.+}} = zext i1 [[TMP2]] to i32
|
24 |
| - __builtin_signbitf(val); |
| 24 | + if (__builtin_signbitf(val)) {} |
25 | 25 | }
|
26 | 26 |
|
27 | 27 | void test_signbit_long_double(long double val) {
|
28 | 28 | // CIR: test_signbit_long_double
|
29 | 29 | // LLVM: test_signbit_long_double
|
30 |
| - __builtin_signbitl(val); |
31 |
| - // CIR: %{{.+}} = cir.signbit %{{.+}} : !cir.long_double<!cir.f80> -> !s32i |
| 30 | + if (__builtin_signbitl(val)) {} |
| 31 | + // CIR: %{{.+}} = cir.signbit %{{.+}} : !cir.long_double<!cir.f80> -> !cir.bool |
32 | 32 | // LLVM: [[TMP1:%.*]] = bitcast x86_fp80 %{{.+}} to i80
|
33 | 33 | // LLVM: [[TMP2:%.*]] = icmp slt i80 [[TMP1]], 0
|
34 | 34 | // LLVM: %{{.+}} = zext i1 [[TMP2]] to i32
|
|
0 commit comments