[LLVMbugs] [Bug 15141] New: X86: Inefficient lowering of variable shl

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 1 16:38:40 PST 2013


             Bug #: 15141
           Summary: X86: Inefficient lowering of variable shl
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nrotem at apple.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The code below is lowered to the following sequence.

 23 define <4 x i32> @f22oo(<4 x i32> %in) {
 24 entry:
 25   %T = shl <4 x i32> %in, <i32 0, i32 1, i32 2, i32 4>
 26   ret <4 x i32> %T
 27 }

_f22oo:                                 ## @f22oo
## BB#0:                                ## %entry
    vmovdqa    LCPI2_0(%rip), %xmm1
    vpslld    $23, %xmm1, %xmm1
    vpaddd    LCPI2_1(%rip), %xmm1, %xmm1
    vcvttps2dq    %xmm1, %xmm1
    vpmulld    %xmm0, %xmm1, %xmm0

We could convert this code into "mul <1 , 2, 4, 8>".

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