[llvm-bugs] [Bug 44111] New: error in backend: Cannot emit physreg copy instruction, after _mm_hadd_pd

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 22 00:24:03 PST 2019


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

            Bug ID: 44111
           Summary: error in backend: Cannot emit physreg copy
                    instruction, after _mm_hadd_pd
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: agner at agner.org
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 22853
  --> https://bugs.llvm.org/attachment.cgi?id=22853&action=edit
Complete code and diagnostics

The attached program containing the intrinsic function for horizontal addition,
_mm_hadd_pd, causes errors in Clang 9.0 (Windows/msys2 version).

Three situations are tested:
1: No bugs with -O1.
2: Wrong result with -O2 (or -O3).
3: The compiler crashes with -O2 when additional printf statements are added to
trace the error.

Disassembly of (2) shows that _mm_hadd_pd is implemented correctly, but the
value is somehow lost in the subsequent code. Both errors disappear when
_mm_hadd_pd is replaced by alternatives.

-- 
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/20191122/e6bd8de2/attachment.html>


More information about the llvm-bugs mailing list