[LLVMbugs] [Bug 22024] New: Unnecessary vxorps instructions
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Wed Dec 24 04:04:44 PST 2014
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=22024
            Bug ID: 22024
           Summary: Unnecessary vxorps instructions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: tobias at grosser.es
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified
Created attachment 13590
  --> http://llvm.org/bugs/attachment.cgi?id=13590&action=edit
Test case
For the following code:
void foo(float *A, float *B, long x, long y) {
        *B = y;
    *A = x;
}
gcc -S -o - /tmp/test.c -O3 -mavx
    vcvtsi2ssq    %rcx, %xmm0, %xmm0
    vmovss    %xmm0, (%rsi)
    vcvtsi2ssq    %rdx, %xmm0, %xmm0
    vmovss    %xmm0, (%rdi)
    ret
clang -S -o - /tmp/test.c -O3 -mavx
    vcvtsi2ssq    %rcx, %xmm0, %xmm0
    vmovss    %xmm0, (%rsi)
    vxorps    %xmm0, %xmm0, %xmm0
    vcvtsi2ssq    %rdx, %xmm0, %xmm0
    vmovss    %xmm0, (%rdi)
    retq
The vxorps instruction is unnecessary.
-- 
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/20141224/b40bbb3c/attachment.html>
    
    
More information about the llvm-bugs
mailing list