[LLVMbugs] [Bug 11334] New: 'fpext float2 to double2' not lowered to 'cvtps2pd'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 8 03:23:09 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11334

             Bug #: 11334
           Summary: 'fpext float2 to double2' not lowered to 'cvtps2pd'
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: zvi.rackover at intel.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Consider the following test:
; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=corei7 | FileCheck %s

define <2 x double> @f2d_ext_vec(<2 x float> %v1) nounwind {
entry:
; CHECK: cvtps2pd
  %f1 = fpext <2 x float> %v1 to <2 x double>
  ret <2 x double> %f1
}


The generated code is:
        movdqa  %xmm0, %xmm1
        cvtss2sd        %xmm1, %xmm0
        pshufd  $1, %xmm1, %xmm1        # xmm1 = xmm1[1,0,0,0]
        cvtss2sd        %xmm1, %xmm1
        unpcklpd        %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
        ret


A more optimal code would be:
        cvtps2pd  %xmm0, %xmm0
        ret

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list