[llvm-bugs] [Bug 44405] [SystemZ] Backend emits an STRL to an unaligned address

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 30 09:36:19 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44405

Jonas Paulsson <paulsson at linux.vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from Jonas Paulsson <paulsson at linux.vnet.ibm.com> ---
(In reply to Eli Friedman from comment #1)
> You're performing a store with align 4 to an unaligned variable.
> 
> (Implicit alignment in IR is confusing, useless historical artifact; we
> should get rid of it, but I haven't had time.)

I am not sure I follow your reasoning:

- This is not affected by adding explicit alignments on the variable and the
store.

- Since this is the second element of the struct, lying after an i16, it will
never be guaranteed to be aligned at 4 bytes.

- The STRL instruction demands a 4 byte alignment. Therefore, I think the
backend should emit an MVHI instead, which does not have this requirement (if
the first element is changed to be an i8, the MVHI is produced).

-- 
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/20191230/dc78aa2f/attachment.html>


More information about the llvm-bugs mailing list