Hi, This is similar to the previous patch except that it prevents (vec_select:DI (operand:DI)) type operations.
Exposed by the vst*_lane*.c tests in the new testsuite. regards, Ramana 2012-07-27 Ramana Radhakrishnan <ramana.radhakrish...@linaro.org> * config/arm/neon.md (neon_vst1_lanedi): Split from .. (neon_vst1<mode> VDX): this, iterate over VD and cleanup. --- gcc/config/arm/neon.md | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 843c907..ec35d69 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -4405,10 +4405,23 @@ "vst1.<V_sz_elem>\t%h1, %A0" [(set_attr "neon_type" "neon_vst1_1_2_regs_vst2_2_regs")]) +(define_expand "neon_vst1_lanedi" + [(match_operand:DI 0 "neon_struct_operand") + (match_operand:DI 1 "s_register_operand") + (match_operand:SI 2 "neon_lane_number")] + "TARGET_NEON" + { + if (INTVAL (operands[2]) == 1) + error ("lane out of range for vst1_lanedi intrinsic"); + emit_move_insn (operands[0], operands[1]); + DONE; + } +) + (define_insn "neon_vst1_lane<mode>" [(set (match_operand:<V_elem> 0 "neon_struct_operand" "=Um") (vec_select:<V_elem> - (match_operand:VDX 1 "s_register_operand" "w") + (match_operand:VD 1 "s_register_operand" "w") (parallel [(match_operand:SI 2 "neon_lane_number" "i")])))] "TARGET_NEON" { @@ -4416,15 +4429,10 @@ HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode); if (lane < 0 || lane >= max) error ("lane out of range"); - if (max == 1) - return "vst1.<V_sz_elem>\t{%P1}, %A0"; - else - return "vst1.<V_sz_elem>\t{%P1[%c2]}, %A0"; + + return "vst1.<V_sz_elem>\t{%P1[%c2]}, %A0"; } - [(set (attr "neon_type") - (if_then_else (eq (const_string "<V_mode_nunits>") (const_int 1)) - (const_string "neon_vst1_1_2_regs_vst2_2_regs") - (const_string "neon_vst1_vst2_lane")))]) + [(set_attr "neon_type" "neon_vst1_vst2_lane")]) (define_insn "neon_vst1_lane<mode>" [(set (match_operand:<V_elem> 0 "neon_struct_operand" "=Um") -- 1.7.4.1