On 31 January 2011 16:53, Ulrich Weigand Ulrich.Weigand@de.ibm.com wrote:
Ira Rosen ira.rosen@linaro.org wrote:
(define_insn "neon_vzip<mode>_internal" [(set (match_operand:VDQW 0 "s_register_operand" "=w") (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")] UNSPEC_VZIP1)) (set (match_operand:VDQW 2 "s_register_operand" "=w") (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")] UNSPEC_VZIP2))] "TARGET_NEON" "vzip.<V_sz_elem>\t%<V_reg>0, %<V_reg>2" [(set (attr "neon_type") (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0)) (const_string "neon_bp_simple") (const_string "neon_bp_3cycle")))] )
Is there a way to properly mark the dependence?
I guess you need to make sure the UNSPEC_VZIP forms both explicitly depend on both input operands. This can be a bit tricky due to various reload constraints on how matching constraints and/or match_dup can be used, but I think something along the following lines should work:
[(set (match_operand:VDQW 0 "s_register_operand" "=w") (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0") (match_operand:VDQW 2 "s_register_operand" "w")] UNSPEC_VZIP1)) (set (match_operand:VDQW 3 "s_register_operand" "=2") (unspec:VDQW [(match_dup 1) (match_dup 2)] UNSPEC_VZIP2))]
Thanks a lot! It seems to work. It fixed the problem and I am now testing the patch on the rest of the vectorizer testsuite.
Thanks, Ira
Mit freundlichen Gruessen / Best Regards
Ulrich Weigand
-- Dr. Ulrich Weigand | Phone: +49-7031/16-3727 STSM, GNU compiler and toolchain for Linux on System z and Cell/B.E. IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter | Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht Stuttgart, HRB 243294