On Tue 06 Dec 2011 18:43:05 GMT, Julian Brown wrote:
On Tue, 06 Dec 2011 17:59:44 +0000
Andrew Stubbs<a...@codesourcery.com>  wrote:

This patch adds a one's complement pattern for doing DImode 'not' in
NEON registers.

There are already patterns for doing one's complement of vectors, and
even though it boils down to the same instruction, the DImode case
was missing.

The patch needs to be a little more complicated than using a mode
iterator that includes DI because it needs to coexist with the
non-neon one_cmpldi2 (renamed by this patch to "one_cmpldi2_core").

OK for when stage 1 opens again?

Andrew

+(define_insn "*one_cmpldi2_neon"
+  [(set (match_operand:DI 0 "s_register_operand"      "=w,?&r,?&r,?w")
+       (not:DI (match_operand:DI 1 "s_register_operand" " w,  0,  r, w")))]
+  "TARGET_NEON"
+  "@
+  vmvn\t%P0, %P1
+  #
+  #
+  vmvn\t%P0, %P1"
+  [(set_attr "neon_type" "neon_int_1,*,*,neon_int_1")
+   (set_attr "length" "*,8,8,*")
+   (set_attr "arch" "nota8,*,*,onlya8")]
+)

Don't you need to specify an element type on those instructions? (".s64"
maybe)?

No; I believe you can, but it's ignored, given that it makes zero difference. Same for vand, vorr, veor etc. In any case this was copied from the existing "one_cmpl<mode>2" pattern, and gas accepts it.

Andrew

Reply via email to