+2019-10-28 Mihailo Stojanovic <mistojanovic@wavecomp.com>
+
+ * config/mips/mips-msa.md (msa_insert_<msaftm_f>): Add an
+ alternative which covers the floating-point input value. Also
+ forbid the split of insert.d pattern for floating-point values.
+
2019-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
* config.gcc: Add riscv-sr.o to extra_objs for riscv.
})
(define_insn "msa_insert_<msafmt_f>"
- [(set (match_operand:MSA 0 "register_operand" "=f")
+ [(set (match_operand:MSA 0 "register_operand" "=f,f")
(vec_merge:MSA
(vec_duplicate:MSA
- (match_operand:<UNITMODE> 1 "reg_or_0_operand" "dJ"))
- (match_operand:MSA 2 "register_operand" "0")
+ (match_operand:<UNITMODE> 1 "reg_or_0_operand" "dJ,f"))
+ (match_operand:MSA 2 "register_operand" "0,0")
(match_operand 3 "const_<bitmask>_operand" "")))]
"ISA_HAS_MSA"
{
+ if (which_alternative == 1)
+ return "insve.<msafmt>\t%w0[%y3],%w1[0]";
+
if (!TARGET_64BIT && (<MODE>mode == V2DImode || <MODE>mode == V2DFmode))
return "#";
else
"reload_completed && ISA_HAS_MSA && !TARGET_64BIT"
[(const_int 0)]
{
+ if (REG_P (operands[1]) && FP_REG_P (REGNO (operands[1])))
+ FAIL;
mips_split_msa_insert_d (operands[0], operands[2], operands[3], operands[1]);
DONE;
})
+2019-10-28 Mihailo Stojanovic <mistojanovic@wavecomp.com>
+
+ * gcc.target/mips/msa-insert-split.c: New test.
+
2019-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
* gcc.target/riscv/save-restore-2.c: New file.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mfp64 -mhard-float -mmsa" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+typedef double v2f64 __attribute__ ((vector_size (16)));
+
+void foo (double* arr, v2f64* vec)
+{
+ v2f64 v;
+ v[0] = arr[0];
+ v[1] = arr[1];
+ *vec = v;
+}
+
+/* { dg-final { scan-assembler-not "insert.w" } } */
+/* { dg-final { scan-assembler-times "insve.d" 2 } } */