This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__m64 and aliasing


Hi,
bugreport 6783 seems to show alliasing problem in:

unsigned char a[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
unsigned char b[8] = { 10, 20, 30, 40, 50, 60, 70, 80 };
unsigned char c[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
__m64 m0, m1, m2;
int i;

m0 = *(__m64 *) a;
m1 = *(__m64 *) b;
m2 = _mm_adds_pu8 (m0, m1);

GCC appears to assume that the copy from a to m0 does not alias with the
array so the initialization code is scheduled afterwards.
Is the testcase buggy or we need to fix the aliasing problem?

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]