------- Comment #3 from ubizjak at gmail dot com 2007-09-10 06:32 ------- A 64-bit compiler is required. The problem is, that gcc creates a vector shift constant for vector shift instruction, without checking if optab can take vector argument.
This one will also create wrong operand for x86_64: --cut here-- typedef struct tagPOINT { int x; int y; } POINT; void f (POINT * ptBuf) { int i; for (i = 0; i < 4; i++) { ptBuf[i].x = ((ptBuf[i].x) << 4); ptBuf[i].y = ((ptBuf[i].y) << 4); } } --cut here-- When compiling with 32bit compiler, the shift argument is pushed into memory, but resulting code is still wrong: movdqu (%edx), %xmm0 movdqa .LC0, %xmm1 pslld %xmm1, %xmm0 movdqa %xmm0, (%edx) movdqu 16(%edx), %xmm0 pslld %xmm1, %xmm0 movdqa %xmm0, 16(%edx) where .LC0: .long 4 .long 4 .long 4 .long 4 This problem is similar or the same as PR22480. -- ubizjak at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- BugsThisDependsOn| |22480 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33369