[llvm-bugs] [Bug 42361] New: Illegal aligned store for odd-sized byval argument

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 22 03:44:04 PDT 2019


            Bug ID: 42361
           Summary: Illegal aligned store for odd-sized byval argument
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: nikita.ppv at gmail.com
                CC: llvm-bugs at lists.llvm.org

%struct = type { [31 x i8] }

declare void @foo(%struct* align 16 byval) nounwind

define void @test1(%struct* nocapture %x) nounwind {
  call void @foo(%struct* align 16 byval %x)
  ret void

Using -mcpu=haswell gives:

        subq    $40, %rsp
        vmovups 15(%rdi), %xmm0
        vmovaps %xmm0, 15(%rsp)
        vmovaps (%rdi), %xmm0
        vmovaps %xmm0, (%rsp)
        callq   foo
        addq    $40, %rsp

The first vmovaps should be a vmovups.

The problem is that alignment is not correctly computed for MachinePointerInfo
with unknown base value. I have an old patch for this lying around at

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190622/d3ff5f72/attachment-0001.html>

More information about the llvm-bugs mailing list