[LLVMbugs] [Bug 21743] machine copy propagation kills ABI-related copies on win64 (atom?)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 14 22:02:02 PDT 2015


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

vtjnash at gmail.com changed:

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

--- Comment #7 from vtjnash at gmail.com ---
Alright, someone found a new test case for this one. (reproducible on llvm3.5
through svn commit r234975+)

The full (runnable) example is captured at
https://gist.github.com/vtjnash/80a2aa73f04e33ec13b2

In particular, we are interested in the following lines:
    callq   *%rax
    vmovapd %xmm0, %xmm6
    vxorps  %xmm0, %xmm0, %xmm0
    vcvtsi2sdq  %rsi, %xmm0, %xmm7
    movl    $339772768, %eax        # imm = 0x14408560
                                        # kill: XMM0<def> XMM6<kill>
    vmovaps %xmm7, %xmm1
    callq   *%rax

Per the win64 calling convention, the argument value got returned in xmm0, and
should be passed to the next function, still in xmm0. However, we see that this
value is getting listed in the 'kill' comment (after getting zero'd by the
vxorps instruction, but before being used by the second function call)

Adding -disable-copyprop replaces the 'kill' comment with the missing `vmovapd
%xmm6, %xmm0` instruction (and makes no other changes to the output)

-- 
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/20150415/dafe13ab/attachment.html>


More information about the llvm-bugs mailing list