This is an archive of the discontinued LLVM Phabricator instance.

[X86] Fix bug that mm_mask_cvtsepi64_epi32 generates result without zero the upper 64bit
ClosedPublic

Authored by LiuChen3 on Feb 13 2020, 5:51 AM.

Details

Summary

For example:

int main(void)
{
  char  array1[16];
  memset(array1,0x01,16);
  char array2[16];
  memset(array2,0xff, 16);
  __m128i a1 = *(__m128i *)array1;
  __m128i a2 = *(__m128i *)array2;
 __m128i result =  _mm_mask_cvtsepi64_epi32 (a1, 0x02, a2);
 return 0;
}

The result is 0x0101010101010101FFFFFFFF01010101, which should be 0x0000000000000000FFFFFFFF01010101.

Diff Detail

Event Timeline

LiuChen3 created this revision.Feb 13 2020, 5:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2020, 5:51 AM
LiuChen3 retitled this revision from [X86] Fixx bug that mm_mask_cvtsepi64_epi32 generates result without zero the upper 64bit to [X86] Fix bug that mm_mask_cvtsepi64_epi32 generates result without zero the upper 64bit.Feb 13 2020, 5:52 AM
LiuChen3 edited the summary of this revision. (Show Details)Feb 13 2020, 7:14 AM
pengfei accepted this revision.Feb 13 2020, 7:29 AM

LGTM.

This revision is now accepted and ready to land.Feb 13 2020, 7:29 AM
craig.topper accepted this revision.Feb 13 2020, 2:38 PM

LGTM to be me as well.