We used INSR to handle zero integers but not zero floats.
2019-08-07 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* config/aarch64/constraints.md (Z): Handle floating-point zeros too.
* config/aarch64/predicates.md (aarch64_reg_or_zero): Likewise.
gcc/testsuite/
* gcc.target/aarch64/sve/init_13.c: New test.
From-SVN: r274193
+2019-08-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/aarch64/constraints.md (Z): Handle floating-point zeros too.
+ * config/aarch64/predicates.md (aarch64_reg_or_zero): Likewise.
+
2019-08-07 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): Add
(match_test "aarch64_float_const_zero_rtx_p (op)")))
(define_constraint "Z"
- "Integer constant zero."
- (match_test "op == const0_rtx"))
+ "Integer or floating-point constant zero."
+ (match_test "op == CONST0_RTX (GET_MODE (op))"))
(define_constraint "Ush"
"A constraint that matches an absolute symbolic address high part."
(match_test "REGNO_REG_CLASS (REGNO (op)) == FP_REGS"))))
(define_predicate "aarch64_reg_or_zero"
- (and (match_code "reg,subreg,const_int")
+ (and (match_code "reg,subreg,const_int,const_double")
(ior (match_operand 0 "register_operand")
- (match_test "op == const0_rtx"))))
+ (match_test "op == CONST0_RTX (GET_MODE (op))"))))
(define_predicate "aarch64_reg_or_fp_zero"
(ior (match_operand 0 "register_operand")
+2019-08-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/init_13.c: New test.
+
2019-08-07 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/sve/init_12.c: Expect w1 to be moved into
--- /dev/null
+/* { dg-do assemble { target aarch64_asm_sve_ok } } */
+/* { dg-options "-O -msve-vector-bits=256 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+typedef float vnx4sf __attribute__((vector_size (32)));
+
+/*
+** foo:
+** mov (z[0-9]+\.s), s0
+** insr \1, wzr
+** ...
+*/
+vnx4sf
+foo (float a)
+{
+ return (vnx4sf) { 0.0f, a, a, a, a, a, a, a };
+}