1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple loongarch64 -target-feature +lasx -target-feature +frecipe -O2 -emit-llvm %s -o - | FileCheck %s
4 #include <lasxintrin.h>
6 // CHECK-LABEL: @xvfrecipe_s(
8 // CHECK-NEXT: [[_1:%.*]] = load <8 x float>, ptr [[TMP0:%.*]], align 32, !tbaa [[TBAA2:![0-9]+]]
9 // CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x float> @llvm.loongarch.lasx.xvfrecipe.s(<8 x float> [[_1]])
10 // CHECK-NEXT: store <8 x float> [[TMP1]], ptr [[AGG_RESULT:%.*]], align 32, !tbaa [[TBAA2]]
11 // CHECK-NEXT: ret void
13 v8f32
xvfrecipe_s(v8f32 _1
) { return __lasx_xvfrecipe_s(_1
); }
14 // CHECK-LABEL: @xvfrecipe_d(
16 // CHECK-NEXT: [[_1:%.*]] = load <4 x double>, ptr [[TMP0:%.*]], align 32, !tbaa [[TBAA2:![0-9]+]]
17 // CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x double> @llvm.loongarch.lasx.xvfrecipe.d(<4 x double> [[_1]])
18 // CHECK-NEXT: store <4 x double> [[TMP1]], ptr [[AGG_RESULT:%.*]], align 32, !tbaa [[TBAA2]]
19 // CHECK-NEXT: ret void
21 v4f64
xvfrecipe_d(v4f64 _1
) { return __lasx_xvfrecipe_d(_1
); }
22 // CHECK-LABEL: @xvfrsqrte_s(
24 // CHECK-NEXT: [[_1:%.*]] = load <8 x float>, ptr [[TMP0:%.*]], align 32, !tbaa [[TBAA2:![0-9]+]]
25 // CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x float> @llvm.loongarch.lasx.xvfrsqrte.s(<8 x float> [[_1]])
26 // CHECK-NEXT: store <8 x float> [[TMP1]], ptr [[AGG_RESULT:%.*]], align 32, !tbaa [[TBAA2]]
27 // CHECK-NEXT: ret void
29 v8f32
xvfrsqrte_s(v8f32 _1
) { return __lasx_xvfrsqrte_s(_1
); }
30 // CHECK-LABEL: @xvfrsqrte_d(
32 // CHECK-NEXT: [[_1:%.*]] = load <4 x double>, ptr [[TMP0:%.*]], align 32, !tbaa [[TBAA2:![0-9]+]]
33 // CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x double> @llvm.loongarch.lasx.xvfrsqrte.d(<4 x double> [[_1]])
34 // CHECK-NEXT: store <4 x double> [[TMP1]], ptr [[AGG_RESULT:%.*]], align 32, !tbaa [[TBAA2]]
35 // CHECK-NEXT: ret void
37 v4f64
xvfrsqrte_d(v4f64 _1
) { return __lasx_xvfrsqrte_d(_1
); }