On Tue, 8 Jul 2025 11:42:02 GMT, Emanuel Peter 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 17 additional commits since
>> t
On Tue, 8 Jul 2025 11:42:18 GMT, Emanuel Peter wrote:
>> Oh wow, my bad. I misunderstood the brackets!
>>
>> Instead of:
>>
>> !(in1->as_VectorMaskCmp())->predicate_can_be_negated() ||
>> !VectorNode::is_all_ones_vector(in2)) {
>>
>> I read:
>>
>> !(in1->as_VectorMaskCmp()->
> 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
On Tue, 8 Jul 2025 10:21:03 GMT, erifan wrote:
>>> predicate cannot be negated AND the vector is all ones. Can you explain
>>> this condition?
>>
>> Ok, I'll add a comment for it.
>>
>>> Why do you guard against VectorNode::is_all_ones_vector(in2) at all?
>>
>> Because one of the nodes in the
On Tue, 8 Jul 2025 11:41:01 GMT, Emanuel Peter wrote:
>> The purpose of this PR is optimizing the following kinds of patterns:
>>
>> XXXVector va, vb;
>> va.compare(EQ, vb).not()
>>
>> And the generated IR of `va.compare(EQ, vb).not()` is `(XorVMask
>> (VectorMaskCmp va vb EQ) (MaskAll -1))`.
On Tue, 8 Jul 2025 06:00:38 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))
>> => (VectorMas
On Tue, 8 Jul 2025 09:49:30 GMT, erifan wrote:
>> Thanks for your answers @erifan !
>>
>> Can you please answer these as well?
>>
>>> predicate cannot be negated AND the vector is all ones. Can you explain
>>> this condition?
>>
>> A code comment would be helpful for this case. I'm a little b
On Tue, 8 Jul 2025 08:56:44 GMT, Emanuel Peter wrote:
> predicate cannot be negated AND the vector is all ones. Can you explain this
> condition?
Ok, I'll add a comment for it.
> Why do you guard against VectorNode::is_all_ones_vector(in2) at all?
Because one of the nodes in the supported pat
On Tue, 8 Jul 2025 05:56:58 GMT, erifan wrote:
>> The current testing status for the conditions you listed:
>>> 1. Not MaskCmp.
>>
>> **No test for it, tested locally**, Because I think this condition is too
>> straightforward.
>>
>>> 2. More than one use.
>>
>> **Tested**, see `VectorMaskCom
> 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
On Mon, 7 Jul 2025 09:32:42 GMT, erifan wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2243:
>>
>>> 2241: !VectorNode::is_all_ones_vector(in2)) {
>>> 2242: return nullptr;
>>> 2243: }
>>
>> Suggestion:
>>
>> if (in1->Opcode() != Op_VectorMaskCmp ||
>> in1->outcnt() !=
On Mon, 7 Jul 2025 06:19:15 GMT, Emanuel Peter 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 15 additional commits since
>> t
On Wed, 25 Jun 2025 10:08:23 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
On Thu, 5 Jun 2025 11:05:48 GMT, Emanuel Peter wrote:
>>> > FYI: `BoolTest::negate` already does what you want: `mask negate( ) const
>>> > { return mask(_test^4); }` I think you should use that instead :)
>>>
>>> Indeed, I hadn't noticed that, thank you.
>>
>> Oh I think we still cannot use `
On Wed, 25 Jun 2025 10:08:23 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
> 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
On Wed, 11 Jun 2025 09:09:57 GMT, erifan wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2221:
>>
>>> 2219: // XorV/XorVMask is commutative, swap VectorMaskCmp/VectorMaskCast
>>> to in1.
>>> 2220: if (in2->Opcode() == Op_VectorMaskCmp ||
>>> 2221: (in2->Opcode() == Op_VectorMaskC
On Wed, 11 Jun 2025 09:07:12 GMT, erifan wrote:
>> Oh. Ok. Well at least add a `RuntimeException` to an `else` branch then, I
>> would suggest :)
>
> Make sense!
Done
>>> > You are checking IRNode.XOR_VL, "= 0". But you are comparing floats. Does
>>> > that make sense?
>>
>>> The bottom type
On Wed, 11 Jun 2025 05:09:34 GMT, Emanuel Peter wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2227:
>>
>>> 2225: const TypeVect* vector_mask_cast_vt = nullptr;
>>> 2226: // in1 should be single used, otherwise the optimization may be
>>> unprofitable.
>>> 2227: if (in1->Opcode() ==
On Wed, 11 Jun 2025 08:51:50 GMT, Xiaohong Gong wrote:
>> erifan has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> Support negating unsigned comparison for BoolTest::mask
>>
>> Added a static method `negate_mask(mask btm)` into BoolTe
On Wed, 11 Jun 2025 04:56:36 GMT, Emanuel Peter wrote:
>> erifan has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> Support negating unsigned comparison for BoolTest::mask
>>
>> Added a static method `negate_mask(mask btm)` into BoolTe
On Thu, 5 Jun 2025 11:05:48 GMT, Emanuel Peter wrote:
>>> > FYI: `BoolTest::negate` already does what you want: `mask negate( ) const
>>> > { return mask(_test^4); }` I think you should use that instead :)
>>>
>>> Indeed, I hadn't noticed that, thank you.
>>
>> Oh I think we still cannot use `
On Fri, 6 Jun 2025 10:38:11 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))
>> => (VectorMas
On Wed, 11 Jun 2025 08:47:56 GMT, Xiaohong Gong wrote:
>> erifan has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> Support negating unsigned comparison for BoolTest::mask
>>
>> Added a static method `negate_mask(mask btm)` into BoolTe
On Wed, 11 Jun 2025 07:43:55 GMT, Emanuel Peter wrote:
>> `VectorOperators.XXX` is not compile time constants, we can't use `switch`
>> here.
>
> Oh. Ok. Well at least add a `RuntimeException` to an `else` branch then, I
> would suggest :)
Make sense!
-
PR Review Comment: https:/
On Wed, 11 Jun 2025 08:30:51 GMT, Emanuel Peter wrote:
>>> You are checking IRNode.XOR_VL, "= 0". But you are comparing floats. Does
>>> that make sense?
>>
>> The bottom types of `float` and `double` vector masks are casted to `int`
>> and `long`. Seems this is by design? So this is correct.
On Wed, 11 Jun 2025 08:20:20 GMT, erifan wrote:
> > You are checking IRNode.XOR_VL, "= 0". But you are comparing floats. Does
> > that make sense?
> The bottom types of float and double vector masks are casted to int and long.
> Seems this is by design? So this is correct.
This is a `float` t
On Wed, 11 Jun 2025 05:31:00 GMT, Emanuel Peter wrote:
> You are checking IRNode.XOR_VL, "= 0". But you are comparing floats. Does
> that make sense?
The bottom types of `float` and `double` vector masks are casted to `int` and
`long`. Seems this is by design? So this is correct.
As for `cont
On Wed, 11 Jun 2025 07:31:48 GMT, erifan wrote:
>> test/hotspot/jtreg/compiler/vectorapi/VectorMaskCompareNotTest.java line 158:
>>
>>> 156: } else if (op == VectorOperators.UGT) {
>>> 157: Asserts.assertEquals(compareUnsigned(a, b) <= 0, r);
>>> 158: }
>>
>> Please
On Wed, 11 Jun 2025 05:23:12 GMT, Emanuel Peter wrote:
>> erifan has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> Support negating unsigned comparison for BoolTest::mask
>>
>> Added a static method `negate_mask(mask btm)` into BoolTe
On Wed, 11 Jun 2025 05:08:35 GMT, Emanuel Peter wrote:
>> erifan has updated the pull request incrementally with one additional commit
>> since the last revision:
>>
>> Support negating unsigned comparison for BoolTest::mask
>>
>> Added a static method `negate_mask(mask btm)` into BoolTe
On Fri, 6 Jun 2025 10:38:11 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))
>> => (VectorMas
On Fri, 6 Jun 2025 10:38:11 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))
>> => (VectorMas
On Tue, 10 Jun 2025 02:38:29 GMT, Fei Yang wrote:
> FYI: I submitted to testing in QEMU-system / Ubuntu 25.04 (fastdebug jdk
> build and 256-bit RVV) and I see `compiler/vectorization`,
> `compiler/vectorapi` and `jdk_vector` tests are passing.
Thank you very much!
-
PR Comment:
On Fri, 6 Jun 2025 10:38:11 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))
>> => (VectorMas
On Fri, 6 Jun 2025 10:38:11 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))
>> => (VectorMas
On Fri, 6 Jun 2025 07:01:58 GMT, erifan wrote:
> > > Oh I think we still cannot use `BoolTest::negate`, because we cannot
> > > instantiate a `BoolTest` object with **unsigned** comparison.
> > > `BoolTest::negate` is a non-static function.
> >
> >
> > I see. Ok. Hmm. I still think that the l
> 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
On Thu, 5 Jun 2025 11:05:48 GMT, Emanuel Peter wrote:
> > Oh I think we still cannot use `BoolTest::negate`, because we cannot
> > instantiate a `BoolTest` object with **unsigned** comparison.
> > `BoolTest::negate` is a non-static function.
>
> I see. Ok. Hmm. I still think that the logic sho
On Thu, 5 Jun 2025 09:48:46 GMT, erifan wrote:
> Oh I think we still cannot use `BoolTest::negate`, because we cannot
> instantiate a `BoolTest` object with **unsigned** comparison.
> `BoolTest::negate` is a non-static function.
I see. Ok. Hmm. I still think that the logic should be in `BoolTe
On Thu, 5 Jun 2025 09:24:10 GMT, Emanuel Peter wrote:
> FYI: `BoolTest::negate` already does what you want: `mask negate( ) const {
> return mask(_test^4); }` I think you should use that instead :)
Indeed, I hadn't noticed that, thank you.
-
PR Comment: https://git.openjdk.org/jdk
On Wed, 28 May 2025 12:18:15 GMT, Emanuel Peter 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 10 additional commits since
>>
On Thu, 29 May 2025 01:44:49 GMT, Xiaohong Gong wrote:
>> test/micro/org/openjdk/bench/jdk/incubator/vector/MaskCompareNotBenchmark.java
>> line 49:
>>
>>> 47: private static final VectorSpecies L_SPECIES =
>>> LongVector.SPECIES_MAX;
>>> 48: private static final VectorSpecies F_SPECIE
On Thu, 5 Jun 2025 09:32:15 GMT, erifan wrote:
> > FYI: `BoolTest::negate` already does what you want: `mask negate( ) const {
> > return mask(_test^4); }` I think you should use that instead :)
>
> Indeed, I hadn't noticed that, thank you.
Oh I think we still cannot use `BoolTest::negate`, be
On Wed, 28 May 2025 12:28:20 GMT, Emanuel Peter wrote:
>> test/hotspot/jtreg/compiler/vectorapi/VectorMaskCompareNotTest.java line 237:
>>
>>> 235: // Byte tests
>>> 236: @Test
>>> 237: @IR(counts = { IRNode.XOR_V_MASK, "= 0", IRNode.XOR_VB, "= 0" },
>>
>> Could you still assert the
On Thu, 5 Jun 2025 09:12:30 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))
>> => (VectorMas
On Thu, 29 May 2025 07:55:06 GMT, erifan wrote:
>> Also: You now cast `(VectorMaskCmpNode*) in1` twice. Can we not do
>> `as_VectorMaskCmp()`? Or could we at least cast it only once, and then use
>> it as `in1_mask_cmp` instead?
>
>> What is the hard-coded ^ 4 here?
>
> This is to negate the c
> 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
On Thu, 29 May 2025 08:00:05 GMT, erifan wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2233:
>>
>>> 2231: if (in2->Opcode() == Op_VectorMaskCast) {
>>> 2232: in2 = in2->in(1);
>>> 2233: }
>>
>> Wow, this seems to be an addition that is not covered in the patterns you
>> mention
On Wed, 28 May 2025 12:03:48 GMT, Emanuel Peter 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 10 additional commits since
>>
On Wed, 28 May 2025 12:12:50 GMT, Emanuel Peter 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 10 additional commits since
>>
On Fri, 16 May 2025 07:40:53 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 10 additional commits since
>> the las
On Wed, 28 May 2025 12:16:23 GMT, Emanuel Peter wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2244:
>>
>>> 2242: // BoolTest doesn't support unsigned comparisons.
>>> 2243: BoolTest::mask neg_cond =
>>> 2244: (BoolTest::mask) (((VectorMaskCmpNode*) in1)->get_predicate() ^
>>> 4
On Wed, 28 May 2025 12:26:31 GMT, Emanuel Peter 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 10 additional commits since
>>
On Wed, 14 May 2025 02:44:14 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
On Wed, 28 May 2025 12:14:56 GMT, Emanuel Peter 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 10 additional commits since
>>
On Wed, 14 May 2025 02:44:14 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
On Wed, 7 May 2025 11:13:23 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 eight additional commits
>> sinc
On Fri, 9 May 2025 09:37:22 GMT, erifan wrote:
>> Yes, converting `VectorMask.fromLong(SPECIES, -1L)` to `MaskAll()` would be
>> better, and that will benefit AArch64 as well, since `MaskAll()` is much
>> more cheaper than `fromLong()` on AArch64. We can add such a transformation
>> with anoth
> 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
On Thu, 8 May 2025 01:49:45 GMT, Xiaohong Gong wrote:
>> Yes, that's the right approach. For this PR, I think you can mix some test
>> points covering compare, xor(maskAll(true)).
>
> Yes, converting `VectorMask.fromLong(SPECIES, -1L)` to `MaskAll()` would be
> better, and that will benefit AAr
On Wed, 7 May 2025 02:10:56 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))
>> => (VectorMas
On Wed, 7 May 2025 11:02:43 GMT, Jatin Bhateja wrote:
>> Hi @jatin-bhateja It is feasible. But I was thinking about whether another
>> solution would be better, which is to turn `VectorMask.fromLong(SPECIES,
>> -1L)` into `MaskAll(true)` in the mid-end. In this way, we don't need to
>> check
On Wed, 7 May 2025 02:10:56 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))
>> => (VectorMas
On Wed, 7 May 2025 10:24:14 GMT, erifan wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2231:
>>
>>> 2229: }
>>> 2230: if (in1->Opcode() != Op_VectorMaskCmp || in1->outcnt() > 1 ||
>>> 2231: !((VectorMaskCmpNode*) in1)->predicate_can_be_inverted() ||
>>
>> Do you plan to extend
On Fri, 25 Apr 2025 09:17:02 GMT, Jatin Bhateja wrote:
>> Thanks for telling me this information. Another more important reason to
>> check outcnt here is to prevent this optimization when the uses of
>> VectorMaskCmp is greater than 1, because this optimization may not be
>> worthwhile. For e
On Wed, 7 May 2025 06:59:34 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 eight additional commits
>> sinc
On Wed, 7 May 2025 06:59:34 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 eight additional commits
>> sinc
On Wed, 7 May 2025 02:10:56 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))
>> => (VectorMas
On Fri, 2 May 2025 06:14:33 GMT, Emanuel Peter wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2216:
>>
>>> 2214: in2->is_predicated_vector()) {
>>> 2215: with_predicated = true;
>>> 2216: }
>>
>> Suggestion:
>>
>> bool with_predicated = is_predicated_vector() ||
>>
On Fri, 2 May 2025 06:16:03 GMT, Emanuel Peter 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 six additional commits since
>>
On Thu, 1 May 2025 07:32:22 GMT, erifan wrote:
>> Yes, this discussion is down to `requires` vs `applyIf`. This is my argument
>> for `applyIf`, quoted from above, I have not yet seen an argument against it:
>>
>>> If you use @require, then the person does not realize there is a test AND
>>>
> 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
On Fri, 2 May 2025 06:14:19 GMT, Emanuel Peter 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 six additional commits since
>>
On Tue, 29 Apr 2025 10:22:22 GMT, Emanuel Peter 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 four additional commits since
>
> 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
On Tue, 29 Apr 2025 10:22:22 GMT, Emanuel Peter wrote:
> Yes, this discussion is down to `requires` vs `applyIf`. This is my argument
> for `applyIf`, quoted from above, I have not yet seen an argument against it:
>
> > If you use @require, then the person does not realize there is a test AND
On Fri, 25 Apr 2025 07:24:15 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
On Mon, 28 Apr 2025 14:13:43 GMT, Emanuel Peter wrote:
> > > > > Just a drive-by comment for now, I may review this later more fully.
> > > > > > I would also prefer if you added the IR restrictions rather than
> > > > > > the JTREG requires.
> > > > > > The benefit is that we can still run the
On Mon, 28 Apr 2025 14:12:02 GMT, Emanuel Peter wrote:
> I suppose in that case you can assert that you NEVER get those nodes, because
> if you have vectors not supported, they will not show up because of that, and
> if you do support vectors, they should be optimized away.
This is expected.
On Mon, 28 Apr 2025 14:10:40 GMT, Emanuel Peter wrote:
>> test/hotspot/jtreg/compiler/vectorapi/VectorMaskCompareNotTest.java line 237:
>>
>>> 235: public static void testCompareEQMaskNotByte() {
>>> 236: testCompareMaskNotByte(VectorOperators.EQ);
>>> 237: }
>>
>> Another comme
On Mon, 28 Apr 2025 14:06:49 GMT, Emanuel Peter 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 four additional commits since
>
On Mon, 28 Apr 2025 07:46:14 GMT, erifan wrote:
>> I would also prefer if you added the IR restrictions rather than the JTREG
>> requires.
>> The benefit is that we can still run the tests on all platforms, at least
>> for result verification.
>>
>> Imagine someone adds optimizations to a new
On Mon, 28 Apr 2025 09:51:10 GMT, erifan wrote:
> > > > Just a drive-by comment for now, I may review this later more fully.
> > > > > I would also prefer if you added the IR restrictions rather than the
> > > > > JTREG requires.
> > > > > The benefit is that we can still run the tests on all pl
On Fri, 25 Apr 2025 07:24:15 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
On Mon, 28 Apr 2025 09:17:58 GMT, Emanuel Peter wrote:
> > > Just a drive-by comment for now, I may review this later more fully.
> > > > I would also prefer if you added the IR restrictions rather than the
> > > > JTREG requires.
> > > > The benefit is that we can still run the tests on all pla
On Mon, 28 Apr 2025 07:48:58 GMT, erifan wrote:
> > Just a drive-by comment for now, I may review this later more fully.
> > > I would also prefer if you added the IR restrictions rather than the
> > > JTREG requires.
> > > The benefit is that we can still run the tests on all platforms, at leas
On Mon, 28 Apr 2025 06:45:58 GMT, Emanuel Peter wrote:
>> This is not specifically required on x86, but because this test fails on x86
>> when `-XX:UseAVX=0` is specified. When `-XX:UseAVX=0` is specified, the
>> sub-graph is like this:
>> `(XorV (VectorMaskCmp (LoadVector ...)) (Replicate -1))
On Mon, 28 Apr 2025 06:47:38 GMT, Emanuel Peter wrote:
> Just a drive-by comment for now, I may review this later more fully.
>
> > I would also prefer if you added the IR restrictions rather than the JTREG
> > requires.
> > The benefit is that we can still run the tests on all platforms, at le
On Sun, 27 Apr 2025 10:09:48 GMT, erifan wrote:
>> I don't see XorVMask implemented on all non-x86 target, like PPC etc..
>
> This is not specifically required on x86, but because this test fails on x86
> when `-XX:UseAVX=0` is specified. When `-XX:UseAVX=0` is specified, the
> sub-graph is lik
On Fri, 25 Apr 2025 07:24:15 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
On Fri, 25 Apr 2025 09:48:59 GMT, Jatin Bhateja wrote:
>> Since this is a platform independent optimization, I tend to use this
>> `@requires` because it's simpler. If we use `applyIfCPUFeatureOr`, we need
>> to add the same restriction before each test. In addition, if a new
>> architecture
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
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"
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
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
>>
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
> 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
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
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
>>
1 - 100 of 105 matches
Mail list logo