re: [vector]Intrinsic for VectorIntrinsics.test 512
Wang Zhuo(Zhuoren)
zhuoren.wz at alibaba-inc.com
Wed Oct 30 16:14:07 UTC 2019
Hi Vladimir/Sandhya,
Could you please help review this patch?
Regards,
Zhuoren
------------------------------------------------------------------
From:Sandler <zhuoren.wz at alibaba-inc.com>
Sent At:2019 Oct. 24 (Thu.) 18:33
To:panama-dev <panama-dev at openjdk.java.net>
Cc:Kingsum Chow <kingsum.kc at alibaba-inc.com>; li sanhong <sanhong.lsh at alibaba-inc.com>; Kevin <kuaiwei.kw at alibaba-inc.com>
Subject:[vector]Intrinsic for VectorIntrinsics.test 512
Hi,
VectorIntrinsics.test with width 512 is not intrinsic on x86. allTrue/anyTrue are affected.
I made a patch to fix this. http://cr.openjdk.java.net/~wzhuo/alltrue/webrev.00/ . Mainly on using x86 instructions to fulfil functions of test.
For allTrue, an instruct vptest16inae is added in x86.ad. Its implementation is quite similiar to 512 width compare part of MacroAssembler::string_compare.
While for anyTrue, since the parameter is set to "this", I did not find a way to also fulfil it with evpcmp. So in my implementation, one 512 vector is to two 256 vector and vptest is used.
public boolean anyTrue() {
return VectorIntrinsics.test(BT_ne, Long512Mask.class, long.class, VLENGTH,
this, this,
(m, __) -> anyTrueHelper(((Long512Mask)m).getBits())); }
Any comment for this?
Regards,
Zhuoren
More information about the panama-dev
mailing list