[vectorIntrinsics] Miscellaneous cleanup for x86 code gen

Viswanathan, Sandhya sandhya.viswanathan at intel.com
Fri Mar 27 23:46:03 UTC 2020


Thanks a lot for the review.
I will make those changes and push the patch.

Best Regards,
Sandhya

-----Original Message-----
From: Vladimir Ivanov <vladimir.x.ivanov at oracle.com> 
Sent: Friday, March 27, 2020 4:07 PM
To: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; panama-dev <panama-dev at openjdk.java.net>; Rukmannagari, Shravya <shravya.rukmannagari at intel.com>
Subject: Re: [vectorIntrinsics] Miscellaneous cleanup for x86 code gen

A couple more notes:

+    case Op_ExtractB:
+    case Op_ExtractL:
+#ifndef _LP64
+      return false;
+#endif
...
+    case Op_VectorTest:
+      return false;
+      break;

I think you can safely drop the checks since it should be already covered by has_match_rule(opcode).

+      if(vlen == 1 || vlen == 2) {

vlen == 1 is redundant. (Vectors have at least 2 elements.)

Otherwise, looks good.

Best regards,
Vladimir Ivanov

On 28.03.2020 01:47, Viswanathan, Sandhya wrote:
> Yes, it is most likely not needed. I think this was included as half an attempt to support 1 and 2 byte masks.
> I will remove these, test and verify that they are not being used.
> 
> Best Regards,
> Sandhya
> 
> -----Original Message-----
> From: Vladimir Ivanov <vladimir.x.ivanov at oracle.com>
> Sent: Friday, March 27, 2020 3:18 PM
> To: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; panama-dev 
> <panama-dev at openjdk.java.net>; Rukmannagari, Shravya 
> <shravya.rukmannagari at intel.com>
> Subject: Re: [vectorIntrinsics] Miscellaneous cleanup for x86 code gen
> 
> 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