[llvm-bugs] [Bug 41601] New: load+zext from a known size source should be wider load+mask

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 25 09:48:04 PDT 2019


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

            Bug ID: 41601
           Summary: load+zext from a known size source should be wider
                    load+mask
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Keywords: code-quality
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: nok.raven at gmail.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

The information about load source should be used to produce load+mask where
currently concatenated loads produced, for example a known size array:

#include <cstring>
#include <cstdint>
#include <cstddef>

std::uint32_t loadu24(std::byte const(&src)[10])
{
  std::uint32_t result = 0;
  std::memcpy(&result, src, 3);
  return result;
}

-- 
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/20190425/1317d910/attachment.html>


More information about the llvm-bugs mailing list