[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


             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

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

/* testcase.c */
typedef long long W __attribute__((__vector_size__(16)));
W foo(W a0) {
  W r0;
  return a0 ^ r0;

# llc -mtriple=i686-freebsd -mattr=-avx
foo:                                    # @foo
# BB#0:                                 # %entry
        subl    $28, %esp
        movups  %xmm0, (%esp)           # 16-byte Folded Spill
        xorps   (%esp), %xmm0           # 16-byte Folded Reload
        addl    $28, %esp

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