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

            Bug ID: 39903
           Summary: Vectorization generates unaligned moves for properly
                    aligned data
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangb...@nondot.org
          Reporter: jamesma...@gmail.com
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk

Created attachment 21198
  --> https://bugs.llvm.org/attachment.cgi?id=21198&action=edit
Code that shows the problem in compiler explorer.

A simple FMA loop operating on data that is aligned with `alignas(64)` is
generating `vmovups` instructions when it could, and should, be generating
`vmovaps`.

Since the nehalem architecture the cost of a `vmovups` relative to `vmovaps` is
not as large as it once was, but it is noticeable and if the data is guaranteed
to be aligned, then `vmovaps` should be the instruction used.

https://www.godbolt.org/z/CCcjYu

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to