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

Cameron McInally cameron.mcinally at nyu.edu
Wed Jun 18 06:23:49 PDT 2014


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



More information about the llvm-commits mailing list