[vectorIntrinsics] Miscellaneous cleanup for x86 code gen

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Fri Mar 27 22:17:46 UTC 2020


Considering supported vectors are at least 4 bytes in size, I'm curious 
why do we need 1-/2-byte vector memory operations?

1724 const int Matcher::vector_width_in_bytes(BasicType bt) {
...
1738   // Minimum 2 values in vector (or 4 for bytes).

+instruct storeV1(memory mem, vec src, rRegI tmp) %{
+  predicate(n->as_StoreVector()->memory_size() == 1);
+  match(Set mem (StoreVector mem src));
+  ins_cost(145);
+  effect(TEMP tmp);
+  format %{ "movd $tmp,$src\n\t"
+          "movb $mem,$tmp\t! store vector (1 byte)" %}
+  ins_encode %{
+    __ movdl($tmp$$Register, $src$$XMMRegister);
+    __ movb($mem$$Address, $tmp$$Register);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+instruct storeV2(memory mem, vec src, rRegI tmp) %{
+  predicate(n->as_StoreVector()->memory_size() == 2);
+  match(Set mem (StoreVector mem src));
+  ins_cost(145);
+  effect(TEMP tmp);
+  format %{ "movd $tmp,$src\n\t"
+          "movw $mem,$tmp\t! store vector (2 bytes)" %}
+  ins_encode %{
+    __ movdl($tmp$$Register, $src$$XMMRegister);
+    __ movw($mem$$Address, $tmp$$Register);
+  %}
+  ins_pipe( pipe_slow );
+%}

Best regards,
Vladimir Ivanov

On 28.03.2020 00:48, Viswanathan, Sandhya wrote:
> Please find below a webrev which does miscellaneous cleanup for x86 code gen:
> http://cr.openjdk.java.net/~sviswanathan/vectorIntrinsics/Misc/webrev.00/
> 
> Best Regards,
> Sandhya
> 
> 


More information about the panama-dev mailing list