Re: RFR: 8282162: [vector] Optimize vector negation API [v2]

2022-03-28 Thread Xiaohong Gong
On Mon, 28 Mar 2022 07:43:29 GMT, Jie Fu wrote: >> Xiaohong Gong has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add a superclass for vector negation > > src/hotspot/share/opto/vectornode.cpp line 1592: > >> 1590: >> 1591: // Generate

Re: RFR: 8282162: [vector] Optimize vector negation API [v2]

2022-03-28 Thread Jie Fu
On Tue, 22 Mar 2022 09:58:23 GMT, Xiaohong Gong wrote: >> The current vector `"NEG"` is implemented with substraction a vector by zero >> in case the architecture does not support the negation instruction. And to >> fit the predicate feature for architectures that support it, the masked >>

Re: RFR: 8282162: [vector] Optimize vector negation API [v2]

2022-03-28 Thread Xiaohong Gong
On Mon, 28 Mar 2022 07:40:48 GMT, Jie Fu wrote: >> The compiler can get the real type info from `Op_NegVI` that can also handle >> the `BYTE ` and `SHORT ` basic type. I just don't want to add more new IRs >> which also need more match rules in the ad files. >> >>> Is there any performance

Re: RFR: 8282162: [vector] Optimize vector negation API [v2]

2022-03-28 Thread Jie Fu
On Mon, 21 Mar 2022 01:19:57 GMT, Xiaohong Gong wrote: > The compiler can get the real type info from `Op_NegVI` that can also handle > the `BYTE ` and `SHORT ` basic type. I just don't want to add more new IRs > which also need more match rules in the ad files. > > > Is there any performance

Re: RFR: 8282162: [vector] Optimize vector negation API [v2]

2022-03-23 Thread Xiaohong Gong
On Tue, 22 Mar 2022 09:58:23 GMT, Xiaohong Gong wrote: >> The current vector `"NEG"` is implemented with substraction a vector by zero >> in case the architecture does not support the negation instruction. And to >> fit the predicate feature for architectures that support it, the masked >>

Re: RFR: 8282162: [vector] Optimize vector negation API [v2]

2022-03-22 Thread Xiaohong Gong
> The current vector `"NEG"` is implemented with substraction a vector by zero > in case the architecture does not support the negation instruction. And to > fit the predicate feature for architectures that support it, the masked > vector `"NEG" ` is implemented with pattern `"v.not(m).add(1,