RFR: 8341137: Optimize long vector multiplication using x86 VPMUL[U]DQ instruction

Jatin Bhateja jbhateja at openjdk.org
Wed Nov 6 17:39:34 UTC 2024


On Thu, 17 Oct 2024 21:53:16 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> > > MulVL (VectorCastI2X src1) (VectorCastI2X src2)
> 
> > It looks unsafe to me, since VectorCastI2L sign-extends integer lanes, ...
> 
> Hm, I don't see any problems with it if `VPMULDQ` is used. Sign extension becomes redundant when 64-bit multiplication is strength-reduced to 32-bit one (32x32->64). Am I missing something important here?

@iwanowww , Agree!, I missed noticing that you were talking about **VPMULDQ**, its a  signed doubleword multiplier with quadword saturation, so it should be ok to include suggested pattern.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21244#issuecomment-2421132055


More information about the hotspot-compiler-dev mailing list