[vector]Intrinsic for VectorIntrinsics.test 512

Viswanathan, Sandhya sandhya.viswanathan at intel.com
Wed Oct 30 17:45:27 UTC 2019


Hi Zhuoren,

I started looking at the patch yesterday. In some of the ad file instruct rules that you added, I don’t see src2 being used at all.
I will try to get back with review comments today.

Best Regards,
Sandhya


From: Wang Zhuo(Zhuoren) <zhuoren.wz at alibaba-inc.com>
Sent: Wednesday, October 30, 2019 9:14 AM
To: panama-dev <panama-dev at openjdk.java.net>; Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; Vladimir Ivanov <vladimir.x.ivanov at oracle.com>
Subject: re: [vector]Intrinsic for VectorIntrinsics.test 512

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