1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4
2 // RUN: %clang_cc1 -triple loongarch32 -target-feature +f -target-feature +frecipe -O2 -emit-llvm %s -o - | FileCheck %s
3 // RUN: %clang_cc1 -triple loongarch64 -target-feature +f -target-feature +frecipe -O2 -emit-llvm %s -o - | FileCheck %s
5 #include <larchintrin.h>
7 // CHECK-LABEL: @frecipe_s
9 // CHECK-NEXT: [[TMP0:%.*]] = tail call float @llvm.loongarch.frecipe.s(float [[A:%.*]])
10 // CHECK-NEXT: ret float [[TMP0]]
12 float frecipe_s (float _1
)
14 return __builtin_loongarch_frecipe_s (_1
);
17 // CHECK-LABEL: @frsqrte_s
19 // CHECK-NEXT: [[TMP0:%.*]] = tail call float @llvm.loongarch.frsqrte.s(float [[A:%.*]])
20 // CHECK-NEXT: ret float [[TMP0]]
22 float frsqrte_s (float _1
)
24 return __builtin_loongarch_frsqrte_s (_1
);
27 // CHECK-LABEL: @frecipe_s_alia
29 // CHECK-NEXT: [[TMP0:%.*]] = tail call float @llvm.loongarch.frecipe.s(float [[A:%.*]])
30 // CHECK-NEXT: ret float [[TMP0]]
32 float frecipe_s_alia (float _1
)
34 return __frecipe_s (_1
);
37 // CHECK-LABEL: @frsqrte_s_alia
39 // CHECK-NEXT: [[TMP0:%.*]] = tail call float @llvm.loongarch.frsqrte.s(float [[A:%.*]])
40 // CHECK-NEXT: ret float [[TMP0]]
42 float frsqrte_s_alia (float _1
)
44 return __frsqrte_s (_1
);