Summary: | [4.4, 4.5, 4.6 Regression] _mm_cvtpu16_ps (and hence _mm_cvtpu8_ps) returns false result | ||
---|---|---|---|
Product: | gcc | Reporter: | release_candidate |
Component: | target | Assignee: | Uroš Bizjak <ubizjak> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cck0011, release_candidate |
Priority: | P3 | Keywords: | ssemmx, wrong-code |
Version: | 4.4.5 | ||
Target Milestone: | 4.4.6 | ||
URL: | http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01090.html | ||
Host: | Target: | x86 | |
Build: | Known to work: | 4.3.5 | |
Known to fail: | 4.4.5, 4.5.1 | Last reconfirmed: | 2010-11-10 22:14:13 |
Attachments: | example code |
Description
release_candidate
2010-11-10 20:39:03 UTC
Ugh... Patch in testing: Index: xmmintrin.h =================================================================== --- xmmintrin.h (revision 166558) +++ xmmintrin.h (working copy) @@ -626,13 +626,13 @@ __sign = __builtin_ia32_pcmpgtw ((__v4hi)0LL, (__v4hi)__A); /* Convert the four words to doublewords. */ + __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, __sign); __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, __sign); - __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, __sign); /* Convert the doublewords to floating point two at a time. */ __zero = (__v4sf) _mm_setzero_ps (); - __ra = __builtin_ia32_cvtpi2ps (__zero, __hisi); - __rb = __builtin_ia32_cvtpi2ps (__ra, __losi); + __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); + __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); return (__m128) __builtin_ia32_movlhps (__ra, __rb); } @@ -645,13 +645,13 @@ __v4sf __zero, __ra, __rb; /* Convert the four words to doublewords. */ + __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, (__v4hi)0LL); __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, (__v4hi)0LL); - __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, (__v4hi)0LL); /* Convert the doublewords to floating point two at a time. */ __zero = (__v4sf) _mm_setzero_ps (); - __ra = __builtin_ia32_cvtpi2ps (__zero, __hisi); - __rb = __builtin_ia32_cvtpi2ps (__ra, __losi); + __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); + __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); return (__m128) __builtin_ia32_movlhps (__ra, __rb); } Author: uros Date: Wed Nov 10 23:00:01 2010 New Revision: 166569 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166569 Log: PR middle-end/46419 * config/i386/xmmintrin.h (_mm_cvtpi16_ps): Swap __hisi and __losi. (_mm_cvtpu16_ps): Ditto. testsuite/ChangeLog: PR target/46419 * gcc-target/i386/pr46419.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/pr46419.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/xmmintrin.h trunk/gcc/testsuite/ChangeLog Author: uros Date: Wed Nov 10 23:26:49 2010 New Revision: 166571 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166571 Log: PR middle-end/46419 * config/i386/xmmintrin.h (_mm_cvtpi16_ps): Swap __hisi and __losi. (_mm_cvtpu16_ps): Ditto. testsuite/ChangeLog: PR target/46419 * gcc-target/i386/pr46419.c: New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/pr46419.c - copied unchanged from r166569, trunk/gcc/testsuite/gcc.target/i386/pr46419.c Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/config/i386/xmmintrin.h branches/gcc-4_5-branch/gcc/testsuite/ChangeLog Author: uros Date: Wed Nov 10 23:28:03 2010 New Revision: 166572 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166572 Log: PR middle-end/46419 * config/i386/xmmintrin.h (_mm_cvtpi16_ps): Swap __hisi and __losi. (_mm_cvtpu16_ps): Ditto. testsuite/ChangeLog: PR target/46419 * gcc-target/i386/pr46419.c: New test. Added: branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr46419.c - copied unchanged from r166569, trunk/gcc/testsuite/gcc.target/i386/pr46419.c Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/config/i386/xmmintrin.h branches/gcc-4_4-branch/gcc/testsuite/ChangeLog Fixed. |