[LLVMbugs] [Bug 14646] New: Spilled XMM is assumed wrongly to be aligned
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 18 23:08:28 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14646
Bug #: 14646
Summary: Spilled XMM is assumed wrongly to be aligned
Product: libraries
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: geek4civic at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
With XMM, loading m in INSTrm should be 16-byte aligned.
xorps (%esp), %xmm0 # 16-byte Folded Reload
But This function does not have realignment in prologue. (%esp) might not be
16-aligned.
It causes miscompilation with i686-cygwin vectorizer.
* Reproducible for i686-freebsd (also possible for netbsd, cygming and win32)
* It's leaf function. This issue could be suppressed if frame pointer were
generated.
/* testcase.c */
typedef long long W __attribute__((__vector_size__(16)));
W foo(W a0) {
W r0;
asm
volatile("nop":"=x"(r0)::"%xmm1","%xmm2","%xmm3","xmm4","%xmm5","%xmm6","%xmm7");
return a0 ^ r0;
}
# llc -mtriple=i686-freebsd -mattr=-avx
foo: # @foo
# BB#0: # %entry
subl $28, %esp
movups %xmm0, (%esp) # 16-byte Folded Spill
#APP
nop
#NO_APP
xorps (%esp), %xmm0 # 16-byte Folded Reload
addl $28, %esp
ret
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list