diff options
author | Jack Carter <jack.carter@imgtec.com> | 2013-08-15 13:45:36 +0000 |
---|---|---|
committer | Jack Carter <jack.carter@imgtec.com> | 2013-08-15 13:45:36 +0000 |
commit | d0f99639c16ddad697db30e75643ae4cc52c3e80 (patch) | |
tree | 87ce781f1e567fc510032f490a07f84183ca9f16 /test/CodeGen/Mips/msa | |
parent | e2a9376b1bd2204ea6f56a35b762e28e0ef4e35a (diff) | |
download | external_llvm-d0f99639c16ddad697db30e75643ae4cc52c3e80.zip external_llvm-d0f99639c16ddad697db30e75643ae4cc52c3e80.tar.gz external_llvm-d0f99639c16ddad697db30e75643ae4cc52c3e80.tar.bz2 |
[Mips][msa] Added the simple builtins (fadd to ftq)
Includes:
fadd, fceq, fcg[et], fclass, fcl[et], fcne, fcun, fdiv, fexdo, fexp2,
fexup[lr], ffint_[su], ffql, ffqr, fill, flog2, fmadd, fmax, fmax_a, fmin,
fmin_a, fmsub, fmul, frint, frcp, frsqrt, fseq, fsge, fsgt, fsle, fslt,
fsne, fsqr, fsub, ftint_s, ftq
Patch by Daniel Sanders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/msa')
-rw-r--r-- | test/CodeGen/Mips/msa/2rf.ll | 192 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/2rf_exup.ll | 78 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/2rf_float_int.ll | 78 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/2rf_fq.ll | 78 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/2rf_int_float.ll | 116 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/2rf_tq.ll | 46 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/3rf.ll | 354 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/3rf_4rf.ll | 102 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/3rf_exdo.ll | 46 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/3rf_float_int.ll | 46 | ||||
-rw-r--r-- | test/CodeGen/Mips/msa/3rf_int_float.ll | 574 |
11 files changed, 1710 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/msa/2rf.ll b/test/CodeGen/Mips/msa/2rf.ll new file mode 100644 index 0000000..6283cdf --- /dev/null +++ b/test/CodeGen/Mips/msa/2rf.ll @@ -0,0 +1,192 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_flog2_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_flog2_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_flog2_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_flog2_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.flog2.w(<4 x float> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_flog2_w_RES + ret void +} + +declare <4 x float> @llvm.mips.flog2.w(<4 x float>) nounwind + +; CHECK: llvm_mips_flog2_w_test: +; CHECK: ld.w +; CHECK: flog2.w +; CHECK: st.w +; CHECK: .size llvm_mips_flog2_w_test +; +@llvm_mips_flog2_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_flog2_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_flog2_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_flog2_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.flog2.d(<2 x double> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_flog2_d_RES + ret void +} + +declare <2 x double> @llvm.mips.flog2.d(<2 x double>) nounwind + +; CHECK: llvm_mips_flog2_d_test: +; CHECK: ld.d +; CHECK: flog2.d +; CHECK: st.d +; CHECK: .size llvm_mips_flog2_d_test +; +@llvm_mips_frint_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_frint_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_frint_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_frint_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.frint.w(<4 x float> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_frint_w_RES + ret void +} + +declare <4 x float> @llvm.mips.frint.w(<4 x float>) nounwind + +; CHECK: llvm_mips_frint_w_test: +; CHECK: ld.w +; CHECK: frint.w +; CHECK: st.w +; CHECK: .size llvm_mips_frint_w_test +; +@llvm_mips_frint_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_frint_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_frint_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_frint_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.frint.d(<2 x double> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_frint_d_RES + ret void +} + +declare <2 x double> @llvm.mips.frint.d(<2 x double>) nounwind + +; CHECK: llvm_mips_frint_d_test: +; CHECK: ld.d +; CHECK: frint.d +; CHECK: st.d +; CHECK: .size llvm_mips_frint_d_test +; +@llvm_mips_frcp_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_frcp_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_frcp_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_frcp_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.frcp.w(<4 x float> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_frcp_w_RES + ret void +} + +declare <4 x float> @llvm.mips.frcp.w(<4 x float>) nounwind + +; CHECK: llvm_mips_frcp_w_test: +; CHECK: ld.w +; CHECK: frcp.w +; CHECK: st.w +; CHECK: .size llvm_mips_frcp_w_test +; +@llvm_mips_frcp_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_frcp_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_frcp_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_frcp_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.frcp.d(<2 x double> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_frcp_d_RES + ret void +} + +declare <2 x double> @llvm.mips.frcp.d(<2 x double>) nounwind + +; CHECK: llvm_mips_frcp_d_test: +; CHECK: ld.d +; CHECK: frcp.d +; CHECK: st.d +; CHECK: .size llvm_mips_frcp_d_test +; +@llvm_mips_frsqrt_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_frsqrt_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_frsqrt_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_frsqrt_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.frsqrt.w(<4 x float> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_frsqrt_w_RES + ret void +} + +declare <4 x float> @llvm.mips.frsqrt.w(<4 x float>) nounwind + +; CHECK: llvm_mips_frsqrt_w_test: +; CHECK: ld.w +; CHECK: frsqrt.w +; CHECK: st.w +; CHECK: .size llvm_mips_frsqrt_w_test +; +@llvm_mips_frsqrt_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_frsqrt_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_frsqrt_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_frsqrt_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.frsqrt.d(<2 x double> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_frsqrt_d_RES + ret void +} + +declare <2 x double> @llvm.mips.frsqrt.d(<2 x double>) nounwind + +; CHECK: llvm_mips_frsqrt_d_test: +; CHECK: ld.d +; CHECK: frsqrt.d +; CHECK: st.d +; CHECK: .size llvm_mips_frsqrt_d_test +; +@llvm_mips_fsqrt_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fsqrt_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fsqrt_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fsqrt_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.fsqrt.w(<4 x float> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_fsqrt_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fsqrt.w(<4 x float>) nounwind + +; CHECK: llvm_mips_fsqrt_w_test: +; CHECK: ld.w +; CHECK: fsqrt.w +; CHECK: st.w +; CHECK: .size llvm_mips_fsqrt_w_test +; +@llvm_mips_fsqrt_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fsqrt_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fsqrt_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fsqrt_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.fsqrt.d(<2 x double> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_fsqrt_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fsqrt.d(<2 x double>) nounwind + +; CHECK: llvm_mips_fsqrt_d_test: +; CHECK: ld.d +; CHECK: fsqrt.d +; CHECK: st.d +; CHECK: .size llvm_mips_fsqrt_d_test +; diff --git a/test/CodeGen/Mips/msa/2rf_exup.ll b/test/CodeGen/Mips/msa/2rf_exup.ll new file mode 100644 index 0000000..54e416d --- /dev/null +++ b/test/CodeGen/Mips/msa/2rf_exup.ll @@ -0,0 +1,78 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_fexupl_w_ARG1 = global <8 x half> <half 0.000000e+00, half 1.000000e+00, half 2.000000e+00, half 3.000000e+00, half 4.000000e+00, half 5.000000e+00, half 6.000000e+00, half 7.000000e+00>, align 16 +@llvm_mips_fexupl_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fexupl_w_test() nounwind { +entry: + %0 = load <8 x half>* @llvm_mips_fexupl_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.fexupl.w(<8 x half> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_fexupl_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fexupl.w(<8 x half>) nounwind + +; CHECK: llvm_mips_fexupl_w_test: +; CHECK: ld.h +; CHECK: fexupl.w +; CHECK: st.w +; CHECK: .size llvm_mips_fexupl_w_test +; +@llvm_mips_fexupl_d_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fexupl_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fexupl_d_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fexupl_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.fexupl.d(<4 x float> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_fexupl_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fexupl.d(<4 x float>) nounwind + +; CHECK: llvm_mips_fexupl_d_test: +; CHECK: ld.w +; CHECK: fexupl.d +; CHECK: st.d +; CHECK: .size llvm_mips_fexupl_d_test +; +@llvm_mips_fexupr_w_ARG1 = global <8 x half> <half 0.000000e+00, half 1.000000e+00, half 2.000000e+00, half 3.000000e+00, half 4.000000e+00, half 5.000000e+00, half 6.000000e+00, half 7.000000e+00>, align 16 +@llvm_mips_fexupr_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fexupr_w_test() nounwind { +entry: + %0 = load <8 x half>* @llvm_mips_fexupr_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.fexupr.w(<8 x half> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_fexupr_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fexupr.w(<8 x half>) nounwind + +; CHECK: llvm_mips_fexupr_w_test: +; CHECK: ld.h +; CHECK: fexupr.w +; CHECK: st.w +; CHECK: .size llvm_mips_fexupr_w_test +; +@llvm_mips_fexupr_d_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fexupr_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fexupr_d_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fexupr_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.fexupr.d(<4 x float> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_fexupr_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fexupr.d(<4 x float>) nounwind + +; CHECK: llvm_mips_fexupr_d_test: +; CHECK: ld.w +; CHECK: fexupr.d +; CHECK: st.d +; CHECK: .size llvm_mips_fexupr_d_test +; diff --git a/test/CodeGen/Mips/msa/2rf_float_int.ll b/test/CodeGen/Mips/msa/2rf_float_int.ll new file mode 100644 index 0000000..4b2ef22 --- /dev/null +++ b/test/CodeGen/Mips/msa/2rf_float_int.ll @@ -0,0 +1,78 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_ffint_s_w_ARG1 = global <4 x i32> <i32 0, i32 1, i32 2, i32 3>, align 16 +@llvm_mips_ffint_s_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_ffint_s_w_test() nounwind { +entry: + %0 = load <4 x i32>* @llvm_mips_ffint_s_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.ffint.s.w(<4 x i32> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_ffint_s_w_RES + ret void +} + +declare <4 x float> @llvm.mips.ffint.s.w(<4 x i32>) nounwind + +; CHECK: llvm_mips_ffint_s_w_test: +; CHECK: ld.w +; CHECK: ffint_s.w +; CHECK: st.w +; CHECK: .size llvm_mips_ffint_s_w_test +; +@llvm_mips_ffint_s_d_ARG1 = global <2 x i64> <i64 0, i64 1>, align 16 +@llvm_mips_ffint_s_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_ffint_s_d_test() nounwind { +entry: + %0 = load <2 x i64>* @llvm_mips_ffint_s_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.ffint.s.d(<2 x i64> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_ffint_s_d_RES + ret void +} + +declare <2 x double> @llvm.mips.ffint.s.d(<2 x i64>) nounwind + +; CHECK: llvm_mips_ffint_s_d_test: +; CHECK: ld.d +; CHECK: ffint_s.d +; CHECK: st.d +; CHECK: .size llvm_mips_ffint_s_d_test +; +@llvm_mips_ffint_u_w_ARG1 = global <4 x i32> <i32 0, i32 1, i32 2, i32 3>, align 16 +@llvm_mips_ffint_u_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_ffint_u_w_test() nounwind { +entry: + %0 = load <4 x i32>* @llvm_mips_ffint_u_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.ffint.u.w(<4 x i32> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_ffint_u_w_RES + ret void +} + +declare <4 x float> @llvm.mips.ffint.u.w(<4 x i32>) nounwind + +; CHECK: llvm_mips_ffint_u_w_test: +; CHECK: ld.w +; CHECK: ffint_u.w +; CHECK: st.w +; CHECK: .size llvm_mips_ffint_u_w_test +; +@llvm_mips_ffint_u_d_ARG1 = global <2 x i64> <i64 0, i64 1>, align 16 +@llvm_mips_ffint_u_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_ffint_u_d_test() nounwind { +entry: + %0 = load <2 x i64>* @llvm_mips_ffint_u_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.ffint.u.d(<2 x i64> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_ffint_u_d_RES + ret void +} + +declare <2 x double> @llvm.mips.ffint.u.d(<2 x i64>) nounwind + +; CHECK: llvm_mips_ffint_u_d_test: +; CHECK: ld.d +; CHECK: ffint_u.d +; CHECK: st.d +; CHECK: .size llvm_mips_ffint_u_d_test +; diff --git a/test/CodeGen/Mips/msa/2rf_fq.ll b/test/CodeGen/Mips/msa/2rf_fq.ll new file mode 100644 index 0000000..e0f80c0 --- /dev/null +++ b/test/CodeGen/Mips/msa/2rf_fq.ll @@ -0,0 +1,78 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_ffql_w_ARG1 = global <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>, align 16 +@llvm_mips_ffql_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_ffql_w_test() nounwind { +entry: + %0 = load <8 x i16>* @llvm_mips_ffql_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.ffql.w(<8 x i16> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_ffql_w_RES + ret void +} + +declare <4 x float> @llvm.mips.ffql.w(<8 x i16>) nounwind + +; CHECK: llvm_mips_ffql_w_test: +; CHECK: ld.h +; CHECK: ffql.w +; CHECK: st.w +; CHECK: .size llvm_mips_ffql_w_test +; +@llvm_mips_ffql_d_ARG1 = global <4 x i32> <i32 0, i32 1, i32 2, i32 3>, align 16 +@llvm_mips_ffql_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_ffql_d_test() nounwind { +entry: + %0 = load <4 x i32>* @llvm_mips_ffql_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.ffql.d(<4 x i32> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_ffql_d_RES + ret void +} + +declare <2 x double> @llvm.mips.ffql.d(<4 x i32>) nounwind + +; CHECK: llvm_mips_ffql_d_test: +; CHECK: ld.w +; CHECK: ffql.d +; CHECK: st.d +; CHECK: .size llvm_mips_ffql_d_test +; +@llvm_mips_ffqr_w_ARG1 = global <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>, align 16 +@llvm_mips_ffqr_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_ffqr_w_test() nounwind { +entry: + %0 = load <8 x i16>* @llvm_mips_ffqr_w_ARG1 + %1 = tail call <4 x float> @llvm.mips.ffqr.w(<8 x i16> %0) + store <4 x float> %1, <4 x float>* @llvm_mips_ffqr_w_RES + ret void +} + +declare <4 x float> @llvm.mips.ffqr.w(<8 x i16>) nounwind + +; CHECK: llvm_mips_ffqr_w_test: +; CHECK: ld.h +; CHECK: ffqr.w +; CHECK: st.w +; CHECK: .size llvm_mips_ffqr_w_test +; +@llvm_mips_ffqr_d_ARG1 = global <4 x i32> <i32 0, i32 1, i32 2, i32 3>, align 16 +@llvm_mips_ffqr_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_ffqr_d_test() nounwind { +entry: + %0 = load <4 x i32>* @llvm_mips_ffqr_d_ARG1 + %1 = tail call <2 x double> @llvm.mips.ffqr.d(<4 x i32> %0) + store <2 x double> %1, <2 x double>* @llvm_mips_ffqr_d_RES + ret void +} + +declare <2 x double> @llvm.mips.ffqr.d(<4 x i32>) nounwind + +; CHECK: llvm_mips_ffqr_d_test: +; CHECK: ld.w +; CHECK: ffqr.d +; CHECK: st.d +; CHECK: .size llvm_mips_ffqr_d_test +; diff --git a/test/CodeGen/Mips/msa/2rf_int_float.ll b/test/CodeGen/Mips/msa/2rf_int_float.ll new file mode 100644 index 0000000..ef5c0c3 --- /dev/null +++ b/test/CodeGen/Mips/msa/2rf_int_float.ll @@ -0,0 +1,116 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_fclass_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fclass_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fclass_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fclass_w_ARG1 + %1 = tail call <4 x i32> @llvm.mips.fclass.w(<4 x float> %0) + store <4 x i32> %1, <4 x i32>* @llvm_mips_fclass_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fclass.w(<4 x float>) nounwind + +; CHECK: llvm_mips_fclass_w_test: +; CHECK: ld.w +; CHECK: fclass.w +; CHECK: st.w +; CHECK: .size llvm_mips_fclass_w_test +; +@llvm_mips_fclass_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fclass_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fclass_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fclass_d_ARG1 + %1 = tail call <2 x i64> @llvm.mips.fclass.d(<2 x double> %0) + store <2 x i64> %1, <2 x i64>* @llvm_mips_fclass_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fclass.d(<2 x double>) nounwind + +; CHECK: llvm_mips_fclass_d_test: +; CHECK: ld.d +; CHECK: fclass.d +; CHECK: st.d +; CHECK: .size llvm_mips_fclass_d_test +; +@llvm_mips_ftint_s_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_ftint_s_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_ftint_s_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_ftint_s_w_ARG1 + %1 = tail call <4 x i32> @llvm.mips.ftint.s.w(<4 x float> %0) + store <4 x i32> %1, <4 x i32>* @llvm_mips_ftint_s_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.ftint.s.w(<4 x float>) nounwind + +; CHECK: llvm_mips_ftint_s_w_test: +; CHECK: ld.w +; CHECK: ftint_s.w +; CHECK: st.w +; CHECK: .size llvm_mips_ftint_s_w_test +; +@llvm_mips_ftint_s_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_ftint_s_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_ftint_s_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_ftint_s_d_ARG1 + %1 = tail call <2 x i64> @llvm.mips.ftint.s.d(<2 x double> %0) + store <2 x i64> %1, <2 x i64>* @llvm_mips_ftint_s_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.ftint.s.d(<2 x double>) nounwind + +; CHECK: llvm_mips_ftint_s_d_test: +; CHECK: ld.d +; CHECK: ftint_s.d +; CHECK: st.d +; CHECK: .size llvm_mips_ftint_s_d_test +; +@llvm_mips_ftint_u_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_ftint_u_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_ftint_u_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_ftint_u_w_ARG1 + %1 = tail call <4 x i32> @llvm.mips.ftint.u.w(<4 x float> %0) + store <4 x i32> %1, <4 x i32>* @llvm_mips_ftint_u_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.ftint.u.w(<4 x float>) nounwind + +; CHECK: llvm_mips_ftint_u_w_test: +; CHECK: ld.w +; CHECK: ftint_u.w +; CHECK: st.w +; CHECK: .size llvm_mips_ftint_u_w_test +; +@llvm_mips_ftint_u_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_ftint_u_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_ftint_u_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_ftint_u_d_ARG1 + %1 = tail call <2 x i64> @llvm.mips.ftint.u.d(<2 x double> %0) + store <2 x i64> %1, <2 x i64>* @llvm_mips_ftint_u_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.ftint.u.d(<2 x double>) nounwind + +; CHECK: llvm_mips_ftint_u_d_test: +; CHECK: ld.d +; CHECK: ftint_u.d +; CHECK: st.d +; CHECK: .size llvm_mips_ftint_u_d_test +; diff --git a/test/CodeGen/Mips/msa/2rf_tq.ll b/test/CodeGen/Mips/msa/2rf_tq.ll new file mode 100644 index 0000000..190f93c --- /dev/null +++ b/test/CodeGen/Mips/msa/2rf_tq.ll @@ -0,0 +1,46 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_ftq_h_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_ftq_h_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_ftq_h_RES = global <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>, align 16 + +define void @llvm_mips_ftq_h_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_ftq_h_ARG1 + %1 = load <4 x float>* @llvm_mips_ftq_h_ARG2 + %2 = tail call <8 x i16> @llvm.mips.ftq.h(<4 x float> %0, <4 x float> %1) + store <8 x i16> %2, <8 x i16>* @llvm_mips_ftq_h_RES + ret void +} + +declare <8 x i16> @llvm.mips.ftq.h(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_ftq_h_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: ftq.h +; CHECK: st.h +; CHECK: .size llvm_mips_ftq_h_test +; +@llvm_mips_ftq_w_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_ftq_w_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_ftq_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_ftq_w_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_ftq_w_ARG1 + %1 = load <2 x double>* @llvm_mips_ftq_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.ftq.w(<2 x double> %0, <2 x double> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_ftq_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.ftq.w(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_ftq_w_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: ftq.w +; CHECK: st.w +; CHECK: .size llvm_mips_ftq_w_test +; diff --git a/test/CodeGen/Mips/msa/3rf.ll b/test/CodeGen/Mips/msa/3rf.ll new file mode 100644 index 0000000..e2d5a20 --- /dev/null +++ b/test/CodeGen/Mips/msa/3rf.ll @@ -0,0 +1,354 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_fadd_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fadd_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fadd_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fadd_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fadd_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fadd_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fadd.w(<4 x float> %0, <4 x float> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fadd_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fadd.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fadd_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fadd.w +; CHECK: st.w +; CHECK: .size llvm_mips_fadd_w_test +; +@llvm_mips_fadd_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fadd_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fadd_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fadd_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fadd_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fadd_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fadd.d(<2 x double> %0, <2 x double> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fadd_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fadd.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fadd_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fadd.d +; CHECK: st.d +; CHECK: .size llvm_mips_fadd_d_test +; +@llvm_mips_fdiv_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fdiv_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fdiv_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fdiv_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fdiv_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fdiv_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fdiv.w(<4 x float> %0, <4 x float> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fdiv_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fdiv.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fdiv_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fdiv.w +; CHECK: st.w +; CHECK: .size llvm_mips_fdiv_w_test +; +@llvm_mips_fdiv_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fdiv_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fdiv_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fdiv_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fdiv_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fdiv_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fdiv.d(<2 x double> %0, <2 x double> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fdiv_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fdiv.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fdiv_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fdiv.d +; CHECK: st.d +; CHECK: .size llvm_mips_fdiv_d_test +; +@llvm_mips_fmin_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fmin_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fmin_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fmin_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fmin_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fmin_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fmin.w(<4 x float> %0, <4 x float> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fmin_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fmin.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fmin_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fmin.w +; CHECK: st.w +; CHECK: .size llvm_mips_fmin_w_test +; +@llvm_mips_fmin_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fmin_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fmin_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fmin_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fmin_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fmin_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fmin.d(<2 x double> %0, <2 x double> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fmin_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fmin.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fmin_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fmin.d +; CHECK: st.d +; CHECK: .size llvm_mips_fmin_d_test +; +@llvm_mips_fmin_a_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fmin_a_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fmin_a_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fmin_a_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fmin_a_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fmin_a_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fmin.a.w(<4 x float> %0, <4 x float> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fmin_a_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fmin.a.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fmin_a_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fmin_a.w +; CHECK: st.w +; CHECK: .size llvm_mips_fmin_a_w_test +; +@llvm_mips_fmin_a_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fmin_a_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fmin_a_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fmin_a_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fmin_a_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fmin_a_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fmin.a.d(<2 x double> %0, <2 x double> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fmin_a_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fmin.a.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fmin_a_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fmin_a.d +; CHECK: st.d +; CHECK: .size llvm_mips_fmin_a_d_test +; +@llvm_mips_fmax_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fmax_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fmax_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fmax_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fmax_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fmax_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fmax.w(<4 x float> %0, <4 x float> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fmax_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fmax.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fmax_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fmax.w +; CHECK: st.w +; CHECK: .size llvm_mips_fmax_w_test +; +@llvm_mips_fmax_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fmax_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fmax_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fmax_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fmax_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fmax_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fmax.d(<2 x double> %0, <2 x double> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fmax_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fmax.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fmax_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fmax.d +; CHECK: st.d +; CHECK: .size llvm_mips_fmax_d_test +; +@llvm_mips_fmax_a_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fmax_a_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fmax_a_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fmax_a_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fmax_a_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fmax_a_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fmax.a.w(<4 x float> %0, <4 x float> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fmax_a_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fmax.a.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fmax_a_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fmax_a.w +; CHECK: st.w +; CHECK: .size llvm_mips_fmax_a_w_test +; +@llvm_mips_fmax_a_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fmax_a_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fmax_a_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fmax_a_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fmax_a_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fmax_a_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fmax.a.d(<2 x double> %0, <2 x double> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fmax_a_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fmax.a.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fmax_a_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fmax_a.d +; CHECK: st.d +; CHECK: .size llvm_mips_fmax_a_d_test +; +@llvm_mips_fmul_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fmul_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fmul_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fmul_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fmul_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fmul_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fmul.w(<4 x float> %0, <4 x float> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fmul_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fmul.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fmul_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fmul.w +; CHECK: st.w +; CHECK: .size llvm_mips_fmul_w_test +; +@llvm_mips_fmul_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fmul_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fmul_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fmul_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fmul_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fmul_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fmul.d(<2 x double> %0, <2 x double> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fmul_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fmul.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fmul_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fmul.d +; CHECK: st.d +; CHECK: .size llvm_mips_fmul_d_test +; +@llvm_mips_fsub_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fsub_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fsub_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fsub_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fsub_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fsub_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fsub.w(<4 x float> %0, <4 x float> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fsub_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fsub.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fsub_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fsub.w +; CHECK: st.w +; CHECK: .size llvm_mips_fsub_w_test +; +@llvm_mips_fsub_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fsub_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fsub_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fsub_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fsub_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fsub_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fsub.d(<2 x double> %0, <2 x double> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fsub_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fsub.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fsub_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fsub.d +; CHECK: st.d +; CHECK: .size llvm_mips_fsub_d_test +; diff --git a/test/CodeGen/Mips/msa/3rf_4rf.ll b/test/CodeGen/Mips/msa/3rf_4rf.ll new file mode 100644 index 0000000..cef38fd --- /dev/null +++ b/test/CodeGen/Mips/msa/3rf_4rf.ll @@ -0,0 +1,102 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_fmadd_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fmadd_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fmadd_w_ARG3 = global <4 x float> <float 8.000000e+00, float 9.000000e+00, float 1.000000e+01, float 1.100000e+01>, align 16 +@llvm_mips_fmadd_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fmadd_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fmadd_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fmadd_w_ARG2 + %2 = load <4 x float>* @llvm_mips_fmadd_w_ARG3 + %3 = tail call <4 x float> @llvm.mips.fmadd.w(<4 x float> %0, <4 x float> %1, <4 x float> %2) + store <4 x float> %3, <4 x float>* @llvm_mips_fmadd_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fmadd.w(<4 x float>, <4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fmadd_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fmadd.w +; CHECK: st.w +; CHECK: .size llvm_mips_fmadd_w_test +; +@llvm_mips_fmadd_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fmadd_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fmadd_d_ARG3 = global <2 x double> <double 4.000000e+00, double 5.000000e+00>, align 16 +@llvm_mips_fmadd_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fmadd_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fmadd_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fmadd_d_ARG2 + %2 = load <2 x double>* @llvm_mips_fmadd_d_ARG3 + %3 = tail call <2 x double> @llvm.mips.fmadd.d(<2 x double> %0, <2 x double> %1, <2 x double> %2) + store <2 x double> %3, <2 x double>* @llvm_mips_fmadd_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fmadd.d(<2 x double>, <2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fmadd_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fmadd.d +; CHECK: st.d +; CHECK: .size llvm_mips_fmadd_d_test +; +@llvm_mips_fmsub_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fmsub_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fmsub_w_ARG3 = global <4 x float> <float 8.000000e+00, float 9.000000e+00, float 1.000000e+01, float 1.100000e+01>, align 16 +@llvm_mips_fmsub_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fmsub_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fmsub_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fmsub_w_ARG2 + %2 = load <4 x float>* @llvm_mips_fmsub_w_ARG3 + %3 = tail call <4 x float> @llvm.mips.fmsub.w(<4 x float> %0, <4 x float> %1, <4 x float> %2) + store <4 x float> %3, <4 x float>* @llvm_mips_fmsub_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fmsub.w(<4 x float>, <4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fmsub_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fmsub.w +; CHECK: st.w +; CHECK: .size llvm_mips_fmsub_w_test +; +@llvm_mips_fmsub_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fmsub_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fmsub_d_ARG3 = global <2 x double> <double 4.000000e+00, double 5.000000e+00>, align 16 +@llvm_mips_fmsub_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fmsub_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fmsub_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fmsub_d_ARG2 + %2 = load <2 x double>* @llvm_mips_fmsub_d_ARG3 + %3 = tail call <2 x double> @llvm.mips.fmsub.d(<2 x double> %0, <2 x double> %1, <2 x double> %2) + store <2 x double> %3, <2 x double>* @llvm_mips_fmsub_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fmsub.d(<2 x double>, <2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fmsub_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fmsub.d +; CHECK: st.d +; CHECK: .size llvm_mips_fmsub_d_test +; diff --git a/test/CodeGen/Mips/msa/3rf_exdo.ll b/test/CodeGen/Mips/msa/3rf_exdo.ll new file mode 100644 index 0000000..45a8011 --- /dev/null +++ b/test/CodeGen/Mips/msa/3rf_exdo.ll @@ -0,0 +1,46 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_fexdo_h_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fexdo_h_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fexdo_h_RES = global <8 x half> <half 0.000000e+00, half 0.000000e+00, half 0.000000e+00, half 0.000000e+00, half 0.000000e+00, half 0.000000e+00, half 0.000000e+00, half 0.000000e+00>, align 16 + +define void @llvm_mips_fexdo_h_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fexdo_h_ARG1 + %1 = load <4 x float>* @llvm_mips_fexdo_h_ARG2 + %2 = tail call <8 x half> @llvm.mips.fexdo.h(<4 x float> %0, <4 x float> %1) + store <8 x half> %2, <8 x half>* @llvm_mips_fexdo_h_RES + ret void +} + +declare <8 x half> @llvm.mips.fexdo.h(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fexdo_h_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fexdo.h +; CHECK: st.h +; CHECK: .size llvm_mips_fexdo_h_test +; +@llvm_mips_fexdo_w_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fexdo_w_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fexdo_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fexdo_w_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fexdo_w_ARG1 + %1 = load <2 x double>* @llvm_mips_fexdo_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fexdo.w(<2 x double> %0, <2 x double> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fexdo_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fexdo.w(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fexdo_w_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fexdo.w +; CHECK: st.w +; CHECK: .size llvm_mips_fexdo_w_test +; diff --git a/test/CodeGen/Mips/msa/3rf_float_int.ll b/test/CodeGen/Mips/msa/3rf_float_int.ll new file mode 100644 index 0000000..6b9998d --- /dev/null +++ b/test/CodeGen/Mips/msa/3rf_float_int.ll @@ -0,0 +1,46 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_fexp2_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fexp2_w_ARG2 = global <4 x i32> <i32 4, i32 5, i32 6, i32 7>, align 16 +@llvm_mips_fexp2_w_RES = global <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, align 16 + +define void @llvm_mips_fexp2_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fexp2_w_ARG1 + %1 = load <4 x i32>* @llvm_mips_fexp2_w_ARG2 + %2 = tail call <4 x float> @llvm.mips.fexp2.w(<4 x float> %0, <4 x i32> %1) + store <4 x float> %2, <4 x float>* @llvm_mips_fexp2_w_RES + ret void +} + +declare <4 x float> @llvm.mips.fexp2.w(<4 x float>, <4 x i32>) nounwind + +; CHECK: llvm_mips_fexp2_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fexp2.w +; CHECK: st.w +; CHECK: .size llvm_mips_fexp2_w_test +; +@llvm_mips_fexp2_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fexp2_d_ARG2 = global <2 x i64> <i64 2, i64 3>, align 16 +@llvm_mips_fexp2_d_RES = global <2 x double> <double 0.000000e+00, double 0.000000e+00>, align 16 + +define void @llvm_mips_fexp2_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fexp2_d_ARG1 + %1 = load <2 x i64>* @llvm_mips_fexp2_d_ARG2 + %2 = tail call <2 x double> @llvm.mips.fexp2.d(<2 x double> %0, <2 x i64> %1) + store <2 x double> %2, <2 x double>* @llvm_mips_fexp2_d_RES + ret void +} + +declare <2 x double> @llvm.mips.fexp2.d(<2 x double>, <2 x i64>) nounwind + +; CHECK: llvm_mips_fexp2_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fexp2.d +; CHECK: st.d +; CHECK: .size llvm_mips_fexp2_d_test +; diff --git a/test/CodeGen/Mips/msa/3rf_int_float.ll b/test/CodeGen/Mips/msa/3rf_int_float.ll new file mode 100644 index 0000000..70f73f5 --- /dev/null +++ b/test/CodeGen/Mips/msa/3rf_int_float.ll @@ -0,0 +1,574 @@ +; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s + +@llvm_mips_fceq_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fceq_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fceq_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fceq_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fceq_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fceq_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fceq.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fceq_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fceq.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fceq_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fceq.w +; CHECK: st.w +; CHECK: .size llvm_mips_fceq_w_test +; +@llvm_mips_fceq_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fceq_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fceq_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fceq_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fceq_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fceq_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fceq.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fceq_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fceq.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fceq_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fceq.d +; CHECK: st.d +; CHECK: .size llvm_mips_fceq_d_test +; +@llvm_mips_fcge_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fcge_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fcge_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fcge_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fcge_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fcge_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fcge.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fcge_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fcge.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fcge_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fcge.w +; CHECK: st.w +; CHECK: .size llvm_mips_fcge_w_test +; +@llvm_mips_fcge_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fcge_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fcge_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fcge_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fcge_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fcge_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fcge.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fcge_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fcge.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fcge_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fcge.d +; CHECK: st.d +; CHECK: .size llvm_mips_fcge_d_test +; +@llvm_mips_fcgt_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fcgt_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fcgt_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fcgt_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fcgt_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fcgt_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fcgt.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fcgt_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fcgt.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fcgt_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fcgt.w +; CHECK: st.w +; CHECK: .size llvm_mips_fcgt_w_test +; +@llvm_mips_fcgt_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fcgt_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fcgt_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fcgt_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fcgt_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fcgt_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fcgt.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fcgt_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fcgt.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fcgt_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fcgt.d +; CHECK: st.d +; CHECK: .size llvm_mips_fcgt_d_test +; +@llvm_mips_fcle_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fcle_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fcle_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fcle_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fcle_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fcle_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fcle.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fcle_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fcle.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fcle_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fcle.w +; CHECK: st.w +; CHECK: .size llvm_mips_fcle_w_test +; +@llvm_mips_fcle_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fcle_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fcle_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fcle_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fcle_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fcle_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fcle.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fcle_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fcle.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fcle_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fcle.d +; CHECK: st.d +; CHECK: .size llvm_mips_fcle_d_test +; +@llvm_mips_fclt_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fclt_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fclt_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fclt_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fclt_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fclt_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fclt.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fclt_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fclt.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fclt_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fclt.w +; CHECK: st.w +; CHECK: .size llvm_mips_fclt_w_test +; +@llvm_mips_fclt_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fclt_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fclt_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fclt_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fclt_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fclt_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fclt.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fclt_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fclt.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fclt_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fclt.d +; CHECK: st.d +; CHECK: .size llvm_mips_fclt_d_test +; +@llvm_mips_fcne_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fcne_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fcne_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fcne_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fcne_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fcne_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fcne.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fcne_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fcne.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fcne_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fcne.w +; CHECK: st.w +; CHECK: .size llvm_mips_fcne_w_test +; +@llvm_mips_fcne_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fcne_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fcne_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fcne_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fcne_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fcne_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fcne.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fcne_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fcne.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fcne_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fcne.d +; CHECK: st.d +; CHECK: .size llvm_mips_fcne_d_test +; +@llvm_mips_fcun_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fcun_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fcun_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fcun_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fcun_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fcun_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fcun.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fcun_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fcun.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fcun_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fcun.w +; CHECK: st.w +; CHECK: .size llvm_mips_fcun_w_test +; +@llvm_mips_fcun_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fcun_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fcun_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fcun_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fcun_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fcun_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fcun.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fcun_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fcun.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fcun_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fcun.d +; CHECK: st.d +; CHECK: .size llvm_mips_fcun_d_test +; +@llvm_mips_fseq_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fseq_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fseq_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fseq_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fseq_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fseq_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fseq.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fseq_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fseq.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fseq_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fseq.w +; CHECK: st.w +; CHECK: .size llvm_mips_fseq_w_test +; +@llvm_mips_fseq_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fseq_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fseq_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fseq_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fseq_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fseq_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fseq.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fseq_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fseq.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fseq_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fseq.d +; CHECK: st.d +; CHECK: .size llvm_mips_fseq_d_test +; +@llvm_mips_fsge_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fsge_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fsge_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fsge_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fsge_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fsge_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fsge.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fsge_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fsge.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fsge_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fsge.w +; CHECK: st.w +; CHECK: .size llvm_mips_fsge_w_test +; +@llvm_mips_fsge_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fsge_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fsge_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fsge_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fsge_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fsge_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fsge.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fsge_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fsge.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fsge_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fsge.d +; CHECK: st.d +; CHECK: .size llvm_mips_fsge_d_test +; +@llvm_mips_fsgt_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fsgt_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fsgt_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fsgt_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fsgt_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fsgt_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fsgt.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fsgt_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fsgt.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fsgt_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fsgt.w +; CHECK: st.w +; CHECK: .size llvm_mips_fsgt_w_test +; +@llvm_mips_fsgt_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fsgt_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fsgt_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fsgt_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fsgt_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fsgt_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fsgt.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fsgt_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fsgt.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fsgt_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fsgt.d +; CHECK: st.d +; CHECK: .size llvm_mips_fsgt_d_test +; +@llvm_mips_fsle_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fsle_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fsle_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fsle_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fsle_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fsle_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fsle.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fsle_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fsle.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fsle_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fsle.w +; CHECK: st.w +; CHECK: .size llvm_mips_fsle_w_test +; +@llvm_mips_fsle_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fsle_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fsle_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fsle_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fsle_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fsle_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fsle.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fsle_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fsle.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fsle_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fsle.d +; CHECK: st.d +; CHECK: .size llvm_mips_fsle_d_test +; +@llvm_mips_fslt_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fslt_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fslt_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fslt_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fslt_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fslt_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fslt.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fslt_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fslt.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fslt_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fslt.w +; CHECK: st.w +; CHECK: .size llvm_mips_fslt_w_test +; +@llvm_mips_fslt_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fslt_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fslt_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fslt_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fslt_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fslt_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fslt.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fslt_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fslt.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fslt_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fslt.d +; CHECK: st.d +; CHECK: .size llvm_mips_fslt_d_test +; +@llvm_mips_fsne_w_ARG1 = global <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, align 16 +@llvm_mips_fsne_w_ARG2 = global <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, align 16 +@llvm_mips_fsne_w_RES = global <4 x i32> <i32 0, i32 0, i32 0, i32 0>, align 16 + +define void @llvm_mips_fsne_w_test() nounwind { +entry: + %0 = load <4 x float>* @llvm_mips_fsne_w_ARG1 + %1 = load <4 x float>* @llvm_mips_fsne_w_ARG2 + %2 = tail call <4 x i32> @llvm.mips.fsne.w(<4 x float> %0, <4 x float> %1) + store <4 x i32> %2, <4 x i32>* @llvm_mips_fsne_w_RES + ret void +} + +declare <4 x i32> @llvm.mips.fsne.w(<4 x float>, <4 x float>) nounwind + +; CHECK: llvm_mips_fsne_w_test: +; CHECK: ld.w +; CHECK: ld.w +; CHECK: fsne.w +; CHECK: st.w +; CHECK: .size llvm_mips_fsne_w_test +; +@llvm_mips_fsne_d_ARG1 = global <2 x double> <double 0.000000e+00, double 1.000000e+00>, align 16 +@llvm_mips_fsne_d_ARG2 = global <2 x double> <double 2.000000e+00, double 3.000000e+00>, align 16 +@llvm_mips_fsne_d_RES = global <2 x i64> <i64 0, i64 0>, align 16 + +define void @llvm_mips_fsne_d_test() nounwind { +entry: + %0 = load <2 x double>* @llvm_mips_fsne_d_ARG1 + %1 = load <2 x double>* @llvm_mips_fsne_d_ARG2 + %2 = tail call <2 x i64> @llvm.mips.fsne.d(<2 x double> %0, <2 x double> %1) + store <2 x i64> %2, <2 x i64>* @llvm_mips_fsne_d_RES + ret void +} + +declare <2 x i64> @llvm.mips.fsne.d(<2 x double>, <2 x double>) nounwind + +; CHECK: llvm_mips_fsne_d_test: +; CHECK: ld.d +; CHECK: ld.d +; CHECK: fsne.d +; CHECK: st.d +; CHECK: .size llvm_mips_fsne_d_test +; |