[PATCH][AVX512] Handle unsigned v4i32->v4f64 convert

Demikhovsky, Elena elena.demikhovsky at intel.com
Wed Jun 18 22:48:50 PDT 2014


You can commit the patch, of course.
As far as mem-to-reg form, we should use 256 or 128 bit load from AVX2 set, of course.

-  Elena


-----Original Message-----
From: Cameron McInally [mailto:cameron.mcinally at nyu.edu] 
Sent: Wednesday, June 18, 2014 16:24
To: Demikhovsky, Elena
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH][AVX512] Handle unsigned v4i32->v4f64 convert

On Wed, Jun 18, 2014 at 4:56 AM, Demikhovsky, Elena <elena.demikhovsky at intel.com> wrote:
> Usually, when I add such operation in td file, I have to specify that this operation becomes legal in X86ISelLowering.cpp.
> Could you, please, check?
> And what happens on AVX2? Should you say that the replacement is available on AVX-512 only.

Hey Elena,

Sorry, I should have been more explicit...

Yes, this operation is already marked Legal in X86ISelLowering.cpp.
Before my patch, I was receiving a "Cannot Select" error message for this operation.

>     setOperationAction(ISD::UINT_TO_FP,         MVT::v4i32, Legal);

Also, only AVX512 is affected by this change. The
setOperationAction(...) call above is guarded by a
Subtarget->hasAVX512() check. Please note that this is similar to the
pattern that converts an unsigned v4i32->v4f32 just above my change.

To be pedantic, these 128b/256b converts are using a full 512b AVX512 instruction with undefined top bits. This is okay for the reg-reg converts, but it is not okay for the converts that load from memory, since a 512b load could potentially segfault.

I'll go ahead and submit the mod. Please contact me if you have any more concerns.

Thanks again,
Cameron
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the llvm-commits mailing list