On Donnerstag, 10. Januar 2019 11:39:56 CET Jakub Jelinek wrote:
> On Thu, Jan 10, 2019 at 10:46:14AM +0100, Dr. Matthias Kretz wrote:
> > _mm_fixupimm_ps(_mm_getexp_ps(x), x, _mm_set1_epi32(0x00550433), 0x00);
> 
> I guess you could use
> _mm_mask_fixupimm_ps(_mm_getexp_ps(x), -1, x, _mm_set1_epi32(0x00550433),
> 0x00); because that one does allow you to specify the dest operand.

Thanks. Actually _mm_getexp_ps produces the right answer already by itself. I 
only meant to demonstrate the fixupimm usage (e.g. if you calculate a trig 
function and then fix up for Annex F requirements).

BTW, your idea does not work because GCC recognizes the full writemask and 
simply produces the same as `_mm_fixupimm_ps(x, _mm_set1_epi32(0x00550433), 
0x00)`. See here: https://godbolt.org/z/-5Ql0f

> But I agree it is just weird, the non-masked intrinsics don't take into
> account the 0b0000 cases anymore.

To be precise, they still do, but they produce garbage (e.g. https://
godbolt.org/z/f6u-GI).

-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                                https://kretzfamily.de
 GSI Helmholtzzentrum für Schwerionenforschung             https://gsi.de
 SIMD easy and portable                     https://github.com/VcDevel/Vc
──────────────────────────────────────────────────────────────────────────

Reply via email to