brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · f26f032 Raw
38 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// RUN: %clang_cc1 -triple loongarch64 -target-feature +lsx -target-feature +frecipe -O2 -emit-llvm %s -o - | FileCheck %s3 4#include <lsxintrin.h>5 6// CHECK-LABEL: @vfrecipe_s(7// CHECK-NEXT:  entry:8// CHECK-NEXT:    [[TMP0:%.*]] = bitcast i128 [[_1_COERCE:%.*]] to <4 x float>9// CHECK-NEXT:    [[TMP1:%.*]] = tail call <4 x float> @llvm.loongarch.lsx.vfrecipe.s(<4 x float> [[TMP0]])10// CHECK-NEXT:    [[TMP2:%.*]] = bitcast <4 x float> [[TMP1]] to i12811// CHECK-NEXT:    ret i128 [[TMP2]]12//13v4f32 vfrecipe_s(v4f32 _1) { return __lsx_vfrecipe_s(_1); }14// CHECK-LABEL: @vfrecipe_d(15// CHECK-NEXT:  entry:16// CHECK-NEXT:    [[TMP0:%.*]] = bitcast i128 [[_1_COERCE:%.*]] to <2 x double>17// CHECK-NEXT:    [[TMP1:%.*]] = tail call <2 x double> @llvm.loongarch.lsx.vfrecipe.d(<2 x double> [[TMP0]])18// CHECK-NEXT:    [[TMP2:%.*]] = bitcast <2 x double> [[TMP1]] to i12819// CHECK-NEXT:    ret i128 [[TMP2]]20//21v2f64 vfrecipe_d(v2f64 _1) { return __lsx_vfrecipe_d(_1); }22// CHECK-LABEL: @vfrsqrte_s(23// CHECK-NEXT:  entry:24// CHECK-NEXT:    [[TMP0:%.*]] = bitcast i128 [[_1_COERCE:%.*]] to <4 x float>25// CHECK-NEXT:    [[TMP1:%.*]] = tail call <4 x float> @llvm.loongarch.lsx.vfrsqrte.s(<4 x float> [[TMP0]])26// CHECK-NEXT:    [[TMP2:%.*]] = bitcast <4 x float> [[TMP1]] to i12827// CHECK-NEXT:    ret i128 [[TMP2]]28//29v4f32 vfrsqrte_s(v4f32 _1) { return __lsx_vfrsqrte_s(_1); }30// CHECK-LABEL: @vfrsqrte_d(31// CHECK-NEXT:  entry:32// CHECK-NEXT:    [[TMP0:%.*]] = bitcast i128 [[_1_COERCE:%.*]] to <2 x double>33// CHECK-NEXT:    [[TMP1:%.*]] = tail call <2 x double> @llvm.loongarch.lsx.vfrsqrte.d(<2 x double> [[TMP0]])34// CHECK-NEXT:    [[TMP2:%.*]] = bitcast <2 x double> [[TMP1]] to i12835// CHECK-NEXT:    ret i128 [[TMP2]]36//37v2f64 vfrsqrte_d(v2f64 _1) { return __lsx_vfrsqrte_d(_1); }38