Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-25 Thread Jatin Bhateja
On Thu, 24 Apr 2025 08:57:14 GMT, erifan wrote: >> erifan has updated the pull request with a new target base due to a merge or >> a rebase. The incremental webrev excludes the unrelated changes brought in >> by the merge/rebase. The pull request contains two additional commits since >> the la

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-25 Thread Jatin Bhateja
On Thu, 24 Apr 2025 09:46:24 GMT, erifan wrote: >> test/hotspot/jtreg/compiler/vectorapi/VectorMaskCompareNotTest.java line 38: >> >>> 36: * @summary test combining vector not operation with compare >>> 37: * @modules jdk.incubator.vector >>> 38: * @requires ((os.arch!="x86" & os.arch!="i386"

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-25 Thread Jatin Bhateja
On Thu, 24 Apr 2025 09:37:07 GMT, erifan wrote: >> src/hotspot/share/opto/vectornode.cpp line 2243: >> >>> 2241: in1 = in1->in(1); >>> 2242: } >>> 2243: if (in1->Opcode() != Op_VectorMaskCmp || in1->outcnt() > 1 || >> >> Checks on outcnt on line 2243 and 2238 can be removed. Idealizatio

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-25 Thread erifan
On Thu, 24 Apr 2025 10:28:15 GMT, Andrew Haley wrote: >> erifan has updated the pull request with a new target base due to a merge or >> a rebase. The incremental webrev excludes the unrelated changes brought in >> by the merge/rebase. The pull request contains two additional commits since >>

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-25 Thread erifan
On Thu, 24 Apr 2025 09:39:58 GMT, erifan wrote: >> src/hotspot/share/opto/vectornode.cpp line 2265: >> >>> 2263: vmcmp = new VectorMaskCastNode(phase->transform(vmcmp), >>> vmcast_vt); >>> 2264: } >>> 2265: return vmcmp; >> >> It would be preferable if you could kindly re-factor the co

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-04-25 Thread erifan
> This patch optimizes the following patterns: > For integer types: > > (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) > => (VectorMaskCmp src1 src2 ncond) > (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) > => (VectorMaskCmp src1 src2 ncond) > > cond can be eq, ne, le, ge, l

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-24 Thread Andrew Haley
On Fri, 18 Apr 2025 01:36:10 GMT, erifan wrote: >> This patch optimizes the following patterns: >> For integer types: >> >> (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) >> => (VectorMaskCmp src1 src2 ncond) >> (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) >> => (VectorMa

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-24 Thread erifan
On Wed, 23 Apr 2025 12:09:51 GMT, Jatin Bhateja wrote: >> erifan has updated the pull request with a new target base due to a merge or >> a rebase. The incremental webrev excludes the unrelated changes brought in >> by the merge/rebase. The pull request contains two additional commits since >>

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-24 Thread erifan
On Fri, 18 Apr 2025 01:36:10 GMT, erifan wrote: >> This patch optimizes the following patterns: >> For integer types: >> >> (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) >> => (VectorMaskCmp src1 src2 ncond) >> (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) >> => (VectorMa

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-23 Thread Jatin Bhateja
On Fri, 18 Apr 2025 01:36:10 GMT, erifan wrote: >> This patch optimizes the following patterns: >> For integer types: >> >> (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) >> => (VectorMaskCmp src1 src2 ncond) >> (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) >> => (VectorMa

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-23 Thread Jatin Bhateja
On Fri, 18 Apr 2025 01:36:10 GMT, erifan wrote: >> This patch optimizes the following patterns: >> For integer types: >> >> (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) >> => (VectorMaskCmp src1 src2 ncond) >> (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) >> => (VectorMa

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-17 Thread erifan
> This patch optimizes the following patterns: > For integer types: > > (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) > => (VectorMaskCmp src1 src2 ncond) > (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) > => (VectorMaskCmp src1 src2 ncond) > > cond can be eq, ne, le, ge, l

RFR: 8354242: VectorAPI: combine vector not operation with compare

2025-04-15 Thread erifan
This patch optimizes the following patterns: For integer types: (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) => (VectorMaskCmp src1 src2 ncond) (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) => (VectorMaskCmp src1 src2 ncond) cond can be eq, ne, le, ge, lt, gt, ule, uge, u