[Bug target/67124] [6 Regression] wrong code at -O1, -O2 and -O3 on x86_64-linux-gnu
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 5 11:07:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67124
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*
Component|rtl-optimization |target
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, looks like a target issue. We expand from
c = a[1];
c$2_10 = MEM[(struct S1[2] *)&a + 18B];
b.0_4 = b;
MEM[(struct S1 *)&c + 2B] = c$2_10;
MEM[(struct S1 *)&c + 4B] = 0;
*b.0_4 = c;
if (c$2_10 != 0)
..
_6 = a[0].f3;
if (_6 != 1)
...
and get
movzbl a+18(%rip), %eax
movdqa a+16(%rip), %xmm0
movq %xmm0, %rdx
movq %rax, %rcx
salq $16, %rax
andq $-16711681, %rdx
orq %rax, %rdx
xorl %eax, %eax
testb %cl, %cl
movq %rdx, 8(%rsp)
movq 8(%rsp), %xmm0
pinsrw $2, %eax, %xmm0
movq b(%rip), %rax
movups %xmm0, (%rax) <---
jne .L2
.L3:
jmp .L3
.p2align 4,,10
.p2align 3
.L2:
cmpl $1, a+8(%rip)
jne .L7
but <--- stores the wrong value here. -mno-sse2 fixes the testcase.
More information about the Gcc-bugs
mailing list