From d13fea547ae1828fce9dffb45ea3e30be96f19e0 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 27 Sep 2013 10:08:31 +0000 Subject: [PATCH] [mips][msa] MSA requires FR=1 mode (64-bit FPU register file). Report fatal error when using it in FR=0 mode. llvm-svn: 191498 --- lib/Target/Mips/MipsSubtarget.cpp | 5 +++++ test/CodeGen/Mips/msa/2r.ll | 2 +- test/CodeGen/Mips/msa/2r_vector_scalar.ll | 2 +- test/CodeGen/Mips/msa/2rf.ll | 2 +- test/CodeGen/Mips/msa/2rf_exup.ll | 2 +- test/CodeGen/Mips/msa/2rf_float_int.ll | 2 +- test/CodeGen/Mips/msa/2rf_fq.ll | 2 +- test/CodeGen/Mips/msa/2rf_int_float.ll | 2 +- test/CodeGen/Mips/msa/2rf_tq.ll | 2 +- test/CodeGen/Mips/msa/3r-a.ll | 7 ++++++- test/CodeGen/Mips/msa/3r-b.ll | 2 +- test/CodeGen/Mips/msa/3r-c.ll | 2 +- test/CodeGen/Mips/msa/3r-d.ll | 2 +- test/CodeGen/Mips/msa/3r-i.ll | 2 +- test/CodeGen/Mips/msa/3r-m.ll | 2 +- test/CodeGen/Mips/msa/3r-p.ll | 2 +- test/CodeGen/Mips/msa/3r-s.ll | 2 +- test/CodeGen/Mips/msa/3r-v.ll | 2 +- test/CodeGen/Mips/msa/3r_4r.ll | 2 +- test/CodeGen/Mips/msa/3r_4r_widen.ll | 2 +- test/CodeGen/Mips/msa/3r_ld_st.ll | 2 +- test/CodeGen/Mips/msa/3r_splat.ll | 2 +- test/CodeGen/Mips/msa/3rf.ll | 2 +- test/CodeGen/Mips/msa/3rf_4rf.ll | 2 +- test/CodeGen/Mips/msa/3rf_4rf_q.ll | 2 +- test/CodeGen/Mips/msa/3rf_exdo.ll | 2 +- test/CodeGen/Mips/msa/3rf_float_int.ll | 2 +- test/CodeGen/Mips/msa/3rf_int_float.ll | 2 +- test/CodeGen/Mips/msa/3rf_q.ll | 2 +- test/CodeGen/Mips/msa/arithmetic.ll | 2 +- test/CodeGen/Mips/msa/arithmetic_float.ll | 2 +- test/CodeGen/Mips/msa/basic_operations.ll | 2 +- test/CodeGen/Mips/msa/basic_operations_float.ll | 2 +- test/CodeGen/Mips/msa/bit.ll | 2 +- test/CodeGen/Mips/msa/bitcast.ll | 4 ++-- test/CodeGen/Mips/msa/bitwise.ll | 2 +- test/CodeGen/Mips/msa/compare.ll | 2 +- test/CodeGen/Mips/msa/compare_float.ll | 2 +- test/CodeGen/Mips/msa/elm_copy.ll | 2 +- test/CodeGen/Mips/msa/elm_cxcmsa.ll | 2 +- test/CodeGen/Mips/msa/elm_insv.ll | 2 +- test/CodeGen/Mips/msa/elm_move.ll | 2 +- test/CodeGen/Mips/msa/elm_shift_slide.ll | 2 +- test/CodeGen/Mips/msa/i10.ll | 2 +- test/CodeGen/Mips/msa/i5-a.ll | 2 +- test/CodeGen/Mips/msa/i5-b.ll | 2 +- test/CodeGen/Mips/msa/i5-c.ll | 2 +- test/CodeGen/Mips/msa/i5-m.ll | 2 +- test/CodeGen/Mips/msa/i5-s.ll | 2 +- test/CodeGen/Mips/msa/i5_ld_st.ll | 2 +- test/CodeGen/Mips/msa/i8.ll | 2 +- test/CodeGen/Mips/msa/llvm-stress-s525530439.ll | 2 +- test/CodeGen/Mips/msa/llvm-stress-sz1-s742806235.ll | 2 +- test/CodeGen/Mips/msa/shuffle.ll | 2 +- test/CodeGen/Mips/msa/spill.ll | 2 +- test/CodeGen/Mips/msa/vec.ll | 4 ++-- test/CodeGen/Mips/msa/vecs10.ll | 2 +- 57 files changed, 68 insertions(+), 58 deletions(-) diff --git a/lib/Target/Mips/MipsSubtarget.cpp b/lib/Target/Mips/MipsSubtarget.cpp index 91e2535911c..3a122706aa2 100644 --- a/lib/Target/Mips/MipsSubtarget.cpp +++ b/lib/Target/Mips/MipsSubtarget.cpp @@ -89,6 +89,11 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU, (hasMips64() && (isABI_N32() || isABI_N64()))) && "Invalid Arch & ABI pair."); + if (hasMSA() && !isFP64bit()) + report_fatal_error("MSA requires a 64-bit FPU register file (FR=1 mode). " + "See -mattr=+fp64.", + false); + // Is the target system Linux ? if (TT.find("linux") == std::string::npos) IsLinux = false; diff --git a/test/CodeGen/Mips/msa/2r.ll b/test/CodeGen/Mips/msa/2r.ll index 7719b7cc0cf..9a3189b126a 100644 --- a/test/CodeGen/Mips/msa/2r.ll +++ b/test/CodeGen/Mips/msa/2r.ll @@ -1,6 +1,6 @@ ; Test the MSA intrinsics that are encoded with the 2R instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_nloc_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_nloc_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/2r_vector_scalar.ll b/test/CodeGen/Mips/msa/2r_vector_scalar.ll index e03c9a3464f..1a468cf2460 100644 --- a/test/CodeGen/Mips/msa/2r_vector_scalar.ll +++ b/test/CodeGen/Mips/msa/2r_vector_scalar.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 2R instruction format and ; convert scalars to vectors. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_fill_b_ARG1 = global i32 23, align 16 @llvm_mips_fill_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/2rf.ll b/test/CodeGen/Mips/msa/2rf.ll index 7878b4aaebb..7708cade976 100644 --- a/test/CodeGen/Mips/msa/2rf.ll +++ b/test/CodeGen/Mips/msa/2rf.ll @@ -1,6 +1,6 @@ ; Test the MSA intrinsics that are encoded with the 2RF instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_flog2_w_ARG1 = global <4 x float> , align 16 @llvm_mips_flog2_w_RES = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/2rf_exup.ll b/test/CodeGen/Mips/msa/2rf_exup.ll index ca47c95b8a2..aad008b6295 100644 --- a/test/CodeGen/Mips/msa/2rf_exup.ll +++ b/test/CodeGen/Mips/msa/2rf_exup.ll @@ -1,7 +1,7 @@ ; Test the MSA floating point conversion intrinsics (e.g. float->double) that ; are encoded with the 2RF instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_fexupl_w_ARG1 = global <8 x half> , align 16 @llvm_mips_fexupl_w_RES = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/2rf_float_int.ll b/test/CodeGen/Mips/msa/2rf_float_int.ll index c76064a8bad..e0a60d6a2d6 100644 --- a/test/CodeGen/Mips/msa/2rf_float_int.ll +++ b/test/CodeGen/Mips/msa/2rf_float_int.ll @@ -1,7 +1,7 @@ ; Test the MSA integer to floating point conversion intrinsics that are encoded ; with the 2RF instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_ffint_s_w_ARG1 = global <4 x i32> , align 16 @llvm_mips_ffint_s_w_RES = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/2rf_fq.ll b/test/CodeGen/Mips/msa/2rf_fq.ll index 6808a2a99da..da76fdc2109 100644 --- a/test/CodeGen/Mips/msa/2rf_fq.ll +++ b/test/CodeGen/Mips/msa/2rf_fq.ll @@ -1,7 +1,7 @@ ; Test the MSA fixed-point to floating point conversion intrinsics that are ; encoded with the 2RF instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_ffql_w_ARG1 = global <8 x i16> , align 16 @llvm_mips_ffql_w_RES = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/2rf_int_float.ll b/test/CodeGen/Mips/msa/2rf_int_float.ll index 2e4244c8543..f822a1cadca 100644 --- a/test/CodeGen/Mips/msa/2rf_int_float.ll +++ b/test/CodeGen/Mips/msa/2rf_int_float.ll @@ -2,7 +2,7 @@ ; 2RF instruction format. This includes conversions but other instructions such ; as fclass are also here. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_fclass_w_ARG1 = global <4 x float> , align 16 @llvm_mips_fclass_w_RES = global <4 x i32> , align 16 diff --git a/test/CodeGen/Mips/msa/2rf_tq.ll b/test/CodeGen/Mips/msa/2rf_tq.ll index aa7fc8636f4..efd962cac86 100644 --- a/test/CodeGen/Mips/msa/2rf_tq.ll +++ b/test/CodeGen/Mips/msa/2rf_tq.ll @@ -1,7 +1,7 @@ ; Test the MSA floating-point to fixed-point conversion intrinsics that are ; encoded with the 2RF instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_ftq_h_ARG1 = global <4 x float> , align 16 @llvm_mips_ftq_h_ARG2 = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-a.ll b/test/CodeGen/Mips/msa/3r-a.ll index ed41e4759c1..76e760089df 100644 --- a/test/CodeGen/Mips/msa/3r-a.ll +++ b/test/CodeGen/Mips/msa/3r-a.ll @@ -1,7 +1,12 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 'a' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s + +; It should fail to compile without fp64. +; RUN: not llc -march=mips -mattr=+msa < %s 2>&1 | \ +; RUN: FileCheck -check-prefix=FP32ERROR %s +; FP32ERROR: LLVM ERROR: MSA requires a 64-bit FPU register file (FR=1 mode). @llvm_mips_add_a_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_add_a_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-b.ll b/test/CodeGen/Mips/msa/3r-b.ll index 786c71f9614..4f7955c6735 100644 --- a/test/CodeGen/Mips/msa/3r-b.ll +++ b/test/CodeGen/Mips/msa/3r-b.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 'b' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_bclr_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_bclr_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-c.ll b/test/CodeGen/Mips/msa/3r-c.ll index 0ad6afbe429..84d8fa29ef5 100644 --- a/test/CodeGen/Mips/msa/3r-c.ll +++ b/test/CodeGen/Mips/msa/3r-c.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 'c' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_ceq_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_ceq_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-d.ll b/test/CodeGen/Mips/msa/3r-d.ll index ed0998dae43..48c83a6f23a 100644 --- a/test/CodeGen/Mips/msa/3r-d.ll +++ b/test/CodeGen/Mips/msa/3r-d.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 'd' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_div_s_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_div_s_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-i.ll b/test/CodeGen/Mips/msa/3r-i.ll index 2f9acd1f1ed..c04734d350a 100644 --- a/test/CodeGen/Mips/msa/3r-i.ll +++ b/test/CodeGen/Mips/msa/3r-i.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 'i' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_ilvev_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_ilvev_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-m.ll b/test/CodeGen/Mips/msa/3r-m.ll index 1612cfd267c..c8de6d27152 100644 --- a/test/CodeGen/Mips/msa/3r-m.ll +++ b/test/CodeGen/Mips/msa/3r-m.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 'm' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_max_a_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_max_a_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-p.ll b/test/CodeGen/Mips/msa/3r-p.ll index f328cad614d..4620f88f419 100644 --- a/test/CodeGen/Mips/msa/3r-p.ll +++ b/test/CodeGen/Mips/msa/3r-p.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 'p' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_pckev_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_pckev_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-s.ll b/test/CodeGen/Mips/msa/3r-s.ll index 735b2d5aaac..fabdfdfb9fd 100644 --- a/test/CodeGen/Mips/msa/3r-s.ll +++ b/test/CodeGen/Mips/msa/3r-s.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 's' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_sld_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_sld_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r-v.ll b/test/CodeGen/Mips/msa/3r-v.ll index 544ae9fd5d1..fb547cf0bf4 100644 --- a/test/CodeGen/Mips/msa/3r-v.ll +++ b/test/CodeGen/Mips/msa/3r-v.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format. ; There are lots of these so this covers those beginning with 'v' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_vshf_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_vshf_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r_4r.ll b/test/CodeGen/Mips/msa/3r_4r.ll index 52f3cd3b880..2e341d01ce6 100644 --- a/test/CodeGen/Mips/msa/3r_4r.ll +++ b/test/CodeGen/Mips/msa/3r_4r.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format and ; use the result as a third operand. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_maddv_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_maddv_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r_4r_widen.ll b/test/CodeGen/Mips/msa/3r_4r_widen.ll index 63592b4b052..6dd7fbcdc12 100644 --- a/test/CodeGen/Mips/msa/3r_4r_widen.ll +++ b/test/CodeGen/Mips/msa/3r_4r_widen.ll @@ -2,7 +2,7 @@ ; use the result as a third operand and results in wider elements than the ; operands had. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_dpadd_s_h_ARG1 = global <8 x i16> , align 16 @llvm_mips_dpadd_s_h_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r_ld_st.ll b/test/CodeGen/Mips/msa/3r_ld_st.ll index 9b57675e21f..425efb4a6fd 100644 --- a/test/CodeGen/Mips/msa/3r_ld_st.ll +++ b/test/CodeGen/Mips/msa/3r_ld_st.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3R instruction format and ; are loads or stores. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_ldx_b_ARG = global <16 x i8> , align 16 @llvm_mips_ldx_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3r_splat.ll b/test/CodeGen/Mips/msa/3r_splat.ll index 001f723f7d4..2e604a43a03 100644 --- a/test/CodeGen/Mips/msa/3r_splat.ll +++ b/test/CodeGen/Mips/msa/3r_splat.ll @@ -1,7 +1,7 @@ ; Test the MSA splat intrinsics that are encoded with the 3R instruction ; format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_splat_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_splat_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/3rf.ll b/test/CodeGen/Mips/msa/3rf.ll index 4202dc4cfa8..ea1291e7198 100644 --- a/test/CodeGen/Mips/msa/3rf.ll +++ b/test/CodeGen/Mips/msa/3rf.ll @@ -1,6 +1,6 @@ ; Test the MSA intrinsics that are encoded with the 3RF instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_fadd_w_ARG1 = global <4 x float> , align 16 @llvm_mips_fadd_w_ARG2 = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/3rf_4rf.ll b/test/CodeGen/Mips/msa/3rf_4rf.ll index 913fe70c06e..9c446c904df 100644 --- a/test/CodeGen/Mips/msa/3rf_4rf.ll +++ b/test/CodeGen/Mips/msa/3rf_4rf.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3RF instruction format and ; use the result as a third operand. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_fmadd_w_ARG1 = global <4 x float> , align 16 @llvm_mips_fmadd_w_ARG2 = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/3rf_4rf_q.ll b/test/CodeGen/Mips/msa/3rf_4rf_q.ll index 4fbc69d3c4d..888a022e3d2 100644 --- a/test/CodeGen/Mips/msa/3rf_4rf_q.ll +++ b/test/CodeGen/Mips/msa/3rf_4rf_q.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3RF instruction format and ; use the result as a third operand and perform fixed-point operations. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_madd_q_h_ARG1 = global <8 x i16> , align 16 @llvm_mips_madd_q_h_ARG2 = global <8 x i16> , align 16 diff --git a/test/CodeGen/Mips/msa/3rf_exdo.ll b/test/CodeGen/Mips/msa/3rf_exdo.ll index d5713cb9aea..16a3c81841f 100644 --- a/test/CodeGen/Mips/msa/3rf_exdo.ll +++ b/test/CodeGen/Mips/msa/3rf_exdo.ll @@ -1,7 +1,7 @@ ; Test the MSA floating-point conversion intrinsics that are encoded with the ; 3RF instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_fexdo_h_ARG1 = global <4 x float> , align 16 @llvm_mips_fexdo_h_ARG2 = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/3rf_float_int.ll b/test/CodeGen/Mips/msa/3rf_float_int.ll index 6fd46f5e7f2..a446ebd0b78 100644 --- a/test/CodeGen/Mips/msa/3rf_float_int.ll +++ b/test/CodeGen/Mips/msa/3rf_float_int.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3RF instruction format and ; take an integer as an operand. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_fexp2_w_ARG1 = global <4 x float> , align 16 @llvm_mips_fexp2_w_ARG2 = global <4 x i32> , align 16 diff --git a/test/CodeGen/Mips/msa/3rf_int_float.ll b/test/CodeGen/Mips/msa/3rf_int_float.ll index 819093bd507..3dbcc79f4cb 100644 --- a/test/CodeGen/Mips/msa/3rf_int_float.ll +++ b/test/CodeGen/Mips/msa/3rf_int_float.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the 3RF instruction format and ; produce an integer as a result. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_fcaf_w_ARG1 = global <4 x float> , align 16 @llvm_mips_fcaf_w_ARG2 = global <4 x float> , align 16 diff --git a/test/CodeGen/Mips/msa/3rf_q.ll b/test/CodeGen/Mips/msa/3rf_q.ll index 857ae3f617d..0504fe840b6 100644 --- a/test/CodeGen/Mips/msa/3rf_q.ll +++ b/test/CodeGen/Mips/msa/3rf_q.ll @@ -1,7 +1,7 @@ ; Test the MSA fixed-point intrinsics that are encoded with the 3RF instruction ; format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_mul_q_h_ARG1 = global <8 x i16> , align 16 @llvm_mips_mul_q_h_ARG2 = global <8 x i16> , align 16 diff --git a/test/CodeGen/Mips/msa/arithmetic.ll b/test/CodeGen/Mips/msa/arithmetic.ll index 7dc758e35df..dc655e184ab 100644 --- a/test/CodeGen/Mips/msa/arithmetic.ll +++ b/test/CodeGen/Mips/msa/arithmetic.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s define void @add_v16i8(<16 x i8>* %c, <16 x i8>* %a, <16 x i8>* %b) nounwind { ; CHECK: add_v16i8: diff --git a/test/CodeGen/Mips/msa/arithmetic_float.ll b/test/CodeGen/Mips/msa/arithmetic_float.ll index 9487e2cba68..0c106f826de 100644 --- a/test/CodeGen/Mips/msa/arithmetic_float.ll +++ b/test/CodeGen/Mips/msa/arithmetic_float.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s define void @add_v4f32(<4 x float>* %c, <4 x float>* %a, <4 x float>* %b) nounwind { ; CHECK: add_v4f32: diff --git a/test/CodeGen/Mips/msa/basic_operations.ll b/test/CodeGen/Mips/msa/basic_operations.ll index b0de05d9949..73c17dc468b 100644 --- a/test/CodeGen/Mips/msa/basic_operations.ll +++ b/test/CodeGen/Mips/msa/basic_operations.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck -check-prefix=MIPS32 %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=MIPS32 %s @v4i8 = global <4 x i8> @v16i8 = global <16 x i8> diff --git a/test/CodeGen/Mips/msa/basic_operations_float.ll b/test/CodeGen/Mips/msa/basic_operations_float.ll index 19213758773..7090138ed1e 100644 --- a/test/CodeGen/Mips/msa/basic_operations_float.ll +++ b/test/CodeGen/Mips/msa/basic_operations_float.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck -check-prefix=MIPS32 %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=MIPS32 %s @v4f32 = global <4 x float> @v2f64 = global <2 x double> diff --git a/test/CodeGen/Mips/msa/bit.ll b/test/CodeGen/Mips/msa/bit.ll index f39f2c72d49..1fdf37090ae 100644 --- a/test/CodeGen/Mips/msa/bit.ll +++ b/test/CodeGen/Mips/msa/bit.ll @@ -1,6 +1,6 @@ ; Test the MSA intrinsics that are encoded with the BIT instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_sat_s_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_sat_s_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/bitcast.ll b/test/CodeGen/Mips/msa/bitcast.ll index 03195a84592..12edf830242 100644 --- a/test/CodeGen/Mips/msa/bitcast.ll +++ b/test/CodeGen/Mips/msa/bitcast.ll @@ -1,7 +1,7 @@ ; Test the bitcast operation for big-endian and little-endian. -; RUN: llc -march=mipsel -mattr=+msa < %s | FileCheck -check-prefix=LITENDIAN %s -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck -check-prefix=BIGENDIAN %s +; RUN: llc -march=mipsel -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=LITENDIAN %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=BIGENDIAN %s define void @v16i8_to_v16i8(<16 x i8>* %src, <16 x i8>* %dst) nounwind { entry: diff --git a/test/CodeGen/Mips/msa/bitwise.ll b/test/CodeGen/Mips/msa/bitwise.ll index 0d4407388c1..f5da9f247c1 100644 --- a/test/CodeGen/Mips/msa/bitwise.ll +++ b/test/CodeGen/Mips/msa/bitwise.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s define void @and_v16i8(<16 x i8>* %c, <16 x i8>* %a, <16 x i8>* %b) nounwind { ; CHECK: and_v16i8: diff --git a/test/CodeGen/Mips/msa/compare.ll b/test/CodeGen/Mips/msa/compare.ll index 2e66d9467da..e45e84931a7 100644 --- a/test/CodeGen/Mips/msa/compare.ll +++ b/test/CodeGen/Mips/msa/compare.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s define void @ceq_v16i8(<16 x i8>* %c, <16 x i8>* %a, <16 x i8>* %b) nounwind { ; CHECK: ceq_v16i8: diff --git a/test/CodeGen/Mips/msa/compare_float.ll b/test/CodeGen/Mips/msa/compare_float.ll index 287578a3653..4849928b86d 100644 --- a/test/CodeGen/Mips/msa/compare_float.ll +++ b/test/CodeGen/Mips/msa/compare_float.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s declare <4 x float> @llvm.mips.fmax.w(<4 x float>, <4 x float>) nounwind declare <2 x double> @llvm.mips.fmax.d(<2 x double>, <2 x double>) nounwind diff --git a/test/CodeGen/Mips/msa/elm_copy.ll b/test/CodeGen/Mips/msa/elm_copy.ll index a966043b5de..c32dd8b5917 100644 --- a/test/CodeGen/Mips/msa/elm_copy.ll +++ b/test/CodeGen/Mips/msa/elm_copy.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the ELM instruction format and ; are element extraction operations. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_copy_s_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_copy_s_b_RES = global i32 0, align 16 diff --git a/test/CodeGen/Mips/msa/elm_cxcmsa.ll b/test/CodeGen/Mips/msa/elm_cxcmsa.ll index 383c4ae8b37..dc1fcf79ca4 100644 --- a/test/CodeGen/Mips/msa/elm_cxcmsa.ll +++ b/test/CodeGen/Mips/msa/elm_cxcmsa.ll @@ -1,7 +1,7 @@ ; Test the MSA ctcmsa and cfcmsa intrinsics (which are encoded with the ELM ; instruction format). -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s define i32 @msa_ir_cfcmsa_test() nounwind { entry: diff --git a/test/CodeGen/Mips/msa/elm_insv.ll b/test/CodeGen/Mips/msa/elm_insv.ll index eb7dbf515d2..409503eb7cd 100644 --- a/test/CodeGen/Mips/msa/elm_insv.ll +++ b/test/CodeGen/Mips/msa/elm_insv.ll @@ -1,7 +1,7 @@ ; Test the MSA element insertion intrinsics that are encoded with the ELM ; instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_insert_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_insert_b_ARG3 = global i32 27, align 16 diff --git a/test/CodeGen/Mips/msa/elm_move.ll b/test/CodeGen/Mips/msa/elm_move.ll index 2f1763b4f3c..37fde15c3b5 100644 --- a/test/CodeGen/Mips/msa/elm_move.ll +++ b/test/CodeGen/Mips/msa/elm_move.ll @@ -1,7 +1,7 @@ ; Test the MSA move intrinsics (which are encoded with the ELM instruction ; format). -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_move_vb_ARG1 = global <16 x i8> , align 16 @llvm_mips_move_vb_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/elm_shift_slide.ll b/test/CodeGen/Mips/msa/elm_shift_slide.ll index 2568ba01f7b..d3863c835b0 100644 --- a/test/CodeGen/Mips/msa/elm_shift_slide.ll +++ b/test/CodeGen/Mips/msa/elm_shift_slide.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the ELM instruction format and ; are either shifts or slides. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_sldi_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_sldi_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/i10.ll b/test/CodeGen/Mips/msa/i10.ll index cfc48bd7d34..5e8d2598ee5 100644 --- a/test/CodeGen/Mips/msa/i10.ll +++ b/test/CodeGen/Mips/msa/i10.ll @@ -1,6 +1,6 @@ ; Test the MSA intrinsics that are encoded with the I10 instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_bnz_b_ARG1 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/i5-a.ll b/test/CodeGen/Mips/msa/i5-a.ll index f158494f35f..1fe83b39f1b 100644 --- a/test/CodeGen/Mips/msa/i5-a.ll +++ b/test/CodeGen/Mips/msa/i5-a.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the I5 instruction format. ; There are lots of these so this covers those beginning with 'a' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_addvi_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_addvi_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/i5-b.ll b/test/CodeGen/Mips/msa/i5-b.ll index 165c9a449a6..4362625469b 100644 --- a/test/CodeGen/Mips/msa/i5-b.ll +++ b/test/CodeGen/Mips/msa/i5-b.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the I5 instruction format. ; There are lots of these so this covers those beginning with 'b' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_bclri_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_bclri_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/i5-c.ll b/test/CodeGen/Mips/msa/i5-c.ll index e9ebee40adc..d23a2df45ff 100644 --- a/test/CodeGen/Mips/msa/i5-c.ll +++ b/test/CodeGen/Mips/msa/i5-c.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the I5 instruction format. ; There are lots of these so this covers those beginning with 'c' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_ceqi_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_ceqi_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/i5-m.ll b/test/CodeGen/Mips/msa/i5-m.ll index a4677194acb..3017cd467cc 100644 --- a/test/CodeGen/Mips/msa/i5-m.ll +++ b/test/CodeGen/Mips/msa/i5-m.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the I5 instruction format. ; There are lots of these so this covers those beginning with 'm' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_maxi_s_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_maxi_s_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/i5-s.ll b/test/CodeGen/Mips/msa/i5-s.ll index 616085c7f45..77f52bfb1a4 100644 --- a/test/CodeGen/Mips/msa/i5-s.ll +++ b/test/CodeGen/Mips/msa/i5-s.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the I5 instruction format. ; There are lots of these so this covers those beginning with 's' -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_subvi_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_subvi_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/i5_ld_st.ll b/test/CodeGen/Mips/msa/i5_ld_st.ll index 7a26326fc0d..7ec93261061 100644 --- a/test/CodeGen/Mips/msa/i5_ld_st.ll +++ b/test/CodeGen/Mips/msa/i5_ld_st.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the I5 instruction format and ; are loads or stores. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_ld_b_ARG = global <16 x i8> , align 16 @llvm_mips_ld_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/i8.ll b/test/CodeGen/Mips/msa/i8.ll index ad8d0a44f9e..140658894d5 100644 --- a/test/CodeGen/Mips/msa/i8.ll +++ b/test/CodeGen/Mips/msa/i8.ll @@ -1,6 +1,6 @@ ; Test the MSA intrinsics that are encoded with the I8 instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_andi_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_andi_b_RES = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/llvm-stress-s525530439.ll b/test/CodeGen/Mips/msa/llvm-stress-s525530439.ll index a6e612f2aff..685c407d020 100644 --- a/test/CodeGen/Mips/msa/llvm-stress-s525530439.ll +++ b/test/CodeGen/Mips/msa/llvm-stress-s525530439.ll @@ -1,5 +1,5 @@ ; RUN: llc -march=mips < %s -; RUN: llc -march=mips -mattr=+MSA < %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s ; This test originally failed for MSA with a ; `Num < NumOperands && "Invalid child # of SDNode!"' assertion. diff --git a/test/CodeGen/Mips/msa/llvm-stress-sz1-s742806235.ll b/test/CodeGen/Mips/msa/llvm-stress-sz1-s742806235.ll index 9eb4ff4f707..36afffe7657 100644 --- a/test/CodeGen/Mips/msa/llvm-stress-sz1-s742806235.ll +++ b/test/CodeGen/Mips/msa/llvm-stress-sz1-s742806235.ll @@ -1,5 +1,5 @@ ; RUN: llc -march=mips < %s -; RUN: llc -march=mips -mattr=+MSA < %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s ; This test originally failed to select code for a truncstore of a ; build_vector. diff --git a/test/CodeGen/Mips/msa/shuffle.ll b/test/CodeGen/Mips/msa/shuffle.ll index 129efe4f3d9..9265d251dda 100644 --- a/test/CodeGen/Mips/msa/shuffle.ll +++ b/test/CodeGen/Mips/msa/shuffle.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s define void @vshf_v16i8_0(<16 x i8>* %c, <16 x i8>* %a, <16 x i8>* %b) nounwind { ; CHECK: vshf_v16i8_0: diff --git a/test/CodeGen/Mips/msa/spill.ll b/test/CodeGen/Mips/msa/spill.ll index 5c927bfffff..d73a8b59086 100644 --- a/test/CodeGen/Mips/msa/spill.ll +++ b/test/CodeGen/Mips/msa/spill.ll @@ -1,7 +1,7 @@ ; Test that the correct instruction is chosen for spill and reload by trying ; to have 33 live MSA registers simultaneously -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s define i32 @test_i8(<16 x i8>* %p0, <16 x i8>* %q1) nounwind { entry: diff --git a/test/CodeGen/Mips/msa/vec.ll b/test/CodeGen/Mips/msa/vec.ll index ee13493d7fd..c26144e35a3 100644 --- a/test/CodeGen/Mips/msa/vec.ll +++ b/test/CodeGen/Mips/msa/vec.ll @@ -1,7 +1,7 @@ ; Test the MSA intrinsics that are encoded with the VEC instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck -check-prefix=ANYENDIAN %s -; RUN: llc -march=mipsel -mattr=+msa < %s | FileCheck -check-prefix=ANYENDIAN %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=ANYENDIAN %s +; RUN: llc -march=mipsel -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=ANYENDIAN %s @llvm_mips_and_v_b_ARG1 = global <16 x i8> , align 16 @llvm_mips_and_v_b_ARG2 = global <16 x i8> , align 16 diff --git a/test/CodeGen/Mips/msa/vecs10.ll b/test/CodeGen/Mips/msa/vecs10.ll index 8d68a0e6ca9..a00a488401d 100644 --- a/test/CodeGen/Mips/msa/vecs10.ll +++ b/test/CodeGen/Mips/msa/vecs10.ll @@ -1,6 +1,6 @@ ; Test the MSA intrinsics that are encoded with the VECS10 instruction format. -; RUN: llc -march=mips -mattr=+msa < %s | FileCheck %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s @llvm_mips_bnz_v_ARG1 = global <16 x i8> , align 16