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

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 29 15:21:55 PST 2019


            Bug ID: 44405
           Summary: [SystemZ]  Backend emits an STRL to an unaligned
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: SystemZ
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22970
  --> https://bugs.llvm.org/attachment.cgi?id=22970&action=edit
reduced testcase

%0 = type <{ i16, i32 }>
@0 = global %0 <{ i16 0, i32 0 }>
define void @main()  {
  store i32 0, i32* getelementptr inbounds (%0, %0* @0, i64 0, i32 1)
  ret void

llc -O3 -mcpu=z10 ./tc_strl_unaligned.ll -o tc.s


        .file   "tc_strl_unaligned.ll"
        .globl  main                    # -- Begin function main
        .p2align        4
        .type   main, at function
main:                                   # @main
# %bb.0:                                # %bb
        lhi     %r0, 0
        strl    %r0, __unnamed_1+2
        br      %r14
        .size   main, .Lfunc_end0-main
                                        # -- End function
        .type   __unnamed_1, at object     # @0
        .section        .bss,"aw", at nobits
        .globl  __unnamed_1
        .p2align        1
        .space  6
        .size   __unnamed_1, 6

This results in "Illegal instruction" if assembled and run. The STRL is not
aligned on a word boundary, which is the problem, right?

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/20191229/7596daf5/attachment-0001.html>

More information about the llvm-bugs mailing list