[llvm-commits] [llvm] r112109 - /llvm/trunk/lib/Target/X86/README-SSE.txt

Eli Friedman eli.friedman at gmail.com
Wed Aug 25 17:56:46 PDT 2010


On Wed, Aug 25, 2010 at 4:31 PM, Chris Lattner <sabre at nondot.org> wrote:
> +SSE has instructions for doing operations on complex numbers, we should pattern
> +match them.  Compiling this:
> +
> +_Complex float f32(_Complex float A, _Complex float B) {
> +  return A+B;
> +}
> +
> +into:
> +
> +_f32:
> +       movdqa  %xmm0, %xmm2
> +       addss   %xmm1, %xmm2
> +       pshufd  $16, %xmm2, %xmm2
> +       pshufd  $1, %xmm1, %xmm1
> +       pshufd  $1, %xmm0, %xmm0
> +       addss   %xmm1, %xmm0
> +       pshufd  $16, %xmm0, %xmm1
> +       movdqa  %xmm2, %xmm0
> +       unpcklps        %xmm1, %xmm0
> +       ret
> +
> +seems silly.

Err, just checking: you're suggesting this should turn into an addps?
This seems like just "we don't have a straight-line vectorization
pass".

-Eli




More information about the llvm-commits mailing list